From 338e965b2622eecf1a4e7f72d9fc66a25f2947c8 Mon Sep 17 00:00:00 2001 From: Eddie Sholl Date: Sun, 26 Oct 2025 14:20:35 +1100 Subject: [PATCH 1/8] Scripts to automate the client generation --- examples/python-api-client/generate.sh | 15 ++ .../python-api-client/resources/run_test.sh | 25 +++ .../resources/setup_local.sh | 51 +++++ .../python-api-client/resources/test_api.py | 208 ++++++++++++++++++ 4 files changed, 299 insertions(+) create mode 100755 examples/python-api-client/generate.sh create mode 100755 examples/python-api-client/resources/run_test.sh create mode 100755 examples/python-api-client/resources/setup_local.sh create mode 100755 examples/python-api-client/resources/test_api.py diff --git a/examples/python-api-client/generate.sh b/examples/python-api-client/generate.sh new file mode 100755 index 00000000..a8364dc5 --- /dev/null +++ b/examples/python-api-client/generate.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -e +API_CLIENT_DIR=api-client3 +API_VERSION=3.0.0 +rm -rf $API_CLIENT_DIR + +npm -g install @openapitools/openapi-generator-cli +openapi-generator-cli generate \ + -i https://d2awla29kxgk7i.cloudfront.net/api/$API_VERSION/openapi.json \ + -g python \ + -o $API_CLIENT_DIR +cp resources/* $API_CLIENT_DIR/ +cd $API_CLIENT_DIR +./setup_local.sh +./run_test.sh \ No newline at end of file diff --git a/examples/python-api-client/resources/run_test.sh b/examples/python-api-client/resources/run_test.sh new file mode 100755 index 00000000..c75860b2 --- /dev/null +++ b/examples/python-api-client/resources/run_test.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Quick run script for testing the API client +# This script activates the virtual environment and runs the test + +set -e + +# Check if virtual environment exists +if [ ! -d "venv" ]; then + echo "Virtual environment not found. Please run ./setup_local.sh first" + exit 1 +fi + +# Activate virtual environment +echo "Activating virtual environment..." +source venv/bin/activate + +# Run the test script +echo "Running API test script..." +python test_api.py + +echo "" +echo "Test complete! Virtual environment is still active." +echo "To deactivate: deactivate" + diff --git a/examples/python-api-client/resources/setup_local.sh b/examples/python-api-client/resources/setup_local.sh new file mode 100755 index 00000000..17f898b0 --- /dev/null +++ b/examples/python-api-client/resources/setup_local.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# Setup script for local development and testing of the API client +# This script creates a virtual environment and installs the client locally + +set -e + +echo "Setting up Python API client for local development..." + +# Check if Python 3.9+ is available +python_version=$(python3 --version 2>&1 | grep -o '[0-9]\+\.[0-9]\+' | head -1) +required_version="3.9" + +if [ "$(printf '%s\n' "$required_version" "$python_version" | sort -V | head -n1)" != "$required_version" ]; then + echo "Error: Python 3.9+ is required, but found Python $python_version" + echo "Please install Python 3.9 or later" + exit 1 +fi + +# Create virtual environment if it doesn't exist +if [ ! -d "venv" ]; then + echo "Creating virtual environment..." + python3 -m venv venv +else + echo "Virtual environment already exists" +fi + +# Activate virtual environment +echo "Activating virtual environment..." +source venv/bin/activate + +# Upgrade pip +echo "Upgrading pip..." +pip install --upgrade pip + +# Install the client in development mode +echo "Installing API client in development mode..." +pip install -e . + +# Install additional dependencies for testing +echo "Installing additional dependencies..." +pip install pytest + +echo "" +echo "Setup complete! To use the API client:" +echo "1. Activate the virtual environment: source venv/bin/activate" +echo "2. Run the test script: python test_api.py" +echo "3. Or run tests: pytest" +echo "" +echo "To deactivate the virtual environment when done: deactivate" + diff --git a/examples/python-api-client/resources/test_api.py b/examples/python-api-client/resources/test_api.py new file mode 100755 index 00000000..dfaa3836 --- /dev/null +++ b/examples/python-api-client/resources/test_api.py @@ -0,0 +1,208 @@ +#!/usr/bin/env python3 +""" +Test script for the AIA Calculator API client +This script demonstrates how to use the generated API client locally +""" + +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +def create_valid_aquaculture_input(): + """Create a valid aquaculture input using from_dict methods""" + + # Create sample data for a salmon farming operation + enterprise_data = { + "id": "salmon_farm_001", + "state": "tas", # Tasmania + "productionSystem": "Offshore Caged Aquaculture", + "totalHarvestKg": 50000, # 50 tonnes + "refrigerants": [ + { + "refrigerant": "R-134a", + "chargeSize": 2.5 + } + ], + "bait": [ + { + "type": "High Animal Protein Formulated Feed", + "purchasedTonnes": 75.0, + "additionalIngredients": 0.1, + "emissionsIntensity": 2.5 + } + ], + "customBait": [], # Empty list + "inboundFreight": [], # Empty list + "outboundFreight": [], # Empty list + "totalCommercialFlightsKm": 0, + "electricityRenewable": 0.3, # 30% renewable + "electricityUse": 15000, # 15 MWh + "electricitySource": "State Grid", + "fuel": { + "transportFuel": [ + { + "type": "diesel", + "amountLitres": 500 + } + ], + "stationaryFuel": [ + { + "type": "diesel", + "amountLitres": 200 + } + ], + "naturalGas": 0 + }, + "fluidWaste": [], # Empty list + "solidWaste": { + "sentOffsiteTonnes": 5.0, + "onsiteCompostingTonnes": 2.0 + }, + "carbonOffsets": 10.0 # 10 tonnes CO2 offset + } + + # Create the enterprise input using from_dict + enterprise = openapi_client.AquacultureEnterpriseInput.from_dict(enterprise_data) + + # Create the main aquaculture input + aquaculture_data = { + "enterprises": [enterprise_data] # Pass the dict directly + } + + aquaculture_input = openapi_client.AquacultureInput.from_dict(aquaculture_data) + + return aquaculture_input + +def test_aquaculture_api(): + """Test the aquaculture API endpoint with valid input""" + + # Defining the host is optional and defaults to https://emissionscalculator-mtls.production.aiaapi.com/calculator/2.0.0 + # See configuration.py for a list of all supported configuration parameters. + configuration = openapi_client.Configuration( + host="https://emissionscalculator-mtls.staging.aiaapi.com/calculator/2.0.0", + cert_file="./cert.pem", + key_file="./key.pem" + ) + + # Create a valid aquaculture input + aquaculture_input = create_valid_aquaculture_input() + + print("Created aquaculture input:") + print("=" * 50) + pprint(aquaculture_input.to_dict()) + print("=" * 50) + + # Enter a context with an instance of the API client + with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + + try: + # Perform Aquaculture calculation + print("Calling aquaculture API...") + api_response = api_instance.post_aquaculture(aquaculture_input) + print("The response of GAFApi->post_aquaculture:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling GAFApi->post_aquaculture: %s\n" % e) + print("This is expected if you don't have proper authentication configured") + +def create_valid_beef_input(): + """Create a valid beef input using from_dict methods""" + + # Create sample data for a beef cattle operation + beef_data = { + "enterprises": [ + { + "id": "beef_cattle_001", + "state": "qld", # Queensland + "productionSystem": "Grass-fed", + "totalHarvestKg": 300000, # 300 tonnes + "refrigerants": [ + { + "refrigerant": "R-134a", + "chargeSize": 1.0 + } + ], + "bait": [], # Empty for beef + "customBait": [], + "inboundFreight": [], + "outboundFreight": [], + "totalCommercialFlightsKm": 0, + "electricityRenewable": 0.2, # 20% renewable + "electricityUse": 5000, # 5 MWh + "electricitySource": "State Grid", + "fuel": { + "transportFuel": [ + { + "type": "diesel", + "amountLitres": 1000 + } + ], + "stationaryFuel": [ + { + "type": "diesel", + "amountLitres": 500 + } + ], + "naturalGas": 0 + }, + "fluidWaste": [], + "solidWaste": { + "sentOffsiteTonnes": 10.0, + "onsiteCompostingTonnes": 5.0 + }, + "carbonOffsets": 5.0 + } + ] + } + + beef_input = openapi_client.BeefInput.from_dict(beef_data) + return beef_input + +def test_beef_api(): + """Test the beef API endpoint with valid input""" + + configuration = openapi_client.Configuration( + host="https://emissionscalculator-mtls.production.aiaapi.com/calculator/2.0.0" + ) + + # Create a valid beef input + beef_input = create_valid_beef_input() + + print("Created beef input:") + print("=" * 50) + pprint(beef_input.to_dict()) + print("=" * 50) + + with openapi_client.ApiClient(configuration) as api_client: + api_instance = openapi_client.GAFApi(api_client) + + try: + print("Calling beef API...") + api_response = api_instance.post_beef(beef_input) + print("The response of GAFApi->post_beef:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling GAFApi->post_beef: %s\n" % e) + print("This is expected if you don't have proper authentication configured") + +def main(): + """Main function to run API tests""" + print("Testing AIA Calculator API Client") + print("=" * 40) + + # Test aquaculture endpoint + test_aquaculture_api() + print("\n" + "=" * 40) + + # Test beef endpoint + # test_beef_api() + # print("\n" + "=" * 40) + + print("API testing complete!") + print("\nNote: Authentication errors are expected if you haven't configured") + print("proper credentials for the production API endpoint.") + +if __name__ == "__main__": + main() From a312f562eac123a049dd275636c70995376f0bfa Mon Sep 17 00:00:00 2001 From: Eddie Sholl Date: Sun, 26 Oct 2025 19:46:08 +1100 Subject: [PATCH 2/8] Resources for generating a php client --- examples/php-api-client/resources/example.php | 36 +++++++++++++++++++ examples/php-api-client/resources/run_test.sh | 1 + .../php-api-client/resources/setup_local.sh | 1 + 3 files changed, 38 insertions(+) create mode 100644 examples/php-api-client/resources/example.php create mode 100755 examples/php-api-client/resources/run_test.sh create mode 100755 examples/php-api-client/resources/setup_local.sh diff --git a/examples/php-api-client/resources/example.php b/examples/php-api-client/resources/example.php new file mode 100644 index 00000000..2bdba403 --- /dev/null +++ b/examples/php-api-client/resources/example.php @@ -0,0 +1,36 @@ + [ + // Add your enterprise data here + // See lib/Model/PostAquacultureRequestEnterprisesInner.php for structure + ] + ]); + + $config = Configuration::getDefaultConfiguration(); + $config->setHost('https://emissionscalculator-mtls.staging.aiaapi.com/calculator/3.0.0'); + + $config->setCertFile(__DIR__ . '/cert.pem'); + $config->setKeyFile(__DIR__ . '/key.pem'); + + // Initialize API + $api = new GAFApi(new Client(), $config); + + // Make the API call + $result = $api->postAquaculture($request); + + // Print the result + print_r($result); + +} catch (Exception $e) { + echo "Error: " . $e->getMessage() . "\n"; +} \ No newline at end of file diff --git a/examples/php-api-client/resources/run_test.sh b/examples/php-api-client/resources/run_test.sh new file mode 100755 index 00000000..cb1cecc6 --- /dev/null +++ b/examples/php-api-client/resources/run_test.sh @@ -0,0 +1 @@ +php ./example.php \ No newline at end of file diff --git a/examples/php-api-client/resources/setup_local.sh b/examples/php-api-client/resources/setup_local.sh new file mode 100755 index 00000000..03105477 --- /dev/null +++ b/examples/php-api-client/resources/setup_local.sh @@ -0,0 +1 @@ +composer install \ No newline at end of file From 82b8b19583ecfb0de3387ddc75ebcdd38bfe4c19 Mon Sep 17 00:00:00 2001 From: Eddie Sholl Date: Sun, 26 Oct 2025 19:49:53 +1100 Subject: [PATCH 3/8] Tidy up generate scripts --- examples/php-api-client/generate.sh | 17 +++++++++++++++++ examples/python-api-client/generate.sh | 4 +++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 examples/php-api-client/generate.sh diff --git a/examples/php-api-client/generate.sh b/examples/php-api-client/generate.sh new file mode 100755 index 00000000..50563a2b --- /dev/null +++ b/examples/php-api-client/generate.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -e +API_CLIENT_DIR=api-client +API_VERSION=3.0.0 +rm -rf $API_CLIENT_DIR + +npm -g install @openapitools/openapi-generator-cli +openapi-generator-cli generate \ + -i https://d2awla29kxgk7i.cloudfront.net/api/$API_VERSION/openapi.json \ + -g python \ + -o $API_CLIENT_DIR + +cp resources/* $API_CLIENT_DIR/ + +cd $API_CLIENT_DIR +./setup_local.sh +./run_test.sh \ No newline at end of file diff --git a/examples/python-api-client/generate.sh b/examples/python-api-client/generate.sh index a8364dc5..50563a2b 100755 --- a/examples/python-api-client/generate.sh +++ b/examples/python-api-client/generate.sh @@ -1,6 +1,6 @@ #!/bin/bash set -e -API_CLIENT_DIR=api-client3 +API_CLIENT_DIR=api-client API_VERSION=3.0.0 rm -rf $API_CLIENT_DIR @@ -9,7 +9,9 @@ openapi-generator-cli generate \ -i https://d2awla29kxgk7i.cloudfront.net/api/$API_VERSION/openapi.json \ -g python \ -o $API_CLIENT_DIR + cp resources/* $API_CLIENT_DIR/ + cd $API_CLIENT_DIR ./setup_local.sh ./run_test.sh \ No newline at end of file From d5596f1ebd17e0eb1f44e2a77a5d8a935c37c661 Mon Sep 17 00:00:00 2001 From: Eddie Sholl Date: Mon, 27 Oct 2025 13:13:48 +1100 Subject: [PATCH 4/8] Generated api client for python --- .../api-client/.github/workflows/python.yml | 34 + .../python-api-client/api-client/.gitignore | 66 + .../api-client/.gitlab-ci.yml | 31 + .../api-client/.openapi-generator-ignore | 23 + .../api-client/.openapi-generator/FILES | 899 +++ .../api-client/.openapi-generator/VERSION | 1 + .../python-api-client/api-client/.travis.yml | 17 + .../python-api-client/api-client/README.md | 416 ++ .../api-client/docs/GAFApi.md | 1428 +++++ .../docs/PostAquaculture200Response.md | 37 + ...uaculture200ResponseCarbonSequestration.md | 31 + .../PostAquaculture200ResponseIntensities.md | 31 + ...Aquaculture200ResponseIntermediateInner.md | 36 + ...nseIntermediateInnerCarbonSequestration.md | 30 + .../docs/PostAquaculture200ResponseNet.md | 30 + ...tAquaculture200ResponsePurchasedOffsets.md | 30 + .../docs/PostAquaculture200ResponseScope1.md | 40 + .../docs/PostAquaculture200ResponseScope2.md | 31 + .../docs/PostAquaculture200ResponseScope3.md | 37 + .../api-client/docs/PostAquacultureRequest.md | 30 + .../PostAquacultureRequestEnterprisesInner.md | 46 + ...cultureRequestEnterprisesInnerBaitInner.md | 32 + ...eRequestEnterprisesInnerCustomBaitInner.md | 30 + ...eRequestEnterprisesInnerFluidWasteInner.md | 33 + ...tAquacultureRequestEnterprisesInnerFuel.md | 32 + ...EnterprisesInnerFuelStationaryFuelInner.md | 30 + ...tEnterprisesInnerFuelTransportFuelInner.md | 30 + ...uestEnterprisesInnerInboundFreightInner.md | 30 + ...equestEnterprisesInnerRefrigerantsInner.md | 30 + ...ultureRequestEnterprisesInnerSolidWaste.md | 31 + .../api-client/docs/PostBeef200Response.md | 36 + .../PostBeef200ResponseIntermediateInner.md | 36 + ...200ResponseIntermediateInnerIntensities.md | 31 + .../api-client/docs/PostBeef200ResponseNet.md | 30 + .../docs/PostBeef200ResponseScope1.md | 46 + .../docs/PostBeef200ResponseScope3.md | 38 + .../api-client/docs/PostBeefRequest.md | 35 + .../docs/PostBeefRequestBeefInner.md | 46 + .../docs/PostBeefRequestBeefInnerClasses.md | 45 + ...PostBeefRequestBeefInnerClassesBullsGt1.md | 39 + ...efRequestBeefInnerClassesBullsGt1Autumn.md | 33 + ...tBeefInnerClassesBullsGt1PurchasesInner.md | 32 + ...efRequestBeefInnerClassesBullsGt1Traded.md | 39 + .../PostBeefRequestBeefInnerClassesCowsGt2.md | 39 + ...eefRequestBeefInnerClassesCowsGt2Traded.md | 39 + ...tBeefRequestBeefInnerClassesHeifers1To2.md | 39 + ...equestBeefInnerClassesHeifers1To2Traded.md | 39 + ...stBeefRequestBeefInnerClassesHeifersGt2.md | 39 + ...RequestBeefInnerClassesHeifersGt2Traded.md | 39 + ...stBeefRequestBeefInnerClassesHeifersLt1.md | 39 + ...RequestBeefInnerClassesHeifersLt1Traded.md | 39 + ...stBeefRequestBeefInnerClassesSteers1To2.md | 39 + ...RequestBeefInnerClassesSteers1To2Traded.md | 39 + ...ostBeefRequestBeefInnerClassesSteersGt2.md | 39 + ...fRequestBeefInnerClassesSteersGt2Traded.md | 39 + ...ostBeefRequestBeefInnerClassesSteersLt1.md | 39 + ...fRequestBeefInnerClassesSteersLt1Traded.md | 39 + .../PostBeefRequestBeefInnerCowsCalving.md | 33 + .../PostBeefRequestBeefInnerFertiliser.md | 38 + ...eefInnerFertiliserOtherFertilisersInner.md | 32 + ...fRequestBeefInnerMineralSupplementation.md | 35 + .../docs/PostBeefRequestBurningInner.md | 31 + .../PostBeefRequestBurningInnerBurning.md | 36 + .../docs/PostBeefRequestVegetationInner.md | 32 + ...ostBeefRequestVegetationInnerVegetation.md | 34 + .../api-client/docs/PostBuffalo200Response.md | 36 + .../docs/PostBuffalo200ResponseIntensities.md | 31 + ...PostBuffalo200ResponseIntermediateInner.md | 36 + .../docs/PostBuffalo200ResponseNet.md | 30 + .../docs/PostBuffalo200ResponseScope1.md | 44 + .../docs/PostBuffalo200ResponseScope3.md | 37 + .../api-client/docs/PostBuffaloRequest.md | 33 + .../docs/PostBuffaloRequestBuffalosInner.md | 45 + .../PostBuffaloRequestBuffalosInnerClasses.md | 37 + ...BuffaloRequestBuffalosInnerClassesBulls.md | 36 + ...oRequestBuffalosInnerClassesBullsAutumn.md | 29 + ...BuffalosInnerClassesBullsPurchasesInner.md | 30 + ...BuffaloRequestBuffalosInnerClassesCalfs.md | 36 + ...tBuffaloRequestBuffalosInnerClassesCows.md | 36 + ...uffaloRequestBuffalosInnerClassesSteers.md | 36 + ...loRequestBuffalosInnerClassesTradeBulls.md | 36 + ...loRequestBuffalosInnerClassesTradeCalfs.md | 36 + ...aloRequestBuffalosInnerClassesTradeCows.md | 36 + ...oRequestBuffalosInnerClassesTradeSteers.md | 36 + ...tBuffaloRequestBuffalosInnerCowsCalving.md | 33 + ...faloRequestBuffalosInnerSeasonalCalving.md | 33 + .../docs/PostBuffaloRequestVegetationInner.md | 31 + .../api-client/docs/PostCotton200Response.md | 36 + .../PostCotton200ResponseIntermediateInner.md | 36 + ...200ResponseIntermediateInnerIntensities.md | 43 + .../docs/PostCotton200ResponseNet.md | 31 + .../docs/PostCotton200ResponseScope1.md | 44 + .../docs/PostCotton200ResponseScope3.md | 35 + .../api-client/docs/PostCottonRequest.md | 34 + .../docs/PostCottonRequestCropsInner.md | 55 + .../docs/PostCottonRequestVegetationInner.md | 30 + .../api-client/docs/PostDairy200Response.md | 36 + .../docs/PostDairy200ResponseIntensities.md | 30 + .../PostDairy200ResponseIntermediateInner.md | 36 + .../docs/PostDairy200ResponseNet.md | 29 + .../docs/PostDairy200ResponseScope1.md | 49 + .../docs/PostDairy200ResponseScope3.md | 36 + .../api-client/docs/PostDairyRequest.md | 34 + .../docs/PostDairyRequestDairyInner.md | 50 + .../docs/PostDairyRequestDairyInnerAreas.md | 33 + .../docs/PostDairyRequestDairyInnerClasses.md | 34 + ...ryRequestDairyInnerClassesDairyBullsGt1.md | 33 + ...ryRequestDairyInnerClassesDairyBullsLt1.md | 33 + ...DairyRequestDairyInnerClassesHeifersGt1.md | 33 + ...DairyRequestDairyInnerClassesHeifersLt1.md | 33 + ...airyRequestDairyInnerClassesMilkingCows.md | 33 + ...questDairyInnerClassesMilkingCowsAutumn.md | 34 + ...stDairyInnerManureManagementMilkingCows.md | 34 + ...airyRequestDairyInnerSeasonalFertiliser.md | 33 + ...questDairyInnerSeasonalFertiliserAutumn.md | 33 + .../docs/PostDairyRequestVegetationInner.md | 31 + .../api-client/docs/PostDeer200Response.md | 36 + .../docs/PostDeer200ResponseIntensities.md | 31 + .../PostDeer200ResponseIntermediateInner.md | 36 + .../api-client/docs/PostDeer200ResponseNet.md | 30 + .../api-client/docs/PostDeerRequest.md | 33 + .../docs/PostDeerRequestDeersInner.md | 45 + .../docs/PostDeerRequestDeersInnerClasses.md | 37 + ...eerRequestDeersInnerClassesBreedingDoes.md | 36 + .../PostDeerRequestDeersInnerClassesBucks.md | 36 + .../PostDeerRequestDeersInnerClassesFawn.md | 36 + ...stDeerRequestDeersInnerClassesOtherDoes.md | 36 + ...tDeerRequestDeersInnerClassesTradeBucks.md | 36 + ...stDeerRequestDeersInnerClassesTradeDoes.md | 36 + ...stDeerRequestDeersInnerClassesTradeFawn.md | 36 + ...rRequestDeersInnerClassesTradeOtherDoes.md | 36 + .../PostDeerRequestDeersInnerDoesFawning.md | 33 + ...ostDeerRequestDeersInnerSeasonalFawning.md | 33 + .../docs/PostDeerRequestVegetationInner.md | 31 + .../api-client/docs/PostFeedlot200Response.md | 36 + ...PostFeedlot200ResponseIntermediateInner.md | 35 + ...200ResponseIntermediateInnerIntensities.md | 31 + ...tFeedlot200ResponseIntermediateInnerNet.md | 30 + .../docs/PostFeedlot200ResponseScope1.md | 47 + .../docs/PostFeedlot200ResponseScope3.md | 37 + .../api-client/docs/PostFeedlotRequest.md | 32 + .../docs/PostFeedlotRequestFeedlotsInner.md | 50 + ...tFeedlotRequestFeedlotsInnerGroupsInner.md | 29 + ...questFeedlotsInnerGroupsInnerStaysInner.md | 38 + ...ostFeedlotRequestFeedlotsInnerPurchases.md | 45 + ...uestFeedlotsInnerPurchasesBullsGt1Inner.md | 31 + .../PostFeedlotRequestFeedlotsInnerSales.md | 45 + ...tRequestFeedlotsInnerSalesBullsGt1Inner.md | 30 + .../docs/PostFeedlotRequestVegetationInner.md | 30 + .../api-client/docs/PostGoat200Response.md | 36 + .../docs/PostGoat200ResponseIntensities.md | 34 + .../PostGoat200ResponseIntermediateInner.md | 36 + .../api-client/docs/PostGoat200ResponseNet.md | 30 + .../api-client/docs/PostGoatRequest.md | 33 + .../docs/PostGoatRequestGoatsInner.md | 44 + .../docs/PostGoatRequestGoatsInnerClasses.md | 42 + ...estGoatsInnerClassesBreedingDoesNannies.md | 41 + ...tGoatRequestGoatsInnerClassesBucksBilly.md | 41 + .../PostGoatRequestGoatsInnerClassesKids.md | 41 + ...tsInnerClassesMaidenBreedingDoesNannies.md | 41 + ...GoatsInnerClassesOtherDoesCulledFemales.md | 41 + ...atsInnerClassesTradeBreedingDoesNannies.md | 41 + ...tGoatRequestGoatsInnerClassesTradeBucks.md | 41 + ...stGoatRequestGoatsInnerClassesTradeDoes.md | 41 + ...stGoatRequestGoatsInnerClassesTradeKids.md | 41 + ...erClassesTradeMaidenBreedingDoesNannies.md | 41 + ...InnerClassesTradeOtherDoesCulledFemales.md | 41 + ...oatRequestGoatsInnerClassesTradeWethers.md | 41 + ...PostGoatRequestGoatsInnerClassesWethers.md | 41 + .../docs/PostGoatRequestVegetationInner.md | 31 + .../api-client/docs/PostGrains200Response.md | 37 + .../PostGrains200ResponseIntermediateInner.md | 36 + ...ediateInnerIntensitiesWithSequestration.md | 31 + .../api-client/docs/PostGrainsRequest.md | 34 + .../docs/PostGrainsRequestCropsInner.md | 50 + .../docs/PostHorticulture200Response.md | 36 + ...orticulture200ResponseIntermediateInner.md | 36 + ...ediateInnerIntensitiesWithSequestration.md | 32 + .../docs/PostHorticulture200ResponseScope1.md | 46 + .../docs/PostHorticultureRequest.md | 34 + .../docs/PostHorticultureRequestCropsInner.md | 51 + ...ltureRequestCropsInnerRefrigerantsInner.md | 30 + .../api-client/docs/PostPork200Response.md | 36 + .../docs/PostPork200ResponseIntensities.md | 31 + .../PostPork200ResponseIntermediateInner.md | 35 + .../api-client/docs/PostPork200ResponseNet.md | 30 + .../docs/PostPork200ResponseScope1.md | 46 + .../docs/PostPork200ResponseScope3.md | 38 + .../api-client/docs/PostPorkRequest.md | 34 + .../docs/PostPorkRequestPorkInner.md | 43 + .../docs/PostPorkRequestPorkInnerClasses.md | 36 + .../PostPorkRequestPorkInnerClassesBoars.md | 39 + .../PostPorkRequestPorkInnerClassesGilts.md | 39 + .../PostPorkRequestPorkInnerClassesGrowers.md | 39 + ...orkRequestPorkInnerClassesSlaughterPigs.md | 39 + .../PostPorkRequestPorkInnerClassesSows.md | 39 + ...stPorkRequestPorkInnerClassesSowsManure.md | 32 + ...RequestPorkInnerClassesSowsManureSpring.md | 33 + .../PostPorkRequestPorkInnerClassesSuckers.md | 39 + .../PostPorkRequestPorkInnerClassesWeaners.md | 39 + ...stPorkRequestPorkInnerFeedProductsInner.md | 33 + ...stPorkInnerFeedProductsInnerIngredients.md | 41 + .../docs/PostPorkRequestVegetationInner.md | 31 + .../api-client/docs/PostPoultry200Response.md | 37 + .../docs/PostPoultry200ResponseIntensities.md | 34 + ...try200ResponseIntermediateBroilersInner.md | 35 + ...nseIntermediateBroilersInnerIntensities.md | 31 + ...ultry200ResponseIntermediateLayersInner.md | 35 + ...ponseIntermediateLayersInnerIntensities.md | 31 + .../docs/PostPoultry200ResponseNet.md | 31 + .../docs/PostPoultry200ResponseScope1.md | 40 + .../docs/PostPoultry200ResponseScope3.md | 36 + .../api-client/docs/PostPoultryRequest.md | 35 + .../docs/PostPoultryRequestBroilersInner.md | 48 + ...tPoultryRequestBroilersInnerGroupsInner.md | 35 + ...equestBroilersInnerGroupsInnerFeedInner.md | 33 + ...ersInnerGroupsInnerFeedInnerIngredients.md | 34 + ...ilersInnerGroupsInnerMeatChickenGrowers.md | 39 + ...roilersInnerMeatChickenGrowersPurchases.md | 31 + ...BroilersInnerMeatChickenLayersPurchases.md | 31 + ...yRequestBroilersInnerMeatOtherPurchases.md | 31 + ...stPoultryRequestBroilersInnerSalesInner.md | 32 + .../docs/PostPoultryRequestLayersInner.md | 52 + .../PostPoultryRequestLayersInnerLayers.md | 33 + ...tPoultryRequestLayersInnerLayersEggSale.md | 31 + ...oultryRequestLayersInnerLayersPurchases.md | 31 + ...ltryRequestLayersInnerMeatChickenLayers.md | 33 + ...uestLayersInnerMeatChickenLayersEggSale.md | 31 + .../docs/PostPoultryRequestVegetationInner.md | 32 + .../docs/PostProcessing200Response.md | 37 + ...stProcessing200ResponseIntensitiesInner.md | 32 + ...tProcessing200ResponseIntermediateInner.md | 35 + .../docs/PostProcessing200ResponseNet.md | 30 + .../docs/PostProcessing200ResponseScope1.md | 41 + .../docs/PostProcessing200ResponseScope3.md | 33 + .../api-client/docs/PostProcessingRequest.md | 31 + .../PostProcessingRequestProductsInner.md | 40 + ...stProcessingRequestProductsInnerProduct.md | 31 + .../api-client/docs/PostRice200Response.md | 36 + .../docs/PostRice200ResponseIntensities.md | 33 + .../PostRice200ResponseIntermediateInner.md | 36 + ...200ResponseIntermediateInnerIntensities.md | 32 + .../docs/PostRice200ResponseScope1.md | 45 + .../api-client/docs/PostRiceRequest.md | 34 + .../docs/PostRiceRequestCropsInner.md | 51 + .../api-client/docs/PostSheep200Response.md | 36 + .../PostSheep200ResponseIntermediateInner.md | 35 + ...200ResponseIntermediateInnerIntensities.md | 34 + .../docs/PostSheep200ResponseNet.md | 30 + .../api-client/docs/PostSheepRequest.md | 34 + .../docs/PostSheepRequestSheepInner.md | 47 + .../docs/PostSheepRequestSheepInnerClasses.md | 44 + .../PostSheepRequestSheepInnerClassesRams.md | 40 + ...SheepRequestSheepInnerClassesRamsAutumn.md | 34 + ...tSheepRequestSheepInnerClassesTradeEwes.md | 41 + ...stSheepInnerClassesTradeLambsAndHoggets.md | 41 + .../PostSheepRequestSheepInnerEwesLambing.md | 33 + ...stSheepRequestSheepInnerSeasonalLambing.md | 33 + .../docs/PostSheepRequestVegetationInner.md | 31 + .../docs/PostSheepbeef200Response.md | 38 + .../PostSheepbeef200ResponseIntensities.md | 37 + .../PostSheepbeef200ResponseIntermediate.md | 31 + ...ostSheepbeef200ResponseIntermediateBeef.md | 35 + ...stSheepbeef200ResponseIntermediateSheep.md | 35 + .../docs/PostSheepbeef200ResponseNet.md | 31 + .../api-client/docs/PostSheepbeefRequest.md | 36 + .../PostSheepbeefRequestVegetationInner.md | 32 + .../api-client/docs/PostSugar200Response.md | 36 + .../PostSugar200ResponseIntermediateInner.md | 36 + ...200ResponseIntermediateInnerIntensities.md | 31 + .../api-client/docs/PostSugarRequest.md | 34 + .../docs/PostSugarRequestCropsInner.md | 50 + .../docs/PostVineyard200Response.md | 36 + ...ostVineyard200ResponseIntermediateInner.md | 36 + ...200ResponseIntermediateInnerIntensities.md | 31 + .../docs/PostVineyard200ResponseNet.md | 31 + .../docs/PostVineyard200ResponseScope1.md | 44 + .../docs/PostVineyard200ResponseScope3.md | 39 + .../api-client/docs/PostVineyardRequest.md | 31 + .../PostVineyardRequestVegetationInner.md | 30 + .../docs/PostVineyardRequestVineyardsInner.md | 53 + .../docs/PostWildcatchfishery200Response.md | 37 + ...tWildcatchfishery200ResponseIntensities.md | 31 + ...atchfishery200ResponseIntermediateInner.md | 36 + .../PostWildcatchfishery200ResponseScope1.md | 40 + .../docs/PostWildcatchfisheryRequest.md | 30 + ...WildcatchfisheryRequestEnterprisesInner.md | 46 + ...fisheryRequestEnterprisesInnerBaitInner.md | 32 + .../docs/PostWildseafisheries200Response.md | 36 + ...eafisheries200ResponseIntermediateInner.md | 37 + ...200ResponseIntermediateInnerIntensities.md | 31 + .../PostWildseafisheries200ResponseScope1.md | 38 + .../PostWildseafisheries200ResponseScope3.md | 33 + .../docs/PostWildseafisheriesRequest.md | 30 + ...WildseafisheriesRequestEnterprisesInner.md | 43 + ...sheriesRequestEnterprisesInnerBaitInner.md | 32 + ...sRequestEnterprisesInnerCustombaitInner.md | 30 + ...riesRequestEnterprisesInnerFlightsInner.md | 30 + ...equestEnterprisesInnerRefrigerantsInner.md | 30 + ...sRequestEnterprisesInnerTransportsInner.md | 31 + .../python-api-client/api-client/git_push.sh | 57 + .../api-client/openapi_client/__init__.py | 630 ++ .../api-client/openapi_client/api/__init__.py | 5 + .../api-client/openapi_client/api/gaf_api.py | 5596 +++++++++++++++++ .../api-client/openapi_client/api_client.py | 802 +++ .../api-client/openapi_client/api_response.py | 21 + .../openapi_client/configuration.py | 577 ++ .../api-client/openapi_client/exceptions.py | 217 + .../openapi_client/models/__init__.py | 308 + .../models/post_aquaculture200_response.py | 151 + ...ulture200_response_carbon_sequestration.py | 103 + ...ost_aquaculture200_response_intensities.py | 105 + ...aculture200_response_intermediate_inner.py | 137 + ...intermediate_inner_carbon_sequestration.py | 101 + .../post_aquaculture200_response_net.py | 101 + ...uaculture200_response_purchased_offsets.py | 101 + .../post_aquaculture200_response_scope1.py | 121 + .../post_aquaculture200_response_scope2.py | 103 + .../post_aquaculture200_response_scope3.py | 115 + .../models/post_aquaculture_request.py | 109 + ...t_aquaculture_request_enterprises_inner.py | 210 + ...re_request_enterprises_inner_bait_inner.py | 115 + ...est_enterprises_inner_custom_bait_inner.py | 103 + ...est_enterprises_inner_fluid_waste_inner.py | 116 + ...aculture_request_enterprises_inner_fuel.py | 121 + ...prises_inner_fuel_stationary_fuel_inner.py | 110 + ...rprises_inner_fuel_transport_fuel_inner.py | 110 + ...enterprises_inner_inbound_freight_inner.py | 110 + ...st_enterprises_inner_refrigerants_inner.py | 110 + ...e_request_enterprises_inner_solid_waste.py | 103 + .../models/post_beef200_response.py | 145 + ...ost_beef200_response_intermediate_inner.py | 133 + ...response_intermediate_inner_intensities.py | 105 + .../models/post_beef200_response_net.py | 103 + .../models/post_beef200_response_scope1.py | 133 + .../models/post_beef200_response_scope3.py | 117 + .../models/post_beef_request.py | 142 + .../models/post_beef_request_beef_inner.py | 159 + .../post_beef_request_beef_inner_classes.py | 195 + ...ef_request_beef_inner_classes_bulls_gt1.py | 150 + ...est_beef_inner_classes_bulls_gt1_autumn.py | 109 + ...inner_classes_bulls_gt1_purchases_inner.py | 112 + ...est_beef_inner_classes_bulls_gt1_traded.py | 150 + ...eef_request_beef_inner_classes_cows_gt2.py | 150 + ...uest_beef_inner_classes_cows_gt2_traded.py | 150 + ...request_beef_inner_classes_heifers1_to2.py | 150 + ..._beef_inner_classes_heifers1_to2_traded.py | 150 + ..._request_beef_inner_classes_heifers_gt2.py | 150 + ...t_beef_inner_classes_heifers_gt2_traded.py | 150 + ..._request_beef_inner_classes_heifers_lt1.py | 150 + ...t_beef_inner_classes_heifers_lt1_traded.py | 150 + ..._request_beef_inner_classes_steers1_to2.py | 150 + ...t_beef_inner_classes_steers1_to2_traded.py | 150 + ...f_request_beef_inner_classes_steers_gt2.py | 150 + ...st_beef_inner_classes_steers_gt2_traded.py | 150 + ...f_request_beef_inner_classes_steers_lt1.py | 150 + ...st_beef_inner_classes_steers_lt1_traded.py | 150 + ...st_beef_request_beef_inner_cows_calving.py | 107 + ...post_beef_request_beef_inner_fertiliser.py | 135 + ...nner_fertiliser_other_fertilisers_inner.py | 112 + ...uest_beef_inner_mineral_supplementation.py | 111 + .../models/post_beef_request_burning_inner.py | 107 + ...post_beef_request_burning_inner_burning.py | 148 + .../post_beef_request_vegetation_inner.py | 109 + ...eef_request_vegetation_inner_vegetation.py | 130 + .../models/post_buffalo200_response.py | 145 + .../post_buffalo200_response_intensities.py | 105 + ..._buffalo200_response_intermediate_inner.py | 137 + .../models/post_buffalo200_response_net.py | 101 + .../models/post_buffalo200_response_scope1.py | 129 + .../models/post_buffalo200_response_scope3.py | 115 + .../models/post_buffalo_request.py | 130 + .../post_buffalo_request_buffalos_inner.py | 157 + ..._buffalo_request_buffalos_inner_classes.py | 147 + ...lo_request_buffalos_inner_classes_bulls.py | 134 + ...est_buffalos_inner_classes_bulls_autumn.py | 101 + ...los_inner_classes_bulls_purchases_inner.py | 103 + ...lo_request_buffalos_inner_classes_calfs.py | 134 + ...alo_request_buffalos_inner_classes_cows.py | 134 + ...o_request_buffalos_inner_classes_steers.py | 134 + ...uest_buffalos_inner_classes_trade_bulls.py | 134 + ...uest_buffalos_inner_classes_trade_calfs.py | 134 + ...quest_buffalos_inner_classes_trade_cows.py | 134 + ...est_buffalos_inner_classes_trade_steers.py | 134 + ...alo_request_buffalos_inner_cows_calving.py | 107 + ...request_buffalos_inner_seasonal_calving.py | 107 + .../post_buffalo_request_vegetation_inner.py | 107 + .../models/post_cotton200_response.py | 149 + ...t_cotton200_response_intermediate_inner.py | 137 + ...response_intermediate_inner_intensities.py | 127 + .../models/post_cotton200_response_net.py | 103 + .../models/post_cotton200_response_scope1.py | 129 + .../models/post_cotton200_response_scope3.py | 111 + .../models/post_cotton_request.py | 133 + .../models/post_cotton_request_crops_inner.py | 170 + .../post_cotton_request_vegetation_inner.py | 107 + .../models/post_dairy200_response.py | 145 + .../post_dairy200_response_intensities.py | 103 + ...st_dairy200_response_intermediate_inner.py | 137 + .../models/post_dairy200_response_net.py | 101 + .../models/post_dairy200_response_scope1.py | 139 + .../models/post_dairy200_response_scope3.py | 113 + .../models/post_dairy_request.py | 139 + .../models/post_dairy_request_dairy_inner.py | 174 + .../post_dairy_request_dairy_inner_areas.py | 107 + .../post_dairy_request_dairy_inner_classes.py | 129 + ...est_dairy_inner_classes_dairy_bulls_gt1.py | 120 + ...est_dairy_inner_classes_dairy_bulls_lt1.py | 120 + ...request_dairy_inner_classes_heifers_gt1.py | 120 + ...request_dairy_inner_classes_heifers_lt1.py | 120 + ...equest_dairy_inner_classes_milking_cows.py | 120 + ...dairy_inner_classes_milking_cows_autumn.py | 111 + ...ry_inner_manure_management_milking_cows.py | 110 + ...request_dairy_inner_seasonal_fertiliser.py | 120 + ..._dairy_inner_seasonal_fertiliser_autumn.py | 107 + .../post_dairy_request_vegetation_inner.py | 107 + .../models/post_deer200_response.py | 145 + .../post_deer200_response_intensities.py | 105 + ...ost_deer200_response_intermediate_inner.py | 137 + .../models/post_deer200_response_net.py | 101 + .../models/post_deer_request.py | 130 + .../models/post_deer_request_deers_inner.py | 157 + .../post_deer_request_deers_inner_classes.py | 147 + ...quest_deers_inner_classes_breeding_does.py | 134 + ..._deer_request_deers_inner_classes_bucks.py | 134 + ...t_deer_request_deers_inner_classes_fawn.py | 134 + ..._request_deers_inner_classes_other_does.py | 134 + ...request_deers_inner_classes_trade_bucks.py | 134 + ..._request_deers_inner_classes_trade_does.py | 134 + ..._request_deers_inner_classes_trade_fawn.py | 134 + ...st_deers_inner_classes_trade_other_does.py | 134 + ...t_deer_request_deers_inner_does_fawning.py | 107 + ...er_request_deers_inner_seasonal_fawning.py | 107 + .../post_deer_request_vegetation_inner.py | 107 + .../models/post_feedlot200_response.py | 145 + ..._feedlot200_response_intermediate_inner.py | 137 + ...response_intermediate_inner_intensities.py | 105 + ...dlot200_response_intermediate_inner_net.py | 101 + .../models/post_feedlot200_response_scope1.py | 135 + .../models/post_feedlot200_response_scope3.py | 115 + .../models/post_feedlot_request.py | 128 + .../post_feedlot_request_feedlots_inner.py | 183 + ...lot_request_feedlots_inner_groups_inner.py | 109 + ...feedlots_inner_groups_inner_stays_inner.py | 117 + ...eedlot_request_feedlots_inner_purchases.py | 244 + ...eedlots_inner_purchases_bulls_gt1_inner.py | 112 + ...st_feedlot_request_feedlots_inner_sales.py | 244 + ...st_feedlots_inner_sales_bulls_gt1_inner.py | 103 + .../post_feedlot_request_vegetation_inner.py | 107 + .../models/post_goat200_response.py | 145 + .../post_goat200_response_intensities.py | 111 + ...ost_goat200_response_intermediate_inner.py | 137 + .../models/post_goat200_response_net.py | 101 + .../models/post_goat_request.py | 130 + .../models/post_goat_request_goats_inner.py | 151 + .../post_goat_request_goats_inner_classes.py | 177 + ...ats_inner_classes_breeding_does_nannies.py | 144 + ...request_goats_inner_classes_bucks_billy.py | 144 + ...t_goat_request_goats_inner_classes_kids.py | 144 + ...er_classes_maiden_breeding_does_nannies.py | 144 + ...inner_classes_other_does_culled_females.py | 144 + ...ner_classes_trade_breeding_does_nannies.py | 144 + ...request_goats_inner_classes_trade_bucks.py | 144 + ..._request_goats_inner_classes_trade_does.py | 144 + ..._request_goats_inner_classes_trade_kids.py | 144 + ...sses_trade_maiden_breeding_does_nannies.py | 144 + ...classes_trade_other_does_culled_females.py | 144 + ...quest_goats_inner_classes_trade_wethers.py | 144 + ...oat_request_goats_inner_classes_wethers.py | 144 + .../post_goat_request_vegetation_inner.py | 107 + .../models/post_grains200_response.py | 151 + ...t_grains200_response_intermediate_inner.py | 137 + ...te_inner_intensities_with_sequestration.py | 105 + .../models/post_grains_request.py | 133 + .../models/post_grains_request_crops_inner.py | 164 + .../models/post_horticulture200_response.py | 149 + ...iculture200_response_intermediate_inner.py | 137 + ...te_inner_intensities_with_sequestration.py | 105 + .../post_horticulture200_response_scope1.py | 133 + .../models/post_horticulture_request.py | 133 + .../post_horticulture_request_crops_inner.py | 160 + ..._request_crops_inner_refrigerants_inner.py | 97 + .../models/post_pork200_response.py | 145 + .../post_pork200_response_intensities.py | 105 + ...ost_pork200_response_intermediate_inner.py | 133 + .../models/post_pork200_response_net.py | 101 + .../models/post_pork200_response_scope1.py | 133 + .../models/post_pork200_response_scope3.py | 117 + .../models/post_pork_request.py | 132 + .../models/post_pork_request_pork_inner.py | 153 + .../post_pork_request_pork_inner_classes.py | 141 + ...t_pork_request_pork_inner_classes_boars.py | 131 + ...t_pork_request_pork_inner_classes_gilts.py | 131 + ...pork_request_pork_inner_classes_growers.py | 131 + ...quest_pork_inner_classes_slaughter_pigs.py | 131 + ...st_pork_request_pork_inner_classes_sows.py | 131 + ..._request_pork_inner_classes_sows_manure.py | 120 + ...t_pork_inner_classes_sows_manure_spring.py | 109 + ...pork_request_pork_inner_classes_suckers.py | 131 + ...pork_request_pork_inner_classes_weaners.py | 131 + ..._request_pork_inner_feed_products_inner.py | 112 + ...k_inner_feed_products_inner_ingredients.py | 124 + .../post_pork_request_vegetation_inner.py | 107 + .../models/post_poultry200_response.py | 155 + .../post_poultry200_response_intensities.py | 111 + ...00_response_intermediate_broilers_inner.py | 137 + ...intermediate_broilers_inner_intensities.py | 105 + ...y200_response_intermediate_layers_inner.py | 137 + ...e_intermediate_layers_inner_intensities.py | 105 + .../models/post_poultry200_response_net.py | 105 + .../models/post_poultry200_response_scope1.py | 121 + .../models/post_poultry200_response_scope3.py | 113 + .../models/post_poultry_request.py | 142 + .../post_poultry_request_broilers_inner.py | 175 + ...try_request_broilers_inner_groups_inner.py | 129 + ..._broilers_inner_groups_inner_feed_inner.py | 111 + ...ner_groups_inner_feed_inner_ingredients.py | 109 + ...inner_groups_inner_meat_chicken_growers.py | 119 + ...rs_inner_meat_chicken_growers_purchases.py | 103 + ...ers_inner_meat_chicken_layers_purchases.py | 103 + ...est_broilers_inner_meat_other_purchases.py | 103 + ...ltry_request_broilers_inner_sales_inner.py | 115 + .../post_poultry_request_layers_inner.py | 187 + ...ost_poultry_request_layers_inner_layers.py | 107 + ...ry_request_layers_inner_layers_egg_sale.py | 103 + ...y_request_layers_inner_layers_purchases.py | 103 + ...equest_layers_inner_meat_chicken_layers.py | 107 + ...yers_inner_meat_chicken_layers_egg_sale.py | 103 + .../post_poultry_request_vegetation_inner.py | 109 + .../models/post_processing200_response.py | 155 + ...rocessing200_response_intensities_inner.py | 114 + ...ocessing200_response_intermediate_inner.py | 137 + .../models/post_processing200_response_net.py | 101 + .../post_processing200_response_scope1.py | 123 + .../post_processing200_response_scope3.py | 107 + .../models/post_processing_request.py | 118 + .../post_processing_request_products_inner.py | 157 + ...ocessing_request_products_inner_product.py | 110 + .../models/post_rice200_response.py | 145 + .../post_rice200_response_intensities.py | 107 + ...ost_rice200_response_intermediate_inner.py | 133 + ...response_intermediate_inner_intensities.py | 107 + .../models/post_rice200_response_scope1.py | 131 + .../models/post_rice_request.py | 133 + .../models/post_rice_request_crops_inner.py | 174 + .../models/post_sheep200_response.py | 145 + ...st_sheep200_response_intermediate_inner.py | 133 + ...response_intermediate_inner_intensities.py | 111 + .../models/post_sheep200_response_net.py | 103 + .../models/post_sheep_request.py | 132 + .../models/post_sheep_request_sheep_inner.py | 165 + .../post_sheep_request_sheep_inner_classes.py | 182 + ..._sheep_request_sheep_inner_classes_rams.py | 144 + ...request_sheep_inner_classes_rams_autumn.py | 111 + ..._request_sheep_inner_classes_trade_ewes.py | 144 + ...p_inner_classes_trade_lambs_and_hoggets.py | 144 + ..._sheep_request_sheep_inner_ewes_lambing.py | 108 + ...ep_request_sheep_inner_seasonal_lambing.py | 108 + .../post_sheep_request_vegetation_inner.py | 107 + .../models/post_sheepbeef200_response.py | 161 + .../post_sheepbeef200_response_intensities.py | 117 + ...post_sheepbeef200_response_intermediate.py | 111 + ...sheepbeef200_response_intermediate_beef.py | 131 + ...heepbeef200_response_intermediate_sheep.py | 131 + .../models/post_sheepbeef200_response_net.py | 105 + .../models/post_sheepbeef_request.py | 152 + ...post_sheepbeef_request_vegetation_inner.py | 109 + .../models/post_sugar200_response.py | 149 + ...st_sugar200_response_intermediate_inner.py | 133 + ...response_intermediate_inner_intensities.py | 105 + .../models/post_sugar_request.py | 133 + .../models/post_sugar_request_crops_inner.py | 157 + .../models/post_vineyard200_response.py | 149 + ...vineyard200_response_intermediate_inner.py | 133 + ...response_intermediate_inner_intensities.py | 105 + .../models/post_vineyard200_response_net.py | 103 + .../post_vineyard200_response_scope1.py | 129 + .../post_vineyard200_response_scope3.py | 119 + .../models/post_vineyard_request.py | 119 + .../post_vineyard_request_vegetation_inner.py | 107 + .../post_vineyard_request_vineyards_inner.py | 195 + .../post_wildcatchfishery200_response.py | 151 + ...ildcatchfishery200_response_intensities.py | 105 + ...hfishery200_response_intermediate_inner.py | 137 + ...ost_wildcatchfishery200_response_scope1.py | 121 + .../models/post_wildcatchfishery_request.py | 109 + ...dcatchfishery_request_enterprises_inner.py | 210 + ...ry_request_enterprises_inner_bait_inner.py | 115 + .../post_wildseafisheries200_response.py | 149 + ...isheries200_response_intermediate_inner.py | 139 + ...response_intermediate_inner_intensities.py | 105 + ...ost_wildseafisheries200_response_scope1.py | 117 + ...ost_wildseafisheries200_response_scope3.py | 107 + .../models/post_wildseafisheries_request.py | 109 + ...dseafisheries_request_enterprises_inner.py | 184 + ...es_request_enterprises_inner_bait_inner.py | 115 + ...uest_enterprises_inner_custombait_inner.py | 103 + ...request_enterprises_inner_flights_inner.py | 103 + ...st_enterprises_inner_refrigerants_inner.py | 110 + ...uest_enterprises_inner_transports_inner.py | 119 + .../api-client/openapi_client/py.typed | 0 .../api-client/openapi_client/rest.py | 259 + .../api-client/pyproject.toml | 95 + .../api-client/requirements.txt | 4 + .../python-api-client/api-client/run_test.sh | 25 + .../python-api-client/api-client/setup.cfg | 2 + .../python-api-client/api-client/setup.py | 51 + .../api-client/setup_local.sh | 51 + .../api-client/test-requirements.txt | 6 + .../api-client/test/__init__.py | 0 .../api-client/test/test_gaf_api.py | 172 + .../test/test_post_aquaculture200_response.py | 103 + ...ulture200_response_carbon_sequestration.py | 59 + ...ost_aquaculture200_response_intensities.py | 57 + ...aculture200_response_intermediate_inner.py | 89 + ...intermediate_inner_carbon_sequestration.py | 53 + .../test_post_aquaculture200_response_net.py | 53 + ...uaculture200_response_purchased_offsets.py | 53 + ...est_post_aquaculture200_response_scope1.py | 73 + ...est_post_aquaculture200_response_scope2.py | 55 + ...est_post_aquaculture200_response_scope3.py | 67 + .../test/test_post_aquaculture_request.py | 61 + ...t_aquaculture_request_enterprises_inner.py | 139 + ...re_request_enterprises_inner_bait_inner.py | 59 + ...est_enterprises_inner_custom_bait_inner.py | 55 + ...est_enterprises_inner_fluid_waste_inner.py | 61 + ...aculture_request_enterprises_inner_fuel.py | 73 + ...prises_inner_fuel_stationary_fuel_inner.py | 55 + ...rprises_inner_fuel_transport_fuel_inner.py | 55 + ...enterprises_inner_inbound_freight_inner.py | 55 + ...st_enterprises_inner_refrigerants_inner.py | 55 + ...e_request_enterprises_inner_solid_waste.py | 55 + .../test/test_post_beef200_response.py | 97 + ...ost_beef200_response_intermediate_inner.py | 85 + ...response_intermediate_inner_intensities.py | 57 + .../test/test_post_beef200_response_net.py | 55 + .../test/test_post_beef200_response_scope1.py | 85 + .../test/test_post_beef200_response_scope3.py | 69 + .../api-client/test/test_post_beef_request.py | 87 + .../test/test_post_beef_request_beef_inner.py | 102 + ...st_post_beef_request_beef_inner_classes.py | 99 + ...ef_request_beef_inner_classes_bulls_gt1.py | 87 + ...est_beef_inner_classes_bulls_gt1_autumn.py | 59 + ...inner_classes_bulls_gt1_purchases_inner.py | 57 + ...est_beef_inner_classes_bulls_gt1_traded.py | 87 + ...eef_request_beef_inner_classes_cows_gt2.py | 87 + ...uest_beef_inner_classes_cows_gt2_traded.py | 87 + ...request_beef_inner_classes_heifers1_to2.py | 87 + ..._beef_inner_classes_heifers1_to2_traded.py | 87 + ..._request_beef_inner_classes_heifers_gt2.py | 87 + ...t_beef_inner_classes_heifers_gt2_traded.py | 87 + ..._request_beef_inner_classes_heifers_lt1.py | 87 + ...t_beef_inner_classes_heifers_lt1_traded.py | 87 + ..._request_beef_inner_classes_steers1_to2.py | 87 + ...t_beef_inner_classes_steers1_to2_traded.py | 87 + ...f_request_beef_inner_classes_steers_gt2.py | 87 + ...st_beef_inner_classes_steers_gt2_traded.py | 87 + ...f_request_beef_inner_classes_steers_lt1.py | 87 + ...st_beef_inner_classes_steers_lt1_traded.py | 87 + ...st_beef_request_beef_inner_cows_calving.py | 59 + ...post_beef_request_beef_inner_fertiliser.py | 69 + ...nner_fertiliser_other_fertilisers_inner.py | 57 + ...uest_beef_inner_mineral_supplementation.py | 63 + .../test_post_beef_request_burning_inner.py | 63 + ...post_beef_request_burning_inner_burning.py | 65 + ...test_post_beef_request_vegetation_inner.py | 64 + ...eef_request_vegetation_inner_vegetation.py | 61 + .../test/test_post_buffalo200_response.py | 97 + ...st_post_buffalo200_response_intensities.py | 57 + ..._buffalo200_response_intermediate_inner.py | 89 + .../test/test_post_buffalo200_response_net.py | 53 + .../test_post_buffalo200_response_scope1.py | 81 + .../test_post_buffalo200_response_scope3.py | 67 + .../test/test_post_buffalo_request.py | 75 + ...est_post_buffalo_request_buffalos_inner.py | 100 + ..._buffalo_request_buffalos_inner_classes.py | 75 + ...lo_request_buffalos_inner_classes_bulls.py | 84 + ...est_buffalos_inner_classes_bulls_autumn.py | 53 + ...los_inner_classes_bulls_purchases_inner.py | 55 + ...lo_request_buffalos_inner_classes_calfs.py | 84 + ...alo_request_buffalos_inner_classes_cows.py | 84 + ...o_request_buffalos_inner_classes_steers.py | 84 + ...uest_buffalos_inner_classes_trade_bulls.py | 84 + ...uest_buffalos_inner_classes_trade_calfs.py | 84 + ...quest_buffalos_inner_classes_trade_cows.py | 84 + ...est_buffalos_inner_classes_trade_steers.py | 84 + ...alo_request_buffalos_inner_cows_calving.py | 59 + ...request_buffalos_inner_seasonal_calving.py | 59 + ...t_post_buffalo_request_vegetation_inner.py | 63 + .../test/test_post_cotton200_response.py | 101 + ...t_cotton200_response_intermediate_inner.py | 89 + ...response_intermediate_inner_intensities.py | 79 + .../test/test_post_cotton200_response_net.py | 59 + .../test_post_cotton200_response_scope1.py | 81 + .../test_post_cotton200_response_scope3.py | 63 + .../test/test_post_cotton_request.py | 77 + .../test_post_cotton_request_crops_inner.py | 103 + ...st_post_cotton_request_vegetation_inner.py | 63 + .../test/test_post_dairy200_response.py | 97 + ...test_post_dairy200_response_intensities.py | 55 + ...st_dairy200_response_intermediate_inner.py | 89 + .../test/test_post_dairy200_response_net.py | 53 + .../test_post_dairy200_response_scope1.py | 91 + .../test_post_dairy200_response_scope3.py | 65 + .../test/test_post_dairy_request.py | 77 + .../test_post_dairy_request_dairy_inner.py | 118 + ...st_post_dairy_request_dairy_inner_areas.py | 59 + ..._post_dairy_request_dairy_inner_classes.py | 81 + ...est_dairy_inner_classes_dairy_bulls_gt1.py | 75 + ...est_dairy_inner_classes_dairy_bulls_lt1.py | 75 + ...request_dairy_inner_classes_heifers_gt1.py | 75 + ...request_dairy_inner_classes_heifers_lt1.py | 75 + ...equest_dairy_inner_classes_milking_cows.py | 75 + ...dairy_inner_classes_milking_cows_autumn.py | 60 + ...ry_inner_manure_management_milking_cows.py | 61 + ...request_dairy_inner_seasonal_fertiliser.py | 75 + ..._dairy_inner_seasonal_fertiliser_autumn.py | 59 + ...est_post_dairy_request_vegetation_inner.py | 63 + .../test/test_post_deer200_response.py | 97 + .../test_post_deer200_response_intensities.py | 57 + ...ost_deer200_response_intermediate_inner.py | 89 + .../test/test_post_deer200_response_net.py | 53 + .../api-client/test/test_post_deer_request.py | 75 + .../test_post_deer_request_deers_inner.py | 100 + ...t_post_deer_request_deers_inner_classes.py | 75 + ...quest_deers_inner_classes_breeding_does.py | 84 + ..._deer_request_deers_inner_classes_bucks.py | 84 + ...t_deer_request_deers_inner_classes_fawn.py | 84 + ..._request_deers_inner_classes_other_does.py | 84 + ...request_deers_inner_classes_trade_bucks.py | 84 + ..._request_deers_inner_classes_trade_does.py | 84 + ..._request_deers_inner_classes_trade_fawn.py | 84 + ...st_deers_inner_classes_trade_other_does.py | 84 + ...t_deer_request_deers_inner_does_fawning.py | 59 + ...er_request_deers_inner_seasonal_fawning.py | 59 + ...test_post_deer_request_vegetation_inner.py | 63 + .../test/test_post_feedlot200_response.py | 97 + ..._feedlot200_response_intermediate_inner.py | 89 + ...response_intermediate_inner_intensities.py | 57 + ...dlot200_response_intermediate_inner_net.py | 53 + .../test_post_feedlot200_response_scope1.py | 87 + .../test_post_feedlot200_response_scope3.py | 67 + .../test/test_post_feedlot_request.py | 73 + ...est_post_feedlot_request_feedlots_inner.py | 112 + ...lot_request_feedlots_inner_groups_inner.py | 61 + ...feedlots_inner_groups_inner_stays_inner.py | 69 + ...eedlot_request_feedlots_inner_purchases.py | 131 + ...eedlots_inner_purchases_bulls_gt1_inner.py | 57 + ...st_feedlot_request_feedlots_inner_sales.py | 211 + ...st_feedlots_inner_sales_bulls_gt1_inner.py | 55 + ...t_post_feedlot_request_vegetation_inner.py | 63 + .../test/test_post_goat200_response.py | 97 + .../test_post_goat200_response_intensities.py | 63 + ...ost_goat200_response_intermediate_inner.py | 89 + .../test/test_post_goat200_response_net.py | 53 + .../api-client/test/test_post_goat_request.py | 75 + .../test_post_goat_request_goats_inner.py | 94 + ...t_post_goat_request_goats_inner_classes.py | 90 + ...ats_inner_classes_breeding_does_nannies.py | 92 + ...request_goats_inner_classes_bucks_billy.py | 92 + ...t_goat_request_goats_inner_classes_kids.py | 92 + ...er_classes_maiden_breeding_does_nannies.py | 92 + ...inner_classes_other_does_culled_females.py | 92 + ...ner_classes_trade_breeding_does_nannies.py | 92 + ...request_goats_inner_classes_trade_bucks.py | 92 + ..._request_goats_inner_classes_trade_does.py | 92 + ..._request_goats_inner_classes_trade_kids.py | 92 + ...sses_trade_maiden_breeding_does_nannies.py | 92 + ...classes_trade_other_does_culled_females.py | 92 + ...quest_goats_inner_classes_trade_wethers.py | 92 + ...oat_request_goats_inner_classes_wethers.py | 92 + ...test_post_goat_request_vegetation_inner.py | 63 + .../test/test_post_grains200_response.py | 107 + ...t_grains200_response_intermediate_inner.py | 89 + ...te_inner_intensities_with_sequestration.py | 57 + .../test/test_post_grains_request.py | 77 + .../test_post_grains_request_crops_inner.py | 94 + .../test_post_horticulture200_response.py | 101 + ...iculture200_response_intermediate_inner.py | 89 + ...te_inner_intensities_with_sequestration.py | 57 + ...st_post_horticulture200_response_scope1.py | 85 + .../test/test_post_horticulture_request.py | 77 + ...t_post_horticulture_request_crops_inner.py | 102 + ..._request_crops_inner_refrigerants_inner.py | 55 + .../test/test_post_pork200_response.py | 97 + .../test_post_pork200_response_intensities.py | 57 + ...ost_pork200_response_intermediate_inner.py | 85 + .../test/test_post_pork200_response_net.py | 53 + .../test/test_post_pork200_response_scope1.py | 85 + .../test/test_post_pork200_response_scope3.py | 69 + .../api-client/test/test_post_pork_request.py | 77 + .../test/test_post_pork_request_pork_inner.py | 96 + ...st_post_pork_request_pork_inner_classes.py | 72 + ...t_pork_request_pork_inner_classes_boars.py | 76 + ...t_pork_request_pork_inner_classes_gilts.py | 76 + ...pork_request_pork_inner_classes_growers.py | 76 + ...quest_pork_inner_classes_slaughter_pigs.py | 76 + ...st_pork_request_pork_inner_classes_sows.py | 76 + ..._request_pork_inner_classes_sows_manure.py | 75 + ...t_pork_inner_classes_sows_manure_spring.py | 56 + ...pork_request_pork_inner_classes_suckers.py | 76 + ...pork_request_pork_inner_classes_weaners.py | 76 + ..._request_pork_inner_feed_products_inner.py | 63 + ...k_inner_feed_products_inner_ingredients.py | 63 + ...test_post_pork_request_vegetation_inner.py | 63 + .../test/test_post_poultry200_response.py | 107 + ...st_post_poultry200_response_intensities.py | 63 + ...00_response_intermediate_broilers_inner.py | 89 + ...intermediate_broilers_inner_intensities.py | 57 + ...y200_response_intermediate_layers_inner.py | 89 + ...e_intermediate_layers_inner_intensities.py | 57 + .../test/test_post_poultry200_response_net.py | 57 + .../test_post_poultry200_response_scope1.py | 73 + .../test_post_poultry200_response_scope3.py | 65 + .../test/test_post_poultry_request.py | 87 + ...est_post_poultry_request_broilers_inner.py | 118 + ...try_request_broilers_inner_groups_inner.py | 83 + ..._broilers_inner_groups_inner_feed_inner.py | 63 + ...ner_groups_inner_feed_inner_ingredients.py | 56 + ...inner_groups_inner_meat_chicken_growers.py | 66 + ...rs_inner_meat_chicken_growers_purchases.py | 55 + ...ers_inner_meat_chicken_layers_purchases.py | 55 + ...est_broilers_inner_meat_other_purchases.py | 55 + ...ltry_request_broilers_inner_sales_inner.py | 69 + .../test_post_poultry_request_layers_inner.py | 130 + ...ost_poultry_request_layers_inner_layers.py | 59 + ...ry_request_layers_inner_layers_egg_sale.py | 55 + ...y_request_layers_inner_layers_purchases.py | 55 + ...equest_layers_inner_meat_chicken_layers.py | 59 + ...yers_inner_meat_chicken_layers_egg_sale.py | 55 + ...t_post_poultry_request_vegetation_inner.py | 69 + .../test/test_post_processing200_response.py | 107 + ...rocessing200_response_intensities_inner.py | 59 + ...ocessing200_response_intermediate_inner.py | 89 + .../test_post_processing200_response_net.py | 53 + ...test_post_processing200_response_scope1.py | 75 + ...test_post_processing200_response_scope3.py | 59 + .../test/test_post_processing_request.py | 63 + ..._post_processing_request_products_inner.py | 99 + ...ocessing_request_products_inner_product.py | 55 + .../test/test_post_rice200_response.py | 97 + .../test_post_rice200_response_intensities.py | 59 + ...ost_rice200_response_intermediate_inner.py | 85 + ...response_intermediate_inner_intensities.py | 59 + .../test/test_post_rice200_response_scope1.py | 83 + .../api-client/test/test_post_rice_request.py | 77 + .../test_post_rice_request_crops_inner.py | 96 + .../test/test_post_sheep200_response.py | 97 + ...st_sheep200_response_intermediate_inner.py | 85 + ...response_intermediate_inner_intensities.py | 63 + .../test/test_post_sheep200_response_net.py | 55 + .../test/test_post_sheep_request.py | 77 + .../test_post_sheep_request_sheep_inner.py | 108 + ..._post_sheep_request_sheep_inner_classes.py | 108 + ..._sheep_request_sheep_inner_classes_rams.py | 92 + ...request_sheep_inner_classes_rams_autumn.py | 60 + ..._request_sheep_inner_classes_trade_ewes.py | 92 + ...p_inner_classes_trade_lambs_and_hoggets.py | 92 + ..._sheep_request_sheep_inner_ewes_lambing.py | 59 + ...ep_request_sheep_inner_seasonal_lambing.py | 59 + ...est_post_sheep_request_vegetation_inner.py | 63 + .../test/test_post_sheepbeef200_response.py | 113 + ..._post_sheepbeef200_response_intensities.py | 69 + ...post_sheepbeef200_response_intermediate.py | 63 + ...sheepbeef200_response_intermediate_beef.py | 83 + ...heepbeef200_response_intermediate_sheep.py | 83 + .../test_post_sheepbeef200_response_net.py | 57 + .../test/test_post_sheepbeef_request.py | 97 + ...post_sheepbeef_request_vegetation_inner.py | 69 + .../test/test_post_sugar200_response.py | 101 + ...st_sugar200_response_intermediate_inner.py | 85 + ...response_intermediate_inner_intensities.py | 57 + .../test/test_post_sugar_request.py | 77 + .../test_post_sugar_request_crops_inner.py | 93 + .../test/test_post_vineyard200_response.py | 101 + ...vineyard200_response_intermediate_inner.py | 85 + ...response_intermediate_inner_intensities.py | 57 + .../test_post_vineyard200_response_net.py | 59 + .../test_post_vineyard200_response_scope1.py | 81 + .../test_post_vineyard200_response_scope3.py | 71 + .../test/test_post_vineyard_request.py | 71 + ..._post_vineyard_request_vegetation_inner.py | 63 + ...t_post_vineyard_request_vineyards_inner.py | 132 + .../test_post_wildcatchfishery200_response.py | 103 + ...ildcatchfishery200_response_intensities.py | 57 + ...hfishery200_response_intermediate_inner.py | 89 + ...ost_wildcatchfishery200_response_scope1.py | 73 + .../test_post_wildcatchfishery_request.py | 61 + ...dcatchfishery_request_enterprises_inner.py | 139 + ...ry_request_enterprises_inner_bait_inner.py | 59 + .../test_post_wildseafisheries200_response.py | 101 + ...isheries200_response_intermediate_inner.py | 91 + ...response_intermediate_inner_intensities.py | 57 + ...ost_wildseafisheries200_response_scope1.py | 69 + ...ost_wildseafisheries200_response_scope3.py | 59 + .../test_post_wildseafisheries_request.py | 61 + ...dseafisheries_request_enterprises_inner.py | 120 + ...es_request_enterprises_inner_bait_inner.py | 59 + ...uest_enterprises_inner_custombait_inner.py | 55 + ...request_enterprises_inner_flights_inner.py | 55 + ...st_enterprises_inner_refrigerants_inner.py | 55 + ...uest_enterprises_inner_transports_inner.py | 57 + .../python-api-client/api-client/test_api.py | 114 + examples/python-api-client/api-client/tox.ini | 9 + examples/python-api-client/generate.sh | 12 +- .../python-api-client/resources/test_api.py | 196 +- 906 files changed, 82297 insertions(+), 151 deletions(-) create mode 100644 examples/python-api-client/api-client/.github/workflows/python.yml create mode 100644 examples/python-api-client/api-client/.gitignore create mode 100644 examples/python-api-client/api-client/.gitlab-ci.yml create mode 100644 examples/python-api-client/api-client/.openapi-generator-ignore create mode 100644 examples/python-api-client/api-client/.openapi-generator/FILES create mode 100644 examples/python-api-client/api-client/.openapi-generator/VERSION create mode 100644 examples/python-api-client/api-client/.travis.yml create mode 100644 examples/python-api-client/api-client/README.md create mode 100644 examples/python-api-client/api-client/docs/GAFApi.md create mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseCarbonSequestration.md create mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md create mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseNet.md create mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponsePurchasedOffsets.md create mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope1.md create mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope2.md create mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope3.md create mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInner.md create mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerBaitInner.md create mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md create mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md create mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuel.md create mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md create mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md create mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md create mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerSolidWaste.md create mode 100644 examples/python-api-client/api-client/docs/PostBeef200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInnerIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostBeef200ResponseNet.md create mode 100644 examples/python-api-client/api-client/docs/PostBeef200ResponseScope1.md create mode 100644 examples/python-api-client/api-client/docs/PostBeef200ResponseScope3.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInner.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClasses.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Traded.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2Traded.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2Traded.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2Traded.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1Traded.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerCowsCalving.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliser.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerMineralSupplementation.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBurningInner.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBurningInnerBurning.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestVegetationInner.md create mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestVegetationInnerVegetation.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffalo200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffalo200ResponseNet.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope1.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope3.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInner.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClasses.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBulls.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCalfs.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCows.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesSteers.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCows.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerCowsCalving.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerSeasonalCalving.md create mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestVegetationInner.md create mode 100644 examples/python-api-client/api-client/docs/PostCotton200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInnerIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostCotton200ResponseNet.md create mode 100644 examples/python-api-client/api-client/docs/PostCotton200ResponseScope1.md create mode 100644 examples/python-api-client/api-client/docs/PostCotton200ResponseScope3.md create mode 100644 examples/python-api-client/api-client/docs/PostCottonRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostCottonRequestCropsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostCottonRequestVegetationInner.md create mode 100644 examples/python-api-client/api-client/docs/PostDairy200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostDairy200ResponseIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostDairy200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostDairy200ResponseNet.md create mode 100644 examples/python-api-client/api-client/docs/PostDairy200ResponseScope1.md create mode 100644 examples/python-api-client/api-client/docs/PostDairy200ResponseScope3.md create mode 100644 examples/python-api-client/api-client/docs/PostDairyRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInner.md create mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerAreas.md create mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClasses.md create mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsGt1.md create mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsLt1.md create mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersGt1.md create mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersLt1.md create mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCows.md create mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md create mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerManureManagementMilkingCows.md create mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliser.md create mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md create mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestVegetationInner.md create mode 100644 examples/python-api-client/api-client/docs/PostDeer200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostDeer200ResponseIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostDeer200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostDeer200ResponseNet.md create mode 100644 examples/python-api-client/api-client/docs/PostDeerRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInner.md create mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClasses.md create mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBreedingDoes.md create mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBucks.md create mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesFawn.md create mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesOtherDoes.md create mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeBucks.md create mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeDoes.md create mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeFawn.md create mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeOtherDoes.md create mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerDoesFawning.md create mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerSeasonalFawning.md create mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestVegetationInner.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlot200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerNet.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope1.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope3.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchases.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSales.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md create mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestVegetationInner.md create mode 100644 examples/python-api-client/api-client/docs/PostGoat200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostGoat200ResponseIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostGoat200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostGoat200ResponseNet.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClasses.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBucksBilly.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesKids.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBucks.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeDoes.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeKids.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeWethers.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesWethers.md create mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestVegetationInner.md create mode 100644 examples/python-api-client/api-client/docs/PostGrains200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md create mode 100644 examples/python-api-client/api-client/docs/PostGrainsRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostGrainsRequestCropsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostHorticulture200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md create mode 100644 examples/python-api-client/api-client/docs/PostHorticulture200ResponseScope1.md create mode 100644 examples/python-api-client/api-client/docs/PostHorticultureRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInnerRefrigerantsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostPork200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostPork200ResponseIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostPork200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostPork200ResponseNet.md create mode 100644 examples/python-api-client/api-client/docs/PostPork200ResponseScope1.md create mode 100644 examples/python-api-client/api-client/docs/PostPork200ResponseScope3.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInner.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClasses.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesBoars.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGilts.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGrowers.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSlaughterPigs.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSows.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManure.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManureSpring.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSuckers.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesWeaners.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md create mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestVegetationInner.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultry200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInner.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInner.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInnerIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseNet.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseScope1.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseScope3.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInner.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatOtherPurchases.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerSalesInner.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestLayersInner.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayers.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersEggSale.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersPurchases.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayers.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md create mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestVegetationInner.md create mode 100644 examples/python-api-client/api-client/docs/PostProcessing200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostProcessing200ResponseIntensitiesInner.md create mode 100644 examples/python-api-client/api-client/docs/PostProcessing200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostProcessing200ResponseNet.md create mode 100644 examples/python-api-client/api-client/docs/PostProcessing200ResponseScope1.md create mode 100644 examples/python-api-client/api-client/docs/PostProcessing200ResponseScope3.md create mode 100644 examples/python-api-client/api-client/docs/PostProcessingRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostProcessingRequestProductsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostProcessingRequestProductsInnerProduct.md create mode 100644 examples/python-api-client/api-client/docs/PostRice200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostRice200ResponseIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInnerIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostRice200ResponseScope1.md create mode 100644 examples/python-api-client/api-client/docs/PostRiceRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostRiceRequestCropsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostSheep200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInnerIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostSheep200ResponseNet.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInner.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClasses.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRams.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRamsAutumn.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeEwes.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerEwesLambing.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerSeasonalLambing.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestVegetationInner.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepbeef200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediate.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateBeef.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateSheep.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepbeef200ResponseNet.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepbeefRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostSheepbeefRequestVegetationInner.md create mode 100644 examples/python-api-client/api-client/docs/PostSugar200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInnerIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostSugarRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostSugarRequestCropsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostVineyard200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInnerIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostVineyard200ResponseNet.md create mode 100644 examples/python-api-client/api-client/docs/PostVineyard200ResponseScope1.md create mode 100644 examples/python-api-client/api-client/docs/PostVineyard200ResponseScope3.md create mode 100644 examples/python-api-client/api-client/docs/PostVineyardRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostVineyardRequestVegetationInner.md create mode 100644 examples/python-api-client/api-client/docs/PostVineyardRequestVineyardsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostWildcatchfishery200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseScope1.md create mode 100644 examples/python-api-client/api-client/docs/PostWildcatchfisheryRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInner.md create mode 100644 examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md create mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheries200Response.md create mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInner.md create mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInnerIntensities.md create mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope1.md create mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope3.md create mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheriesRequest.md create mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInner.md create mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md create mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md create mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md create mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md create mode 100644 examples/python-api-client/api-client/git_push.sh create mode 100644 examples/python-api-client/api-client/openapi_client/__init__.py create mode 100644 examples/python-api-client/api-client/openapi_client/api/__init__.py create mode 100644 examples/python-api-client/api-client/openapi_client/api/gaf_api.py create mode 100644 examples/python-api-client/api-client/openapi_client/api_client.py create mode 100644 examples/python-api-client/api-client/openapi_client/api_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/configuration.py create mode 100644 examples/python-api-client/api-client/openapi_client/exceptions.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/__init__.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_carbon_sequestration.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_intermediate_inner_carbon_sequestration.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_net.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_purchased_offsets.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_scope1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_scope2.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_scope3.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_bait_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_custom_bait_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fluid_waste_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fuel.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_inbound_freight_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_refrigerants_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_solid_waste.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef200_response_net.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef200_response_scope1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef200_response_scope3.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_autumn.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_traded.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_cows_gt2.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_cows_gt2_traded.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers1_to2.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers1_to2_traded.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_gt2.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_gt2_traded.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_lt1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_lt1_traded.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers1_to2.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers1_to2_traded.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_gt2.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_gt2_traded.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_lt1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_lt1_traded.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_cows_calving.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_fertiliser.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_mineral_supplementation.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_burning_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_burning_inner_burning.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_beef_request_vegetation_inner_vegetation.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_net.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_scope1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_scope3.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls_autumn.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_calfs.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_cows.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_steers.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_bulls.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_calfs.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_cows.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_steers.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_cows_calving.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_seasonal_calving.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_cotton200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_net.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_scope1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_scope3.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_cotton_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_cotton_request_crops_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_cotton_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_net.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_scope1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_scope3.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_areas.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_heifers_gt1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_heifers_lt1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_milking_cows.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_milking_cows_autumn.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_manure_management_milking_cows.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_seasonal_fertiliser.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_dairy_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer200_response_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer200_response_net.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_breeding_does.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_bucks.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_fawn.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_other_does.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_bucks.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_does.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_fawn.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_other_does.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_does_fawning.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_seasonal_fawning.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_deer_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_intermediate_inner_net.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_scope1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_scope3.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_groups_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_purchases.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_sales.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat200_response_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat200_response_net.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_breeding_does_nannies.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_bucks_billy.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_kids.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_other_does_culled_females.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_bucks.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_does.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_kids.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_other_does_culled_females.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_wethers.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_wethers.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_goat_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_grains200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_grains200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_grains200_response_intermediate_inner_intensities_with_sequestration.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_grains_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_grains_request_crops_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response_scope1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_horticulture_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_horticulture_request_crops_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_horticulture_request_crops_inner_refrigerants_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork200_response_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork200_response_net.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork200_response_scope1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork200_response_scope3.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_boars.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_gilts.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_growers.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_slaughter_pigs.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_sows.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_sows_manure.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_sows_manure_spring.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_suckers.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_weaners.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_feed_products_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_feed_products_inner_ingredients.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_pork_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_broilers_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_broilers_inner_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_layers_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_layers_inner_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_net.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_scope1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_scope3.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner_feed_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_meat_other_purchases.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_sales_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_layers.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_layers_egg_sale.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_layers_purchases.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_meat_chicken_layers.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_poultry_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_processing200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_processing200_response_intensities_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_processing200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_processing200_response_net.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_processing200_response_scope1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_processing200_response_scope3.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_processing_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_processing_request_products_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_processing_request_products_inner_product.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_rice200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_rice200_response_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_rice200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_rice200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_rice200_response_scope1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_rice_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_rice_request_crops_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheep200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheep200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheep200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheep200_response_net.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheep_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_rams.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_rams_autumn.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_trade_ewes.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_ewes_lambing.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_seasonal_lambing.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheep_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intermediate.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intermediate_beef.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intermediate_sheep.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_net.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheepbeef_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sheepbeef_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sugar200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sugar200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sugar200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sugar_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_sugar_request_crops_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_net.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_scope1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_scope3.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_vineyard_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_vineyard_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_vineyard_request_vineyards_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response_scope1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery_request_enterprises_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery_request_enterprises_inner_bait_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_scope1.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_scope3.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_bait_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_custombait_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_flights_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_transports_inner.py create mode 100644 examples/python-api-client/api-client/openapi_client/py.typed create mode 100644 examples/python-api-client/api-client/openapi_client/rest.py create mode 100644 examples/python-api-client/api-client/pyproject.toml create mode 100644 examples/python-api-client/api-client/requirements.txt create mode 100755 examples/python-api-client/api-client/run_test.sh create mode 100644 examples/python-api-client/api-client/setup.cfg create mode 100644 examples/python-api-client/api-client/setup.py create mode 100755 examples/python-api-client/api-client/setup_local.sh create mode 100644 examples/python-api-client/api-client/test-requirements.txt create mode 100644 examples/python-api-client/api-client/test/__init__.py create mode 100644 examples/python-api-client/api-client/test/test_gaf_api.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_carbon_sequestration.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner_carbon_sequestration.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_net.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_purchased_offsets.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope1.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope2.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope3.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_bait_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_custom_bait_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fluid_waste_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_inbound_freight_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_refrigerants_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_solid_waste.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef200_response_net.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef200_response_scope1.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef200_response_scope3.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_autumn.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_traded.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2_traded.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2_traded.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2_traded.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1_traded.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2_traded.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2_traded.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1_traded.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_cows_calving.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_mineral_supplementation.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_burning_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_burning_inner_burning.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner_vegetation.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo200_response_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo200_response_net.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo200_response_scope1.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo200_response_scope3.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_autumn.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_calfs.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_cows.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_steers.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_bulls.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_calfs.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_cows.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_steers.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_cows_calving.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_seasonal_calving.py create mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_cotton200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_cotton200_response_net.py create mode 100644 examples/python-api-client/api-client/test/test_post_cotton200_response_scope1.py create mode 100644 examples/python-api-client/api-client/test/test_post_cotton200_response_scope3.py create mode 100644 examples/python-api-client/api-client/test/test_post_cotton_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_cotton_request_crops_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_cotton_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy200_response_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy200_response_net.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy200_response_scope1.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy200_response_scope3.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_areas.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_gt1.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_lt1.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows_autumn.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_manure_management_milking_cows.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py create mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer200_response_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer200_response_net.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_breeding_does.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_bucks.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_fawn.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_other_does.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_bucks.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_does.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_fawn.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_other_does.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_does_fawning.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_seasonal_fawning.py create mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_net.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot200_response_scope1.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot200_response_scope3.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat200_response_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat200_response_net.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_breeding_does_nannies.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_bucks_billy.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_kids.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_other_does_culled_females.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_bucks.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_does.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_kids.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_other_does_culled_females.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_wethers.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_wethers.py create mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_grains200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner_intensities_with_sequestration.py create mode 100644 examples/python-api-client/api-client/test/test_post_grains_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_grains_request_crops_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_horticulture200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py create mode 100644 examples/python-api-client/api-client/test/test_post_horticulture200_response_scope1.py create mode 100644 examples/python-api-client/api-client/test/test_post_horticulture_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner_refrigerants_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork200_response_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork200_response_net.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork200_response_scope1.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork200_response_scope3.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_boars.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_gilts.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_growers.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_slaughter_pigs.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure_spring.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_suckers.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_weaners.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner_ingredients.py create mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_net.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_scope1.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_scope3.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_other_purchases.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_sales_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_egg_sale.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_purchases.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py create mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_processing200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_processing200_response_intensities_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_processing200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_processing200_response_net.py create mode 100644 examples/python-api-client/api-client/test/test_post_processing200_response_scope1.py create mode 100644 examples/python-api-client/api-client/test/test_post_processing200_response_scope3.py create mode 100644 examples/python-api-client/api-client/test/test_post_processing_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_processing_request_products_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_processing_request_products_inner_product.py create mode 100644 examples/python-api-client/api-client/test/test_post_rice200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_rice200_response_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_rice200_response_scope1.py create mode 100644 examples/python-api-client/api-client/test/test_post_rice_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_rice_request_crops_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheep200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheep200_response_net.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams_autumn.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_ewes.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_ewes_lambing.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_seasonal_lambing.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_beef.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_sheep.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef200_response_net.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_sugar200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_sugar_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_sugar_request_crops_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_vineyard200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_vineyard200_response_net.py create mode 100644 examples/python-api-client/api-client/test/test_post_vineyard200_response_scope1.py create mode 100644 examples/python-api-client/api-client/test/test_post_vineyard200_response_scope3.py create mode 100644 examples/python-api-client/api-client/test/test_post_vineyard_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_vineyard_request_vegetation_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_vineyard_request_vineyards_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_scope1.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildcatchfishery_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner_bait_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries200_response.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner_intensities.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope1.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope3.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries_request.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_bait_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_custombait_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_flights_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py create mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_transports_inner.py create mode 100755 examples/python-api-client/api-client/test_api.py create mode 100644 examples/python-api-client/api-client/tox.ini diff --git a/examples/python-api-client/api-client/.github/workflows/python.yml b/examples/python-api-client/api-client/.github/workflows/python.yml new file mode 100644 index 00000000..02a097eb --- /dev/null +++ b/examples/python-api-client/api-client/.github/workflows/python.yml @@ -0,0 +1,34 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: openapi_client Python package + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r test-requirements.txt + - name: Test with pytest + run: | + pytest --cov=openapi_client diff --git a/examples/python-api-client/api-client/.gitignore b/examples/python-api-client/api-client/.gitignore new file mode 100644 index 00000000..43995bd4 --- /dev/null +++ b/examples/python-api-client/api-client/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/examples/python-api-client/api-client/.gitlab-ci.yml b/examples/python-api-client/api-client/.gitlab-ci.yml new file mode 100644 index 00000000..6b9641eb --- /dev/null +++ b/examples/python-api-client/api-client/.gitlab-ci.yml @@ -0,0 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.gitlab.com/ee/ci/README.html +# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml + +stages: + - test + +.pytest: + stage: test + script: + - pip install -r requirements.txt + - pip install -r test-requirements.txt + - pytest --cov=openapi_client + +pytest-3.9: + extends: .pytest + image: python:3.9-alpine +pytest-3.10: + extends: .pytest + image: python:3.10-alpine +pytest-3.11: + extends: .pytest + image: python:3.11-alpine +pytest-3.12: + extends: .pytest + image: python:3.12-alpine +pytest-3.13: + extends: .pytest + image: python:3.13-alpine diff --git a/examples/python-api-client/api-client/.openapi-generator-ignore b/examples/python-api-client/api-client/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/examples/python-api-client/api-client/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/examples/python-api-client/api-client/.openapi-generator/FILES b/examples/python-api-client/api-client/.openapi-generator/FILES new file mode 100644 index 00000000..5bcf5dd0 --- /dev/null +++ b/examples/python-api-client/api-client/.openapi-generator/FILES @@ -0,0 +1,899 @@ +.github/workflows/python.yml +.gitignore +.gitlab-ci.yml +.openapi-generator-ignore +.travis.yml +README.md +docs/GAFApi.md +docs/PostAquaculture200Response.md +docs/PostAquaculture200ResponseCarbonSequestration.md +docs/PostAquaculture200ResponseIntensities.md +docs/PostAquaculture200ResponseIntermediateInner.md +docs/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md +docs/PostAquaculture200ResponseNet.md +docs/PostAquaculture200ResponsePurchasedOffsets.md +docs/PostAquaculture200ResponseScope1.md +docs/PostAquaculture200ResponseScope2.md +docs/PostAquaculture200ResponseScope3.md +docs/PostAquacultureRequest.md +docs/PostAquacultureRequestEnterprisesInner.md +docs/PostAquacultureRequestEnterprisesInnerBaitInner.md +docs/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md +docs/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md +docs/PostAquacultureRequestEnterprisesInnerFuel.md +docs/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md +docs/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md +docs/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md +docs/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md +docs/PostAquacultureRequestEnterprisesInnerSolidWaste.md +docs/PostBeef200Response.md +docs/PostBeef200ResponseIntermediateInner.md +docs/PostBeef200ResponseIntermediateInnerIntensities.md +docs/PostBeef200ResponseNet.md +docs/PostBeef200ResponseScope1.md +docs/PostBeef200ResponseScope3.md +docs/PostBeefRequest.md +docs/PostBeefRequestBeefInner.md +docs/PostBeefRequestBeefInnerClasses.md +docs/PostBeefRequestBeefInnerClassesBullsGt1.md +docs/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md +docs/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md +docs/PostBeefRequestBeefInnerClassesBullsGt1Traded.md +docs/PostBeefRequestBeefInnerClassesCowsGt2.md +docs/PostBeefRequestBeefInnerClassesCowsGt2Traded.md +docs/PostBeefRequestBeefInnerClassesHeifers1To2.md +docs/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md +docs/PostBeefRequestBeefInnerClassesHeifersGt2.md +docs/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md +docs/PostBeefRequestBeefInnerClassesHeifersLt1.md +docs/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md +docs/PostBeefRequestBeefInnerClassesSteers1To2.md +docs/PostBeefRequestBeefInnerClassesSteers1To2Traded.md +docs/PostBeefRequestBeefInnerClassesSteersGt2.md +docs/PostBeefRequestBeefInnerClassesSteersGt2Traded.md +docs/PostBeefRequestBeefInnerClassesSteersLt1.md +docs/PostBeefRequestBeefInnerClassesSteersLt1Traded.md +docs/PostBeefRequestBeefInnerCowsCalving.md +docs/PostBeefRequestBeefInnerFertiliser.md +docs/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md +docs/PostBeefRequestBeefInnerMineralSupplementation.md +docs/PostBeefRequestBurningInner.md +docs/PostBeefRequestBurningInnerBurning.md +docs/PostBeefRequestVegetationInner.md +docs/PostBeefRequestVegetationInnerVegetation.md +docs/PostBuffalo200Response.md +docs/PostBuffalo200ResponseIntensities.md +docs/PostBuffalo200ResponseIntermediateInner.md +docs/PostBuffalo200ResponseNet.md +docs/PostBuffalo200ResponseScope1.md +docs/PostBuffalo200ResponseScope3.md +docs/PostBuffaloRequest.md +docs/PostBuffaloRequestBuffalosInner.md +docs/PostBuffaloRequestBuffalosInnerClasses.md +docs/PostBuffaloRequestBuffalosInnerClassesBulls.md +docs/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md +docs/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md +docs/PostBuffaloRequestBuffalosInnerClassesCalfs.md +docs/PostBuffaloRequestBuffalosInnerClassesCows.md +docs/PostBuffaloRequestBuffalosInnerClassesSteers.md +docs/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md +docs/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md +docs/PostBuffaloRequestBuffalosInnerClassesTradeCows.md +docs/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md +docs/PostBuffaloRequestBuffalosInnerCowsCalving.md +docs/PostBuffaloRequestBuffalosInnerSeasonalCalving.md +docs/PostBuffaloRequestVegetationInner.md +docs/PostCotton200Response.md +docs/PostCotton200ResponseIntermediateInner.md +docs/PostCotton200ResponseIntermediateInnerIntensities.md +docs/PostCotton200ResponseNet.md +docs/PostCotton200ResponseScope1.md +docs/PostCotton200ResponseScope3.md +docs/PostCottonRequest.md +docs/PostCottonRequestCropsInner.md +docs/PostCottonRequestVegetationInner.md +docs/PostDairy200Response.md +docs/PostDairy200ResponseIntensities.md +docs/PostDairy200ResponseIntermediateInner.md +docs/PostDairy200ResponseNet.md +docs/PostDairy200ResponseScope1.md +docs/PostDairy200ResponseScope3.md +docs/PostDairyRequest.md +docs/PostDairyRequestDairyInner.md +docs/PostDairyRequestDairyInnerAreas.md +docs/PostDairyRequestDairyInnerClasses.md +docs/PostDairyRequestDairyInnerClassesDairyBullsGt1.md +docs/PostDairyRequestDairyInnerClassesDairyBullsLt1.md +docs/PostDairyRequestDairyInnerClassesHeifersGt1.md +docs/PostDairyRequestDairyInnerClassesHeifersLt1.md +docs/PostDairyRequestDairyInnerClassesMilkingCows.md +docs/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md +docs/PostDairyRequestDairyInnerManureManagementMilkingCows.md +docs/PostDairyRequestDairyInnerSeasonalFertiliser.md +docs/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md +docs/PostDairyRequestVegetationInner.md +docs/PostDeer200Response.md +docs/PostDeer200ResponseIntensities.md +docs/PostDeer200ResponseIntermediateInner.md +docs/PostDeer200ResponseNet.md +docs/PostDeerRequest.md +docs/PostDeerRequestDeersInner.md +docs/PostDeerRequestDeersInnerClasses.md +docs/PostDeerRequestDeersInnerClassesBreedingDoes.md +docs/PostDeerRequestDeersInnerClassesBucks.md +docs/PostDeerRequestDeersInnerClassesFawn.md +docs/PostDeerRequestDeersInnerClassesOtherDoes.md +docs/PostDeerRequestDeersInnerClassesTradeBucks.md +docs/PostDeerRequestDeersInnerClassesTradeDoes.md +docs/PostDeerRequestDeersInnerClassesTradeFawn.md +docs/PostDeerRequestDeersInnerClassesTradeOtherDoes.md +docs/PostDeerRequestDeersInnerDoesFawning.md +docs/PostDeerRequestDeersInnerSeasonalFawning.md +docs/PostDeerRequestVegetationInner.md +docs/PostFeedlot200Response.md +docs/PostFeedlot200ResponseIntermediateInner.md +docs/PostFeedlot200ResponseIntermediateInnerIntensities.md +docs/PostFeedlot200ResponseIntermediateInnerNet.md +docs/PostFeedlot200ResponseScope1.md +docs/PostFeedlot200ResponseScope3.md +docs/PostFeedlotRequest.md +docs/PostFeedlotRequestFeedlotsInner.md +docs/PostFeedlotRequestFeedlotsInnerGroupsInner.md +docs/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md +docs/PostFeedlotRequestFeedlotsInnerPurchases.md +docs/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md +docs/PostFeedlotRequestFeedlotsInnerSales.md +docs/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md +docs/PostFeedlotRequestVegetationInner.md +docs/PostGoat200Response.md +docs/PostGoat200ResponseIntensities.md +docs/PostGoat200ResponseIntermediateInner.md +docs/PostGoat200ResponseNet.md +docs/PostGoatRequest.md +docs/PostGoatRequestGoatsInner.md +docs/PostGoatRequestGoatsInnerClasses.md +docs/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md +docs/PostGoatRequestGoatsInnerClassesBucksBilly.md +docs/PostGoatRequestGoatsInnerClassesKids.md +docs/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md +docs/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md +docs/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md +docs/PostGoatRequestGoatsInnerClassesTradeBucks.md +docs/PostGoatRequestGoatsInnerClassesTradeDoes.md +docs/PostGoatRequestGoatsInnerClassesTradeKids.md +docs/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md +docs/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md +docs/PostGoatRequestGoatsInnerClassesTradeWethers.md +docs/PostGoatRequestGoatsInnerClassesWethers.md +docs/PostGoatRequestVegetationInner.md +docs/PostGrains200Response.md +docs/PostGrains200ResponseIntermediateInner.md +docs/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md +docs/PostGrainsRequest.md +docs/PostGrainsRequestCropsInner.md +docs/PostHorticulture200Response.md +docs/PostHorticulture200ResponseIntermediateInner.md +docs/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md +docs/PostHorticulture200ResponseScope1.md +docs/PostHorticultureRequest.md +docs/PostHorticultureRequestCropsInner.md +docs/PostHorticultureRequestCropsInnerRefrigerantsInner.md +docs/PostPork200Response.md +docs/PostPork200ResponseIntensities.md +docs/PostPork200ResponseIntermediateInner.md +docs/PostPork200ResponseNet.md +docs/PostPork200ResponseScope1.md +docs/PostPork200ResponseScope3.md +docs/PostPorkRequest.md +docs/PostPorkRequestPorkInner.md +docs/PostPorkRequestPorkInnerClasses.md +docs/PostPorkRequestPorkInnerClassesBoars.md +docs/PostPorkRequestPorkInnerClassesGilts.md +docs/PostPorkRequestPorkInnerClassesGrowers.md +docs/PostPorkRequestPorkInnerClassesSlaughterPigs.md +docs/PostPorkRequestPorkInnerClassesSows.md +docs/PostPorkRequestPorkInnerClassesSowsManure.md +docs/PostPorkRequestPorkInnerClassesSowsManureSpring.md +docs/PostPorkRequestPorkInnerClassesSuckers.md +docs/PostPorkRequestPorkInnerClassesWeaners.md +docs/PostPorkRequestPorkInnerFeedProductsInner.md +docs/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md +docs/PostPorkRequestVegetationInner.md +docs/PostPoultry200Response.md +docs/PostPoultry200ResponseIntensities.md +docs/PostPoultry200ResponseIntermediateBroilersInner.md +docs/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md +docs/PostPoultry200ResponseIntermediateLayersInner.md +docs/PostPoultry200ResponseIntermediateLayersInnerIntensities.md +docs/PostPoultry200ResponseNet.md +docs/PostPoultry200ResponseScope1.md +docs/PostPoultry200ResponseScope3.md +docs/PostPoultryRequest.md +docs/PostPoultryRequestBroilersInner.md +docs/PostPoultryRequestBroilersInnerGroupsInner.md +docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md +docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md +docs/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md +docs/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md +docs/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md +docs/PostPoultryRequestBroilersInnerMeatOtherPurchases.md +docs/PostPoultryRequestBroilersInnerSalesInner.md +docs/PostPoultryRequestLayersInner.md +docs/PostPoultryRequestLayersInnerLayers.md +docs/PostPoultryRequestLayersInnerLayersEggSale.md +docs/PostPoultryRequestLayersInnerLayersPurchases.md +docs/PostPoultryRequestLayersInnerMeatChickenLayers.md +docs/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md +docs/PostPoultryRequestVegetationInner.md +docs/PostProcessing200Response.md +docs/PostProcessing200ResponseIntensitiesInner.md +docs/PostProcessing200ResponseIntermediateInner.md +docs/PostProcessing200ResponseNet.md +docs/PostProcessing200ResponseScope1.md +docs/PostProcessing200ResponseScope3.md +docs/PostProcessingRequest.md +docs/PostProcessingRequestProductsInner.md +docs/PostProcessingRequestProductsInnerProduct.md +docs/PostRice200Response.md +docs/PostRice200ResponseIntensities.md +docs/PostRice200ResponseIntermediateInner.md +docs/PostRice200ResponseIntermediateInnerIntensities.md +docs/PostRice200ResponseScope1.md +docs/PostRiceRequest.md +docs/PostRiceRequestCropsInner.md +docs/PostSheep200Response.md +docs/PostSheep200ResponseIntermediateInner.md +docs/PostSheep200ResponseIntermediateInnerIntensities.md +docs/PostSheep200ResponseNet.md +docs/PostSheepRequest.md +docs/PostSheepRequestSheepInner.md +docs/PostSheepRequestSheepInnerClasses.md +docs/PostSheepRequestSheepInnerClassesRams.md +docs/PostSheepRequestSheepInnerClassesRamsAutumn.md +docs/PostSheepRequestSheepInnerClassesTradeEwes.md +docs/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md +docs/PostSheepRequestSheepInnerEwesLambing.md +docs/PostSheepRequestSheepInnerSeasonalLambing.md +docs/PostSheepRequestVegetationInner.md +docs/PostSheepbeef200Response.md +docs/PostSheepbeef200ResponseIntensities.md +docs/PostSheepbeef200ResponseIntermediate.md +docs/PostSheepbeef200ResponseIntermediateBeef.md +docs/PostSheepbeef200ResponseIntermediateSheep.md +docs/PostSheepbeef200ResponseNet.md +docs/PostSheepbeefRequest.md +docs/PostSheepbeefRequestVegetationInner.md +docs/PostSugar200Response.md +docs/PostSugar200ResponseIntermediateInner.md +docs/PostSugar200ResponseIntermediateInnerIntensities.md +docs/PostSugarRequest.md +docs/PostSugarRequestCropsInner.md +docs/PostVineyard200Response.md +docs/PostVineyard200ResponseIntermediateInner.md +docs/PostVineyard200ResponseIntermediateInnerIntensities.md +docs/PostVineyard200ResponseNet.md +docs/PostVineyard200ResponseScope1.md +docs/PostVineyard200ResponseScope3.md +docs/PostVineyardRequest.md +docs/PostVineyardRequestVegetationInner.md +docs/PostVineyardRequestVineyardsInner.md +docs/PostWildcatchfishery200Response.md +docs/PostWildcatchfishery200ResponseIntensities.md +docs/PostWildcatchfishery200ResponseIntermediateInner.md +docs/PostWildcatchfishery200ResponseScope1.md +docs/PostWildcatchfisheryRequest.md +docs/PostWildcatchfisheryRequestEnterprisesInner.md +docs/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md +docs/PostWildseafisheries200Response.md +docs/PostWildseafisheries200ResponseIntermediateInner.md +docs/PostWildseafisheries200ResponseIntermediateInnerIntensities.md +docs/PostWildseafisheries200ResponseScope1.md +docs/PostWildseafisheries200ResponseScope3.md +docs/PostWildseafisheriesRequest.md +docs/PostWildseafisheriesRequestEnterprisesInner.md +docs/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md +docs/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md +docs/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md +docs/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md +docs/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md +git_push.sh +openapi_client/__init__.py +openapi_client/api/__init__.py +openapi_client/api/gaf_api.py +openapi_client/api_client.py +openapi_client/api_response.py +openapi_client/configuration.py +openapi_client/exceptions.py +openapi_client/models/__init__.py +openapi_client/models/post_aquaculture200_response.py +openapi_client/models/post_aquaculture200_response_carbon_sequestration.py +openapi_client/models/post_aquaculture200_response_intensities.py +openapi_client/models/post_aquaculture200_response_intermediate_inner.py +openapi_client/models/post_aquaculture200_response_intermediate_inner_carbon_sequestration.py +openapi_client/models/post_aquaculture200_response_net.py +openapi_client/models/post_aquaculture200_response_purchased_offsets.py +openapi_client/models/post_aquaculture200_response_scope1.py +openapi_client/models/post_aquaculture200_response_scope2.py +openapi_client/models/post_aquaculture200_response_scope3.py +openapi_client/models/post_aquaculture_request.py +openapi_client/models/post_aquaculture_request_enterprises_inner.py +openapi_client/models/post_aquaculture_request_enterprises_inner_bait_inner.py +openapi_client/models/post_aquaculture_request_enterprises_inner_custom_bait_inner.py +openapi_client/models/post_aquaculture_request_enterprises_inner_fluid_waste_inner.py +openapi_client/models/post_aquaculture_request_enterprises_inner_fuel.py +openapi_client/models/post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py +openapi_client/models/post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py +openapi_client/models/post_aquaculture_request_enterprises_inner_inbound_freight_inner.py +openapi_client/models/post_aquaculture_request_enterprises_inner_refrigerants_inner.py +openapi_client/models/post_aquaculture_request_enterprises_inner_solid_waste.py +openapi_client/models/post_beef200_response.py +openapi_client/models/post_beef200_response_intermediate_inner.py +openapi_client/models/post_beef200_response_intermediate_inner_intensities.py +openapi_client/models/post_beef200_response_net.py +openapi_client/models/post_beef200_response_scope1.py +openapi_client/models/post_beef200_response_scope3.py +openapi_client/models/post_beef_request.py +openapi_client/models/post_beef_request_beef_inner.py +openapi_client/models/post_beef_request_beef_inner_classes.py +openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1.py +openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_autumn.py +openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py +openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_traded.py +openapi_client/models/post_beef_request_beef_inner_classes_cows_gt2.py +openapi_client/models/post_beef_request_beef_inner_classes_cows_gt2_traded.py +openapi_client/models/post_beef_request_beef_inner_classes_heifers1_to2.py +openapi_client/models/post_beef_request_beef_inner_classes_heifers1_to2_traded.py +openapi_client/models/post_beef_request_beef_inner_classes_heifers_gt2.py +openapi_client/models/post_beef_request_beef_inner_classes_heifers_gt2_traded.py +openapi_client/models/post_beef_request_beef_inner_classes_heifers_lt1.py +openapi_client/models/post_beef_request_beef_inner_classes_heifers_lt1_traded.py +openapi_client/models/post_beef_request_beef_inner_classes_steers1_to2.py +openapi_client/models/post_beef_request_beef_inner_classes_steers1_to2_traded.py +openapi_client/models/post_beef_request_beef_inner_classes_steers_gt2.py +openapi_client/models/post_beef_request_beef_inner_classes_steers_gt2_traded.py +openapi_client/models/post_beef_request_beef_inner_classes_steers_lt1.py +openapi_client/models/post_beef_request_beef_inner_classes_steers_lt1_traded.py +openapi_client/models/post_beef_request_beef_inner_cows_calving.py +openapi_client/models/post_beef_request_beef_inner_fertiliser.py +openapi_client/models/post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py +openapi_client/models/post_beef_request_beef_inner_mineral_supplementation.py +openapi_client/models/post_beef_request_burning_inner.py +openapi_client/models/post_beef_request_burning_inner_burning.py +openapi_client/models/post_beef_request_vegetation_inner.py +openapi_client/models/post_beef_request_vegetation_inner_vegetation.py +openapi_client/models/post_buffalo200_response.py +openapi_client/models/post_buffalo200_response_intensities.py +openapi_client/models/post_buffalo200_response_intermediate_inner.py +openapi_client/models/post_buffalo200_response_net.py +openapi_client/models/post_buffalo200_response_scope1.py +openapi_client/models/post_buffalo200_response_scope3.py +openapi_client/models/post_buffalo_request.py +openapi_client/models/post_buffalo_request_buffalos_inner.py +openapi_client/models/post_buffalo_request_buffalos_inner_classes.py +openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls.py +openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls_autumn.py +openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py +openapi_client/models/post_buffalo_request_buffalos_inner_classes_calfs.py +openapi_client/models/post_buffalo_request_buffalos_inner_classes_cows.py +openapi_client/models/post_buffalo_request_buffalos_inner_classes_steers.py +openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_bulls.py +openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_calfs.py +openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_cows.py +openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_steers.py +openapi_client/models/post_buffalo_request_buffalos_inner_cows_calving.py +openapi_client/models/post_buffalo_request_buffalos_inner_seasonal_calving.py +openapi_client/models/post_buffalo_request_vegetation_inner.py +openapi_client/models/post_cotton200_response.py +openapi_client/models/post_cotton200_response_intermediate_inner.py +openapi_client/models/post_cotton200_response_intermediate_inner_intensities.py +openapi_client/models/post_cotton200_response_net.py +openapi_client/models/post_cotton200_response_scope1.py +openapi_client/models/post_cotton200_response_scope3.py +openapi_client/models/post_cotton_request.py +openapi_client/models/post_cotton_request_crops_inner.py +openapi_client/models/post_cotton_request_vegetation_inner.py +openapi_client/models/post_dairy200_response.py +openapi_client/models/post_dairy200_response_intensities.py +openapi_client/models/post_dairy200_response_intermediate_inner.py +openapi_client/models/post_dairy200_response_net.py +openapi_client/models/post_dairy200_response_scope1.py +openapi_client/models/post_dairy200_response_scope3.py +openapi_client/models/post_dairy_request.py +openapi_client/models/post_dairy_request_dairy_inner.py +openapi_client/models/post_dairy_request_dairy_inner_areas.py +openapi_client/models/post_dairy_request_dairy_inner_classes.py +openapi_client/models/post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py +openapi_client/models/post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py +openapi_client/models/post_dairy_request_dairy_inner_classes_heifers_gt1.py +openapi_client/models/post_dairy_request_dairy_inner_classes_heifers_lt1.py +openapi_client/models/post_dairy_request_dairy_inner_classes_milking_cows.py +openapi_client/models/post_dairy_request_dairy_inner_classes_milking_cows_autumn.py +openapi_client/models/post_dairy_request_dairy_inner_manure_management_milking_cows.py +openapi_client/models/post_dairy_request_dairy_inner_seasonal_fertiliser.py +openapi_client/models/post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py +openapi_client/models/post_dairy_request_vegetation_inner.py +openapi_client/models/post_deer200_response.py +openapi_client/models/post_deer200_response_intensities.py +openapi_client/models/post_deer200_response_intermediate_inner.py +openapi_client/models/post_deer200_response_net.py +openapi_client/models/post_deer_request.py +openapi_client/models/post_deer_request_deers_inner.py +openapi_client/models/post_deer_request_deers_inner_classes.py +openapi_client/models/post_deer_request_deers_inner_classes_breeding_does.py +openapi_client/models/post_deer_request_deers_inner_classes_bucks.py +openapi_client/models/post_deer_request_deers_inner_classes_fawn.py +openapi_client/models/post_deer_request_deers_inner_classes_other_does.py +openapi_client/models/post_deer_request_deers_inner_classes_trade_bucks.py +openapi_client/models/post_deer_request_deers_inner_classes_trade_does.py +openapi_client/models/post_deer_request_deers_inner_classes_trade_fawn.py +openapi_client/models/post_deer_request_deers_inner_classes_trade_other_does.py +openapi_client/models/post_deer_request_deers_inner_does_fawning.py +openapi_client/models/post_deer_request_deers_inner_seasonal_fawning.py +openapi_client/models/post_deer_request_vegetation_inner.py +openapi_client/models/post_feedlot200_response.py +openapi_client/models/post_feedlot200_response_intermediate_inner.py +openapi_client/models/post_feedlot200_response_intermediate_inner_intensities.py +openapi_client/models/post_feedlot200_response_intermediate_inner_net.py +openapi_client/models/post_feedlot200_response_scope1.py +openapi_client/models/post_feedlot200_response_scope3.py +openapi_client/models/post_feedlot_request.py +openapi_client/models/post_feedlot_request_feedlots_inner.py +openapi_client/models/post_feedlot_request_feedlots_inner_groups_inner.py +openapi_client/models/post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py +openapi_client/models/post_feedlot_request_feedlots_inner_purchases.py +openapi_client/models/post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py +openapi_client/models/post_feedlot_request_feedlots_inner_sales.py +openapi_client/models/post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py +openapi_client/models/post_feedlot_request_vegetation_inner.py +openapi_client/models/post_goat200_response.py +openapi_client/models/post_goat200_response_intensities.py +openapi_client/models/post_goat200_response_intermediate_inner.py +openapi_client/models/post_goat200_response_net.py +openapi_client/models/post_goat_request.py +openapi_client/models/post_goat_request_goats_inner.py +openapi_client/models/post_goat_request_goats_inner_classes.py +openapi_client/models/post_goat_request_goats_inner_classes_breeding_does_nannies.py +openapi_client/models/post_goat_request_goats_inner_classes_bucks_billy.py +openapi_client/models/post_goat_request_goats_inner_classes_kids.py +openapi_client/models/post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py +openapi_client/models/post_goat_request_goats_inner_classes_other_does_culled_females.py +openapi_client/models/post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py +openapi_client/models/post_goat_request_goats_inner_classes_trade_bucks.py +openapi_client/models/post_goat_request_goats_inner_classes_trade_does.py +openapi_client/models/post_goat_request_goats_inner_classes_trade_kids.py +openapi_client/models/post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py +openapi_client/models/post_goat_request_goats_inner_classes_trade_other_does_culled_females.py +openapi_client/models/post_goat_request_goats_inner_classes_trade_wethers.py +openapi_client/models/post_goat_request_goats_inner_classes_wethers.py +openapi_client/models/post_goat_request_vegetation_inner.py +openapi_client/models/post_grains200_response.py +openapi_client/models/post_grains200_response_intermediate_inner.py +openapi_client/models/post_grains200_response_intermediate_inner_intensities_with_sequestration.py +openapi_client/models/post_grains_request.py +openapi_client/models/post_grains_request_crops_inner.py +openapi_client/models/post_horticulture200_response.py +openapi_client/models/post_horticulture200_response_intermediate_inner.py +openapi_client/models/post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py +openapi_client/models/post_horticulture200_response_scope1.py +openapi_client/models/post_horticulture_request.py +openapi_client/models/post_horticulture_request_crops_inner.py +openapi_client/models/post_horticulture_request_crops_inner_refrigerants_inner.py +openapi_client/models/post_pork200_response.py +openapi_client/models/post_pork200_response_intensities.py +openapi_client/models/post_pork200_response_intermediate_inner.py +openapi_client/models/post_pork200_response_net.py +openapi_client/models/post_pork200_response_scope1.py +openapi_client/models/post_pork200_response_scope3.py +openapi_client/models/post_pork_request.py +openapi_client/models/post_pork_request_pork_inner.py +openapi_client/models/post_pork_request_pork_inner_classes.py +openapi_client/models/post_pork_request_pork_inner_classes_boars.py +openapi_client/models/post_pork_request_pork_inner_classes_gilts.py +openapi_client/models/post_pork_request_pork_inner_classes_growers.py +openapi_client/models/post_pork_request_pork_inner_classes_slaughter_pigs.py +openapi_client/models/post_pork_request_pork_inner_classes_sows.py +openapi_client/models/post_pork_request_pork_inner_classes_sows_manure.py +openapi_client/models/post_pork_request_pork_inner_classes_sows_manure_spring.py +openapi_client/models/post_pork_request_pork_inner_classes_suckers.py +openapi_client/models/post_pork_request_pork_inner_classes_weaners.py +openapi_client/models/post_pork_request_pork_inner_feed_products_inner.py +openapi_client/models/post_pork_request_pork_inner_feed_products_inner_ingredients.py +openapi_client/models/post_pork_request_vegetation_inner.py +openapi_client/models/post_poultry200_response.py +openapi_client/models/post_poultry200_response_intensities.py +openapi_client/models/post_poultry200_response_intermediate_broilers_inner.py +openapi_client/models/post_poultry200_response_intermediate_broilers_inner_intensities.py +openapi_client/models/post_poultry200_response_intermediate_layers_inner.py +openapi_client/models/post_poultry200_response_intermediate_layers_inner_intensities.py +openapi_client/models/post_poultry200_response_net.py +openapi_client/models/post_poultry200_response_scope1.py +openapi_client/models/post_poultry200_response_scope3.py +openapi_client/models/post_poultry_request.py +openapi_client/models/post_poultry_request_broilers_inner.py +openapi_client/models/post_poultry_request_broilers_inner_groups_inner.py +openapi_client/models/post_poultry_request_broilers_inner_groups_inner_feed_inner.py +openapi_client/models/post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py +openapi_client/models/post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py +openapi_client/models/post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py +openapi_client/models/post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py +openapi_client/models/post_poultry_request_broilers_inner_meat_other_purchases.py +openapi_client/models/post_poultry_request_broilers_inner_sales_inner.py +openapi_client/models/post_poultry_request_layers_inner.py +openapi_client/models/post_poultry_request_layers_inner_layers.py +openapi_client/models/post_poultry_request_layers_inner_layers_egg_sale.py +openapi_client/models/post_poultry_request_layers_inner_layers_purchases.py +openapi_client/models/post_poultry_request_layers_inner_meat_chicken_layers.py +openapi_client/models/post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py +openapi_client/models/post_poultry_request_vegetation_inner.py +openapi_client/models/post_processing200_response.py +openapi_client/models/post_processing200_response_intensities_inner.py +openapi_client/models/post_processing200_response_intermediate_inner.py +openapi_client/models/post_processing200_response_net.py +openapi_client/models/post_processing200_response_scope1.py +openapi_client/models/post_processing200_response_scope3.py +openapi_client/models/post_processing_request.py +openapi_client/models/post_processing_request_products_inner.py +openapi_client/models/post_processing_request_products_inner_product.py +openapi_client/models/post_rice200_response.py +openapi_client/models/post_rice200_response_intensities.py +openapi_client/models/post_rice200_response_intermediate_inner.py +openapi_client/models/post_rice200_response_intermediate_inner_intensities.py +openapi_client/models/post_rice200_response_scope1.py +openapi_client/models/post_rice_request.py +openapi_client/models/post_rice_request_crops_inner.py +openapi_client/models/post_sheep200_response.py +openapi_client/models/post_sheep200_response_intermediate_inner.py +openapi_client/models/post_sheep200_response_intermediate_inner_intensities.py +openapi_client/models/post_sheep200_response_net.py +openapi_client/models/post_sheep_request.py +openapi_client/models/post_sheep_request_sheep_inner.py +openapi_client/models/post_sheep_request_sheep_inner_classes.py +openapi_client/models/post_sheep_request_sheep_inner_classes_rams.py +openapi_client/models/post_sheep_request_sheep_inner_classes_rams_autumn.py +openapi_client/models/post_sheep_request_sheep_inner_classes_trade_ewes.py +openapi_client/models/post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py +openapi_client/models/post_sheep_request_sheep_inner_ewes_lambing.py +openapi_client/models/post_sheep_request_sheep_inner_seasonal_lambing.py +openapi_client/models/post_sheep_request_vegetation_inner.py +openapi_client/models/post_sheepbeef200_response.py +openapi_client/models/post_sheepbeef200_response_intensities.py +openapi_client/models/post_sheepbeef200_response_intermediate.py +openapi_client/models/post_sheepbeef200_response_intermediate_beef.py +openapi_client/models/post_sheepbeef200_response_intermediate_sheep.py +openapi_client/models/post_sheepbeef200_response_net.py +openapi_client/models/post_sheepbeef_request.py +openapi_client/models/post_sheepbeef_request_vegetation_inner.py +openapi_client/models/post_sugar200_response.py +openapi_client/models/post_sugar200_response_intermediate_inner.py +openapi_client/models/post_sugar200_response_intermediate_inner_intensities.py +openapi_client/models/post_sugar_request.py +openapi_client/models/post_sugar_request_crops_inner.py +openapi_client/models/post_vineyard200_response.py +openapi_client/models/post_vineyard200_response_intermediate_inner.py +openapi_client/models/post_vineyard200_response_intermediate_inner_intensities.py +openapi_client/models/post_vineyard200_response_net.py +openapi_client/models/post_vineyard200_response_scope1.py +openapi_client/models/post_vineyard200_response_scope3.py +openapi_client/models/post_vineyard_request.py +openapi_client/models/post_vineyard_request_vegetation_inner.py +openapi_client/models/post_vineyard_request_vineyards_inner.py +openapi_client/models/post_wildcatchfishery200_response.py +openapi_client/models/post_wildcatchfishery200_response_intensities.py +openapi_client/models/post_wildcatchfishery200_response_intermediate_inner.py +openapi_client/models/post_wildcatchfishery200_response_scope1.py +openapi_client/models/post_wildcatchfishery_request.py +openapi_client/models/post_wildcatchfishery_request_enterprises_inner.py +openapi_client/models/post_wildcatchfishery_request_enterprises_inner_bait_inner.py +openapi_client/models/post_wildseafisheries200_response.py +openapi_client/models/post_wildseafisheries200_response_intermediate_inner.py +openapi_client/models/post_wildseafisheries200_response_intermediate_inner_intensities.py +openapi_client/models/post_wildseafisheries200_response_scope1.py +openapi_client/models/post_wildseafisheries200_response_scope3.py +openapi_client/models/post_wildseafisheries_request.py +openapi_client/models/post_wildseafisheries_request_enterprises_inner.py +openapi_client/models/post_wildseafisheries_request_enterprises_inner_bait_inner.py +openapi_client/models/post_wildseafisheries_request_enterprises_inner_custombait_inner.py +openapi_client/models/post_wildseafisheries_request_enterprises_inner_flights_inner.py +openapi_client/models/post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py +openapi_client/models/post_wildseafisheries_request_enterprises_inner_transports_inner.py +openapi_client/py.typed +openapi_client/rest.py +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_gaf_api.py +test/test_post_aquaculture200_response.py +test/test_post_aquaculture200_response_carbon_sequestration.py +test/test_post_aquaculture200_response_intensities.py +test/test_post_aquaculture200_response_intermediate_inner.py +test/test_post_aquaculture200_response_intermediate_inner_carbon_sequestration.py +test/test_post_aquaculture200_response_net.py +test/test_post_aquaculture200_response_purchased_offsets.py +test/test_post_aquaculture200_response_scope1.py +test/test_post_aquaculture200_response_scope2.py +test/test_post_aquaculture200_response_scope3.py +test/test_post_aquaculture_request.py +test/test_post_aquaculture_request_enterprises_inner.py +test/test_post_aquaculture_request_enterprises_inner_bait_inner.py +test/test_post_aquaculture_request_enterprises_inner_custom_bait_inner.py +test/test_post_aquaculture_request_enterprises_inner_fluid_waste_inner.py +test/test_post_aquaculture_request_enterprises_inner_fuel.py +test/test_post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py +test/test_post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py +test/test_post_aquaculture_request_enterprises_inner_inbound_freight_inner.py +test/test_post_aquaculture_request_enterprises_inner_refrigerants_inner.py +test/test_post_aquaculture_request_enterprises_inner_solid_waste.py +test/test_post_beef200_response.py +test/test_post_beef200_response_intermediate_inner.py +test/test_post_beef200_response_intermediate_inner_intensities.py +test/test_post_beef200_response_net.py +test/test_post_beef200_response_scope1.py +test/test_post_beef200_response_scope3.py +test/test_post_beef_request.py +test/test_post_beef_request_beef_inner.py +test/test_post_beef_request_beef_inner_classes.py +test/test_post_beef_request_beef_inner_classes_bulls_gt1.py +test/test_post_beef_request_beef_inner_classes_bulls_gt1_autumn.py +test/test_post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py +test/test_post_beef_request_beef_inner_classes_bulls_gt1_traded.py +test/test_post_beef_request_beef_inner_classes_cows_gt2.py +test/test_post_beef_request_beef_inner_classes_cows_gt2_traded.py +test/test_post_beef_request_beef_inner_classes_heifers1_to2.py +test/test_post_beef_request_beef_inner_classes_heifers1_to2_traded.py +test/test_post_beef_request_beef_inner_classes_heifers_gt2.py +test/test_post_beef_request_beef_inner_classes_heifers_gt2_traded.py +test/test_post_beef_request_beef_inner_classes_heifers_lt1.py +test/test_post_beef_request_beef_inner_classes_heifers_lt1_traded.py +test/test_post_beef_request_beef_inner_classes_steers1_to2.py +test/test_post_beef_request_beef_inner_classes_steers1_to2_traded.py +test/test_post_beef_request_beef_inner_classes_steers_gt2.py +test/test_post_beef_request_beef_inner_classes_steers_gt2_traded.py +test/test_post_beef_request_beef_inner_classes_steers_lt1.py +test/test_post_beef_request_beef_inner_classes_steers_lt1_traded.py +test/test_post_beef_request_beef_inner_cows_calving.py +test/test_post_beef_request_beef_inner_fertiliser.py +test/test_post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py +test/test_post_beef_request_beef_inner_mineral_supplementation.py +test/test_post_beef_request_burning_inner.py +test/test_post_beef_request_burning_inner_burning.py +test/test_post_beef_request_vegetation_inner.py +test/test_post_beef_request_vegetation_inner_vegetation.py +test/test_post_buffalo200_response.py +test/test_post_buffalo200_response_intensities.py +test/test_post_buffalo200_response_intermediate_inner.py +test/test_post_buffalo200_response_net.py +test/test_post_buffalo200_response_scope1.py +test/test_post_buffalo200_response_scope3.py +test/test_post_buffalo_request.py +test/test_post_buffalo_request_buffalos_inner.py +test/test_post_buffalo_request_buffalos_inner_classes.py +test/test_post_buffalo_request_buffalos_inner_classes_bulls.py +test/test_post_buffalo_request_buffalos_inner_classes_bulls_autumn.py +test/test_post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py +test/test_post_buffalo_request_buffalos_inner_classes_calfs.py +test/test_post_buffalo_request_buffalos_inner_classes_cows.py +test/test_post_buffalo_request_buffalos_inner_classes_steers.py +test/test_post_buffalo_request_buffalos_inner_classes_trade_bulls.py +test/test_post_buffalo_request_buffalos_inner_classes_trade_calfs.py +test/test_post_buffalo_request_buffalos_inner_classes_trade_cows.py +test/test_post_buffalo_request_buffalos_inner_classes_trade_steers.py +test/test_post_buffalo_request_buffalos_inner_cows_calving.py +test/test_post_buffalo_request_buffalos_inner_seasonal_calving.py +test/test_post_buffalo_request_vegetation_inner.py +test/test_post_cotton200_response.py +test/test_post_cotton200_response_intermediate_inner.py +test/test_post_cotton200_response_intermediate_inner_intensities.py +test/test_post_cotton200_response_net.py +test/test_post_cotton200_response_scope1.py +test/test_post_cotton200_response_scope3.py +test/test_post_cotton_request.py +test/test_post_cotton_request_crops_inner.py +test/test_post_cotton_request_vegetation_inner.py +test/test_post_dairy200_response.py +test/test_post_dairy200_response_intensities.py +test/test_post_dairy200_response_intermediate_inner.py +test/test_post_dairy200_response_net.py +test/test_post_dairy200_response_scope1.py +test/test_post_dairy200_response_scope3.py +test/test_post_dairy_request.py +test/test_post_dairy_request_dairy_inner.py +test/test_post_dairy_request_dairy_inner_areas.py +test/test_post_dairy_request_dairy_inner_classes.py +test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py +test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py +test/test_post_dairy_request_dairy_inner_classes_heifers_gt1.py +test/test_post_dairy_request_dairy_inner_classes_heifers_lt1.py +test/test_post_dairy_request_dairy_inner_classes_milking_cows.py +test/test_post_dairy_request_dairy_inner_classes_milking_cows_autumn.py +test/test_post_dairy_request_dairy_inner_manure_management_milking_cows.py +test/test_post_dairy_request_dairy_inner_seasonal_fertiliser.py +test/test_post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py +test/test_post_dairy_request_vegetation_inner.py +test/test_post_deer200_response.py +test/test_post_deer200_response_intensities.py +test/test_post_deer200_response_intermediate_inner.py +test/test_post_deer200_response_net.py +test/test_post_deer_request.py +test/test_post_deer_request_deers_inner.py +test/test_post_deer_request_deers_inner_classes.py +test/test_post_deer_request_deers_inner_classes_breeding_does.py +test/test_post_deer_request_deers_inner_classes_bucks.py +test/test_post_deer_request_deers_inner_classes_fawn.py +test/test_post_deer_request_deers_inner_classes_other_does.py +test/test_post_deer_request_deers_inner_classes_trade_bucks.py +test/test_post_deer_request_deers_inner_classes_trade_does.py +test/test_post_deer_request_deers_inner_classes_trade_fawn.py +test/test_post_deer_request_deers_inner_classes_trade_other_does.py +test/test_post_deer_request_deers_inner_does_fawning.py +test/test_post_deer_request_deers_inner_seasonal_fawning.py +test/test_post_deer_request_vegetation_inner.py +test/test_post_feedlot200_response.py +test/test_post_feedlot200_response_intermediate_inner.py +test/test_post_feedlot200_response_intermediate_inner_intensities.py +test/test_post_feedlot200_response_intermediate_inner_net.py +test/test_post_feedlot200_response_scope1.py +test/test_post_feedlot200_response_scope3.py +test/test_post_feedlot_request.py +test/test_post_feedlot_request_feedlots_inner.py +test/test_post_feedlot_request_feedlots_inner_groups_inner.py +test/test_post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py +test/test_post_feedlot_request_feedlots_inner_purchases.py +test/test_post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py +test/test_post_feedlot_request_feedlots_inner_sales.py +test/test_post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py +test/test_post_feedlot_request_vegetation_inner.py +test/test_post_goat200_response.py +test/test_post_goat200_response_intensities.py +test/test_post_goat200_response_intermediate_inner.py +test/test_post_goat200_response_net.py +test/test_post_goat_request.py +test/test_post_goat_request_goats_inner.py +test/test_post_goat_request_goats_inner_classes.py +test/test_post_goat_request_goats_inner_classes_breeding_does_nannies.py +test/test_post_goat_request_goats_inner_classes_bucks_billy.py +test/test_post_goat_request_goats_inner_classes_kids.py +test/test_post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py +test/test_post_goat_request_goats_inner_classes_other_does_culled_females.py +test/test_post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py +test/test_post_goat_request_goats_inner_classes_trade_bucks.py +test/test_post_goat_request_goats_inner_classes_trade_does.py +test/test_post_goat_request_goats_inner_classes_trade_kids.py +test/test_post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py +test/test_post_goat_request_goats_inner_classes_trade_other_does_culled_females.py +test/test_post_goat_request_goats_inner_classes_trade_wethers.py +test/test_post_goat_request_goats_inner_classes_wethers.py +test/test_post_goat_request_vegetation_inner.py +test/test_post_grains200_response.py +test/test_post_grains200_response_intermediate_inner.py +test/test_post_grains200_response_intermediate_inner_intensities_with_sequestration.py +test/test_post_grains_request.py +test/test_post_grains_request_crops_inner.py +test/test_post_horticulture200_response.py +test/test_post_horticulture200_response_intermediate_inner.py +test/test_post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py +test/test_post_horticulture200_response_scope1.py +test/test_post_horticulture_request.py +test/test_post_horticulture_request_crops_inner.py +test/test_post_horticulture_request_crops_inner_refrigerants_inner.py +test/test_post_pork200_response.py +test/test_post_pork200_response_intensities.py +test/test_post_pork200_response_intermediate_inner.py +test/test_post_pork200_response_net.py +test/test_post_pork200_response_scope1.py +test/test_post_pork200_response_scope3.py +test/test_post_pork_request.py +test/test_post_pork_request_pork_inner.py +test/test_post_pork_request_pork_inner_classes.py +test/test_post_pork_request_pork_inner_classes_boars.py +test/test_post_pork_request_pork_inner_classes_gilts.py +test/test_post_pork_request_pork_inner_classes_growers.py +test/test_post_pork_request_pork_inner_classes_slaughter_pigs.py +test/test_post_pork_request_pork_inner_classes_sows.py +test/test_post_pork_request_pork_inner_classes_sows_manure.py +test/test_post_pork_request_pork_inner_classes_sows_manure_spring.py +test/test_post_pork_request_pork_inner_classes_suckers.py +test/test_post_pork_request_pork_inner_classes_weaners.py +test/test_post_pork_request_pork_inner_feed_products_inner.py +test/test_post_pork_request_pork_inner_feed_products_inner_ingredients.py +test/test_post_pork_request_vegetation_inner.py +test/test_post_poultry200_response.py +test/test_post_poultry200_response_intensities.py +test/test_post_poultry200_response_intermediate_broilers_inner.py +test/test_post_poultry200_response_intermediate_broilers_inner_intensities.py +test/test_post_poultry200_response_intermediate_layers_inner.py +test/test_post_poultry200_response_intermediate_layers_inner_intensities.py +test/test_post_poultry200_response_net.py +test/test_post_poultry200_response_scope1.py +test/test_post_poultry200_response_scope3.py +test/test_post_poultry_request.py +test/test_post_poultry_request_broilers_inner.py +test/test_post_poultry_request_broilers_inner_groups_inner.py +test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner.py +test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py +test/test_post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py +test/test_post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py +test/test_post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py +test/test_post_poultry_request_broilers_inner_meat_other_purchases.py +test/test_post_poultry_request_broilers_inner_sales_inner.py +test/test_post_poultry_request_layers_inner.py +test/test_post_poultry_request_layers_inner_layers.py +test/test_post_poultry_request_layers_inner_layers_egg_sale.py +test/test_post_poultry_request_layers_inner_layers_purchases.py +test/test_post_poultry_request_layers_inner_meat_chicken_layers.py +test/test_post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py +test/test_post_poultry_request_vegetation_inner.py +test/test_post_processing200_response.py +test/test_post_processing200_response_intensities_inner.py +test/test_post_processing200_response_intermediate_inner.py +test/test_post_processing200_response_net.py +test/test_post_processing200_response_scope1.py +test/test_post_processing200_response_scope3.py +test/test_post_processing_request.py +test/test_post_processing_request_products_inner.py +test/test_post_processing_request_products_inner_product.py +test/test_post_rice200_response.py +test/test_post_rice200_response_intensities.py +test/test_post_rice200_response_intermediate_inner.py +test/test_post_rice200_response_intermediate_inner_intensities.py +test/test_post_rice200_response_scope1.py +test/test_post_rice_request.py +test/test_post_rice_request_crops_inner.py +test/test_post_sheep200_response.py +test/test_post_sheep200_response_intermediate_inner.py +test/test_post_sheep200_response_intermediate_inner_intensities.py +test/test_post_sheep200_response_net.py +test/test_post_sheep_request.py +test/test_post_sheep_request_sheep_inner.py +test/test_post_sheep_request_sheep_inner_classes.py +test/test_post_sheep_request_sheep_inner_classes_rams.py +test/test_post_sheep_request_sheep_inner_classes_rams_autumn.py +test/test_post_sheep_request_sheep_inner_classes_trade_ewes.py +test/test_post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py +test/test_post_sheep_request_sheep_inner_ewes_lambing.py +test/test_post_sheep_request_sheep_inner_seasonal_lambing.py +test/test_post_sheep_request_vegetation_inner.py +test/test_post_sheepbeef200_response.py +test/test_post_sheepbeef200_response_intensities.py +test/test_post_sheepbeef200_response_intermediate.py +test/test_post_sheepbeef200_response_intermediate_beef.py +test/test_post_sheepbeef200_response_intermediate_sheep.py +test/test_post_sheepbeef200_response_net.py +test/test_post_sheepbeef_request.py +test/test_post_sheepbeef_request_vegetation_inner.py +test/test_post_sugar200_response.py +test/test_post_sugar200_response_intermediate_inner.py +test/test_post_sugar200_response_intermediate_inner_intensities.py +test/test_post_sugar_request.py +test/test_post_sugar_request_crops_inner.py +test/test_post_vineyard200_response.py +test/test_post_vineyard200_response_intermediate_inner.py +test/test_post_vineyard200_response_intermediate_inner_intensities.py +test/test_post_vineyard200_response_net.py +test/test_post_vineyard200_response_scope1.py +test/test_post_vineyard200_response_scope3.py +test/test_post_vineyard_request.py +test/test_post_vineyard_request_vegetation_inner.py +test/test_post_vineyard_request_vineyards_inner.py +test/test_post_wildcatchfishery200_response.py +test/test_post_wildcatchfishery200_response_intensities.py +test/test_post_wildcatchfishery200_response_intermediate_inner.py +test/test_post_wildcatchfishery200_response_scope1.py +test/test_post_wildcatchfishery_request.py +test/test_post_wildcatchfishery_request_enterprises_inner.py +test/test_post_wildcatchfishery_request_enterprises_inner_bait_inner.py +test/test_post_wildseafisheries200_response.py +test/test_post_wildseafisheries200_response_intermediate_inner.py +test/test_post_wildseafisheries200_response_intermediate_inner_intensities.py +test/test_post_wildseafisheries200_response_scope1.py +test/test_post_wildseafisheries200_response_scope3.py +test/test_post_wildseafisheries_request.py +test/test_post_wildseafisheries_request_enterprises_inner.py +test/test_post_wildseafisheries_request_enterprises_inner_bait_inner.py +test/test_post_wildseafisheries_request_enterprises_inner_custombait_inner.py +test/test_post_wildseafisheries_request_enterprises_inner_flights_inner.py +test/test_post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py +test/test_post_wildseafisheries_request_enterprises_inner_transports_inner.py +tox.ini diff --git a/examples/python-api-client/api-client/.openapi-generator/VERSION b/examples/python-api-client/api-client/.openapi-generator/VERSION new file mode 100644 index 00000000..e465da43 --- /dev/null +++ b/examples/python-api-client/api-client/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.14.0 diff --git a/examples/python-api-client/api-client/.travis.yml b/examples/python-api-client/api-client/.travis.yml new file mode 100644 index 00000000..a3e4200d --- /dev/null +++ b/examples/python-api-client/api-client/.travis.yml @@ -0,0 +1,17 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "3.9" + - "3.10" + - "3.11" + - "3.12" + - "3.13" + # uncomment the following if needed + #- "3.13-dev" # 3.13 development branch + #- "nightly" # nightly build +# command to install dependencies +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" +# command to run tests +script: pytest --cov=openapi_client diff --git a/examples/python-api-client/api-client/README.md b/examples/python-api-client/api-client/README.md new file mode 100644 index 00000000..4b593d37 --- /dev/null +++ b/examples/python-api-client/api-client/README.md @@ -0,0 +1,416 @@ +# openapi-client +Emissions Calculators for various farming activities + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 3.0.0 +- Package version: 1.0.0 +- Generator version: 7.14.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen +For more information, please visit [https://aginnovationaustralia.com.au/contact-us/](https://aginnovationaustralia.com.au/contact-us/) + +## Requirements. + +Python 3.9+ + +## Installation & Usage +### pip install + +If the python package is hosted on a repository, you can install directly using: + +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import openapi_client +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import openapi_client +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_aquaculture_request = openapi_client.PostAquacultureRequest() # PostAquacultureRequest | + + try: + # Perform aquaculture calculation + api_response = api_instance.post_aquaculture(post_aquaculture_request) + print("The response of GAFApi->post_aquaculture:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling GAFApi->post_aquaculture: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*GAFApi* | [**post_aquaculture**](docs/GAFApi.md#post_aquaculture) | **POST** /aquaculture | Perform aquaculture calculation +*GAFApi* | [**post_beef**](docs/GAFApi.md#post_beef) | **POST** /beef | Perform beef calculation +*GAFApi* | [**post_buffalo**](docs/GAFApi.md#post_buffalo) | **POST** /buffalo | Perform buffalo calculation +*GAFApi* | [**post_cotton**](docs/GAFApi.md#post_cotton) | **POST** /cotton | Perform cotton calculation +*GAFApi* | [**post_dairy**](docs/GAFApi.md#post_dairy) | **POST** /dairy | Perform dairy calculation +*GAFApi* | [**post_deer**](docs/GAFApi.md#post_deer) | **POST** /deer | Perform deer calculation +*GAFApi* | [**post_feedlot**](docs/GAFApi.md#post_feedlot) | **POST** /feedlot | Perform feedlot calculation +*GAFApi* | [**post_goat**](docs/GAFApi.md#post_goat) | **POST** /goat | Perform goat calculation +*GAFApi* | [**post_grains**](docs/GAFApi.md#post_grains) | **POST** /grains | Perform grains calculation +*GAFApi* | [**post_horticulture**](docs/GAFApi.md#post_horticulture) | **POST** /horticulture | Perform horticulture calculation +*GAFApi* | [**post_pork**](docs/GAFApi.md#post_pork) | **POST** /pork | Perform pork calculation +*GAFApi* | [**post_poultry**](docs/GAFApi.md#post_poultry) | **POST** /poultry | Perform poultry calculation +*GAFApi* | [**post_processing**](docs/GAFApi.md#post_processing) | **POST** /processing | Perform processing calculation +*GAFApi* | [**post_rice**](docs/GAFApi.md#post_rice) | **POST** /rice | Perform rice calculation +*GAFApi* | [**post_sheep**](docs/GAFApi.md#post_sheep) | **POST** /sheep | Perform sheep calculation +*GAFApi* | [**post_sheepbeef**](docs/GAFApi.md#post_sheepbeef) | **POST** /sheepbeef | Perform sheepbeef calculation +*GAFApi* | [**post_sugar**](docs/GAFApi.md#post_sugar) | **POST** /sugar | Perform sugar calculation +*GAFApi* | [**post_vineyard**](docs/GAFApi.md#post_vineyard) | **POST** /vineyard | Perform vineyard calculation +*GAFApi* | [**post_wildcatchfishery**](docs/GAFApi.md#post_wildcatchfishery) | **POST** /wildcatchfishery | Perform wildcatchfishery calculation +*GAFApi* | [**post_wildseafisheries**](docs/GAFApi.md#post_wildseafisheries) | **POST** /wildseafisheries | Perform wildseafisheries calculation + + +## Documentation For Models + + - [PostAquaculture200Response](docs/PostAquaculture200Response.md) + - [PostAquaculture200ResponseCarbonSequestration](docs/PostAquaculture200ResponseCarbonSequestration.md) + - [PostAquaculture200ResponseIntensities](docs/PostAquaculture200ResponseIntensities.md) + - [PostAquaculture200ResponseIntermediateInner](docs/PostAquaculture200ResponseIntermediateInner.md) + - [PostAquaculture200ResponseIntermediateInnerCarbonSequestration](docs/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) + - [PostAquaculture200ResponseNet](docs/PostAquaculture200ResponseNet.md) + - [PostAquaculture200ResponsePurchasedOffsets](docs/PostAquaculture200ResponsePurchasedOffsets.md) + - [PostAquaculture200ResponseScope1](docs/PostAquaculture200ResponseScope1.md) + - [PostAquaculture200ResponseScope2](docs/PostAquaculture200ResponseScope2.md) + - [PostAquaculture200ResponseScope3](docs/PostAquaculture200ResponseScope3.md) + - [PostAquacultureRequest](docs/PostAquacultureRequest.md) + - [PostAquacultureRequestEnterprisesInner](docs/PostAquacultureRequestEnterprisesInner.md) + - [PostAquacultureRequestEnterprisesInnerBaitInner](docs/PostAquacultureRequestEnterprisesInnerBaitInner.md) + - [PostAquacultureRequestEnterprisesInnerCustomBaitInner](docs/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md) + - [PostAquacultureRequestEnterprisesInnerFluidWasteInner](docs/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) + - [PostAquacultureRequestEnterprisesInnerFuel](docs/PostAquacultureRequestEnterprisesInnerFuel.md) + - [PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner](docs/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md) + - [PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner](docs/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md) + - [PostAquacultureRequestEnterprisesInnerInboundFreightInner](docs/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) + - [PostAquacultureRequestEnterprisesInnerRefrigerantsInner](docs/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md) + - [PostAquacultureRequestEnterprisesInnerSolidWaste](docs/PostAquacultureRequestEnterprisesInnerSolidWaste.md) + - [PostBeef200Response](docs/PostBeef200Response.md) + - [PostBeef200ResponseIntermediateInner](docs/PostBeef200ResponseIntermediateInner.md) + - [PostBeef200ResponseIntermediateInnerIntensities](docs/PostBeef200ResponseIntermediateInnerIntensities.md) + - [PostBeef200ResponseNet](docs/PostBeef200ResponseNet.md) + - [PostBeef200ResponseScope1](docs/PostBeef200ResponseScope1.md) + - [PostBeef200ResponseScope3](docs/PostBeef200ResponseScope3.md) + - [PostBeefRequest](docs/PostBeefRequest.md) + - [PostBeefRequestBeefInner](docs/PostBeefRequestBeefInner.md) + - [PostBeefRequestBeefInnerClasses](docs/PostBeefRequestBeefInnerClasses.md) + - [PostBeefRequestBeefInnerClassesBullsGt1](docs/PostBeefRequestBeefInnerClassesBullsGt1.md) + - [PostBeefRequestBeefInnerClassesBullsGt1Autumn](docs/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) + - [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner](docs/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) + - [PostBeefRequestBeefInnerClassesBullsGt1Traded](docs/PostBeefRequestBeefInnerClassesBullsGt1Traded.md) + - [PostBeefRequestBeefInnerClassesCowsGt2](docs/PostBeefRequestBeefInnerClassesCowsGt2.md) + - [PostBeefRequestBeefInnerClassesCowsGt2Traded](docs/PostBeefRequestBeefInnerClassesCowsGt2Traded.md) + - [PostBeefRequestBeefInnerClassesHeifers1To2](docs/PostBeefRequestBeefInnerClassesHeifers1To2.md) + - [PostBeefRequestBeefInnerClassesHeifers1To2Traded](docs/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md) + - [PostBeefRequestBeefInnerClassesHeifersGt2](docs/PostBeefRequestBeefInnerClassesHeifersGt2.md) + - [PostBeefRequestBeefInnerClassesHeifersGt2Traded](docs/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md) + - [PostBeefRequestBeefInnerClassesHeifersLt1](docs/PostBeefRequestBeefInnerClassesHeifersLt1.md) + - [PostBeefRequestBeefInnerClassesHeifersLt1Traded](docs/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md) + - [PostBeefRequestBeefInnerClassesSteers1To2](docs/PostBeefRequestBeefInnerClassesSteers1To2.md) + - [PostBeefRequestBeefInnerClassesSteers1To2Traded](docs/PostBeefRequestBeefInnerClassesSteers1To2Traded.md) + - [PostBeefRequestBeefInnerClassesSteersGt2](docs/PostBeefRequestBeefInnerClassesSteersGt2.md) + - [PostBeefRequestBeefInnerClassesSteersGt2Traded](docs/PostBeefRequestBeefInnerClassesSteersGt2Traded.md) + - [PostBeefRequestBeefInnerClassesSteersLt1](docs/PostBeefRequestBeefInnerClassesSteersLt1.md) + - [PostBeefRequestBeefInnerClassesSteersLt1Traded](docs/PostBeefRequestBeefInnerClassesSteersLt1Traded.md) + - [PostBeefRequestBeefInnerCowsCalving](docs/PostBeefRequestBeefInnerCowsCalving.md) + - [PostBeefRequestBeefInnerFertiliser](docs/PostBeefRequestBeefInnerFertiliser.md) + - [PostBeefRequestBeefInnerFertiliserOtherFertilisersInner](docs/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md) + - [PostBeefRequestBeefInnerMineralSupplementation](docs/PostBeefRequestBeefInnerMineralSupplementation.md) + - [PostBeefRequestBurningInner](docs/PostBeefRequestBurningInner.md) + - [PostBeefRequestBurningInnerBurning](docs/PostBeefRequestBurningInnerBurning.md) + - [PostBeefRequestVegetationInner](docs/PostBeefRequestVegetationInner.md) + - [PostBeefRequestVegetationInnerVegetation](docs/PostBeefRequestVegetationInnerVegetation.md) + - [PostBuffalo200Response](docs/PostBuffalo200Response.md) + - [PostBuffalo200ResponseIntensities](docs/PostBuffalo200ResponseIntensities.md) + - [PostBuffalo200ResponseIntermediateInner](docs/PostBuffalo200ResponseIntermediateInner.md) + - [PostBuffalo200ResponseNet](docs/PostBuffalo200ResponseNet.md) + - [PostBuffalo200ResponseScope1](docs/PostBuffalo200ResponseScope1.md) + - [PostBuffalo200ResponseScope3](docs/PostBuffalo200ResponseScope3.md) + - [PostBuffaloRequest](docs/PostBuffaloRequest.md) + - [PostBuffaloRequestBuffalosInner](docs/PostBuffaloRequestBuffalosInner.md) + - [PostBuffaloRequestBuffalosInnerClasses](docs/PostBuffaloRequestBuffalosInnerClasses.md) + - [PostBuffaloRequestBuffalosInnerClassesBulls](docs/PostBuffaloRequestBuffalosInnerClassesBulls.md) + - [PostBuffaloRequestBuffalosInnerClassesBullsAutumn](docs/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) + - [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner](docs/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) + - [PostBuffaloRequestBuffalosInnerClassesCalfs](docs/PostBuffaloRequestBuffalosInnerClassesCalfs.md) + - [PostBuffaloRequestBuffalosInnerClassesCows](docs/PostBuffaloRequestBuffalosInnerClassesCows.md) + - [PostBuffaloRequestBuffalosInnerClassesSteers](docs/PostBuffaloRequestBuffalosInnerClassesSteers.md) + - [PostBuffaloRequestBuffalosInnerClassesTradeBulls](docs/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md) + - [PostBuffaloRequestBuffalosInnerClassesTradeCalfs](docs/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md) + - [PostBuffaloRequestBuffalosInnerClassesTradeCows](docs/PostBuffaloRequestBuffalosInnerClassesTradeCows.md) + - [PostBuffaloRequestBuffalosInnerClassesTradeSteers](docs/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md) + - [PostBuffaloRequestBuffalosInnerCowsCalving](docs/PostBuffaloRequestBuffalosInnerCowsCalving.md) + - [PostBuffaloRequestBuffalosInnerSeasonalCalving](docs/PostBuffaloRequestBuffalosInnerSeasonalCalving.md) + - [PostBuffaloRequestVegetationInner](docs/PostBuffaloRequestVegetationInner.md) + - [PostCotton200Response](docs/PostCotton200Response.md) + - [PostCotton200ResponseIntermediateInner](docs/PostCotton200ResponseIntermediateInner.md) + - [PostCotton200ResponseIntermediateInnerIntensities](docs/PostCotton200ResponseIntermediateInnerIntensities.md) + - [PostCotton200ResponseNet](docs/PostCotton200ResponseNet.md) + - [PostCotton200ResponseScope1](docs/PostCotton200ResponseScope1.md) + - [PostCotton200ResponseScope3](docs/PostCotton200ResponseScope3.md) + - [PostCottonRequest](docs/PostCottonRequest.md) + - [PostCottonRequestCropsInner](docs/PostCottonRequestCropsInner.md) + - [PostCottonRequestVegetationInner](docs/PostCottonRequestVegetationInner.md) + - [PostDairy200Response](docs/PostDairy200Response.md) + - [PostDairy200ResponseIntensities](docs/PostDairy200ResponseIntensities.md) + - [PostDairy200ResponseIntermediateInner](docs/PostDairy200ResponseIntermediateInner.md) + - [PostDairy200ResponseNet](docs/PostDairy200ResponseNet.md) + - [PostDairy200ResponseScope1](docs/PostDairy200ResponseScope1.md) + - [PostDairy200ResponseScope3](docs/PostDairy200ResponseScope3.md) + - [PostDairyRequest](docs/PostDairyRequest.md) + - [PostDairyRequestDairyInner](docs/PostDairyRequestDairyInner.md) + - [PostDairyRequestDairyInnerAreas](docs/PostDairyRequestDairyInnerAreas.md) + - [PostDairyRequestDairyInnerClasses](docs/PostDairyRequestDairyInnerClasses.md) + - [PostDairyRequestDairyInnerClassesDairyBullsGt1](docs/PostDairyRequestDairyInnerClassesDairyBullsGt1.md) + - [PostDairyRequestDairyInnerClassesDairyBullsLt1](docs/PostDairyRequestDairyInnerClassesDairyBullsLt1.md) + - [PostDairyRequestDairyInnerClassesHeifersGt1](docs/PostDairyRequestDairyInnerClassesHeifersGt1.md) + - [PostDairyRequestDairyInnerClassesHeifersLt1](docs/PostDairyRequestDairyInnerClassesHeifersLt1.md) + - [PostDairyRequestDairyInnerClassesMilkingCows](docs/PostDairyRequestDairyInnerClassesMilkingCows.md) + - [PostDairyRequestDairyInnerClassesMilkingCowsAutumn](docs/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) + - [PostDairyRequestDairyInnerManureManagementMilkingCows](docs/PostDairyRequestDairyInnerManureManagementMilkingCows.md) + - [PostDairyRequestDairyInnerSeasonalFertiliser](docs/PostDairyRequestDairyInnerSeasonalFertiliser.md) + - [PostDairyRequestDairyInnerSeasonalFertiliserAutumn](docs/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) + - [PostDairyRequestVegetationInner](docs/PostDairyRequestVegetationInner.md) + - [PostDeer200Response](docs/PostDeer200Response.md) + - [PostDeer200ResponseIntensities](docs/PostDeer200ResponseIntensities.md) + - [PostDeer200ResponseIntermediateInner](docs/PostDeer200ResponseIntermediateInner.md) + - [PostDeer200ResponseNet](docs/PostDeer200ResponseNet.md) + - [PostDeerRequest](docs/PostDeerRequest.md) + - [PostDeerRequestDeersInner](docs/PostDeerRequestDeersInner.md) + - [PostDeerRequestDeersInnerClasses](docs/PostDeerRequestDeersInnerClasses.md) + - [PostDeerRequestDeersInnerClassesBreedingDoes](docs/PostDeerRequestDeersInnerClassesBreedingDoes.md) + - [PostDeerRequestDeersInnerClassesBucks](docs/PostDeerRequestDeersInnerClassesBucks.md) + - [PostDeerRequestDeersInnerClassesFawn](docs/PostDeerRequestDeersInnerClassesFawn.md) + - [PostDeerRequestDeersInnerClassesOtherDoes](docs/PostDeerRequestDeersInnerClassesOtherDoes.md) + - [PostDeerRequestDeersInnerClassesTradeBucks](docs/PostDeerRequestDeersInnerClassesTradeBucks.md) + - [PostDeerRequestDeersInnerClassesTradeDoes](docs/PostDeerRequestDeersInnerClassesTradeDoes.md) + - [PostDeerRequestDeersInnerClassesTradeFawn](docs/PostDeerRequestDeersInnerClassesTradeFawn.md) + - [PostDeerRequestDeersInnerClassesTradeOtherDoes](docs/PostDeerRequestDeersInnerClassesTradeOtherDoes.md) + - [PostDeerRequestDeersInnerDoesFawning](docs/PostDeerRequestDeersInnerDoesFawning.md) + - [PostDeerRequestDeersInnerSeasonalFawning](docs/PostDeerRequestDeersInnerSeasonalFawning.md) + - [PostDeerRequestVegetationInner](docs/PostDeerRequestVegetationInner.md) + - [PostFeedlot200Response](docs/PostFeedlot200Response.md) + - [PostFeedlot200ResponseIntermediateInner](docs/PostFeedlot200ResponseIntermediateInner.md) + - [PostFeedlot200ResponseIntermediateInnerIntensities](docs/PostFeedlot200ResponseIntermediateInnerIntensities.md) + - [PostFeedlot200ResponseIntermediateInnerNet](docs/PostFeedlot200ResponseIntermediateInnerNet.md) + - [PostFeedlot200ResponseScope1](docs/PostFeedlot200ResponseScope1.md) + - [PostFeedlot200ResponseScope3](docs/PostFeedlot200ResponseScope3.md) + - [PostFeedlotRequest](docs/PostFeedlotRequest.md) + - [PostFeedlotRequestFeedlotsInner](docs/PostFeedlotRequestFeedlotsInner.md) + - [PostFeedlotRequestFeedlotsInnerGroupsInner](docs/PostFeedlotRequestFeedlotsInnerGroupsInner.md) + - [PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner](docs/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md) + - [PostFeedlotRequestFeedlotsInnerPurchases](docs/PostFeedlotRequestFeedlotsInnerPurchases.md) + - [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner](docs/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) + - [PostFeedlotRequestFeedlotsInnerSales](docs/PostFeedlotRequestFeedlotsInnerSales.md) + - [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner](docs/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) + - [PostFeedlotRequestVegetationInner](docs/PostFeedlotRequestVegetationInner.md) + - [PostGoat200Response](docs/PostGoat200Response.md) + - [PostGoat200ResponseIntensities](docs/PostGoat200ResponseIntensities.md) + - [PostGoat200ResponseIntermediateInner](docs/PostGoat200ResponseIntermediateInner.md) + - [PostGoat200ResponseNet](docs/PostGoat200ResponseNet.md) + - [PostGoatRequest](docs/PostGoatRequest.md) + - [PostGoatRequestGoatsInner](docs/PostGoatRequestGoatsInner.md) + - [PostGoatRequestGoatsInnerClasses](docs/PostGoatRequestGoatsInnerClasses.md) + - [PostGoatRequestGoatsInnerClassesBreedingDoesNannies](docs/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md) + - [PostGoatRequestGoatsInnerClassesBucksBilly](docs/PostGoatRequestGoatsInnerClassesBucksBilly.md) + - [PostGoatRequestGoatsInnerClassesKids](docs/PostGoatRequestGoatsInnerClassesKids.md) + - [PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies](docs/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md) + - [PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales](docs/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md) + - [PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies](docs/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md) + - [PostGoatRequestGoatsInnerClassesTradeBucks](docs/PostGoatRequestGoatsInnerClassesTradeBucks.md) + - [PostGoatRequestGoatsInnerClassesTradeDoes](docs/PostGoatRequestGoatsInnerClassesTradeDoes.md) + - [PostGoatRequestGoatsInnerClassesTradeKids](docs/PostGoatRequestGoatsInnerClassesTradeKids.md) + - [PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies](docs/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md) + - [PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales](docs/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md) + - [PostGoatRequestGoatsInnerClassesTradeWethers](docs/PostGoatRequestGoatsInnerClassesTradeWethers.md) + - [PostGoatRequestGoatsInnerClassesWethers](docs/PostGoatRequestGoatsInnerClassesWethers.md) + - [PostGoatRequestVegetationInner](docs/PostGoatRequestVegetationInner.md) + - [PostGrains200Response](docs/PostGrains200Response.md) + - [PostGrains200ResponseIntermediateInner](docs/PostGrains200ResponseIntermediateInner.md) + - [PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration](docs/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md) + - [PostGrainsRequest](docs/PostGrainsRequest.md) + - [PostGrainsRequestCropsInner](docs/PostGrainsRequestCropsInner.md) + - [PostHorticulture200Response](docs/PostHorticulture200Response.md) + - [PostHorticulture200ResponseIntermediateInner](docs/PostHorticulture200ResponseIntermediateInner.md) + - [PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration](docs/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md) + - [PostHorticulture200ResponseScope1](docs/PostHorticulture200ResponseScope1.md) + - [PostHorticultureRequest](docs/PostHorticultureRequest.md) + - [PostHorticultureRequestCropsInner](docs/PostHorticultureRequestCropsInner.md) + - [PostHorticultureRequestCropsInnerRefrigerantsInner](docs/PostHorticultureRequestCropsInnerRefrigerantsInner.md) + - [PostPork200Response](docs/PostPork200Response.md) + - [PostPork200ResponseIntensities](docs/PostPork200ResponseIntensities.md) + - [PostPork200ResponseIntermediateInner](docs/PostPork200ResponseIntermediateInner.md) + - [PostPork200ResponseNet](docs/PostPork200ResponseNet.md) + - [PostPork200ResponseScope1](docs/PostPork200ResponseScope1.md) + - [PostPork200ResponseScope3](docs/PostPork200ResponseScope3.md) + - [PostPorkRequest](docs/PostPorkRequest.md) + - [PostPorkRequestPorkInner](docs/PostPorkRequestPorkInner.md) + - [PostPorkRequestPorkInnerClasses](docs/PostPorkRequestPorkInnerClasses.md) + - [PostPorkRequestPorkInnerClassesBoars](docs/PostPorkRequestPorkInnerClassesBoars.md) + - [PostPorkRequestPorkInnerClassesGilts](docs/PostPorkRequestPorkInnerClassesGilts.md) + - [PostPorkRequestPorkInnerClassesGrowers](docs/PostPorkRequestPorkInnerClassesGrowers.md) + - [PostPorkRequestPorkInnerClassesSlaughterPigs](docs/PostPorkRequestPorkInnerClassesSlaughterPigs.md) + - [PostPorkRequestPorkInnerClassesSows](docs/PostPorkRequestPorkInnerClassesSows.md) + - [PostPorkRequestPorkInnerClassesSowsManure](docs/PostPorkRequestPorkInnerClassesSowsManure.md) + - [PostPorkRequestPorkInnerClassesSowsManureSpring](docs/PostPorkRequestPorkInnerClassesSowsManureSpring.md) + - [PostPorkRequestPorkInnerClassesSuckers](docs/PostPorkRequestPorkInnerClassesSuckers.md) + - [PostPorkRequestPorkInnerClassesWeaners](docs/PostPorkRequestPorkInnerClassesWeaners.md) + - [PostPorkRequestPorkInnerFeedProductsInner](docs/PostPorkRequestPorkInnerFeedProductsInner.md) + - [PostPorkRequestPorkInnerFeedProductsInnerIngredients](docs/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md) + - [PostPorkRequestVegetationInner](docs/PostPorkRequestVegetationInner.md) + - [PostPoultry200Response](docs/PostPoultry200Response.md) + - [PostPoultry200ResponseIntensities](docs/PostPoultry200ResponseIntensities.md) + - [PostPoultry200ResponseIntermediateBroilersInner](docs/PostPoultry200ResponseIntermediateBroilersInner.md) + - [PostPoultry200ResponseIntermediateBroilersInnerIntensities](docs/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md) + - [PostPoultry200ResponseIntermediateLayersInner](docs/PostPoultry200ResponseIntermediateLayersInner.md) + - [PostPoultry200ResponseIntermediateLayersInnerIntensities](docs/PostPoultry200ResponseIntermediateLayersInnerIntensities.md) + - [PostPoultry200ResponseNet](docs/PostPoultry200ResponseNet.md) + - [PostPoultry200ResponseScope1](docs/PostPoultry200ResponseScope1.md) + - [PostPoultry200ResponseScope3](docs/PostPoultry200ResponseScope3.md) + - [PostPoultryRequest](docs/PostPoultryRequest.md) + - [PostPoultryRequestBroilersInner](docs/PostPoultryRequestBroilersInner.md) + - [PostPoultryRequestBroilersInnerGroupsInner](docs/PostPoultryRequestBroilersInnerGroupsInner.md) + - [PostPoultryRequestBroilersInnerGroupsInnerFeedInner](docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md) + - [PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients](docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md) + - [PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers](docs/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md) + - [PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases](docs/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md) + - [PostPoultryRequestBroilersInnerMeatChickenLayersPurchases](docs/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md) + - [PostPoultryRequestBroilersInnerMeatOtherPurchases](docs/PostPoultryRequestBroilersInnerMeatOtherPurchases.md) + - [PostPoultryRequestBroilersInnerSalesInner](docs/PostPoultryRequestBroilersInnerSalesInner.md) + - [PostPoultryRequestLayersInner](docs/PostPoultryRequestLayersInner.md) + - [PostPoultryRequestLayersInnerLayers](docs/PostPoultryRequestLayersInnerLayers.md) + - [PostPoultryRequestLayersInnerLayersEggSale](docs/PostPoultryRequestLayersInnerLayersEggSale.md) + - [PostPoultryRequestLayersInnerLayersPurchases](docs/PostPoultryRequestLayersInnerLayersPurchases.md) + - [PostPoultryRequestLayersInnerMeatChickenLayers](docs/PostPoultryRequestLayersInnerMeatChickenLayers.md) + - [PostPoultryRequestLayersInnerMeatChickenLayersEggSale](docs/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md) + - [PostPoultryRequestVegetationInner](docs/PostPoultryRequestVegetationInner.md) + - [PostProcessing200Response](docs/PostProcessing200Response.md) + - [PostProcessing200ResponseIntensitiesInner](docs/PostProcessing200ResponseIntensitiesInner.md) + - [PostProcessing200ResponseIntermediateInner](docs/PostProcessing200ResponseIntermediateInner.md) + - [PostProcessing200ResponseNet](docs/PostProcessing200ResponseNet.md) + - [PostProcessing200ResponseScope1](docs/PostProcessing200ResponseScope1.md) + - [PostProcessing200ResponseScope3](docs/PostProcessing200ResponseScope3.md) + - [PostProcessingRequest](docs/PostProcessingRequest.md) + - [PostProcessingRequestProductsInner](docs/PostProcessingRequestProductsInner.md) + - [PostProcessingRequestProductsInnerProduct](docs/PostProcessingRequestProductsInnerProduct.md) + - [PostRice200Response](docs/PostRice200Response.md) + - [PostRice200ResponseIntensities](docs/PostRice200ResponseIntensities.md) + - [PostRice200ResponseIntermediateInner](docs/PostRice200ResponseIntermediateInner.md) + - [PostRice200ResponseIntermediateInnerIntensities](docs/PostRice200ResponseIntermediateInnerIntensities.md) + - [PostRice200ResponseScope1](docs/PostRice200ResponseScope1.md) + - [PostRiceRequest](docs/PostRiceRequest.md) + - [PostRiceRequestCropsInner](docs/PostRiceRequestCropsInner.md) + - [PostSheep200Response](docs/PostSheep200Response.md) + - [PostSheep200ResponseIntermediateInner](docs/PostSheep200ResponseIntermediateInner.md) + - [PostSheep200ResponseIntermediateInnerIntensities](docs/PostSheep200ResponseIntermediateInnerIntensities.md) + - [PostSheep200ResponseNet](docs/PostSheep200ResponseNet.md) + - [PostSheepRequest](docs/PostSheepRequest.md) + - [PostSheepRequestSheepInner](docs/PostSheepRequestSheepInner.md) + - [PostSheepRequestSheepInnerClasses](docs/PostSheepRequestSheepInnerClasses.md) + - [PostSheepRequestSheepInnerClassesRams](docs/PostSheepRequestSheepInnerClassesRams.md) + - [PostSheepRequestSheepInnerClassesRamsAutumn](docs/PostSheepRequestSheepInnerClassesRamsAutumn.md) + - [PostSheepRequestSheepInnerClassesTradeEwes](docs/PostSheepRequestSheepInnerClassesTradeEwes.md) + - [PostSheepRequestSheepInnerClassesTradeLambsAndHoggets](docs/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md) + - [PostSheepRequestSheepInnerEwesLambing](docs/PostSheepRequestSheepInnerEwesLambing.md) + - [PostSheepRequestSheepInnerSeasonalLambing](docs/PostSheepRequestSheepInnerSeasonalLambing.md) + - [PostSheepRequestVegetationInner](docs/PostSheepRequestVegetationInner.md) + - [PostSheepbeef200Response](docs/PostSheepbeef200Response.md) + - [PostSheepbeef200ResponseIntensities](docs/PostSheepbeef200ResponseIntensities.md) + - [PostSheepbeef200ResponseIntermediate](docs/PostSheepbeef200ResponseIntermediate.md) + - [PostSheepbeef200ResponseIntermediateBeef](docs/PostSheepbeef200ResponseIntermediateBeef.md) + - [PostSheepbeef200ResponseIntermediateSheep](docs/PostSheepbeef200ResponseIntermediateSheep.md) + - [PostSheepbeef200ResponseNet](docs/PostSheepbeef200ResponseNet.md) + - [PostSheepbeefRequest](docs/PostSheepbeefRequest.md) + - [PostSheepbeefRequestVegetationInner](docs/PostSheepbeefRequestVegetationInner.md) + - [PostSugar200Response](docs/PostSugar200Response.md) + - [PostSugar200ResponseIntermediateInner](docs/PostSugar200ResponseIntermediateInner.md) + - [PostSugar200ResponseIntermediateInnerIntensities](docs/PostSugar200ResponseIntermediateInnerIntensities.md) + - [PostSugarRequest](docs/PostSugarRequest.md) + - [PostSugarRequestCropsInner](docs/PostSugarRequestCropsInner.md) + - [PostVineyard200Response](docs/PostVineyard200Response.md) + - [PostVineyard200ResponseIntermediateInner](docs/PostVineyard200ResponseIntermediateInner.md) + - [PostVineyard200ResponseIntermediateInnerIntensities](docs/PostVineyard200ResponseIntermediateInnerIntensities.md) + - [PostVineyard200ResponseNet](docs/PostVineyard200ResponseNet.md) + - [PostVineyard200ResponseScope1](docs/PostVineyard200ResponseScope1.md) + - [PostVineyard200ResponseScope3](docs/PostVineyard200ResponseScope3.md) + - [PostVineyardRequest](docs/PostVineyardRequest.md) + - [PostVineyardRequestVegetationInner](docs/PostVineyardRequestVegetationInner.md) + - [PostVineyardRequestVineyardsInner](docs/PostVineyardRequestVineyardsInner.md) + - [PostWildcatchfishery200Response](docs/PostWildcatchfishery200Response.md) + - [PostWildcatchfishery200ResponseIntensities](docs/PostWildcatchfishery200ResponseIntensities.md) + - [PostWildcatchfishery200ResponseIntermediateInner](docs/PostWildcatchfishery200ResponseIntermediateInner.md) + - [PostWildcatchfishery200ResponseScope1](docs/PostWildcatchfishery200ResponseScope1.md) + - [PostWildcatchfisheryRequest](docs/PostWildcatchfisheryRequest.md) + - [PostWildcatchfisheryRequestEnterprisesInner](docs/PostWildcatchfisheryRequestEnterprisesInner.md) + - [PostWildcatchfisheryRequestEnterprisesInnerBaitInner](docs/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md) + - [PostWildseafisheries200Response](docs/PostWildseafisheries200Response.md) + - [PostWildseafisheries200ResponseIntermediateInner](docs/PostWildseafisheries200ResponseIntermediateInner.md) + - [PostWildseafisheries200ResponseIntermediateInnerIntensities](docs/PostWildseafisheries200ResponseIntermediateInnerIntensities.md) + - [PostWildseafisheries200ResponseScope1](docs/PostWildseafisheries200ResponseScope1.md) + - [PostWildseafisheries200ResponseScope3](docs/PostWildseafisheries200ResponseScope3.md) + - [PostWildseafisheriesRequest](docs/PostWildseafisheriesRequest.md) + - [PostWildseafisheriesRequestEnterprisesInner](docs/PostWildseafisheriesRequestEnterprisesInner.md) + - [PostWildseafisheriesRequestEnterprisesInnerBaitInner](docs/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md) + - [PostWildseafisheriesRequestEnterprisesInnerCustombaitInner](docs/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md) + - [PostWildseafisheriesRequestEnterprisesInnerFlightsInner](docs/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md) + - [PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner](docs/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md) + - [PostWildseafisheriesRequestEnterprisesInnerTransportsInner](docs/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md) + + + +## Documentation For Authorization + +Endpoints do not require authorization. + + +## Author + +contact@aginnovationaustralia.com.au + + diff --git a/examples/python-api-client/api-client/docs/GAFApi.md b/examples/python-api-client/api-client/docs/GAFApi.md new file mode 100644 index 00000000..3c175316 --- /dev/null +++ b/examples/python-api-client/api-client/docs/GAFApi.md @@ -0,0 +1,1428 @@ +# openapi_client.GAFApi + +All URIs are relative to *https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**post_aquaculture**](GAFApi.md#post_aquaculture) | **POST** /aquaculture | Perform aquaculture calculation +[**post_beef**](GAFApi.md#post_beef) | **POST** /beef | Perform beef calculation +[**post_buffalo**](GAFApi.md#post_buffalo) | **POST** /buffalo | Perform buffalo calculation +[**post_cotton**](GAFApi.md#post_cotton) | **POST** /cotton | Perform cotton calculation +[**post_dairy**](GAFApi.md#post_dairy) | **POST** /dairy | Perform dairy calculation +[**post_deer**](GAFApi.md#post_deer) | **POST** /deer | Perform deer calculation +[**post_feedlot**](GAFApi.md#post_feedlot) | **POST** /feedlot | Perform feedlot calculation +[**post_goat**](GAFApi.md#post_goat) | **POST** /goat | Perform goat calculation +[**post_grains**](GAFApi.md#post_grains) | **POST** /grains | Perform grains calculation +[**post_horticulture**](GAFApi.md#post_horticulture) | **POST** /horticulture | Perform horticulture calculation +[**post_pork**](GAFApi.md#post_pork) | **POST** /pork | Perform pork calculation +[**post_poultry**](GAFApi.md#post_poultry) | **POST** /poultry | Perform poultry calculation +[**post_processing**](GAFApi.md#post_processing) | **POST** /processing | Perform processing calculation +[**post_rice**](GAFApi.md#post_rice) | **POST** /rice | Perform rice calculation +[**post_sheep**](GAFApi.md#post_sheep) | **POST** /sheep | Perform sheep calculation +[**post_sheepbeef**](GAFApi.md#post_sheepbeef) | **POST** /sheepbeef | Perform sheepbeef calculation +[**post_sugar**](GAFApi.md#post_sugar) | **POST** /sugar | Perform sugar calculation +[**post_vineyard**](GAFApi.md#post_vineyard) | **POST** /vineyard | Perform vineyard calculation +[**post_wildcatchfishery**](GAFApi.md#post_wildcatchfishery) | **POST** /wildcatchfishery | Perform wildcatchfishery calculation +[**post_wildseafisheries**](GAFApi.md#post_wildseafisheries) | **POST** /wildseafisheries | Perform wildseafisheries calculation + + +# **post_aquaculture** +> PostAquaculture200Response post_aquaculture(post_aquaculture_request) + +Perform aquaculture calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_aquaculture200_response import PostAquaculture200Response +from openapi_client.models.post_aquaculture_request import PostAquacultureRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_aquaculture_request = openapi_client.PostAquacultureRequest() # PostAquacultureRequest | + + try: + # Perform aquaculture calculation + api_response = api_instance.post_aquaculture(post_aquaculture_request) + print("The response of GAFApi->post_aquaculture:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_aquaculture: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_aquaculture_request** | [**PostAquacultureRequest**](PostAquacultureRequest.md)| | + +### Return type + +[**PostAquaculture200Response**](PostAquaculture200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_beef** +> PostBeef200Response post_beef(post_beef_request) + +Perform beef calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_beef200_response import PostBeef200Response +from openapi_client.models.post_beef_request import PostBeefRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_beef_request = openapi_client.PostBeefRequest() # PostBeefRequest | + + try: + # Perform beef calculation + api_response = api_instance.post_beef(post_beef_request) + print("The response of GAFApi->post_beef:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_beef: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_beef_request** | [**PostBeefRequest**](PostBeefRequest.md)| | + +### Return type + +[**PostBeef200Response**](PostBeef200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_buffalo** +> PostBuffalo200Response post_buffalo(post_buffalo_request) + +Perform buffalo calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_buffalo200_response import PostBuffalo200Response +from openapi_client.models.post_buffalo_request import PostBuffaloRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_buffalo_request = openapi_client.PostBuffaloRequest() # PostBuffaloRequest | + + try: + # Perform buffalo calculation + api_response = api_instance.post_buffalo(post_buffalo_request) + print("The response of GAFApi->post_buffalo:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_buffalo: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_buffalo_request** | [**PostBuffaloRequest**](PostBuffaloRequest.md)| | + +### Return type + +[**PostBuffalo200Response**](PostBuffalo200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_cotton** +> PostCotton200Response post_cotton(post_cotton_request) + +Perform cotton calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_cotton200_response import PostCotton200Response +from openapi_client.models.post_cotton_request import PostCottonRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_cotton_request = openapi_client.PostCottonRequest() # PostCottonRequest | + + try: + # Perform cotton calculation + api_response = api_instance.post_cotton(post_cotton_request) + print("The response of GAFApi->post_cotton:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_cotton: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_cotton_request** | [**PostCottonRequest**](PostCottonRequest.md)| | + +### Return type + +[**PostCotton200Response**](PostCotton200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_dairy** +> PostDairy200Response post_dairy(post_dairy_request) + +Perform dairy calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_dairy200_response import PostDairy200Response +from openapi_client.models.post_dairy_request import PostDairyRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_dairy_request = openapi_client.PostDairyRequest() # PostDairyRequest | + + try: + # Perform dairy calculation + api_response = api_instance.post_dairy(post_dairy_request) + print("The response of GAFApi->post_dairy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_dairy: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_dairy_request** | [**PostDairyRequest**](PostDairyRequest.md)| | + +### Return type + +[**PostDairy200Response**](PostDairy200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_deer** +> PostDeer200Response post_deer(post_deer_request) + +Perform deer calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_deer200_response import PostDeer200Response +from openapi_client.models.post_deer_request import PostDeerRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_deer_request = openapi_client.PostDeerRequest() # PostDeerRequest | + + try: + # Perform deer calculation + api_response = api_instance.post_deer(post_deer_request) + print("The response of GAFApi->post_deer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_deer: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_deer_request** | [**PostDeerRequest**](PostDeerRequest.md)| | + +### Return type + +[**PostDeer200Response**](PostDeer200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_feedlot** +> PostFeedlot200Response post_feedlot(post_feedlot_request) + +Perform feedlot calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_feedlot200_response import PostFeedlot200Response +from openapi_client.models.post_feedlot_request import PostFeedlotRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_feedlot_request = openapi_client.PostFeedlotRequest() # PostFeedlotRequest | + + try: + # Perform feedlot calculation + api_response = api_instance.post_feedlot(post_feedlot_request) + print("The response of GAFApi->post_feedlot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_feedlot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_feedlot_request** | [**PostFeedlotRequest**](PostFeedlotRequest.md)| | + +### Return type + +[**PostFeedlot200Response**](PostFeedlot200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_goat** +> PostGoat200Response post_goat(post_goat_request) + +Perform goat calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_goat200_response import PostGoat200Response +from openapi_client.models.post_goat_request import PostGoatRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_goat_request = openapi_client.PostGoatRequest() # PostGoatRequest | + + try: + # Perform goat calculation + api_response = api_instance.post_goat(post_goat_request) + print("The response of GAFApi->post_goat:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_goat: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_goat_request** | [**PostGoatRequest**](PostGoatRequest.md)| | + +### Return type + +[**PostGoat200Response**](PostGoat200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_grains** +> PostGrains200Response post_grains(post_grains_request) + +Perform grains calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_grains200_response import PostGrains200Response +from openapi_client.models.post_grains_request import PostGrainsRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_grains_request = openapi_client.PostGrainsRequest() # PostGrainsRequest | + + try: + # Perform grains calculation + api_response = api_instance.post_grains(post_grains_request) + print("The response of GAFApi->post_grains:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_grains: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_grains_request** | [**PostGrainsRequest**](PostGrainsRequest.md)| | + +### Return type + +[**PostGrains200Response**](PostGrains200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_horticulture** +> PostHorticulture200Response post_horticulture(post_horticulture_request) + +Perform horticulture calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_horticulture200_response import PostHorticulture200Response +from openapi_client.models.post_horticulture_request import PostHorticultureRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_horticulture_request = openapi_client.PostHorticultureRequest() # PostHorticultureRequest | + + try: + # Perform horticulture calculation + api_response = api_instance.post_horticulture(post_horticulture_request) + print("The response of GAFApi->post_horticulture:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_horticulture: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_horticulture_request** | [**PostHorticultureRequest**](PostHorticultureRequest.md)| | + +### Return type + +[**PostHorticulture200Response**](PostHorticulture200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_pork** +> PostPork200Response post_pork(post_pork_request) + +Perform pork calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_pork200_response import PostPork200Response +from openapi_client.models.post_pork_request import PostPorkRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_pork_request = openapi_client.PostPorkRequest() # PostPorkRequest | + + try: + # Perform pork calculation + api_response = api_instance.post_pork(post_pork_request) + print("The response of GAFApi->post_pork:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_pork: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_pork_request** | [**PostPorkRequest**](PostPorkRequest.md)| | + +### Return type + +[**PostPork200Response**](PostPork200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_poultry** +> PostPoultry200Response post_poultry(post_poultry_request) + +Perform poultry calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_poultry200_response import PostPoultry200Response +from openapi_client.models.post_poultry_request import PostPoultryRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_poultry_request = openapi_client.PostPoultryRequest() # PostPoultryRequest | + + try: + # Perform poultry calculation + api_response = api_instance.post_poultry(post_poultry_request) + print("The response of GAFApi->post_poultry:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_poultry: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_poultry_request** | [**PostPoultryRequest**](PostPoultryRequest.md)| | + +### Return type + +[**PostPoultry200Response**](PostPoultry200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_processing** +> PostProcessing200Response post_processing(post_processing_request) + +Perform processing calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_processing200_response import PostProcessing200Response +from openapi_client.models.post_processing_request import PostProcessingRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_processing_request = openapi_client.PostProcessingRequest() # PostProcessingRequest | + + try: + # Perform processing calculation + api_response = api_instance.post_processing(post_processing_request) + print("The response of GAFApi->post_processing:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_processing: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_processing_request** | [**PostProcessingRequest**](PostProcessingRequest.md)| | + +### Return type + +[**PostProcessing200Response**](PostProcessing200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_rice** +> PostRice200Response post_rice(post_rice_request) + +Perform rice calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_rice200_response import PostRice200Response +from openapi_client.models.post_rice_request import PostRiceRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_rice_request = openapi_client.PostRiceRequest() # PostRiceRequest | + + try: + # Perform rice calculation + api_response = api_instance.post_rice(post_rice_request) + print("The response of GAFApi->post_rice:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_rice: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_rice_request** | [**PostRiceRequest**](PostRiceRequest.md)| | + +### Return type + +[**PostRice200Response**](PostRice200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_sheep** +> PostSheep200Response post_sheep(post_sheep_request) + +Perform sheep calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_sheep200_response import PostSheep200Response +from openapi_client.models.post_sheep_request import PostSheepRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_sheep_request = openapi_client.PostSheepRequest() # PostSheepRequest | + + try: + # Perform sheep calculation + api_response = api_instance.post_sheep(post_sheep_request) + print("The response of GAFApi->post_sheep:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_sheep: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_sheep_request** | [**PostSheepRequest**](PostSheepRequest.md)| | + +### Return type + +[**PostSheep200Response**](PostSheep200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_sheepbeef** +> PostSheepbeef200Response post_sheepbeef(post_sheepbeef_request) + +Perform sheepbeef calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_sheepbeef200_response import PostSheepbeef200Response +from openapi_client.models.post_sheepbeef_request import PostSheepbeefRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_sheepbeef_request = openapi_client.PostSheepbeefRequest() # PostSheepbeefRequest | + + try: + # Perform sheepbeef calculation + api_response = api_instance.post_sheepbeef(post_sheepbeef_request) + print("The response of GAFApi->post_sheepbeef:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_sheepbeef: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_sheepbeef_request** | [**PostSheepbeefRequest**](PostSheepbeefRequest.md)| | + +### Return type + +[**PostSheepbeef200Response**](PostSheepbeef200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_sugar** +> PostSugar200Response post_sugar(post_sugar_request) + +Perform sugar calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_sugar200_response import PostSugar200Response +from openapi_client.models.post_sugar_request import PostSugarRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_sugar_request = openapi_client.PostSugarRequest() # PostSugarRequest | + + try: + # Perform sugar calculation + api_response = api_instance.post_sugar(post_sugar_request) + print("The response of GAFApi->post_sugar:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_sugar: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_sugar_request** | [**PostSugarRequest**](PostSugarRequest.md)| | + +### Return type + +[**PostSugar200Response**](PostSugar200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_vineyard** +> PostVineyard200Response post_vineyard(post_vineyard_request) + +Perform vineyard calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_vineyard200_response import PostVineyard200Response +from openapi_client.models.post_vineyard_request import PostVineyardRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_vineyard_request = openapi_client.PostVineyardRequest() # PostVineyardRequest | + + try: + # Perform vineyard calculation + api_response = api_instance.post_vineyard(post_vineyard_request) + print("The response of GAFApi->post_vineyard:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_vineyard: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_vineyard_request** | [**PostVineyardRequest**](PostVineyardRequest.md)| | + +### Return type + +[**PostVineyard200Response**](PostVineyard200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_wildcatchfishery** +> PostWildcatchfishery200Response post_wildcatchfishery(post_wildcatchfishery_request) + +Perform wildcatchfishery calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_wildcatchfishery200_response import PostWildcatchfishery200Response +from openapi_client.models.post_wildcatchfishery_request import PostWildcatchfisheryRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_wildcatchfishery_request = openapi_client.PostWildcatchfisheryRequest() # PostWildcatchfisheryRequest | + + try: + # Perform wildcatchfishery calculation + api_response = api_instance.post_wildcatchfishery(post_wildcatchfishery_request) + print("The response of GAFApi->post_wildcatchfishery:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_wildcatchfishery: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_wildcatchfishery_request** | [**PostWildcatchfisheryRequest**](PostWildcatchfisheryRequest.md)| | + +### Return type + +[**PostWildcatchfishery200Response**](PostWildcatchfishery200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_wildseafisheries** +> PostWildseafisheries200Response post_wildseafisheries(post_wildseafisheries_request) + +Perform wildseafisheries calculation + +Retrieve a simple JSON response + +### Example + + +```python +import openapi_client +from openapi_client.models.post_wildseafisheries200_response import PostWildseafisheries200Response +from openapi_client.models.post_wildseafisheries_request import PostWildseafisheriesRequest +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GAFApi(api_client) + post_wildseafisheries_request = openapi_client.PostWildseafisheriesRequest() # PostWildseafisheriesRequest | + + try: + # Perform wildseafisheries calculation + api_response = api_instance.post_wildseafisheries(post_wildseafisheries_request) + print("The response of GAFApi->post_wildseafisheries:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GAFApi->post_wildseafisheries: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **post_wildseafisheries_request** | [**PostWildseafisheriesRequest**](PostWildseafisheriesRequest.md)| | + +### Return type + +[**PostWildseafisheries200Response**](PostWildseafisheries200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Executes a calculation | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200Response.md b/examples/python-api-client/api-client/docs/PostAquaculture200Response.md new file mode 100644 index 00000000..d8d307c1 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquaculture200Response.md @@ -0,0 +1,37 @@ +# PostAquaculture200Response + +Emissions calculation output for the `aquaculture` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostAquaculture200ResponseScope1**](PostAquaculture200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | +**purchased_offsets** | [**PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**intensities** | [**PostAquaculture200ResponseIntensities**](PostAquaculture200ResponseIntensities.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**List[PostAquaculture200ResponseIntermediateInner]**](PostAquaculture200ResponseIntermediateInner.md) | | + +## Example + +```python +from openapi_client.models.post_aquaculture200_response import PostAquaculture200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquaculture200Response from a JSON string +post_aquaculture200_response_instance = PostAquaculture200Response.from_json(json) +# print the JSON string representation of the object +print(PostAquaculture200Response.to_json()) + +# convert the object into a dict +post_aquaculture200_response_dict = post_aquaculture200_response_instance.to_dict() +# create an instance of PostAquaculture200Response from a dict +post_aquaculture200_response_from_dict = PostAquaculture200Response.from_dict(post_aquaculture200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseCarbonSequestration.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseCarbonSequestration.md new file mode 100644 index 00000000..e164b6bd --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseCarbonSequestration.md @@ -0,0 +1,31 @@ +# PostAquaculture200ResponseCarbonSequestration + +Carbon sequestration, in tonnes-CO2e + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Annual amount of carbon sequestered, in tonnes-CO2e | +**intermediate** | **List[float]** | | + +## Example + +```python +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquaculture200ResponseCarbonSequestration from a JSON string +post_aquaculture200_response_carbon_sequestration_instance = PostAquaculture200ResponseCarbonSequestration.from_json(json) +# print the JSON string representation of the object +print(PostAquaculture200ResponseCarbonSequestration.to_json()) + +# convert the object into a dict +post_aquaculture200_response_carbon_sequestration_dict = post_aquaculture200_response_carbon_sequestration_instance.to_dict() +# create an instance of PostAquaculture200ResponseCarbonSequestration from a dict +post_aquaculture200_response_carbon_sequestration_from_dict = PostAquaculture200ResponseCarbonSequestration.from_dict(post_aquaculture200_response_carbon_sequestration_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntensities.md new file mode 100644 index 00000000..8fca77b0 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntensities.md @@ -0,0 +1,31 @@ +# PostAquaculture200ResponseIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_harvest_weight_kg** | **float** | Total harvest weight in kg | +**aquaculture_excluding_carbon_offsets** | **float** | Aquaculture emissions intensity excluding sequestration, in kg-CO2e/kg | +**aquaculture_including_carbon_offsets** | **float** | Aquaculture emissions intensity including sequestration, in kg-CO2e/kg | + +## Example + +```python +from openapi_client.models.post_aquaculture200_response_intensities import PostAquaculture200ResponseIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquaculture200ResponseIntensities from a JSON string +post_aquaculture200_response_intensities_instance = PostAquaculture200ResponseIntensities.from_json(json) +# print the JSON string representation of the object +print(PostAquaculture200ResponseIntensities.to_json()) + +# convert the object into a dict +post_aquaculture200_response_intensities_dict = post_aquaculture200_response_intensities_instance.to_dict() +# create an instance of PostAquaculture200ResponseIntensities from a dict +post_aquaculture200_response_intensities_from_dict = PostAquaculture200ResponseIntensities.from_dict(post_aquaculture200_response_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInner.md new file mode 100644 index 00000000..4ca23301 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInner.md @@ -0,0 +1,36 @@ +# PostAquaculture200ResponseIntermediateInner + +Intermediate emissions calculation output for the Aquaculture calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostAquaculture200ResponseScope1**](PostAquaculture200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | +**intensities** | [**PostAquaculture200ResponseIntensities**](PostAquaculture200ResponseIntensities.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +## Example + +```python +from openapi_client.models.post_aquaculture200_response_intermediate_inner import PostAquaculture200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquaculture200ResponseIntermediateInner from a JSON string +post_aquaculture200_response_intermediate_inner_instance = PostAquaculture200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostAquaculture200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_aquaculture200_response_intermediate_inner_dict = post_aquaculture200_response_intermediate_inner_instance.to_dict() +# create an instance of PostAquaculture200ResponseIntermediateInner from a dict +post_aquaculture200_response_intermediate_inner_from_dict = PostAquaculture200ResponseIntermediateInner.from_dict(post_aquaculture200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md new file mode 100644 index 00000000..954d92c3 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md @@ -0,0 +1,30 @@ +# PostAquaculture200ResponseIntermediateInnerCarbonSequestration + +Carbon sequestration, in tonnes-CO2e + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Annual amount of carbon sequestered, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquaculture200ResponseIntermediateInnerCarbonSequestration from a JSON string +post_aquaculture200_response_intermediate_inner_carbon_sequestration_instance = PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_json(json) +# print the JSON string representation of the object +print(PostAquaculture200ResponseIntermediateInnerCarbonSequestration.to_json()) + +# convert the object into a dict +post_aquaculture200_response_intermediate_inner_carbon_sequestration_dict = post_aquaculture200_response_intermediate_inner_carbon_sequestration_instance.to_dict() +# create an instance of PostAquaculture200ResponseIntermediateInnerCarbonSequestration from a dict +post_aquaculture200_response_intermediate_inner_carbon_sequestration_from_dict = PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(post_aquaculture200_response_intermediate_inner_carbon_sequestration_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseNet.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseNet.md new file mode 100644 index 00000000..ffc612ae --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseNet.md @@ -0,0 +1,30 @@ +# PostAquaculture200ResponseNet + +Net emissions for the activity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | + +## Example + +```python +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquaculture200ResponseNet from a JSON string +post_aquaculture200_response_net_instance = PostAquaculture200ResponseNet.from_json(json) +# print the JSON string representation of the object +print(PostAquaculture200ResponseNet.to_json()) + +# convert the object into a dict +post_aquaculture200_response_net_dict = post_aquaculture200_response_net_instance.to_dict() +# create an instance of PostAquaculture200ResponseNet from a dict +post_aquaculture200_response_net_from_dict = PostAquaculture200ResponseNet.from_dict(post_aquaculture200_response_net_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponsePurchasedOffsets.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponsePurchasedOffsets.md new file mode 100644 index 00000000..c8d9e27a --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquaculture200ResponsePurchasedOffsets.md @@ -0,0 +1,30 @@ +# PostAquaculture200ResponsePurchasedOffsets + +Purchased offsets, in tonnes-CO2e + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Annual amount of carbon sequestered, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_aquaculture200_response_purchased_offsets import PostAquaculture200ResponsePurchasedOffsets + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquaculture200ResponsePurchasedOffsets from a JSON string +post_aquaculture200_response_purchased_offsets_instance = PostAquaculture200ResponsePurchasedOffsets.from_json(json) +# print the JSON string representation of the object +print(PostAquaculture200ResponsePurchasedOffsets.to_json()) + +# convert the object into a dict +post_aquaculture200_response_purchased_offsets_dict = post_aquaculture200_response_purchased_offsets_instance.to_dict() +# create an instance of PostAquaculture200ResponsePurchasedOffsets from a dict +post_aquaculture200_response_purchased_offsets_from_dict = PostAquaculture200ResponsePurchasedOffsets.from_dict(post_aquaculture200_response_purchased_offsets_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope1.md new file mode 100644 index 00000000..070d62ef --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope1.md @@ -0,0 +1,40 @@ +# PostAquaculture200ResponseScope1 + +Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | +**waste_water_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | +**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_aquaculture200_response_scope1 import PostAquaculture200ResponseScope1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquaculture200ResponseScope1 from a JSON string +post_aquaculture200_response_scope1_instance = PostAquaculture200ResponseScope1.from_json(json) +# print the JSON string representation of the object +print(PostAquaculture200ResponseScope1.to_json()) + +# convert the object into a dict +post_aquaculture200_response_scope1_dict = post_aquaculture200_response_scope1_instance.to_dict() +# create an instance of PostAquaculture200ResponseScope1 from a dict +post_aquaculture200_response_scope1_from_dict = PostAquaculture200ResponseScope1.from_dict(post_aquaculture200_response_scope1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope2.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope2.md new file mode 100644 index 00000000..a928790a --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope2.md @@ -0,0 +1,31 @@ +# PostAquaculture200ResponseScope2 + +Scope 2 greenhouse gas emissions are the emissions released to the atmosphere from the indirect consumption of an energy commodity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**total** | **float** | Total scope 2 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquaculture200ResponseScope2 from a JSON string +post_aquaculture200_response_scope2_instance = PostAquaculture200ResponseScope2.from_json(json) +# print the JSON string representation of the object +print(PostAquaculture200ResponseScope2.to_json()) + +# convert the object into a dict +post_aquaculture200_response_scope2_dict = post_aquaculture200_response_scope2_instance.to_dict() +# create an instance of PostAquaculture200ResponseScope2 from a dict +post_aquaculture200_response_scope2_from_dict = PostAquaculture200ResponseScope2.from_dict(post_aquaculture200_response_scope2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope3.md new file mode 100644 index 00000000..e49c5b04 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope3.md @@ -0,0 +1,37 @@ +# PostAquaculture200ResponseScope3 + +Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purchased_bait** | **float** | Emissions from purchased bait, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**commercial_flights** | **float** | Emissions from commercial flights, in tonnes-CO2e | +**inbound_freight** | **float** | Emissions from inbound freight, in tonnes-CO2e | +**outbound_freight** | **float** | Emissions from outbound freight, in tonnes-CO2e | +**solid_waste_sent_offsite** | **float** | Emissions from solid waste sent offsite, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_aquaculture200_response_scope3 import PostAquaculture200ResponseScope3 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquaculture200ResponseScope3 from a JSON string +post_aquaculture200_response_scope3_instance = PostAquaculture200ResponseScope3.from_json(json) +# print the JSON string representation of the object +print(PostAquaculture200ResponseScope3.to_json()) + +# convert the object into a dict +post_aquaculture200_response_scope3_dict = post_aquaculture200_response_scope3_instance.to_dict() +# create an instance of PostAquaculture200ResponseScope3 from a dict +post_aquaculture200_response_scope3_from_dict = PostAquaculture200ResponseScope3.from_dict(post_aquaculture200_response_scope3_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequest.md b/examples/python-api-client/api-client/docs/PostAquacultureRequest.md new file mode 100644 index 00000000..51a83f6c --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquacultureRequest.md @@ -0,0 +1,30 @@ +# PostAquacultureRequest + +Input data required for the `aquaculture` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enterprises** | [**List[PostAquacultureRequestEnterprisesInner]**](PostAquacultureRequestEnterprisesInner.md) | | + +## Example + +```python +from openapi_client.models.post_aquaculture_request import PostAquacultureRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquacultureRequest from a JSON string +post_aquaculture_request_instance = PostAquacultureRequest.from_json(json) +# print the JSON string representation of the object +print(PostAquacultureRequest.to_json()) + +# convert the object into a dict +post_aquaculture_request_dict = post_aquaculture_request_instance.to_dict() +# create an instance of PostAquacultureRequest from a dict +post_aquaculture_request_from_dict = PostAquacultureRequest.from_dict(post_aquaculture_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInner.md new file mode 100644 index 00000000..0b8136c2 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInner.md @@ -0,0 +1,46 @@ +# PostAquacultureRequestEnterprisesInner + +Input data required for a single aquaculture enterprise + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**production_system** | **str** | Production system of the aquaculture enterprise | +**total_harvest_kg** | **float** | Total harvest in kg | +**refrigerants** | [**List[PostAquacultureRequestEnterprisesInnerRefrigerantsInner]**](PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md) | Refrigerant type | +**bait** | [**List[PostAquacultureRequestEnterprisesInnerBaitInner]**](PostAquacultureRequestEnterprisesInnerBaitInner.md) | Bait purchases | +**custom_bait** | [**List[PostAquacultureRequestEnterprisesInnerCustomBaitInner]**](PostAquacultureRequestEnterprisesInnerCustomBaitInner.md) | Custom bait purchases | +**inbound_freight** | [**List[PostAquacultureRequestEnterprisesInnerInboundFreightInner]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods to the enterprise | +**outbound_freight** | [**List[PostAquacultureRequestEnterprisesInnerInboundFreightInner]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods from the enterprise | +**total_commercial_flights_km** | **float** | Total distance of commercial flights, in km (kilometers) | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**electricity_source** | **str** | Source of electricity | +**fuel** | [**PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | +**fluid_waste** | [**List[PostAquacultureRequestEnterprisesInnerFluidWasteInner]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | +**solid_waste** | [**PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | +**carbon_offsets** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | [optional] + +## Example + +```python +from openapi_client.models.post_aquaculture_request_enterprises_inner import PostAquacultureRequestEnterprisesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquacultureRequestEnterprisesInner from a JSON string +post_aquaculture_request_enterprises_inner_instance = PostAquacultureRequestEnterprisesInner.from_json(json) +# print the JSON string representation of the object +print(PostAquacultureRequestEnterprisesInner.to_json()) + +# convert the object into a dict +post_aquaculture_request_enterprises_inner_dict = post_aquaculture_request_enterprises_inner_instance.to_dict() +# create an instance of PostAquacultureRequestEnterprisesInner from a dict +post_aquaculture_request_enterprises_inner_from_dict = PostAquacultureRequestEnterprisesInner.from_dict(post_aquaculture_request_enterprises_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerBaitInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerBaitInner.md new file mode 100644 index 00000000..47dfad2d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerBaitInner.md @@ -0,0 +1,32 @@ +# PostAquacultureRequestEnterprisesInnerBaitInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Bait product type | +**purchased_tonnes** | **float** | Purchased product in tonnes | +**additional_ingredients** | **float** | Additional ingredient fraction, from 0 to 1 | +**emissions_intensity** | **float** | Emissions intensity of additional ingredients, in kg CO2e/kg bait (default 0) | [default to 0] + +## Example + +```python +from openapi_client.models.post_aquaculture_request_enterprises_inner_bait_inner import PostAquacultureRequestEnterprisesInnerBaitInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquacultureRequestEnterprisesInnerBaitInner from a JSON string +post_aquaculture_request_enterprises_inner_bait_inner_instance = PostAquacultureRequestEnterprisesInnerBaitInner.from_json(json) +# print the JSON string representation of the object +print(PostAquacultureRequestEnterprisesInnerBaitInner.to_json()) + +# convert the object into a dict +post_aquaculture_request_enterprises_inner_bait_inner_dict = post_aquaculture_request_enterprises_inner_bait_inner_instance.to_dict() +# create an instance of PostAquacultureRequestEnterprisesInnerBaitInner from a dict +post_aquaculture_request_enterprises_inner_bait_inner_from_dict = PostAquacultureRequestEnterprisesInnerBaitInner.from_dict(post_aquaculture_request_enterprises_inner_bait_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md new file mode 100644 index 00000000..377ce290 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md @@ -0,0 +1,30 @@ +# PostAquacultureRequestEnterprisesInnerCustomBaitInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purchased_tonnes** | **float** | Purchased product in tonnes | +**emissions_intensity** | **float** | Emissions intensity of product, in kg CO2e/kg bait | + +## Example + +```python +from openapi_client.models.post_aquaculture_request_enterprises_inner_custom_bait_inner import PostAquacultureRequestEnterprisesInnerCustomBaitInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquacultureRequestEnterprisesInnerCustomBaitInner from a JSON string +post_aquaculture_request_enterprises_inner_custom_bait_inner_instance = PostAquacultureRequestEnterprisesInnerCustomBaitInner.from_json(json) +# print the JSON string representation of the object +print(PostAquacultureRequestEnterprisesInnerCustomBaitInner.to_json()) + +# convert the object into a dict +post_aquaculture_request_enterprises_inner_custom_bait_inner_dict = post_aquaculture_request_enterprises_inner_custom_bait_inner_instance.to_dict() +# create an instance of PostAquacultureRequestEnterprisesInnerCustomBaitInner from a dict +post_aquaculture_request_enterprises_inner_custom_bait_inner_from_dict = PostAquacultureRequestEnterprisesInnerCustomBaitInner.from_dict(post_aquaculture_request_enterprises_inner_custom_bait_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md new file mode 100644 index 00000000..091b9bca --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md @@ -0,0 +1,33 @@ +# PostAquacultureRequestEnterprisesInnerFluidWasteInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fluid_waste_kl** | **float** | Amount of fluid waste, in kL (kilolitres) | +**fluid_waste_treatment_type** | **str** | Type of fluid waste treatment | +**average_inlet_cod** | **float** | Average inlet COD (mg per litre) | +**average_outlet_cod** | **float** | Average outlet COD (mg per litre) | +**flared_combusted_fraction** | **float** | Fraction of waste flared or combusted, between 0 and 1 | + +## Example + +```python +from openapi_client.models.post_aquaculture_request_enterprises_inner_fluid_waste_inner import PostAquacultureRequestEnterprisesInnerFluidWasteInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquacultureRequestEnterprisesInnerFluidWasteInner from a JSON string +post_aquaculture_request_enterprises_inner_fluid_waste_inner_instance = PostAquacultureRequestEnterprisesInnerFluidWasteInner.from_json(json) +# print the JSON string representation of the object +print(PostAquacultureRequestEnterprisesInnerFluidWasteInner.to_json()) + +# convert the object into a dict +post_aquaculture_request_enterprises_inner_fluid_waste_inner_dict = post_aquaculture_request_enterprises_inner_fluid_waste_inner_instance.to_dict() +# create an instance of PostAquacultureRequestEnterprisesInnerFluidWasteInner from a dict +post_aquaculture_request_enterprises_inner_fluid_waste_inner_from_dict = PostAquacultureRequestEnterprisesInnerFluidWasteInner.from_dict(post_aquaculture_request_enterprises_inner_fluid_waste_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuel.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuel.md new file mode 100644 index 00000000..bbd9d6f5 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuel.md @@ -0,0 +1,32 @@ +# PostAquacultureRequestEnterprisesInnerFuel + +Fuels used in this enterprise + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transport_fuel** | [**List[PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner]**](PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md) | A list of fuels used in transportation and vehicles | +**stationary_fuel** | [**List[PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner]**](PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md) | A list of fuels used in stationary applications | +**natural_gas** | **float** | Amount of natural gas consumed in Mj (megajoules) | + +## Example + +```python +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel import PostAquacultureRequestEnterprisesInnerFuel + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquacultureRequestEnterprisesInnerFuel from a JSON string +post_aquaculture_request_enterprises_inner_fuel_instance = PostAquacultureRequestEnterprisesInnerFuel.from_json(json) +# print the JSON string representation of the object +print(PostAquacultureRequestEnterprisesInnerFuel.to_json()) + +# convert the object into a dict +post_aquaculture_request_enterprises_inner_fuel_dict = post_aquaculture_request_enterprises_inner_fuel_instance.to_dict() +# create an instance of PostAquacultureRequestEnterprisesInnerFuel from a dict +post_aquaculture_request_enterprises_inner_fuel_from_dict = PostAquacultureRequestEnterprisesInnerFuel.from_dict(post_aquaculture_request_enterprises_inner_fuel_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md new file mode 100644 index 00000000..75aa9973 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md @@ -0,0 +1,30 @@ +# PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Type of fuel | +**amount_litres** | **float** | Amount of fuel consumed (litres) | + +## Example + +```python +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner import PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner from a JSON string +post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner_instance = PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.from_json(json) +# print the JSON string representation of the object +print(PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.to_json()) + +# convert the object into a dict +post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner_dict = post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner_instance.to_dict() +# create an instance of PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner from a dict +post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner_from_dict = PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.from_dict(post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md new file mode 100644 index 00000000..2ec794f9 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md @@ -0,0 +1,30 @@ +# PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Type of fuel | +**amount_litres** | **float** | Amount of fuel consumed (litres) | + +## Example + +```python +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner import PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner from a JSON string +post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner_instance = PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.from_json(json) +# print the JSON string representation of the object +print(PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.to_json()) + +# convert the object into a dict +post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner_dict = post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner_instance.to_dict() +# create an instance of PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner from a dict +post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner_from_dict = PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.from_dict(post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md new file mode 100644 index 00000000..0c3ee098 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md @@ -0,0 +1,30 @@ +# PostAquacultureRequestEnterprisesInnerInboundFreightInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Type of freight used | +**total_km_tonnes** | **float** | Total distance of freight, in kilometre tonnes | + +## Example + +```python +from openapi_client.models.post_aquaculture_request_enterprises_inner_inbound_freight_inner import PostAquacultureRequestEnterprisesInnerInboundFreightInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquacultureRequestEnterprisesInnerInboundFreightInner from a JSON string +post_aquaculture_request_enterprises_inner_inbound_freight_inner_instance = PostAquacultureRequestEnterprisesInnerInboundFreightInner.from_json(json) +# print the JSON string representation of the object +print(PostAquacultureRequestEnterprisesInnerInboundFreightInner.to_json()) + +# convert the object into a dict +post_aquaculture_request_enterprises_inner_inbound_freight_inner_dict = post_aquaculture_request_enterprises_inner_inbound_freight_inner_instance.to_dict() +# create an instance of PostAquacultureRequestEnterprisesInnerInboundFreightInner from a dict +post_aquaculture_request_enterprises_inner_inbound_freight_inner_from_dict = PostAquacultureRequestEnterprisesInnerInboundFreightInner.from_dict(post_aquaculture_request_enterprises_inner_inbound_freight_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md new file mode 100644 index 00000000..ce9bc260 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md @@ -0,0 +1,30 @@ +# PostAquacultureRequestEnterprisesInnerRefrigerantsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**refrigerant** | **str** | Refrigerant type | +**charge_size** | **float** | Amount of refrigerant contained in the appliance, in kg | + +## Example + +```python +from openapi_client.models.post_aquaculture_request_enterprises_inner_refrigerants_inner import PostAquacultureRequestEnterprisesInnerRefrigerantsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquacultureRequestEnterprisesInnerRefrigerantsInner from a JSON string +post_aquaculture_request_enterprises_inner_refrigerants_inner_instance = PostAquacultureRequestEnterprisesInnerRefrigerantsInner.from_json(json) +# print the JSON string representation of the object +print(PostAquacultureRequestEnterprisesInnerRefrigerantsInner.to_json()) + +# convert the object into a dict +post_aquaculture_request_enterprises_inner_refrigerants_inner_dict = post_aquaculture_request_enterprises_inner_refrigerants_inner_instance.to_dict() +# create an instance of PostAquacultureRequestEnterprisesInnerRefrigerantsInner from a dict +post_aquaculture_request_enterprises_inner_refrigerants_inner_from_dict = PostAquacultureRequestEnterprisesInnerRefrigerantsInner.from_dict(post_aquaculture_request_enterprises_inner_refrigerants_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerSolidWaste.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerSolidWaste.md new file mode 100644 index 00000000..4e8cdef2 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerSolidWaste.md @@ -0,0 +1,31 @@ +# PostAquacultureRequestEnterprisesInnerSolidWaste + +Solid waste management + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sent_offsite_tonnes** | **float** | Amount of solid waste sent offsite to landfill, in tonnes | +**onsite_composting_tonnes** | **float** | Amount of solid waste composted on site, in tonnes | + +## Example + +```python +from openapi_client.models.post_aquaculture_request_enterprises_inner_solid_waste import PostAquacultureRequestEnterprisesInnerSolidWaste + +# TODO update the JSON string below +json = "{}" +# create an instance of PostAquacultureRequestEnterprisesInnerSolidWaste from a JSON string +post_aquaculture_request_enterprises_inner_solid_waste_instance = PostAquacultureRequestEnterprisesInnerSolidWaste.from_json(json) +# print the JSON string representation of the object +print(PostAquacultureRequestEnterprisesInnerSolidWaste.to_json()) + +# convert the object into a dict +post_aquaculture_request_enterprises_inner_solid_waste_dict = post_aquaculture_request_enterprises_inner_solid_waste_instance.to_dict() +# create an instance of PostAquacultureRequestEnterprisesInnerSolidWaste from a dict +post_aquaculture_request_enterprises_inner_solid_waste_from_dict = PostAquacultureRequestEnterprisesInnerSolidWaste.from_dict(post_aquaculture_request_enterprises_inner_solid_waste_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeef200Response.md b/examples/python-api-client/api-client/docs/PostBeef200Response.md new file mode 100644 index 00000000..0d7211a7 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeef200Response.md @@ -0,0 +1,36 @@ +# PostBeef200Response + +Emissions calculation output for the `beef` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**List[PostBeef200ResponseIntermediateInner]**](PostBeef200ResponseIntermediateInner.md) | | +**net** | [**PostBeef200ResponseNet**](PostBeef200ResponseNet.md) | | +**intensities** | [**PostBeef200ResponseIntermediateInnerIntensities**](PostBeef200ResponseIntermediateInnerIntensities.md) | | + +## Example + +```python +from openapi_client.models.post_beef200_response import PostBeef200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeef200Response from a JSON string +post_beef200_response_instance = PostBeef200Response.from_json(json) +# print the JSON string representation of the object +print(PostBeef200Response.to_json()) + +# convert the object into a dict +post_beef200_response_dict = post_beef200_response_instance.to_dict() +# create an instance of PostBeef200Response from a dict +post_beef200_response_from_dict = PostBeef200Response.from_dict(post_beef200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInner.md new file mode 100644 index 00000000..708f6998 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInner.md @@ -0,0 +1,36 @@ +# PostBeef200ResponseIntermediateInner + +Intermediate emissions calculation output for the Beef calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**intensities** | [**PostBeef200ResponseIntermediateInnerIntensities**](PostBeef200ResponseIntermediateInnerIntensities.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +## Example + +```python +from openapi_client.models.post_beef200_response_intermediate_inner import PostBeef200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeef200ResponseIntermediateInner from a JSON string +post_beef200_response_intermediate_inner_instance = PostBeef200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostBeef200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_beef200_response_intermediate_inner_dict = post_beef200_response_intermediate_inner_instance.to_dict() +# create an instance of PostBeef200ResponseIntermediateInner from a dict +post_beef200_response_intermediate_inner_from_dict = PostBeef200ResponseIntermediateInner.from_dict(post_beef200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..0f356a3a --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,31 @@ +# PostBeef200ResponseIntermediateInnerIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**liveweight_beef_produced_kg** | **float** | Amount of beef produced in kg liveweight | +**beef_excluding_sequestration** | **float** | Beef excluding sequestration, in kg-CO2e/kg liveweight | +**beef_including_sequestration** | **float** | Beef including sequestration, in kg-CO2e/kg liveweight | + +## Example + +```python +from openapi_client.models.post_beef200_response_intermediate_inner_intensities import PostBeef200ResponseIntermediateInnerIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeef200ResponseIntermediateInnerIntensities from a JSON string +post_beef200_response_intermediate_inner_intensities_instance = PostBeef200ResponseIntermediateInnerIntensities.from_json(json) +# print the JSON string representation of the object +print(PostBeef200ResponseIntermediateInnerIntensities.to_json()) + +# convert the object into a dict +post_beef200_response_intermediate_inner_intensities_dict = post_beef200_response_intermediate_inner_intensities_instance.to_dict() +# create an instance of PostBeef200ResponseIntermediateInnerIntensities from a dict +post_beef200_response_intermediate_inner_intensities_from_dict = PostBeef200ResponseIntermediateInnerIntensities.from_dict(post_beef200_response_intermediate_inner_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeef200ResponseNet.md b/examples/python-api-client/api-client/docs/PostBeef200ResponseNet.md new file mode 100644 index 00000000..9e31730e --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeef200ResponseNet.md @@ -0,0 +1,30 @@ +# PostBeef200ResponseNet + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | +**beef** | **float** | Net emissions of beef, in tonnes-CO2e/year | + +## Example + +```python +from openapi_client.models.post_beef200_response_net import PostBeef200ResponseNet + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeef200ResponseNet from a JSON string +post_beef200_response_net_instance = PostBeef200ResponseNet.from_json(json) +# print the JSON string representation of the object +print(PostBeef200ResponseNet.to_json()) + +# convert the object into a dict +post_beef200_response_net_dict = post_beef200_response_net_instance.to_dict() +# create an instance of PostBeef200ResponseNet from a dict +post_beef200_response_net_from_dict = PostBeef200ResponseNet.from_dict(post_beef200_response_net_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeef200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostBeef200ResponseScope1.md new file mode 100644 index 00000000..ad29e01b --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeef200ResponseScope1.md @@ -0,0 +1,46 @@ +# PostBeef200ResponseScope1 + +Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | +**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | +**urine_and_dung_n2_o** | **float** | N2O emissions from urine and dung, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**savannah_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | +**savannah_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_beef200_response_scope1 import PostBeef200ResponseScope1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeef200ResponseScope1 from a JSON string +post_beef200_response_scope1_instance = PostBeef200ResponseScope1.from_json(json) +# print the JSON string representation of the object +print(PostBeef200ResponseScope1.to_json()) + +# convert the object into a dict +post_beef200_response_scope1_dict = post_beef200_response_scope1_instance.to_dict() +# create an instance of PostBeef200ResponseScope1 from a dict +post_beef200_response_scope1_from_dict = PostBeef200ResponseScope1.from_dict(post_beef200_response_scope1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeef200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostBeef200ResponseScope3.md new file mode 100644 index 00000000..fa431e77 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeef200ResponseScope3.md @@ -0,0 +1,38 @@ +# PostBeef200ResponseScope3 + +Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | +**purchased_mineral_supplementation** | **float** | Emissions from purchased mineral supplementation, in tonnes-CO2e | +**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**lime** | **float** | Emissions from lime, in tonnes-CO2e | +**purchased_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeef200ResponseScope3 from a JSON string +post_beef200_response_scope3_instance = PostBeef200ResponseScope3.from_json(json) +# print the JSON string representation of the object +print(PostBeef200ResponseScope3.to_json()) + +# convert the object into a dict +post_beef200_response_scope3_dict = post_beef200_response_scope3_instance.to_dict() +# create an instance of PostBeef200ResponseScope3 from a dict +post_beef200_response_scope3_from_dict = PostBeef200ResponseScope3.from_dict(post_beef200_response_scope3_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequest.md b/examples/python-api-client/api-client/docs/PostBeefRequest.md new file mode 100644 index 00000000..e4c99179 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequest.md @@ -0,0 +1,35 @@ +# PostBeefRequest + +Input data required for the `beef` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**beef** | [**List[PostBeefRequestBeefInner]**](PostBeefRequestBeefInner.md) | | +**burning** | [**List[PostBeefRequestBurningInner]**](PostBeefRequestBurningInner.md) | | +**vegetation** | [**List[PostBeefRequestVegetationInner]**](PostBeefRequestVegetationInner.md) | | [default to []] + +## Example + +```python +from openapi_client.models.post_beef_request import PostBeefRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequest from a JSON string +post_beef_request_instance = PostBeefRequest.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequest.to_json()) + +# convert the object into a dict +post_beef_request_dict = post_beef_request_instance.to_dict() +# create an instance of PostBeefRequest from a dict +post_beef_request_from_dict = PostBeefRequest.from_dict(post_beef_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInner.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInner.md new file mode 100644 index 00000000..3941fe3c --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInner.md @@ -0,0 +1,46 @@ +# PostBeefRequestBeefInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**classes** | [**PostBeefRequestBeefInnerClasses**](PostBeefRequestBeefInnerClasses.md) | | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**mineral_supplementation** | [**PostBeefRequestBeefInnerMineralSupplementation**](PostBeefRequestBeefInnerMineralSupplementation.md) | | +**electricity_source** | **str** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | +**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | +**cottonseed_feed** | **float** | Cotton seed purchased for cattle feed in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**cows_calving** | [**PostBeefRequestBeefInnerCowsCalving**](PostBeefRequestBeefInnerCowsCalving.md) | | + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner import PostBeefRequestBeefInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInner from a JSON string +post_beef_request_beef_inner_instance = PostBeefRequestBeefInner.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInner.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_dict = post_beef_request_beef_inner_instance.to_dict() +# create an instance of PostBeefRequestBeefInner from a dict +post_beef_request_beef_inner_from_dict = PostBeefRequestBeefInner.from_dict(post_beef_request_beef_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClasses.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClasses.md new file mode 100644 index 00000000..c1a742ae --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClasses.md @@ -0,0 +1,45 @@ +# PostBeefRequestBeefInnerClasses + +Beef classes of different types and age ranges + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bulls_gt1** | [**PostBeefRequestBeefInnerClassesBullsGt1**](PostBeefRequestBeefInnerClassesBullsGt1.md) | | [optional] +**bulls_gt1_traded** | [**PostBeefRequestBeefInnerClassesBullsGt1Traded**](PostBeefRequestBeefInnerClassesBullsGt1Traded.md) | | [optional] +**steers_lt1** | [**PostBeefRequestBeefInnerClassesSteersLt1**](PostBeefRequestBeefInnerClassesSteersLt1.md) | | [optional] +**steers_lt1_traded** | [**PostBeefRequestBeefInnerClassesSteersLt1Traded**](PostBeefRequestBeefInnerClassesSteersLt1Traded.md) | | [optional] +**steers1_to2** | [**PostBeefRequestBeefInnerClassesSteers1To2**](PostBeefRequestBeefInnerClassesSteers1To2.md) | | [optional] +**steers1_to2_traded** | [**PostBeefRequestBeefInnerClassesSteers1To2Traded**](PostBeefRequestBeefInnerClassesSteers1To2Traded.md) | | [optional] +**steers_gt2** | [**PostBeefRequestBeefInnerClassesSteersGt2**](PostBeefRequestBeefInnerClassesSteersGt2.md) | | [optional] +**steers_gt2_traded** | [**PostBeefRequestBeefInnerClassesSteersGt2Traded**](PostBeefRequestBeefInnerClassesSteersGt2Traded.md) | | [optional] +**cows_gt2** | [**PostBeefRequestBeefInnerClassesCowsGt2**](PostBeefRequestBeefInnerClassesCowsGt2.md) | | [optional] +**cows_gt2_traded** | [**PostBeefRequestBeefInnerClassesCowsGt2Traded**](PostBeefRequestBeefInnerClassesCowsGt2Traded.md) | | [optional] +**heifers_lt1** | [**PostBeefRequestBeefInnerClassesHeifersLt1**](PostBeefRequestBeefInnerClassesHeifersLt1.md) | | [optional] +**heifers_lt1_traded** | [**PostBeefRequestBeefInnerClassesHeifersLt1Traded**](PostBeefRequestBeefInnerClassesHeifersLt1Traded.md) | | [optional] +**heifers1_to2** | [**PostBeefRequestBeefInnerClassesHeifers1To2**](PostBeefRequestBeefInnerClassesHeifers1To2.md) | | [optional] +**heifers1_to2_traded** | [**PostBeefRequestBeefInnerClassesHeifers1To2Traded**](PostBeefRequestBeefInnerClassesHeifers1To2Traded.md) | | [optional] +**heifers_gt2** | [**PostBeefRequestBeefInnerClassesHeifersGt2**](PostBeefRequestBeefInnerClassesHeifersGt2.md) | | [optional] +**heifers_gt2_traded** | [**PostBeefRequestBeefInnerClassesHeifersGt2Traded**](PostBeefRequestBeefInnerClassesHeifersGt2Traded.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes import PostBeefRequestBeefInnerClasses + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClasses from a JSON string +post_beef_request_beef_inner_classes_instance = PostBeefRequestBeefInnerClasses.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClasses.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_dict = post_beef_request_beef_inner_classes_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClasses from a dict +post_beef_request_beef_inner_classes_from_dict = PostBeefRequestBeefInnerClasses.from_dict(post_beef_request_beef_inner_classes_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1.md new file mode 100644 index 00000000..b62baee6 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesBullsGt1 + +Bulls whose age is greater than 1 year old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1 import PostBeefRequestBeefInnerClassesBullsGt1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesBullsGt1 from a JSON string +post_beef_request_beef_inner_classes_bulls_gt1_instance = PostBeefRequestBeefInnerClassesBullsGt1.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesBullsGt1.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_bulls_gt1_dict = post_beef_request_beef_inner_classes_bulls_gt1_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesBullsGt1 from a dict +post_beef_request_beef_inner_classes_bulls_gt1_from_dict = PostBeefRequestBeefInnerClassesBullsGt1.from_dict(post_beef_request_beef_inner_classes_bulls_gt1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md new file mode 100644 index 00000000..ce7fc62c --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md @@ -0,0 +1,33 @@ +# PostBeefRequestBeefInnerClassesBullsGt1Autumn + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals (head) | +**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | +**liveweight_gain** | **float** | Average liveweight gain in kg/day (kilogram per day) | +**crude_protein** | **float** | Crude protein percent, between 0 and 100 | [optional] +**dry_matter_digestibility** | **float** | Dry matter digestibility percent, between 0 and 100 | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesBullsGt1Autumn from a JSON string +post_beef_request_beef_inner_classes_bulls_gt1_autumn_instance = PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesBullsGt1Autumn.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_bulls_gt1_autumn_dict = post_beef_request_beef_inner_classes_bulls_gt1_autumn_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesBullsGt1Autumn from a dict +post_beef_request_beef_inner_classes_bulls_gt1_autumn_from_dict = PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(post_beef_request_beef_inner_classes_bulls_gt1_autumn_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md new file mode 100644 index 00000000..ea1003c9 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md @@ -0,0 +1,32 @@ +# PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner + +Beef purchase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals purchased (head) | +**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | +**purchase_source** | **str** | Source location of livestock purchase | + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner from a JSON string +post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner_instance = PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner_dict = post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner from a dict +post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner_from_dict = PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Traded.md new file mode 100644 index 00000000..953ddd5b --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Traded.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesBullsGt1Traded + +Traded bulls whose age is greater than 1 year old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_traded import PostBeefRequestBeefInnerClassesBullsGt1Traded + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesBullsGt1Traded from a JSON string +post_beef_request_beef_inner_classes_bulls_gt1_traded_instance = PostBeefRequestBeefInnerClassesBullsGt1Traded.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesBullsGt1Traded.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_bulls_gt1_traded_dict = post_beef_request_beef_inner_classes_bulls_gt1_traded_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesBullsGt1Traded from a dict +post_beef_request_beef_inner_classes_bulls_gt1_traded_from_dict = PostBeefRequestBeefInnerClassesBullsGt1Traded.from_dict(post_beef_request_beef_inner_classes_bulls_gt1_traded_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2.md new file mode 100644 index 00000000..bfd26d71 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesCowsGt2 + +Cows whose age is greater than 2 years old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_cows_gt2 import PostBeefRequestBeefInnerClassesCowsGt2 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesCowsGt2 from a JSON string +post_beef_request_beef_inner_classes_cows_gt2_instance = PostBeefRequestBeefInnerClassesCowsGt2.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesCowsGt2.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_cows_gt2_dict = post_beef_request_beef_inner_classes_cows_gt2_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesCowsGt2 from a dict +post_beef_request_beef_inner_classes_cows_gt2_from_dict = PostBeefRequestBeefInnerClassesCowsGt2.from_dict(post_beef_request_beef_inner_classes_cows_gt2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2Traded.md new file mode 100644 index 00000000..7b70196f --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2Traded.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesCowsGt2Traded + +Traded cows whose age is greater than 2 years old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_cows_gt2_traded import PostBeefRequestBeefInnerClassesCowsGt2Traded + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesCowsGt2Traded from a JSON string +post_beef_request_beef_inner_classes_cows_gt2_traded_instance = PostBeefRequestBeefInnerClassesCowsGt2Traded.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesCowsGt2Traded.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_cows_gt2_traded_dict = post_beef_request_beef_inner_classes_cows_gt2_traded_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesCowsGt2Traded from a dict +post_beef_request_beef_inner_classes_cows_gt2_traded_from_dict = PostBeefRequestBeefInnerClassesCowsGt2Traded.from_dict(post_beef_request_beef_inner_classes_cows_gt2_traded_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2.md new file mode 100644 index 00000000..62176b00 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesHeifers1To2 + +Heifers whose age is between 1 and 2 years old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_heifers1_to2 import PostBeefRequestBeefInnerClassesHeifers1To2 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesHeifers1To2 from a JSON string +post_beef_request_beef_inner_classes_heifers1_to2_instance = PostBeefRequestBeefInnerClassesHeifers1To2.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesHeifers1To2.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_heifers1_to2_dict = post_beef_request_beef_inner_classes_heifers1_to2_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesHeifers1To2 from a dict +post_beef_request_beef_inner_classes_heifers1_to2_from_dict = PostBeefRequestBeefInnerClassesHeifers1To2.from_dict(post_beef_request_beef_inner_classes_heifers1_to2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md new file mode 100644 index 00000000..522d1aa5 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesHeifers1To2Traded + +Traded heifers whose age is between 1 and 2 years old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_heifers1_to2_traded import PostBeefRequestBeefInnerClassesHeifers1To2Traded + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesHeifers1To2Traded from a JSON string +post_beef_request_beef_inner_classes_heifers1_to2_traded_instance = PostBeefRequestBeefInnerClassesHeifers1To2Traded.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesHeifers1To2Traded.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_heifers1_to2_traded_dict = post_beef_request_beef_inner_classes_heifers1_to2_traded_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesHeifers1To2Traded from a dict +post_beef_request_beef_inner_classes_heifers1_to2_traded_from_dict = PostBeefRequestBeefInnerClassesHeifers1To2Traded.from_dict(post_beef_request_beef_inner_classes_heifers1_to2_traded_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2.md new file mode 100644 index 00000000..be03022c --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesHeifersGt2 + +Heifers whose age is greater than 2 years old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_gt2 import PostBeefRequestBeefInnerClassesHeifersGt2 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesHeifersGt2 from a JSON string +post_beef_request_beef_inner_classes_heifers_gt2_instance = PostBeefRequestBeefInnerClassesHeifersGt2.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesHeifersGt2.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_heifers_gt2_dict = post_beef_request_beef_inner_classes_heifers_gt2_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesHeifersGt2 from a dict +post_beef_request_beef_inner_classes_heifers_gt2_from_dict = PostBeefRequestBeefInnerClassesHeifersGt2.from_dict(post_beef_request_beef_inner_classes_heifers_gt2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md new file mode 100644 index 00000000..0598e8be --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesHeifersGt2Traded + +Traded heifers whose age is greater than 2 years old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_gt2_traded import PostBeefRequestBeefInnerClassesHeifersGt2Traded + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesHeifersGt2Traded from a JSON string +post_beef_request_beef_inner_classes_heifers_gt2_traded_instance = PostBeefRequestBeefInnerClassesHeifersGt2Traded.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesHeifersGt2Traded.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_heifers_gt2_traded_dict = post_beef_request_beef_inner_classes_heifers_gt2_traded_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesHeifersGt2Traded from a dict +post_beef_request_beef_inner_classes_heifers_gt2_traded_from_dict = PostBeefRequestBeefInnerClassesHeifersGt2Traded.from_dict(post_beef_request_beef_inner_classes_heifers_gt2_traded_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1.md new file mode 100644 index 00000000..63e922ef --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesHeifersLt1 + +Heifers whose age is less than 1 year old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_lt1 import PostBeefRequestBeefInnerClassesHeifersLt1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesHeifersLt1 from a JSON string +post_beef_request_beef_inner_classes_heifers_lt1_instance = PostBeefRequestBeefInnerClassesHeifersLt1.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesHeifersLt1.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_heifers_lt1_dict = post_beef_request_beef_inner_classes_heifers_lt1_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesHeifersLt1 from a dict +post_beef_request_beef_inner_classes_heifers_lt1_from_dict = PostBeefRequestBeefInnerClassesHeifersLt1.from_dict(post_beef_request_beef_inner_classes_heifers_lt1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md new file mode 100644 index 00000000..40fe2c47 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesHeifersLt1Traded + +Traded heifers whose age is less than 1 year old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_lt1_traded import PostBeefRequestBeefInnerClassesHeifersLt1Traded + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesHeifersLt1Traded from a JSON string +post_beef_request_beef_inner_classes_heifers_lt1_traded_instance = PostBeefRequestBeefInnerClassesHeifersLt1Traded.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesHeifersLt1Traded.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_heifers_lt1_traded_dict = post_beef_request_beef_inner_classes_heifers_lt1_traded_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesHeifersLt1Traded from a dict +post_beef_request_beef_inner_classes_heifers_lt1_traded_from_dict = PostBeefRequestBeefInnerClassesHeifersLt1Traded.from_dict(post_beef_request_beef_inner_classes_heifers_lt1_traded_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2.md new file mode 100644 index 00000000..21670024 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesSteers1To2 + +Steers whose age is between 1 and 2 years old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_steers1_to2 import PostBeefRequestBeefInnerClassesSteers1To2 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesSteers1To2 from a JSON string +post_beef_request_beef_inner_classes_steers1_to2_instance = PostBeefRequestBeefInnerClassesSteers1To2.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesSteers1To2.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_steers1_to2_dict = post_beef_request_beef_inner_classes_steers1_to2_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesSteers1To2 from a dict +post_beef_request_beef_inner_classes_steers1_to2_from_dict = PostBeefRequestBeefInnerClassesSteers1To2.from_dict(post_beef_request_beef_inner_classes_steers1_to2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2Traded.md new file mode 100644 index 00000000..046559ae --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2Traded.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesSteers1To2Traded + +Traded steers whose age is between 1 and 2 years old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_steers1_to2_traded import PostBeefRequestBeefInnerClassesSteers1To2Traded + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesSteers1To2Traded from a JSON string +post_beef_request_beef_inner_classes_steers1_to2_traded_instance = PostBeefRequestBeefInnerClassesSteers1To2Traded.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesSteers1To2Traded.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_steers1_to2_traded_dict = post_beef_request_beef_inner_classes_steers1_to2_traded_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesSteers1To2Traded from a dict +post_beef_request_beef_inner_classes_steers1_to2_traded_from_dict = PostBeefRequestBeefInnerClassesSteers1To2Traded.from_dict(post_beef_request_beef_inner_classes_steers1_to2_traded_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2.md new file mode 100644 index 00000000..c8eeaff1 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesSteersGt2 + +Steers whose age is greater than 2 years old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_steers_gt2 import PostBeefRequestBeefInnerClassesSteersGt2 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesSteersGt2 from a JSON string +post_beef_request_beef_inner_classes_steers_gt2_instance = PostBeefRequestBeefInnerClassesSteersGt2.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesSteersGt2.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_steers_gt2_dict = post_beef_request_beef_inner_classes_steers_gt2_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesSteersGt2 from a dict +post_beef_request_beef_inner_classes_steers_gt2_from_dict = PostBeefRequestBeefInnerClassesSteersGt2.from_dict(post_beef_request_beef_inner_classes_steers_gt2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2Traded.md new file mode 100644 index 00000000..27cc9897 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2Traded.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesSteersGt2Traded + +Traded steers whose age is greater than 2 years old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_steers_gt2_traded import PostBeefRequestBeefInnerClassesSteersGt2Traded + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesSteersGt2Traded from a JSON string +post_beef_request_beef_inner_classes_steers_gt2_traded_instance = PostBeefRequestBeefInnerClassesSteersGt2Traded.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesSteersGt2Traded.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_steers_gt2_traded_dict = post_beef_request_beef_inner_classes_steers_gt2_traded_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesSteersGt2Traded from a dict +post_beef_request_beef_inner_classes_steers_gt2_traded_from_dict = PostBeefRequestBeefInnerClassesSteersGt2Traded.from_dict(post_beef_request_beef_inner_classes_steers_gt2_traded_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1.md new file mode 100644 index 00000000..f984ed29 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesSteersLt1 + +Steers whose age is less than 1 year old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_steers_lt1 import PostBeefRequestBeefInnerClassesSteersLt1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesSteersLt1 from a JSON string +post_beef_request_beef_inner_classes_steers_lt1_instance = PostBeefRequestBeefInnerClassesSteersLt1.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesSteersLt1.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_steers_lt1_dict = post_beef_request_beef_inner_classes_steers_lt1_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesSteersLt1 from a dict +post_beef_request_beef_inner_classes_steers_lt1_from_dict = PostBeefRequestBeefInnerClassesSteersLt1.from_dict(post_beef_request_beef_inner_classes_steers_lt1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1Traded.md new file mode 100644 index 00000000..7d503b4d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1Traded.md @@ -0,0 +1,39 @@ +# PostBeefRequestBeefInnerClassesSteersLt1Traded + +Traded steers whose age is less than 1 year old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_classes_steers_lt1_traded import PostBeefRequestBeefInnerClassesSteersLt1Traded + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerClassesSteersLt1Traded from a JSON string +post_beef_request_beef_inner_classes_steers_lt1_traded_instance = PostBeefRequestBeefInnerClassesSteersLt1Traded.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerClassesSteersLt1Traded.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_classes_steers_lt1_traded_dict = post_beef_request_beef_inner_classes_steers_lt1_traded_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerClassesSteersLt1Traded from a dict +post_beef_request_beef_inner_classes_steers_lt1_traded_from_dict = PostBeefRequestBeefInnerClassesSteersLt1Traded.from_dict(post_beef_request_beef_inner_classes_steers_lt1_traded_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerCowsCalving.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerCowsCalving.md new file mode 100644 index 00000000..6cccdf4a --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerCowsCalving.md @@ -0,0 +1,33 @@ +# PostBeefRequestBeefInnerCowsCalving + +Fraction of cows calving in each season, between 0 and 1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spring** | **float** | | +**summer** | **float** | | +**autumn** | **float** | | +**winter** | **float** | | + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_cows_calving import PostBeefRequestBeefInnerCowsCalving + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerCowsCalving from a JSON string +post_beef_request_beef_inner_cows_calving_instance = PostBeefRequestBeefInnerCowsCalving.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerCowsCalving.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_cows_calving_dict = post_beef_request_beef_inner_cows_calving_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerCowsCalving from a dict +post_beef_request_beef_inner_cows_calving_from_dict = PostBeefRequestBeefInnerCowsCalving.from_dict(post_beef_request_beef_inner_cows_calving_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliser.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliser.md new file mode 100644 index 00000000..5f48af4a --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliser.md @@ -0,0 +1,38 @@ +# PostBeefRequestBeefInnerFertiliser + +Fertiliser used for different applications (such as dryland pasture) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**single_superphosphate** | **float** | Single superphosphate usage in tonnes | +**other_type** | **str** | Other N fertiliser type. Deprecation note: Use `otherFertilisers` instead | [optional] +**pasture_dryland** | **float** | Urea fertiliser used for dryland pasture, in tonnes Urea | +**pasture_irrigated** | **float** | Urea fertiliser used for irrigated pasture, in tonnes Urea | +**crops_dryland** | **float** | Urea fertiliser used for dryland crops, in tonnes Urea | +**crops_irrigated** | **float** | Urea fertiliser used for irrigated crops, in tonnes Urea | +**other_dryland** | **float** | Other N fertiliser used for dryland. Deprecation note: Use `otherFertilisers` instead | [optional] +**other_irrigated** | **float** | Other N fertiliser used for irrigated. Deprecation note: Use `otherFertilisers` instead | [optional] +**other_fertilisers** | [**List[PostBeefRequestBeefInnerFertiliserOtherFertilisersInner]**](PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md) | Array of Other N fertiliser. Version note: If this field is set and has a length > 0, the `other` fields within this object are ignored, and this array is used instead | [optional] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_fertiliser import PostBeefRequestBeefInnerFertiliser + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerFertiliser from a JSON string +post_beef_request_beef_inner_fertiliser_instance = PostBeefRequestBeefInnerFertiliser.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerFertiliser.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_fertiliser_dict = post_beef_request_beef_inner_fertiliser_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerFertiliser from a dict +post_beef_request_beef_inner_fertiliser_from_dict = PostBeefRequestBeefInnerFertiliser.from_dict(post_beef_request_beef_inner_fertiliser_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md new file mode 100644 index 00000000..a54c1b57 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md @@ -0,0 +1,32 @@ +# PostBeefRequestBeefInnerFertiliserOtherFertilisersInner + +Other fertiliser, of a specific type, used for different applications (such as dryland pasture) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**other_type** | **str** | Other N fertiliser type | +**other_dryland** | **float** | Other N fertiliser used for dryland. From v1.1.0, supply tonnes of product. For earlier versions, supply tonnes of N | +**other_irrigated** | **float** | Other N fertiliser used for irrigated. From v1.1.0, supply tonnes of product. For earlier versions, supply tonnes of N | + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_fertiliser_other_fertilisers_inner import PostBeefRequestBeefInnerFertiliserOtherFertilisersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerFertiliserOtherFertilisersInner from a JSON string +post_beef_request_beef_inner_fertiliser_other_fertilisers_inner_instance = PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_fertiliser_other_fertilisers_inner_dict = post_beef_request_beef_inner_fertiliser_other_fertilisers_inner_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerFertiliserOtherFertilisersInner from a dict +post_beef_request_beef_inner_fertiliser_other_fertilisers_inner_from_dict = PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.from_dict(post_beef_request_beef_inner_fertiliser_other_fertilisers_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerMineralSupplementation.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerMineralSupplementation.md new file mode 100644 index 00000000..62d4d7f3 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerMineralSupplementation.md @@ -0,0 +1,35 @@ +# PostBeefRequestBeefInnerMineralSupplementation + +Supplementation for livestock + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mineral_block** | **float** | Mineral block product used, in tonnes | [default to 0] +**mineral_block_urea** | **float** | Fraction of urea content, between 0 and 1 | [default to 0] +**weaner_block** | **float** | Weaner block product used, in tonnes | [default to 0] +**weaner_block_urea** | **float** | Fraction of urea content, between 0 and 1 | [default to 0] +**dry_season_mix** | **float** | Dry season mix product used, in tonnes | [default to 0] +**dry_season_mix_urea** | **float** | Fraction of urea content, between 0 and 1 | [default to 0] + +## Example + +```python +from openapi_client.models.post_beef_request_beef_inner_mineral_supplementation import PostBeefRequestBeefInnerMineralSupplementation + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBeefInnerMineralSupplementation from a JSON string +post_beef_request_beef_inner_mineral_supplementation_instance = PostBeefRequestBeefInnerMineralSupplementation.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBeefInnerMineralSupplementation.to_json()) + +# convert the object into a dict +post_beef_request_beef_inner_mineral_supplementation_dict = post_beef_request_beef_inner_mineral_supplementation_instance.to_dict() +# create an instance of PostBeefRequestBeefInnerMineralSupplementation from a dict +post_beef_request_beef_inner_mineral_supplementation_from_dict = PostBeefRequestBeefInnerMineralSupplementation.from_dict(post_beef_request_beef_inner_mineral_supplementation_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBurningInner.md b/examples/python-api-client/api-client/docs/PostBeefRequestBurningInner.md new file mode 100644 index 00000000..91bb8084 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBurningInner.md @@ -0,0 +1,31 @@ +# PostBeefRequestBurningInner + +Savannah burning along with allocations to beef + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**burning** | [**PostBeefRequestBurningInnerBurning**](PostBeefRequestBurningInnerBurning.md) | | +**allocation_to_beef** | **List[float]** | The proportion of the burning that is allocated to each beef | + +## Example + +```python +from openapi_client.models.post_beef_request_burning_inner import PostBeefRequestBurningInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBurningInner from a JSON string +post_beef_request_burning_inner_instance = PostBeefRequestBurningInner.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBurningInner.to_json()) + +# convert the object into a dict +post_beef_request_burning_inner_dict = post_beef_request_burning_inner_instance.to_dict() +# create an instance of PostBeefRequestBurningInner from a dict +post_beef_request_burning_inner_from_dict = PostBeefRequestBurningInner.from_dict(post_beef_request_burning_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBurningInnerBurning.md b/examples/python-api-client/api-client/docs/PostBeefRequestBurningInnerBurning.md new file mode 100644 index 00000000..9e028ed8 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestBurningInnerBurning.md @@ -0,0 +1,36 @@ +# PostBeefRequestBurningInnerBurning + +Inputs required for any savannah burning activities that took place + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel** | **str** | The fuel class size that was burnt | [default to 'coarse'] +**season** | **str** | The time relative to the fire season in which the burning took place | [default to 'early dry season'] +**patchiness** | **str** | The patchiness of the savannah/vegetation that was burnt | [default to 'high'] +**rainfall_zone** | **str** | The rainfall zone in which the burning took place | [default to 'low'] +**years_since_last_fire** | **float** | Time since the last fire, in years | [default to 0] +**fire_scar_area** | **float** | The total area of the fire scar, in ha (hectares) | [default to 0] +**vegetation** | **str** | The vegetation class that was burnt | [default to 'Melaleuca woodland'] + +## Example + +```python +from openapi_client.models.post_beef_request_burning_inner_burning import PostBeefRequestBurningInnerBurning + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestBurningInnerBurning from a JSON string +post_beef_request_burning_inner_burning_instance = PostBeefRequestBurningInnerBurning.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestBurningInnerBurning.to_json()) + +# convert the object into a dict +post_beef_request_burning_inner_burning_dict = post_beef_request_burning_inner_burning_instance.to_dict() +# create an instance of PostBeefRequestBurningInnerBurning from a dict +post_beef_request_burning_inner_burning_from_dict = PostBeefRequestBurningInnerBurning.from_dict(post_beef_request_burning_inner_burning_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostBeefRequestVegetationInner.md new file mode 100644 index 00000000..3df720a3 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestVegetationInner.md @@ -0,0 +1,32 @@ +# PostBeefRequestVegetationInner + +Non-productive vegetation inputs along with allocations to beef + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**beef_proportion** | **float** | The proportion of the sequestration that is allocated to beef. Deprecation note: Please use `allocationToBeef` instead | [optional] +**allocation_to_beef** | **List[float]** | The proportion of the sequestration that is allocated to each beef | + +## Example + +```python +from openapi_client.models.post_beef_request_vegetation_inner import PostBeefRequestVegetationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestVegetationInner from a JSON string +post_beef_request_vegetation_inner_instance = PostBeefRequestVegetationInner.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestVegetationInner.to_json()) + +# convert the object into a dict +post_beef_request_vegetation_inner_dict = post_beef_request_vegetation_inner_instance.to_dict() +# create an instance of PostBeefRequestVegetationInner from a dict +post_beef_request_vegetation_inner_from_dict = PostBeefRequestVegetationInner.from_dict(post_beef_request_vegetation_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestVegetationInnerVegetation.md b/examples/python-api-client/api-client/docs/PostBeefRequestVegetationInnerVegetation.md new file mode 100644 index 00000000..56561ea4 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBeefRequestVegetationInnerVegetation.md @@ -0,0 +1,34 @@ +# PostBeefRequestVegetationInnerVegetation + +Inputs required for non-productive vegetation in order to calculate carbon sequestration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**region** | **str** | The rainfall region that the vegetation is in | +**tree_species** | **str** | The species of tree | +**soil** | **str** | The soil type the tree is in | +**area** | **float** | The area of trees, in ha (hectares) | +**age** | **float** | The age of the trees, in years | + +## Example + +```python +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBeefRequestVegetationInnerVegetation from a JSON string +post_beef_request_vegetation_inner_vegetation_instance = PostBeefRequestVegetationInnerVegetation.from_json(json) +# print the JSON string representation of the object +print(PostBeefRequestVegetationInnerVegetation.to_json()) + +# convert the object into a dict +post_beef_request_vegetation_inner_vegetation_dict = post_beef_request_vegetation_inner_vegetation_instance.to_dict() +# create an instance of PostBeefRequestVegetationInnerVegetation from a dict +post_beef_request_vegetation_inner_vegetation_from_dict = PostBeefRequestVegetationInnerVegetation.from_dict(post_beef_request_vegetation_inner_vegetation_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffalo200Response.md b/examples/python-api-client/api-client/docs/PostBuffalo200Response.md new file mode 100644 index 00000000..576d5c0e --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffalo200Response.md @@ -0,0 +1,36 @@ +# PostBuffalo200Response + +Emissions calculation output for the `Buffalo` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**net** | [**PostBuffalo200ResponseNet**](PostBuffalo200ResponseNet.md) | | +**intensities** | [**PostBuffalo200ResponseIntensities**](PostBuffalo200ResponseIntensities.md) | | +**intermediate** | [**List[PostBuffalo200ResponseIntermediateInner]**](PostBuffalo200ResponseIntermediateInner.md) | | + +## Example + +```python +from openapi_client.models.post_buffalo200_response import PostBuffalo200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffalo200Response from a JSON string +post_buffalo200_response_instance = PostBuffalo200Response.from_json(json) +# print the JSON string representation of the object +print(PostBuffalo200Response.to_json()) + +# convert the object into a dict +post_buffalo200_response_dict = post_buffalo200_response_instance.to_dict() +# create an instance of PostBuffalo200Response from a dict +post_buffalo200_response_from_dict = PostBuffalo200Response.from_dict(post_buffalo200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntensities.md new file mode 100644 index 00000000..1aa15457 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntensities.md @@ -0,0 +1,31 @@ +# PostBuffalo200ResponseIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**liveweight_produced_kg** | **float** | Amount of buffalo meat produced in kg liveweight | +**buffalo_meat_excluding_sequestration** | **float** | Buffalo meat (breeding herd) excluding sequestration, in kg-CO2e/kg liveweight | +**buffalo_meat_including_sequestration** | **float** | Buffalo meat (breeding herd) including sequestration, in kg-CO2e/kg liveweight | + +## Example + +```python +from openapi_client.models.post_buffalo200_response_intensities import PostBuffalo200ResponseIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffalo200ResponseIntensities from a JSON string +post_buffalo200_response_intensities_instance = PostBuffalo200ResponseIntensities.from_json(json) +# print the JSON string representation of the object +print(PostBuffalo200ResponseIntensities.to_json()) + +# convert the object into a dict +post_buffalo200_response_intensities_dict = post_buffalo200_response_intensities_instance.to_dict() +# create an instance of PostBuffalo200ResponseIntensities from a dict +post_buffalo200_response_intensities_from_dict = PostBuffalo200ResponseIntensities.from_dict(post_buffalo200_response_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntermediateInner.md new file mode 100644 index 00000000..b462531b --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntermediateInner.md @@ -0,0 +1,36 @@ +# PostBuffalo200ResponseIntermediateInner + +Intermediate emissions calculation output for the Buffalo calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | +**net** | [**PostBuffalo200ResponseNet**](PostBuffalo200ResponseNet.md) | | +**intensities** | [**PostBuffalo200ResponseIntensities**](PostBuffalo200ResponseIntensities.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +## Example + +```python +from openapi_client.models.post_buffalo200_response_intermediate_inner import PostBuffalo200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffalo200ResponseIntermediateInner from a JSON string +post_buffalo200_response_intermediate_inner_instance = PostBuffalo200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostBuffalo200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_buffalo200_response_intermediate_inner_dict = post_buffalo200_response_intermediate_inner_instance.to_dict() +# create an instance of PostBuffalo200ResponseIntermediateInner from a dict +post_buffalo200_response_intermediate_inner_from_dict = PostBuffalo200ResponseIntermediateInner.from_dict(post_buffalo200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseNet.md b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseNet.md new file mode 100644 index 00000000..17730dd7 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseNet.md @@ -0,0 +1,30 @@ +# PostBuffalo200ResponseNet + +Net emissions for Buffalo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | + +## Example + +```python +from openapi_client.models.post_buffalo200_response_net import PostBuffalo200ResponseNet + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffalo200ResponseNet from a JSON string +post_buffalo200_response_net_instance = PostBuffalo200ResponseNet.from_json(json) +# print the JSON string representation of the object +print(PostBuffalo200ResponseNet.to_json()) + +# convert the object into a dict +post_buffalo200_response_net_dict = post_buffalo200_response_net_instance.to_dict() +# create an instance of PostBuffalo200ResponseNet from a dict +post_buffalo200_response_net_from_dict = PostBuffalo200ResponseNet.from_dict(post_buffalo200_response_net_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope1.md new file mode 100644 index 00000000..61b8d2e1 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope1.md @@ -0,0 +1,44 @@ +# PostBuffalo200ResponseScope1 + +Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | +**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | +**urine_and_dung_n2_o** | **float** | N2O emissions from urine and dung, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_buffalo200_response_scope1 import PostBuffalo200ResponseScope1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffalo200ResponseScope1 from a JSON string +post_buffalo200_response_scope1_instance = PostBuffalo200ResponseScope1.from_json(json) +# print the JSON string representation of the object +print(PostBuffalo200ResponseScope1.to_json()) + +# convert the object into a dict +post_buffalo200_response_scope1_dict = post_buffalo200_response_scope1_instance.to_dict() +# create an instance of PostBuffalo200ResponseScope1 from a dict +post_buffalo200_response_scope1_from_dict = PostBuffalo200ResponseScope1.from_dict(post_buffalo200_response_scope1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope3.md new file mode 100644 index 00000000..f9b62560 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope3.md @@ -0,0 +1,37 @@ +# PostBuffalo200ResponseScope3 + +Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | +**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**lime** | **float** | Emissions from lime, in tonnes-CO2e | +**purchased_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_buffalo200_response_scope3 import PostBuffalo200ResponseScope3 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffalo200ResponseScope3 from a JSON string +post_buffalo200_response_scope3_instance = PostBuffalo200ResponseScope3.from_json(json) +# print the JSON string representation of the object +print(PostBuffalo200ResponseScope3.to_json()) + +# convert the object into a dict +post_buffalo200_response_scope3_dict = post_buffalo200_response_scope3_instance.to_dict() +# create an instance of PostBuffalo200ResponseScope3 from a dict +post_buffalo200_response_scope3_from_dict = PostBuffalo200ResponseScope3.from_dict(post_buffalo200_response_scope3_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequest.md b/examples/python-api-client/api-client/docs/PostBuffaloRequest.md new file mode 100644 index 00000000..8673571e --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequest.md @@ -0,0 +1,33 @@ +# PostBuffaloRequest + +Input data required for the `Buffalo` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**buffalos** | [**List[PostBuffaloRequestBuffalosInner]**](PostBuffaloRequestBuffalosInner.md) | | +**vegetation** | [**List[PostBuffaloRequestVegetationInner]**](PostBuffaloRequestVegetationInner.md) | | [default to []] + +## Example + +```python +from openapi_client.models.post_buffalo_request import PostBuffaloRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequest from a JSON string +post_buffalo_request_instance = PostBuffaloRequest.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequest.to_json()) + +# convert the object into a dict +post_buffalo_request_dict = post_buffalo_request_instance.to_dict() +# create an instance of PostBuffaloRequest from a dict +post_buffalo_request_from_dict = PostBuffaloRequest.from_dict(post_buffalo_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInner.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInner.md new file mode 100644 index 00000000..f7a9fa87 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInner.md @@ -0,0 +1,45 @@ +# PostBuffaloRequestBuffalosInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**classes** | [**PostBuffaloRequestBuffalosInnerClasses**](PostBuffaloRequestBuffalosInnerClasses.md) | | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**electricity_source** | **str** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | +**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**cows_calving** | [**PostBuffaloRequestBuffalosInnerCowsCalving**](PostBuffaloRequestBuffalosInnerCowsCalving.md) | | +**seasonal_calving** | [**PostBuffaloRequestBuffalosInnerSeasonalCalving**](PostBuffaloRequestBuffalosInnerSeasonalCalving.md) | | + +## Example + +```python +from openapi_client.models.post_buffalo_request_buffalos_inner import PostBuffaloRequestBuffalosInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestBuffalosInner from a JSON string +post_buffalo_request_buffalos_inner_instance = PostBuffaloRequestBuffalosInner.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestBuffalosInner.to_json()) + +# convert the object into a dict +post_buffalo_request_buffalos_inner_dict = post_buffalo_request_buffalos_inner_instance.to_dict() +# create an instance of PostBuffaloRequestBuffalosInner from a dict +post_buffalo_request_buffalos_inner_from_dict = PostBuffaloRequestBuffalosInner.from_dict(post_buffalo_request_buffalos_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClasses.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClasses.md new file mode 100644 index 00000000..713c432e --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClasses.md @@ -0,0 +1,37 @@ +# PostBuffaloRequestBuffalosInnerClasses + +Buffalo classes of different types + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bulls** | [**PostBuffaloRequestBuffalosInnerClassesBulls**](PostBuffaloRequestBuffalosInnerClassesBulls.md) | | [optional] +**trade_bulls** | [**PostBuffaloRequestBuffalosInnerClassesTradeBulls**](PostBuffaloRequestBuffalosInnerClassesTradeBulls.md) | | [optional] +**cows** | [**PostBuffaloRequestBuffalosInnerClassesCows**](PostBuffaloRequestBuffalosInnerClassesCows.md) | | [optional] +**trade_cows** | [**PostBuffaloRequestBuffalosInnerClassesTradeCows**](PostBuffaloRequestBuffalosInnerClassesTradeCows.md) | | [optional] +**steers** | [**PostBuffaloRequestBuffalosInnerClassesSteers**](PostBuffaloRequestBuffalosInnerClassesSteers.md) | | [optional] +**trade_steers** | [**PostBuffaloRequestBuffalosInnerClassesTradeSteers**](PostBuffaloRequestBuffalosInnerClassesTradeSteers.md) | | [optional] +**calfs** | [**PostBuffaloRequestBuffalosInnerClassesCalfs**](PostBuffaloRequestBuffalosInnerClassesCalfs.md) | | [optional] +**trade_calfs** | [**PostBuffaloRequestBuffalosInnerClassesTradeCalfs**](PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_buffalo_request_buffalos_inner_classes import PostBuffaloRequestBuffalosInnerClasses + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestBuffalosInnerClasses from a JSON string +post_buffalo_request_buffalos_inner_classes_instance = PostBuffaloRequestBuffalosInnerClasses.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestBuffalosInnerClasses.to_json()) + +# convert the object into a dict +post_buffalo_request_buffalos_inner_classes_dict = post_buffalo_request_buffalos_inner_classes_instance.to_dict() +# create an instance of PostBuffaloRequestBuffalosInnerClasses from a dict +post_buffalo_request_buffalos_inner_classes_from_dict = PostBuffaloRequestBuffalosInnerClasses.from_dict(post_buffalo_request_buffalos_inner_classes_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBulls.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBulls.md new file mode 100644 index 00000000..4a7ffab7 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBulls.md @@ -0,0 +1,36 @@ +# PostBuffaloRequestBuffalosInnerClassesBulls + +Bulls + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls import PostBuffaloRequestBuffalosInnerClassesBulls + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestBuffalosInnerClassesBulls from a JSON string +post_buffalo_request_buffalos_inner_classes_bulls_instance = PostBuffaloRequestBuffalosInnerClassesBulls.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestBuffalosInnerClassesBulls.to_json()) + +# convert the object into a dict +post_buffalo_request_buffalos_inner_classes_bulls_dict = post_buffalo_request_buffalos_inner_classes_bulls_instance.to_dict() +# create an instance of PostBuffaloRequestBuffalosInnerClassesBulls from a dict +post_buffalo_request_buffalos_inner_classes_bulls_from_dict = PostBuffaloRequestBuffalosInnerClassesBulls.from_dict(post_buffalo_request_buffalos_inner_classes_bulls_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md new file mode 100644 index 00000000..943ec734 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md @@ -0,0 +1,29 @@ +# PostBuffaloRequestBuffalosInnerClassesBullsAutumn + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals (head) | + +## Example + +```python +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestBuffalosInnerClassesBullsAutumn from a JSON string +post_buffalo_request_buffalos_inner_classes_bulls_autumn_instance = PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestBuffalosInnerClassesBullsAutumn.to_json()) + +# convert the object into a dict +post_buffalo_request_buffalos_inner_classes_bulls_autumn_dict = post_buffalo_request_buffalos_inner_classes_bulls_autumn_instance.to_dict() +# create an instance of PostBuffaloRequestBuffalosInnerClassesBullsAutumn from a dict +post_buffalo_request_buffalos_inner_classes_bulls_autumn_from_dict = PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(post_buffalo_request_buffalos_inner_classes_bulls_autumn_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md new file mode 100644 index 00000000..c33a400b --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md @@ -0,0 +1,30 @@ +# PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals purchased (head) | +**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | + +## Example + +```python +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner from a JSON string +post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner_instance = PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.to_json()) + +# convert the object into a dict +post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner_dict = post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner_instance.to_dict() +# create an instance of PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner from a dict +post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner_from_dict = PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCalfs.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCalfs.md new file mode 100644 index 00000000..8966ad83 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCalfs.md @@ -0,0 +1,36 @@ +# PostBuffaloRequestBuffalosInnerClassesCalfs + +Calfs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_calfs import PostBuffaloRequestBuffalosInnerClassesCalfs + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestBuffalosInnerClassesCalfs from a JSON string +post_buffalo_request_buffalos_inner_classes_calfs_instance = PostBuffaloRequestBuffalosInnerClassesCalfs.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestBuffalosInnerClassesCalfs.to_json()) + +# convert the object into a dict +post_buffalo_request_buffalos_inner_classes_calfs_dict = post_buffalo_request_buffalos_inner_classes_calfs_instance.to_dict() +# create an instance of PostBuffaloRequestBuffalosInnerClassesCalfs from a dict +post_buffalo_request_buffalos_inner_classes_calfs_from_dict = PostBuffaloRequestBuffalosInnerClassesCalfs.from_dict(post_buffalo_request_buffalos_inner_classes_calfs_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCows.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCows.md new file mode 100644 index 00000000..2f75ca09 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCows.md @@ -0,0 +1,36 @@ +# PostBuffaloRequestBuffalosInnerClassesCows + +Cows + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_cows import PostBuffaloRequestBuffalosInnerClassesCows + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestBuffalosInnerClassesCows from a JSON string +post_buffalo_request_buffalos_inner_classes_cows_instance = PostBuffaloRequestBuffalosInnerClassesCows.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestBuffalosInnerClassesCows.to_json()) + +# convert the object into a dict +post_buffalo_request_buffalos_inner_classes_cows_dict = post_buffalo_request_buffalos_inner_classes_cows_instance.to_dict() +# create an instance of PostBuffaloRequestBuffalosInnerClassesCows from a dict +post_buffalo_request_buffalos_inner_classes_cows_from_dict = PostBuffaloRequestBuffalosInnerClassesCows.from_dict(post_buffalo_request_buffalos_inner_classes_cows_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesSteers.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesSteers.md new file mode 100644 index 00000000..a6fc06a9 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesSteers.md @@ -0,0 +1,36 @@ +# PostBuffaloRequestBuffalosInnerClassesSteers + +Steers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_steers import PostBuffaloRequestBuffalosInnerClassesSteers + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestBuffalosInnerClassesSteers from a JSON string +post_buffalo_request_buffalos_inner_classes_steers_instance = PostBuffaloRequestBuffalosInnerClassesSteers.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestBuffalosInnerClassesSteers.to_json()) + +# convert the object into a dict +post_buffalo_request_buffalos_inner_classes_steers_dict = post_buffalo_request_buffalos_inner_classes_steers_instance.to_dict() +# create an instance of PostBuffaloRequestBuffalosInnerClassesSteers from a dict +post_buffalo_request_buffalos_inner_classes_steers_from_dict = PostBuffaloRequestBuffalosInnerClassesSteers.from_dict(post_buffalo_request_buffalos_inner_classes_steers_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md new file mode 100644 index 00000000..8039f52e --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md @@ -0,0 +1,36 @@ +# PostBuffaloRequestBuffalosInnerClassesTradeBulls + +Trade bulls + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_bulls import PostBuffaloRequestBuffalosInnerClassesTradeBulls + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeBulls from a JSON string +post_buffalo_request_buffalos_inner_classes_trade_bulls_instance = PostBuffaloRequestBuffalosInnerClassesTradeBulls.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestBuffalosInnerClassesTradeBulls.to_json()) + +# convert the object into a dict +post_buffalo_request_buffalos_inner_classes_trade_bulls_dict = post_buffalo_request_buffalos_inner_classes_trade_bulls_instance.to_dict() +# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeBulls from a dict +post_buffalo_request_buffalos_inner_classes_trade_bulls_from_dict = PostBuffaloRequestBuffalosInnerClassesTradeBulls.from_dict(post_buffalo_request_buffalos_inner_classes_trade_bulls_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md new file mode 100644 index 00000000..8553646f --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md @@ -0,0 +1,36 @@ +# PostBuffaloRequestBuffalosInnerClassesTradeCalfs + +Trade calfs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_calfs import PostBuffaloRequestBuffalosInnerClassesTradeCalfs + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeCalfs from a JSON string +post_buffalo_request_buffalos_inner_classes_trade_calfs_instance = PostBuffaloRequestBuffalosInnerClassesTradeCalfs.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestBuffalosInnerClassesTradeCalfs.to_json()) + +# convert the object into a dict +post_buffalo_request_buffalos_inner_classes_trade_calfs_dict = post_buffalo_request_buffalos_inner_classes_trade_calfs_instance.to_dict() +# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeCalfs from a dict +post_buffalo_request_buffalos_inner_classes_trade_calfs_from_dict = PostBuffaloRequestBuffalosInnerClassesTradeCalfs.from_dict(post_buffalo_request_buffalos_inner_classes_trade_calfs_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCows.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCows.md new file mode 100644 index 00000000..a7f04ced --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCows.md @@ -0,0 +1,36 @@ +# PostBuffaloRequestBuffalosInnerClassesTradeCows + +Trade cows + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_cows import PostBuffaloRequestBuffalosInnerClassesTradeCows + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeCows from a JSON string +post_buffalo_request_buffalos_inner_classes_trade_cows_instance = PostBuffaloRequestBuffalosInnerClassesTradeCows.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestBuffalosInnerClassesTradeCows.to_json()) + +# convert the object into a dict +post_buffalo_request_buffalos_inner_classes_trade_cows_dict = post_buffalo_request_buffalos_inner_classes_trade_cows_instance.to_dict() +# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeCows from a dict +post_buffalo_request_buffalos_inner_classes_trade_cows_from_dict = PostBuffaloRequestBuffalosInnerClassesTradeCows.from_dict(post_buffalo_request_buffalos_inner_classes_trade_cows_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md new file mode 100644 index 00000000..9d312e7e --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md @@ -0,0 +1,36 @@ +# PostBuffaloRequestBuffalosInnerClassesTradeSteers + +Trade steers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_steers import PostBuffaloRequestBuffalosInnerClassesTradeSteers + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeSteers from a JSON string +post_buffalo_request_buffalos_inner_classes_trade_steers_instance = PostBuffaloRequestBuffalosInnerClassesTradeSteers.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestBuffalosInnerClassesTradeSteers.to_json()) + +# convert the object into a dict +post_buffalo_request_buffalos_inner_classes_trade_steers_dict = post_buffalo_request_buffalos_inner_classes_trade_steers_instance.to_dict() +# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeSteers from a dict +post_buffalo_request_buffalos_inner_classes_trade_steers_from_dict = PostBuffaloRequestBuffalosInnerClassesTradeSteers.from_dict(post_buffalo_request_buffalos_inner_classes_trade_steers_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerCowsCalving.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerCowsCalving.md new file mode 100644 index 00000000..bdc2593d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerCowsCalving.md @@ -0,0 +1,33 @@ +# PostBuffaloRequestBuffalosInnerCowsCalving + +Proportion of cows calving in each season, from 0 to 1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spring** | **float** | | +**summer** | **float** | | +**autumn** | **float** | | +**winter** | **float** | | + +## Example + +```python +from openapi_client.models.post_buffalo_request_buffalos_inner_cows_calving import PostBuffaloRequestBuffalosInnerCowsCalving + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestBuffalosInnerCowsCalving from a JSON string +post_buffalo_request_buffalos_inner_cows_calving_instance = PostBuffaloRequestBuffalosInnerCowsCalving.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestBuffalosInnerCowsCalving.to_json()) + +# convert the object into a dict +post_buffalo_request_buffalos_inner_cows_calving_dict = post_buffalo_request_buffalos_inner_cows_calving_instance.to_dict() +# create an instance of PostBuffaloRequestBuffalosInnerCowsCalving from a dict +post_buffalo_request_buffalos_inner_cows_calving_from_dict = PostBuffaloRequestBuffalosInnerCowsCalving.from_dict(post_buffalo_request_buffalos_inner_cows_calving_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerSeasonalCalving.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerSeasonalCalving.md new file mode 100644 index 00000000..851e3a66 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerSeasonalCalving.md @@ -0,0 +1,33 @@ +# PostBuffaloRequestBuffalosInnerSeasonalCalving + +Seasonal calving rates, from 0 to 1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spring** | **float** | | +**summer** | **float** | | +**autumn** | **float** | | +**winter** | **float** | | + +## Example + +```python +from openapi_client.models.post_buffalo_request_buffalos_inner_seasonal_calving import PostBuffaloRequestBuffalosInnerSeasonalCalving + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestBuffalosInnerSeasonalCalving from a JSON string +post_buffalo_request_buffalos_inner_seasonal_calving_instance = PostBuffaloRequestBuffalosInnerSeasonalCalving.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestBuffalosInnerSeasonalCalving.to_json()) + +# convert the object into a dict +post_buffalo_request_buffalos_inner_seasonal_calving_dict = post_buffalo_request_buffalos_inner_seasonal_calving_instance.to_dict() +# create an instance of PostBuffaloRequestBuffalosInnerSeasonalCalving from a dict +post_buffalo_request_buffalos_inner_seasonal_calving_from_dict = PostBuffaloRequestBuffalosInnerSeasonalCalving.from_dict(post_buffalo_request_buffalos_inner_seasonal_calving_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestVegetationInner.md new file mode 100644 index 00000000..8a3173f2 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostBuffaloRequestVegetationInner.md @@ -0,0 +1,31 @@ +# PostBuffaloRequestVegetationInner + +Non-productive vegetation inputs along with allocations to Buffalo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**buffalo_proportion** | **List[float]** | The proportion of the sequestration that is allocated to Buffalo | + +## Example + +```python +from openapi_client.models.post_buffalo_request_vegetation_inner import PostBuffaloRequestVegetationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostBuffaloRequestVegetationInner from a JSON string +post_buffalo_request_vegetation_inner_instance = PostBuffaloRequestVegetationInner.from_json(json) +# print the JSON string representation of the object +print(PostBuffaloRequestVegetationInner.to_json()) + +# convert the object into a dict +post_buffalo_request_vegetation_inner_dict = post_buffalo_request_vegetation_inner_instance.to_dict() +# create an instance of PostBuffaloRequestVegetationInner from a dict +post_buffalo_request_vegetation_inner_from_dict = PostBuffaloRequestVegetationInner.from_dict(post_buffalo_request_vegetation_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostCotton200Response.md b/examples/python-api-client/api-client/docs/PostCotton200Response.md new file mode 100644 index 00000000..fdd6a6eb --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostCotton200Response.md @@ -0,0 +1,36 @@ +# PostCotton200Response + +Emissions calculation output for the `cotton` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**List[PostCotton200ResponseIntermediateInner]**](PostCotton200ResponseIntermediateInner.md) | | +**net** | [**PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | +**intensities** | [**List[PostCotton200ResponseIntermediateInnerIntensities]**](PostCotton200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each crop (in order) | + +## Example + +```python +from openapi_client.models.post_cotton200_response import PostCotton200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostCotton200Response from a JSON string +post_cotton200_response_instance = PostCotton200Response.from_json(json) +# print the JSON string representation of the object +print(PostCotton200Response.to_json()) + +# convert the object into a dict +post_cotton200_response_dict = post_cotton200_response_instance.to_dict() +# create an instance of PostCotton200Response from a dict +post_cotton200_response_from_dict = PostCotton200Response.from_dict(post_cotton200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInner.md new file mode 100644 index 00000000..3b439407 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInner.md @@ -0,0 +1,36 @@ +# PostCotton200ResponseIntermediateInner + +Intermediate emissions calculation output for the Cotton calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**intensities** | [**PostCotton200ResponseIntermediateInnerIntensities**](PostCotton200ResponseIntermediateInnerIntensities.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +## Example + +```python +from openapi_client.models.post_cotton200_response_intermediate_inner import PostCotton200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostCotton200ResponseIntermediateInner from a JSON string +post_cotton200_response_intermediate_inner_instance = PostCotton200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostCotton200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_cotton200_response_intermediate_inner_dict = post_cotton200_response_intermediate_inner_instance.to_dict() +# create an instance of PostCotton200ResponseIntermediateInner from a dict +post_cotton200_response_intermediate_inner_from_dict = PostCotton200ResponseIntermediateInner.from_dict(post_cotton200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..b7370b30 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,43 @@ +# PostCotton200ResponseIntermediateInnerIntensities + +Cotton intensities output + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cotton_yield_produced_tonnes** | **float** | Cotton yield produced in tonnes | +**bales_produced** | **float** | Number of bales produced | +**lint_produced_tonnes** | **float** | Cotton lint produced in tonnes | +**seed_produced_tonnes** | **float** | Cotton seed produced in tonnes | +**tonnes_crop_excluding_sequestration** | **float** | Emissions intensity excluding sequestration, in t-CO2e/t crop | +**tonnes_crop_including_sequestration** | **float** | Emissions intensity including sequestration, in t-CO2e/t crop | +**bales_excluding_sequestration** | **float** | Emissions intensity excluding sequestration, in t-CO2e/bale | +**bales_including_sequestration** | **float** | Emissions intensity including sequestration, in t-CO2e/bale | +**lint_including_sequestration** | **float** | Emissions intensity of lint including sequestration, in t-CO2e/kg | +**lint_excluding_sequestration** | **float** | Emissions intensity of lint excluding sequestration, in t-CO2e/kg | +**seed_including_sequestration** | **float** | Emissions intensity of seed including sequestration, in t-CO2e/kg | +**seed_excluding_sequestration** | **float** | Emissions intensity of seed excluding sequestration, in t-CO2e/kg | +**lint_economic_allocation** | **float** | Emissions intensity of lint using economic allocation, in t-CO2e/kg | +**seed_economic_allocation** | **float** | Emissions intensity of seed using economic allocation, in t-CO2e/kg | + +## Example + +```python +from openapi_client.models.post_cotton200_response_intermediate_inner_intensities import PostCotton200ResponseIntermediateInnerIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostCotton200ResponseIntermediateInnerIntensities from a JSON string +post_cotton200_response_intermediate_inner_intensities_instance = PostCotton200ResponseIntermediateInnerIntensities.from_json(json) +# print the JSON string representation of the object +print(PostCotton200ResponseIntermediateInnerIntensities.to_json()) + +# convert the object into a dict +post_cotton200_response_intermediate_inner_intensities_dict = post_cotton200_response_intermediate_inner_intensities_instance.to_dict() +# create an instance of PostCotton200ResponseIntermediateInnerIntensities from a dict +post_cotton200_response_intermediate_inner_intensities_from_dict = PostCotton200ResponseIntermediateInnerIntensities.from_dict(post_cotton200_response_intermediate_inner_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostCotton200ResponseNet.md b/examples/python-api-client/api-client/docs/PostCotton200ResponseNet.md new file mode 100644 index 00000000..e974a1d7 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostCotton200ResponseNet.md @@ -0,0 +1,31 @@ +# PostCotton200ResponseNet + +Net emissions for each crop (in order) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | +**crops** | **List[float]** | | + +## Example + +```python +from openapi_client.models.post_cotton200_response_net import PostCotton200ResponseNet + +# TODO update the JSON string below +json = "{}" +# create an instance of PostCotton200ResponseNet from a JSON string +post_cotton200_response_net_instance = PostCotton200ResponseNet.from_json(json) +# print the JSON string representation of the object +print(PostCotton200ResponseNet.to_json()) + +# convert the object into a dict +post_cotton200_response_net_dict = post_cotton200_response_net_instance.to_dict() +# create an instance of PostCotton200ResponseNet from a dict +post_cotton200_response_net_from_dict = PostCotton200ResponseNet.from_dict(post_cotton200_response_net_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostCotton200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostCotton200ResponseScope1.md new file mode 100644 index 00000000..62cfb825 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostCotton200ResponseScope1.md @@ -0,0 +1,44 @@ +# PostCotton200ResponseScope1 + +Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | +**field_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | +**field_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_cotton200_response_scope1 import PostCotton200ResponseScope1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostCotton200ResponseScope1 from a JSON string +post_cotton200_response_scope1_instance = PostCotton200ResponseScope1.from_json(json) +# print the JSON string representation of the object +print(PostCotton200ResponseScope1.to_json()) + +# convert the object into a dict +post_cotton200_response_scope1_dict = post_cotton200_response_scope1_instance.to_dict() +# create an instance of PostCotton200ResponseScope1 from a dict +post_cotton200_response_scope1_from_dict = PostCotton200ResponseScope1.from_dict(post_cotton200_response_scope1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostCotton200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostCotton200ResponseScope3.md new file mode 100644 index 00000000..257cd385 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostCotton200ResponseScope3.md @@ -0,0 +1,35 @@ +# PostCotton200ResponseScope3 + +Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**lime** | **float** | Emissions from lime, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostCotton200ResponseScope3 from a JSON string +post_cotton200_response_scope3_instance = PostCotton200ResponseScope3.from_json(json) +# print the JSON string representation of the object +print(PostCotton200ResponseScope3.to_json()) + +# convert the object into a dict +post_cotton200_response_scope3_dict = post_cotton200_response_scope3_instance.to_dict() +# create an instance of PostCotton200ResponseScope3 from a dict +post_cotton200_response_scope3_from_dict = PostCotton200ResponseScope3.from_dict(post_cotton200_response_scope3_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostCottonRequest.md b/examples/python-api-client/api-client/docs/PostCottonRequest.md new file mode 100644 index 00000000..5b5d4cb5 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostCottonRequest.md @@ -0,0 +1,34 @@ +# PostCottonRequest + +Input data required for the `cotton` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**crops** | [**List[PostCottonRequestCropsInner]**](PostCottonRequestCropsInner.md) | | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**vegetation** | [**List[PostCottonRequestVegetationInner]**](PostCottonRequestVegetationInner.md) | | + +## Example + +```python +from openapi_client.models.post_cotton_request import PostCottonRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostCottonRequest from a JSON string +post_cotton_request_instance = PostCottonRequest.from_json(json) +# print the JSON string representation of the object +print(PostCottonRequest.to_json()) + +# convert the object into a dict +post_cotton_request_dict = post_cotton_request_instance.to_dict() +# create an instance of PostCottonRequest from a dict +post_cotton_request_from_dict = PostCottonRequest.from_dict(post_cotton_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostCottonRequestCropsInner.md b/examples/python-api-client/api-client/docs/PostCottonRequestCropsInner.md new file mode 100644 index 00000000..d901daa1 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostCottonRequestCropsInner.md @@ -0,0 +1,55 @@ +# PostCottonRequestCropsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**average_cotton_yield** | **float** | Average cotton yield, in t/ha (tonnes per hectare) | +**area_sown** | **float** | Area sown, in ha (hectares) | +**average_weight_per_bale_kg** | **float** | Average weight of unprocessed cotton per bale, in kg | +**cotton_lint_per_bale_kg** | **float** | Average weight of cotton lint per bale, in kg | +**cotton_seed_per_bale_kg** | **float** | Average weight of cotton seed produced per bale, in kg | +**waste_per_bale_kg** | **float** | Average weight of cotton waste produced per bale, in kg | +**urea_application** | **float** | Urea application, in kg Urea/ha (kilograms of urea per hectare) | +**other_fertiliser_type** | **str** | Other N fertiliser type | [optional] +**other_fertiliser_application** | **float** | Other N fertiliser application, in kg/ha (kilograms per hectare) | +**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | [default to 0] +**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | [default to 0] +**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | [default to 0] +**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | [default to 0] +**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | [default to 0] +**single_super_phosphate** | **float** | Single superphosphate use, in kg/ha (kilograms per hectare) | +**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | +**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt. If included, this should only ever be 0 for cotton | [default to 0] +**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | +**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | +**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**diesel_use** | **float** | Diesel usage in L (litres) | +**petrol_use** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | + +## Example + +```python +from openapi_client.models.post_cotton_request_crops_inner import PostCottonRequestCropsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostCottonRequestCropsInner from a JSON string +post_cotton_request_crops_inner_instance = PostCottonRequestCropsInner.from_json(json) +# print the JSON string representation of the object +print(PostCottonRequestCropsInner.to_json()) + +# convert the object into a dict +post_cotton_request_crops_inner_dict = post_cotton_request_crops_inner_instance.to_dict() +# create an instance of PostCottonRequestCropsInner from a dict +post_cotton_request_crops_inner_from_dict = PostCottonRequestCropsInner.from_dict(post_cotton_request_crops_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostCottonRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostCottonRequestVegetationInner.md new file mode 100644 index 00000000..aee41e88 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostCottonRequestVegetationInner.md @@ -0,0 +1,30 @@ +# PostCottonRequestVegetationInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**allocation_to_crops** | **List[float]** | | + +## Example + +```python +from openapi_client.models.post_cotton_request_vegetation_inner import PostCottonRequestVegetationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostCottonRequestVegetationInner from a JSON string +post_cotton_request_vegetation_inner_instance = PostCottonRequestVegetationInner.from_json(json) +# print the JSON string representation of the object +print(PostCottonRequestVegetationInner.to_json()) + +# convert the object into a dict +post_cotton_request_vegetation_inner_dict = post_cotton_request_vegetation_inner_instance.to_dict() +# create an instance of PostCottonRequestVegetationInner from a dict +post_cotton_request_vegetation_inner_from_dict = PostCottonRequestVegetationInner.from_dict(post_cotton_request_vegetation_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairy200Response.md b/examples/python-api-client/api-client/docs/PostDairy200Response.md new file mode 100644 index 00000000..5804d1f2 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairy200Response.md @@ -0,0 +1,36 @@ +# PostDairy200Response + +Emissions calculation output for the `dairy` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostDairy200ResponseScope1**](PostDairy200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostDairy200ResponseScope3**](PostDairy200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**net** | [**PostDairy200ResponseNet**](PostDairy200ResponseNet.md) | | +**intensities** | [**PostDairy200ResponseIntensities**](PostDairy200ResponseIntensities.md) | | +**intermediate** | [**List[PostDairy200ResponseIntermediateInner]**](PostDairy200ResponseIntermediateInner.md) | | + +## Example + +```python +from openapi_client.models.post_dairy200_response import PostDairy200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairy200Response from a JSON string +post_dairy200_response_instance = PostDairy200Response.from_json(json) +# print the JSON string representation of the object +print(PostDairy200Response.to_json()) + +# convert the object into a dict +post_dairy200_response_dict = post_dairy200_response_instance.to_dict() +# create an instance of PostDairy200Response from a dict +post_dairy200_response_from_dict = PostDairy200Response.from_dict(post_dairy200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairy200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostDairy200ResponseIntensities.md new file mode 100644 index 00000000..32fd12c4 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairy200ResponseIntensities.md @@ -0,0 +1,30 @@ +# PostDairy200ResponseIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**milk_solids_produced_tonnes** | **float** | Milk solids produced in tonnes | +**intensity** | **float** | Dairy intensities including carbon sequestration, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_dairy200_response_intensities import PostDairy200ResponseIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairy200ResponseIntensities from a JSON string +post_dairy200_response_intensities_instance = PostDairy200ResponseIntensities.from_json(json) +# print the JSON string representation of the object +print(PostDairy200ResponseIntensities.to_json()) + +# convert the object into a dict +post_dairy200_response_intensities_dict = post_dairy200_response_intensities_instance.to_dict() +# create an instance of PostDairy200ResponseIntensities from a dict +post_dairy200_response_intensities_from_dict = PostDairy200ResponseIntensities.from_dict(post_dairy200_response_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairy200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostDairy200ResponseIntermediateInner.md new file mode 100644 index 00000000..70a2d371 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairy200ResponseIntermediateInner.md @@ -0,0 +1,36 @@ +# PostDairy200ResponseIntermediateInner + +Intermediate emissions calculation output for the Dairy calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostDairy200ResponseScope1**](PostDairy200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostDairy200ResponseScope3**](PostDairy200ResponseScope3.md) | | +**net** | [**PostDairy200ResponseNet**](PostDairy200ResponseNet.md) | | +**intensities** | [**PostDairy200ResponseIntensities**](PostDairy200ResponseIntensities.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +## Example + +```python +from openapi_client.models.post_dairy200_response_intermediate_inner import PostDairy200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairy200ResponseIntermediateInner from a JSON string +post_dairy200_response_intermediate_inner_instance = PostDairy200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostDairy200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_dairy200_response_intermediate_inner_dict = post_dairy200_response_intermediate_inner_instance.to_dict() +# create an instance of PostDairy200ResponseIntermediateInner from a dict +post_dairy200_response_intermediate_inner_from_dict = PostDairy200ResponseIntermediateInner.from_dict(post_dairy200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairy200ResponseNet.md b/examples/python-api-client/api-client/docs/PostDairy200ResponseNet.md new file mode 100644 index 00000000..f4ec392f --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairy200ResponseNet.md @@ -0,0 +1,29 @@ +# PostDairy200ResponseNet + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | + +## Example + +```python +from openapi_client.models.post_dairy200_response_net import PostDairy200ResponseNet + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairy200ResponseNet from a JSON string +post_dairy200_response_net_instance = PostDairy200ResponseNet.from_json(json) +# print the JSON string representation of the object +print(PostDairy200ResponseNet.to_json()) + +# convert the object into a dict +post_dairy200_response_net_dict = post_dairy200_response_net_instance.to_dict() +# create an instance of PostDairy200ResponseNet from a dict +post_dairy200_response_net_from_dict = PostDairy200ResponseNet.from_dict(post_dairy200_response_net_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairy200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostDairy200ResponseScope1.md new file mode 100644 index 00000000..c2dd2518 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairy200ResponseScope1.md @@ -0,0 +1,49 @@ +# PostDairy200ResponseScope1 + +Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | +**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | +**manure_management_n2_o** | **float** | N2O emissions from manure management, in tonnes-CO2e | +**animal_waste_n2_o** | **float** | N2O emissions from animal waste, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**urine_and_dung_n2_o** | **float** | N2O emissions from urine and dung, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**transport_n2_o** | **float** | N2O emissions from transport, in tonnes-CO2e | +**transport_ch4** | **float** | CH4 emissions from transport, in tonnes-CO2e | +**transport_co2** | **float** | CO2 emissions from transport, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_dairy200_response_scope1 import PostDairy200ResponseScope1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairy200ResponseScope1 from a JSON string +post_dairy200_response_scope1_instance = PostDairy200ResponseScope1.from_json(json) +# print the JSON string representation of the object +print(PostDairy200ResponseScope1.to_json()) + +# convert the object into a dict +post_dairy200_response_scope1_dict = post_dairy200_response_scope1_instance.to_dict() +# create an instance of PostDairy200ResponseScope1 from a dict +post_dairy200_response_scope1_from_dict = PostDairy200ResponseScope1.from_dict(post_dairy200_response_scope1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairy200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostDairy200ResponseScope3.md new file mode 100644 index 00000000..48adf2c8 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairy200ResponseScope3.md @@ -0,0 +1,36 @@ +# PostDairy200ResponseScope3 + +Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | +**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**lime** | **float** | Emissions from lime, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_dairy200_response_scope3 import PostDairy200ResponseScope3 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairy200ResponseScope3 from a JSON string +post_dairy200_response_scope3_instance = PostDairy200ResponseScope3.from_json(json) +# print the JSON string representation of the object +print(PostDairy200ResponseScope3.to_json()) + +# convert the object into a dict +post_dairy200_response_scope3_dict = post_dairy200_response_scope3_instance.to_dict() +# create an instance of PostDairy200ResponseScope3 from a dict +post_dairy200_response_scope3_from_dict = PostDairy200ResponseScope3.from_dict(post_dairy200_response_scope3_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairyRequest.md b/examples/python-api-client/api-client/docs/PostDairyRequest.md new file mode 100644 index 00000000..a8ae1309 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairyRequest.md @@ -0,0 +1,34 @@ +# PostDairyRequest + +Input data required for the `dairy` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**production_system** | **str** | Production system | +**dairy** | [**List[PostDairyRequestDairyInner]**](PostDairyRequestDairyInner.md) | | +**vegetation** | [**List[PostDairyRequestVegetationInner]**](PostDairyRequestVegetationInner.md) | | + +## Example + +```python +from openapi_client.models.post_dairy_request import PostDairyRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairyRequest from a JSON string +post_dairy_request_instance = PostDairyRequest.from_json(json) +# print the JSON string representation of the object +print(PostDairyRequest.to_json()) + +# convert the object into a dict +post_dairy_request_dict = post_dairy_request_instance.to_dict() +# create an instance of PostDairyRequest from a dict +post_dairy_request_from_dict = PostDairyRequest.from_dict(post_dairy_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInner.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInner.md new file mode 100644 index 00000000..84b52555 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInner.md @@ -0,0 +1,50 @@ +# PostDairyRequestDairyInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**classes** | [**PostDairyRequestDairyInnerClasses**](PostDairyRequestDairyInnerClasses.md) | | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**seasonal_fertiliser** | [**PostDairyRequestDairyInnerSeasonalFertiliser**](PostDairyRequestDairyInnerSeasonalFertiliser.md) | | +**areas** | [**PostDairyRequestDairyInnerAreas**](PostDairyRequestDairyInnerAreas.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | +**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | +**cottonseed_feed** | **float** | Cotton seed purchased for cattle feed in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**manure_management_milking_cows** | [**PostDairyRequestDairyInnerManureManagementMilkingCows**](PostDairyRequestDairyInnerManureManagementMilkingCows.md) | | +**manure_management_other_dairy_cows** | [**PostDairyRequestDairyInnerManureManagementMilkingCows**](PostDairyRequestDairyInnerManureManagementMilkingCows.md) | | +**emissions_allocation_to_red_meat_production** | **float** | Allocation as a fraction, from 0 to 1 | +**truck_type** | **str** | Type of truck used for cattle transport | +**distance_cattle_transported** | **float** | Distance cattle are transported between farms, in km (kilometres) | + +## Example + +```python +from openapi_client.models.post_dairy_request_dairy_inner import PostDairyRequestDairyInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairyRequestDairyInner from a JSON string +post_dairy_request_dairy_inner_instance = PostDairyRequestDairyInner.from_json(json) +# print the JSON string representation of the object +print(PostDairyRequestDairyInner.to_json()) + +# convert the object into a dict +post_dairy_request_dairy_inner_dict = post_dairy_request_dairy_inner_instance.to_dict() +# create an instance of PostDairyRequestDairyInner from a dict +post_dairy_request_dairy_inner_from_dict = PostDairyRequestDairyInner.from_dict(post_dairy_request_dairy_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerAreas.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerAreas.md new file mode 100644 index 00000000..813b878b --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerAreas.md @@ -0,0 +1,33 @@ +# PostDairyRequestDairyInnerAreas + +Areas in hectares (ha) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cropped_dryland** | **float** | | [default to 0] +**cropped_irrigated** | **float** | | [default to 0] +**improved_pasture_dryland** | **float** | | [default to 0] +**improved_pasture_irrigated** | **float** | | [default to 0] + +## Example + +```python +from openapi_client.models.post_dairy_request_dairy_inner_areas import PostDairyRequestDairyInnerAreas + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairyRequestDairyInnerAreas from a JSON string +post_dairy_request_dairy_inner_areas_instance = PostDairyRequestDairyInnerAreas.from_json(json) +# print the JSON string representation of the object +print(PostDairyRequestDairyInnerAreas.to_json()) + +# convert the object into a dict +post_dairy_request_dairy_inner_areas_dict = post_dairy_request_dairy_inner_areas_instance.to_dict() +# create an instance of PostDairyRequestDairyInnerAreas from a dict +post_dairy_request_dairy_inner_areas_from_dict = PostDairyRequestDairyInnerAreas.from_dict(post_dairy_request_dairy_inner_areas_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClasses.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClasses.md new file mode 100644 index 00000000..62ea0bbc --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClasses.md @@ -0,0 +1,34 @@ +# PostDairyRequestDairyInnerClasses + +Dairy classes of different types and age ranges + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**milking_cows** | [**PostDairyRequestDairyInnerClassesMilkingCows**](PostDairyRequestDairyInnerClassesMilkingCows.md) | | +**heifers_lt1** | [**PostDairyRequestDairyInnerClassesHeifersLt1**](PostDairyRequestDairyInnerClassesHeifersLt1.md) | | +**heifers_gt1** | [**PostDairyRequestDairyInnerClassesHeifersGt1**](PostDairyRequestDairyInnerClassesHeifersGt1.md) | | +**dairy_bulls_lt1** | [**PostDairyRequestDairyInnerClassesDairyBullsLt1**](PostDairyRequestDairyInnerClassesDairyBullsLt1.md) | | +**dairy_bulls_gt1** | [**PostDairyRequestDairyInnerClassesDairyBullsGt1**](PostDairyRequestDairyInnerClassesDairyBullsGt1.md) | | + +## Example + +```python +from openapi_client.models.post_dairy_request_dairy_inner_classes import PostDairyRequestDairyInnerClasses + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairyRequestDairyInnerClasses from a JSON string +post_dairy_request_dairy_inner_classes_instance = PostDairyRequestDairyInnerClasses.from_json(json) +# print the JSON string representation of the object +print(PostDairyRequestDairyInnerClasses.to_json()) + +# convert the object into a dict +post_dairy_request_dairy_inner_classes_dict = post_dairy_request_dairy_inner_classes_instance.to_dict() +# create an instance of PostDairyRequestDairyInnerClasses from a dict +post_dairy_request_dairy_inner_classes_from_dict = PostDairyRequestDairyInnerClasses.from_dict(post_dairy_request_dairy_inner_classes_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsGt1.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsGt1.md new file mode 100644 index 00000000..ace5bd00 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsGt1.md @@ -0,0 +1,33 @@ +# PostDairyRequestDairyInnerClassesDairyBullsGt1 + +Dairy bulls whose age is greater than 1 year old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**winter** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**spring** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**summer** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | + +## Example + +```python +from openapi_client.models.post_dairy_request_dairy_inner_classes_dairy_bulls_gt1 import PostDairyRequestDairyInnerClassesDairyBullsGt1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairyRequestDairyInnerClassesDairyBullsGt1 from a JSON string +post_dairy_request_dairy_inner_classes_dairy_bulls_gt1_instance = PostDairyRequestDairyInnerClassesDairyBullsGt1.from_json(json) +# print the JSON string representation of the object +print(PostDairyRequestDairyInnerClassesDairyBullsGt1.to_json()) + +# convert the object into a dict +post_dairy_request_dairy_inner_classes_dairy_bulls_gt1_dict = post_dairy_request_dairy_inner_classes_dairy_bulls_gt1_instance.to_dict() +# create an instance of PostDairyRequestDairyInnerClassesDairyBullsGt1 from a dict +post_dairy_request_dairy_inner_classes_dairy_bulls_gt1_from_dict = PostDairyRequestDairyInnerClassesDairyBullsGt1.from_dict(post_dairy_request_dairy_inner_classes_dairy_bulls_gt1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsLt1.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsLt1.md new file mode 100644 index 00000000..6eb14328 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsLt1.md @@ -0,0 +1,33 @@ +# PostDairyRequestDairyInnerClassesDairyBullsLt1 + +Dairy bulls whose age is less than 1 year old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**winter** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**spring** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**summer** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | + +## Example + +```python +from openapi_client.models.post_dairy_request_dairy_inner_classes_dairy_bulls_lt1 import PostDairyRequestDairyInnerClassesDairyBullsLt1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairyRequestDairyInnerClassesDairyBullsLt1 from a JSON string +post_dairy_request_dairy_inner_classes_dairy_bulls_lt1_instance = PostDairyRequestDairyInnerClassesDairyBullsLt1.from_json(json) +# print the JSON string representation of the object +print(PostDairyRequestDairyInnerClassesDairyBullsLt1.to_json()) + +# convert the object into a dict +post_dairy_request_dairy_inner_classes_dairy_bulls_lt1_dict = post_dairy_request_dairy_inner_classes_dairy_bulls_lt1_instance.to_dict() +# create an instance of PostDairyRequestDairyInnerClassesDairyBullsLt1 from a dict +post_dairy_request_dairy_inner_classes_dairy_bulls_lt1_from_dict = PostDairyRequestDairyInnerClassesDairyBullsLt1.from_dict(post_dairy_request_dairy_inner_classes_dairy_bulls_lt1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersGt1.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersGt1.md new file mode 100644 index 00000000..db658b77 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersGt1.md @@ -0,0 +1,33 @@ +# PostDairyRequestDairyInnerClassesHeifersGt1 + +Heifers whose age is greater than 1 year old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**winter** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**spring** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**summer** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | + +## Example + +```python +from openapi_client.models.post_dairy_request_dairy_inner_classes_heifers_gt1 import PostDairyRequestDairyInnerClassesHeifersGt1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairyRequestDairyInnerClassesHeifersGt1 from a JSON string +post_dairy_request_dairy_inner_classes_heifers_gt1_instance = PostDairyRequestDairyInnerClassesHeifersGt1.from_json(json) +# print the JSON string representation of the object +print(PostDairyRequestDairyInnerClassesHeifersGt1.to_json()) + +# convert the object into a dict +post_dairy_request_dairy_inner_classes_heifers_gt1_dict = post_dairy_request_dairy_inner_classes_heifers_gt1_instance.to_dict() +# create an instance of PostDairyRequestDairyInnerClassesHeifersGt1 from a dict +post_dairy_request_dairy_inner_classes_heifers_gt1_from_dict = PostDairyRequestDairyInnerClassesHeifersGt1.from_dict(post_dairy_request_dairy_inner_classes_heifers_gt1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersLt1.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersLt1.md new file mode 100644 index 00000000..ed254550 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersLt1.md @@ -0,0 +1,33 @@ +# PostDairyRequestDairyInnerClassesHeifersLt1 + +Heifers whose age is less than 1 year old + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**winter** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**spring** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**summer** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | + +## Example + +```python +from openapi_client.models.post_dairy_request_dairy_inner_classes_heifers_lt1 import PostDairyRequestDairyInnerClassesHeifersLt1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairyRequestDairyInnerClassesHeifersLt1 from a JSON string +post_dairy_request_dairy_inner_classes_heifers_lt1_instance = PostDairyRequestDairyInnerClassesHeifersLt1.from_json(json) +# print the JSON string representation of the object +print(PostDairyRequestDairyInnerClassesHeifersLt1.to_json()) + +# convert the object into a dict +post_dairy_request_dairy_inner_classes_heifers_lt1_dict = post_dairy_request_dairy_inner_classes_heifers_lt1_instance.to_dict() +# create an instance of PostDairyRequestDairyInnerClassesHeifersLt1 from a dict +post_dairy_request_dairy_inner_classes_heifers_lt1_from_dict = PostDairyRequestDairyInnerClassesHeifersLt1.from_dict(post_dairy_request_dairy_inner_classes_heifers_lt1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCows.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCows.md new file mode 100644 index 00000000..6590ee5d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCows.md @@ -0,0 +1,33 @@ +# PostDairyRequestDairyInnerClassesMilkingCows + +Milking cows + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**winter** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**spring** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**summer** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | + +## Example + +```python +from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows import PostDairyRequestDairyInnerClassesMilkingCows + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairyRequestDairyInnerClassesMilkingCows from a JSON string +post_dairy_request_dairy_inner_classes_milking_cows_instance = PostDairyRequestDairyInnerClassesMilkingCows.from_json(json) +# print the JSON string representation of the object +print(PostDairyRequestDairyInnerClassesMilkingCows.to_json()) + +# convert the object into a dict +post_dairy_request_dairy_inner_classes_milking_cows_dict = post_dairy_request_dairy_inner_classes_milking_cows_instance.to_dict() +# create an instance of PostDairyRequestDairyInnerClassesMilkingCows from a dict +post_dairy_request_dairy_inner_classes_milking_cows_from_dict = PostDairyRequestDairyInnerClassesMilkingCows.from_dict(post_dairy_request_dairy_inner_classes_milking_cows_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md new file mode 100644 index 00000000..c790389b --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md @@ -0,0 +1,34 @@ +# PostDairyRequestDairyInnerClassesMilkingCowsAutumn + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals (head) | +**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | +**liveweight_gain** | **float** | Average liveweight gain in kg/day (kilogram per day) | +**crude_protein** | **float** | Crude protein percent, between 0 and 100. Note: If no value is provided, zero will be assumed. This will result in large, negative output values. This input will become mandatory in a future version. | [optional] +**dry_matter_digestibility** | **float** | Dry matter digestibility percent, between 0 and 100. Note: If no value is provided, zero will be assumed. This will result in large, negative output values. This input will become mandatory in a future version. | [optional] +**milk_production** | **float** | Milk produced in L/day/head (litres per day per head) | [optional] + +## Example + +```python +from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows_autumn import PostDairyRequestDairyInnerClassesMilkingCowsAutumn + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairyRequestDairyInnerClassesMilkingCowsAutumn from a JSON string +post_dairy_request_dairy_inner_classes_milking_cows_autumn_instance = PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_json(json) +# print the JSON string representation of the object +print(PostDairyRequestDairyInnerClassesMilkingCowsAutumn.to_json()) + +# convert the object into a dict +post_dairy_request_dairy_inner_classes_milking_cows_autumn_dict = post_dairy_request_dairy_inner_classes_milking_cows_autumn_instance.to_dict() +# create an instance of PostDairyRequestDairyInnerClassesMilkingCowsAutumn from a dict +post_dairy_request_dairy_inner_classes_milking_cows_autumn_from_dict = PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(post_dairy_request_dairy_inner_classes_milking_cows_autumn_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerManureManagementMilkingCows.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerManureManagementMilkingCows.md new file mode 100644 index 00000000..419ac485 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerManureManagementMilkingCows.md @@ -0,0 +1,34 @@ +# PostDairyRequestDairyInnerManureManagementMilkingCows + +Manure management for each type, each value is a percentage of all excreta, from 0 to 100 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pasture** | **float** | | +**anaerobic_lagoon** | **float** | | +**sump_and_dispersal** | **float** | | +**drain_to_paddocks** | **float** | | +**soild_storage** | **float** | | + +## Example + +```python +from openapi_client.models.post_dairy_request_dairy_inner_manure_management_milking_cows import PostDairyRequestDairyInnerManureManagementMilkingCows + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairyRequestDairyInnerManureManagementMilkingCows from a JSON string +post_dairy_request_dairy_inner_manure_management_milking_cows_instance = PostDairyRequestDairyInnerManureManagementMilkingCows.from_json(json) +# print the JSON string representation of the object +print(PostDairyRequestDairyInnerManureManagementMilkingCows.to_json()) + +# convert the object into a dict +post_dairy_request_dairy_inner_manure_management_milking_cows_dict = post_dairy_request_dairy_inner_manure_management_milking_cows_instance.to_dict() +# create an instance of PostDairyRequestDairyInnerManureManagementMilkingCows from a dict +post_dairy_request_dairy_inner_manure_management_milking_cows_from_dict = PostDairyRequestDairyInnerManureManagementMilkingCows.from_dict(post_dairy_request_dairy_inner_manure_management_milking_cows_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliser.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliser.md new file mode 100644 index 00000000..df24bb71 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliser.md @@ -0,0 +1,33 @@ +# PostDairyRequestDairyInnerSeasonalFertiliser + +Seasonal nitrogen fertiliser use + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | +**winter** | [**PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | +**spring** | [**PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | +**summer** | [**PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | + +## Example + +```python +from openapi_client.models.post_dairy_request_dairy_inner_seasonal_fertiliser import PostDairyRequestDairyInnerSeasonalFertiliser + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairyRequestDairyInnerSeasonalFertiliser from a JSON string +post_dairy_request_dairy_inner_seasonal_fertiliser_instance = PostDairyRequestDairyInnerSeasonalFertiliser.from_json(json) +# print the JSON string representation of the object +print(PostDairyRequestDairyInnerSeasonalFertiliser.to_json()) + +# convert the object into a dict +post_dairy_request_dairy_inner_seasonal_fertiliser_dict = post_dairy_request_dairy_inner_seasonal_fertiliser_instance.to_dict() +# create an instance of PostDairyRequestDairyInnerSeasonalFertiliser from a dict +post_dairy_request_dairy_inner_seasonal_fertiliser_from_dict = PostDairyRequestDairyInnerSeasonalFertiliser.from_dict(post_dairy_request_dairy_inner_seasonal_fertiliser_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md new file mode 100644 index 00000000..f7c0f813 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md @@ -0,0 +1,33 @@ +# PostDairyRequestDairyInnerSeasonalFertiliserAutumn + +Nitrogen fertiliser application, each value is in kg N/ha + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**crops_irrigated** | **float** | | +**crops_dryland** | **float** | | +**pasture_irrigated** | **float** | | +**pasture_dryland** | **float** | | + +## Example + +```python +from openapi_client.models.post_dairy_request_dairy_inner_seasonal_fertiliser_autumn import PostDairyRequestDairyInnerSeasonalFertiliserAutumn + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairyRequestDairyInnerSeasonalFertiliserAutumn from a JSON string +post_dairy_request_dairy_inner_seasonal_fertiliser_autumn_instance = PostDairyRequestDairyInnerSeasonalFertiliserAutumn.from_json(json) +# print the JSON string representation of the object +print(PostDairyRequestDairyInnerSeasonalFertiliserAutumn.to_json()) + +# convert the object into a dict +post_dairy_request_dairy_inner_seasonal_fertiliser_autumn_dict = post_dairy_request_dairy_inner_seasonal_fertiliser_autumn_instance.to_dict() +# create an instance of PostDairyRequestDairyInnerSeasonalFertiliserAutumn from a dict +post_dairy_request_dairy_inner_seasonal_fertiliser_autumn_from_dict = PostDairyRequestDairyInnerSeasonalFertiliserAutumn.from_dict(post_dairy_request_dairy_inner_seasonal_fertiliser_autumn_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostDairyRequestVegetationInner.md new file mode 100644 index 00000000..87759856 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDairyRequestVegetationInner.md @@ -0,0 +1,31 @@ +# PostDairyRequestVegetationInner + +Non-productive vegetation inputs along with allocations to dairy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**dairy_proportion** | **List[float]** | The proportion of the sequestration that is allocated to dairy | + +## Example + +```python +from openapi_client.models.post_dairy_request_vegetation_inner import PostDairyRequestVegetationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDairyRequestVegetationInner from a JSON string +post_dairy_request_vegetation_inner_instance = PostDairyRequestVegetationInner.from_json(json) +# print the JSON string representation of the object +print(PostDairyRequestVegetationInner.to_json()) + +# convert the object into a dict +post_dairy_request_vegetation_inner_dict = post_dairy_request_vegetation_inner_instance.to_dict() +# create an instance of PostDairyRequestVegetationInner from a dict +post_dairy_request_vegetation_inner_from_dict = PostDairyRequestVegetationInner.from_dict(post_dairy_request_vegetation_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeer200Response.md b/examples/python-api-client/api-client/docs/PostDeer200Response.md new file mode 100644 index 00000000..b5d3f4f9 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeer200Response.md @@ -0,0 +1,36 @@ +# PostDeer200Response + +Emissions calculation output for the `deer` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**net** | [**PostDeer200ResponseNet**](PostDeer200ResponseNet.md) | | +**intensities** | [**PostDeer200ResponseIntensities**](PostDeer200ResponseIntensities.md) | | +**intermediate** | [**List[PostDeer200ResponseIntermediateInner]**](PostDeer200ResponseIntermediateInner.md) | | + +## Example + +```python +from openapi_client.models.post_deer200_response import PostDeer200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeer200Response from a JSON string +post_deer200_response_instance = PostDeer200Response.from_json(json) +# print the JSON string representation of the object +print(PostDeer200Response.to_json()) + +# convert the object into a dict +post_deer200_response_dict = post_deer200_response_instance.to_dict() +# create an instance of PostDeer200Response from a dict +post_deer200_response_from_dict = PostDeer200Response.from_dict(post_deer200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeer200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostDeer200ResponseIntensities.md new file mode 100644 index 00000000..bee2717b --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeer200ResponseIntensities.md @@ -0,0 +1,31 @@ +# PostDeer200ResponseIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**liveweight_produced_kg** | **float** | Deer meat produced in kg liveweight | +**deer_meat_excluding_sequestration** | **float** | Deer meat (breeding herd) excluding sequestration, in kg-CO2e/kg liveweight | +**deer_meat_including_sequestration** | **float** | Deer meat (breeding herd) including sequestration, in kg-CO2e/kg liveweight | + +## Example + +```python +from openapi_client.models.post_deer200_response_intensities import PostDeer200ResponseIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeer200ResponseIntensities from a JSON string +post_deer200_response_intensities_instance = PostDeer200ResponseIntensities.from_json(json) +# print the JSON string representation of the object +print(PostDeer200ResponseIntensities.to_json()) + +# convert the object into a dict +post_deer200_response_intensities_dict = post_deer200_response_intensities_instance.to_dict() +# create an instance of PostDeer200ResponseIntensities from a dict +post_deer200_response_intensities_from_dict = PostDeer200ResponseIntensities.from_dict(post_deer200_response_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeer200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostDeer200ResponseIntermediateInner.md new file mode 100644 index 00000000..58070a7f --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeer200ResponseIntermediateInner.md @@ -0,0 +1,36 @@ +# PostDeer200ResponseIntermediateInner + +Intermediate emissions calculation output for the Deer calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | +**net** | [**PostDeer200ResponseNet**](PostDeer200ResponseNet.md) | | +**intensities** | [**PostDeer200ResponseIntensities**](PostDeer200ResponseIntensities.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +## Example + +```python +from openapi_client.models.post_deer200_response_intermediate_inner import PostDeer200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeer200ResponseIntermediateInner from a JSON string +post_deer200_response_intermediate_inner_instance = PostDeer200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostDeer200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_deer200_response_intermediate_inner_dict = post_deer200_response_intermediate_inner_instance.to_dict() +# create an instance of PostDeer200ResponseIntermediateInner from a dict +post_deer200_response_intermediate_inner_from_dict = PostDeer200ResponseIntermediateInner.from_dict(post_deer200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeer200ResponseNet.md b/examples/python-api-client/api-client/docs/PostDeer200ResponseNet.md new file mode 100644 index 00000000..19b4ca65 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeer200ResponseNet.md @@ -0,0 +1,30 @@ +# PostDeer200ResponseNet + +Net emissions for deer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | + +## Example + +```python +from openapi_client.models.post_deer200_response_net import PostDeer200ResponseNet + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeer200ResponseNet from a JSON string +post_deer200_response_net_instance = PostDeer200ResponseNet.from_json(json) +# print the JSON string representation of the object +print(PostDeer200ResponseNet.to_json()) + +# convert the object into a dict +post_deer200_response_net_dict = post_deer200_response_net_instance.to_dict() +# create an instance of PostDeer200ResponseNet from a dict +post_deer200_response_net_from_dict = PostDeer200ResponseNet.from_dict(post_deer200_response_net_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeerRequest.md b/examples/python-api-client/api-client/docs/PostDeerRequest.md new file mode 100644 index 00000000..c36a5ff4 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeerRequest.md @@ -0,0 +1,33 @@ +# PostDeerRequest + +Input data required for the `deer` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**deers** | [**List[PostDeerRequestDeersInner]**](PostDeerRequestDeersInner.md) | | +**vegetation** | [**List[PostDeerRequestVegetationInner]**](PostDeerRequestVegetationInner.md) | | [default to []] + +## Example + +```python +from openapi_client.models.post_deer_request import PostDeerRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeerRequest from a JSON string +post_deer_request_instance = PostDeerRequest.from_json(json) +# print the JSON string representation of the object +print(PostDeerRequest.to_json()) + +# convert the object into a dict +post_deer_request_dict = post_deer_request_instance.to_dict() +# create an instance of PostDeerRequest from a dict +post_deer_request_from_dict = PostDeerRequest.from_dict(post_deer_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInner.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInner.md new file mode 100644 index 00000000..367c7bae --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInner.md @@ -0,0 +1,45 @@ +# PostDeerRequestDeersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**classes** | [**PostDeerRequestDeersInnerClasses**](PostDeerRequestDeersInnerClasses.md) | | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**electricity_source** | **str** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | +**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**does_fawning** | [**PostDeerRequestDeersInnerDoesFawning**](PostDeerRequestDeersInnerDoesFawning.md) | | +**seasonal_fawning** | [**PostDeerRequestDeersInnerSeasonalFawning**](PostDeerRequestDeersInnerSeasonalFawning.md) | | + +## Example + +```python +from openapi_client.models.post_deer_request_deers_inner import PostDeerRequestDeersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeerRequestDeersInner from a JSON string +post_deer_request_deers_inner_instance = PostDeerRequestDeersInner.from_json(json) +# print the JSON string representation of the object +print(PostDeerRequestDeersInner.to_json()) + +# convert the object into a dict +post_deer_request_deers_inner_dict = post_deer_request_deers_inner_instance.to_dict() +# create an instance of PostDeerRequestDeersInner from a dict +post_deer_request_deers_inner_from_dict = PostDeerRequestDeersInner.from_dict(post_deer_request_deers_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClasses.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClasses.md new file mode 100644 index 00000000..d67accca --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClasses.md @@ -0,0 +1,37 @@ +# PostDeerRequestDeersInnerClasses + +Deer classes of different types + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bucks** | [**PostDeerRequestDeersInnerClassesBucks**](PostDeerRequestDeersInnerClassesBucks.md) | | [optional] +**trade_bucks** | [**PostDeerRequestDeersInnerClassesTradeBucks**](PostDeerRequestDeersInnerClassesTradeBucks.md) | | [optional] +**breeding_does** | [**PostDeerRequestDeersInnerClassesBreedingDoes**](PostDeerRequestDeersInnerClassesBreedingDoes.md) | | [optional] +**trade_does** | [**PostDeerRequestDeersInnerClassesTradeDoes**](PostDeerRequestDeersInnerClassesTradeDoes.md) | | [optional] +**other_does** | [**PostDeerRequestDeersInnerClassesOtherDoes**](PostDeerRequestDeersInnerClassesOtherDoes.md) | | [optional] +**trade_other_does** | [**PostDeerRequestDeersInnerClassesTradeOtherDoes**](PostDeerRequestDeersInnerClassesTradeOtherDoes.md) | | [optional] +**fawn** | [**PostDeerRequestDeersInnerClassesFawn**](PostDeerRequestDeersInnerClassesFawn.md) | | [optional] +**trade_fawn** | [**PostDeerRequestDeersInnerClassesTradeFawn**](PostDeerRequestDeersInnerClassesTradeFawn.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_deer_request_deers_inner_classes import PostDeerRequestDeersInnerClasses + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeerRequestDeersInnerClasses from a JSON string +post_deer_request_deers_inner_classes_instance = PostDeerRequestDeersInnerClasses.from_json(json) +# print the JSON string representation of the object +print(PostDeerRequestDeersInnerClasses.to_json()) + +# convert the object into a dict +post_deer_request_deers_inner_classes_dict = post_deer_request_deers_inner_classes_instance.to_dict() +# create an instance of PostDeerRequestDeersInnerClasses from a dict +post_deer_request_deers_inner_classes_from_dict = PostDeerRequestDeersInnerClasses.from_dict(post_deer_request_deers_inner_classes_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBreedingDoes.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBreedingDoes.md new file mode 100644 index 00000000..e3540fd4 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBreedingDoes.md @@ -0,0 +1,36 @@ +# PostDeerRequestDeersInnerClassesBreedingDoes + +Breeding does + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_deer_request_deers_inner_classes_breeding_does import PostDeerRequestDeersInnerClassesBreedingDoes + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeerRequestDeersInnerClassesBreedingDoes from a JSON string +post_deer_request_deers_inner_classes_breeding_does_instance = PostDeerRequestDeersInnerClassesBreedingDoes.from_json(json) +# print the JSON string representation of the object +print(PostDeerRequestDeersInnerClassesBreedingDoes.to_json()) + +# convert the object into a dict +post_deer_request_deers_inner_classes_breeding_does_dict = post_deer_request_deers_inner_classes_breeding_does_instance.to_dict() +# create an instance of PostDeerRequestDeersInnerClassesBreedingDoes from a dict +post_deer_request_deers_inner_classes_breeding_does_from_dict = PostDeerRequestDeersInnerClassesBreedingDoes.from_dict(post_deer_request_deers_inner_classes_breeding_does_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBucks.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBucks.md new file mode 100644 index 00000000..73b3f2fe --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBucks.md @@ -0,0 +1,36 @@ +# PostDeerRequestDeersInnerClassesBucks + +Bucks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_deer_request_deers_inner_classes_bucks import PostDeerRequestDeersInnerClassesBucks + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeerRequestDeersInnerClassesBucks from a JSON string +post_deer_request_deers_inner_classes_bucks_instance = PostDeerRequestDeersInnerClassesBucks.from_json(json) +# print the JSON string representation of the object +print(PostDeerRequestDeersInnerClassesBucks.to_json()) + +# convert the object into a dict +post_deer_request_deers_inner_classes_bucks_dict = post_deer_request_deers_inner_classes_bucks_instance.to_dict() +# create an instance of PostDeerRequestDeersInnerClassesBucks from a dict +post_deer_request_deers_inner_classes_bucks_from_dict = PostDeerRequestDeersInnerClassesBucks.from_dict(post_deer_request_deers_inner_classes_bucks_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesFawn.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesFawn.md new file mode 100644 index 00000000..bbea9f6d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesFawn.md @@ -0,0 +1,36 @@ +# PostDeerRequestDeersInnerClassesFawn + +Fawns + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_deer_request_deers_inner_classes_fawn import PostDeerRequestDeersInnerClassesFawn + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeerRequestDeersInnerClassesFawn from a JSON string +post_deer_request_deers_inner_classes_fawn_instance = PostDeerRequestDeersInnerClassesFawn.from_json(json) +# print the JSON string representation of the object +print(PostDeerRequestDeersInnerClassesFawn.to_json()) + +# convert the object into a dict +post_deer_request_deers_inner_classes_fawn_dict = post_deer_request_deers_inner_classes_fawn_instance.to_dict() +# create an instance of PostDeerRequestDeersInnerClassesFawn from a dict +post_deer_request_deers_inner_classes_fawn_from_dict = PostDeerRequestDeersInnerClassesFawn.from_dict(post_deer_request_deers_inner_classes_fawn_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesOtherDoes.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesOtherDoes.md new file mode 100644 index 00000000..7a8e0fac --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesOtherDoes.md @@ -0,0 +1,36 @@ +# PostDeerRequestDeersInnerClassesOtherDoes + +Other does + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_deer_request_deers_inner_classes_other_does import PostDeerRequestDeersInnerClassesOtherDoes + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeerRequestDeersInnerClassesOtherDoes from a JSON string +post_deer_request_deers_inner_classes_other_does_instance = PostDeerRequestDeersInnerClassesOtherDoes.from_json(json) +# print the JSON string representation of the object +print(PostDeerRequestDeersInnerClassesOtherDoes.to_json()) + +# convert the object into a dict +post_deer_request_deers_inner_classes_other_does_dict = post_deer_request_deers_inner_classes_other_does_instance.to_dict() +# create an instance of PostDeerRequestDeersInnerClassesOtherDoes from a dict +post_deer_request_deers_inner_classes_other_does_from_dict = PostDeerRequestDeersInnerClassesOtherDoes.from_dict(post_deer_request_deers_inner_classes_other_does_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeBucks.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeBucks.md new file mode 100644 index 00000000..70df18ae --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeBucks.md @@ -0,0 +1,36 @@ +# PostDeerRequestDeersInnerClassesTradeBucks + +Trade bucks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_deer_request_deers_inner_classes_trade_bucks import PostDeerRequestDeersInnerClassesTradeBucks + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeerRequestDeersInnerClassesTradeBucks from a JSON string +post_deer_request_deers_inner_classes_trade_bucks_instance = PostDeerRequestDeersInnerClassesTradeBucks.from_json(json) +# print the JSON string representation of the object +print(PostDeerRequestDeersInnerClassesTradeBucks.to_json()) + +# convert the object into a dict +post_deer_request_deers_inner_classes_trade_bucks_dict = post_deer_request_deers_inner_classes_trade_bucks_instance.to_dict() +# create an instance of PostDeerRequestDeersInnerClassesTradeBucks from a dict +post_deer_request_deers_inner_classes_trade_bucks_from_dict = PostDeerRequestDeersInnerClassesTradeBucks.from_dict(post_deer_request_deers_inner_classes_trade_bucks_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeDoes.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeDoes.md new file mode 100644 index 00000000..806d96a0 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeDoes.md @@ -0,0 +1,36 @@ +# PostDeerRequestDeersInnerClassesTradeDoes + +Trade does + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_deer_request_deers_inner_classes_trade_does import PostDeerRequestDeersInnerClassesTradeDoes + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeerRequestDeersInnerClassesTradeDoes from a JSON string +post_deer_request_deers_inner_classes_trade_does_instance = PostDeerRequestDeersInnerClassesTradeDoes.from_json(json) +# print the JSON string representation of the object +print(PostDeerRequestDeersInnerClassesTradeDoes.to_json()) + +# convert the object into a dict +post_deer_request_deers_inner_classes_trade_does_dict = post_deer_request_deers_inner_classes_trade_does_instance.to_dict() +# create an instance of PostDeerRequestDeersInnerClassesTradeDoes from a dict +post_deer_request_deers_inner_classes_trade_does_from_dict = PostDeerRequestDeersInnerClassesTradeDoes.from_dict(post_deer_request_deers_inner_classes_trade_does_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeFawn.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeFawn.md new file mode 100644 index 00000000..3e1155d2 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeFawn.md @@ -0,0 +1,36 @@ +# PostDeerRequestDeersInnerClassesTradeFawn + +Trade fawns + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_deer_request_deers_inner_classes_trade_fawn import PostDeerRequestDeersInnerClassesTradeFawn + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeerRequestDeersInnerClassesTradeFawn from a JSON string +post_deer_request_deers_inner_classes_trade_fawn_instance = PostDeerRequestDeersInnerClassesTradeFawn.from_json(json) +# print the JSON string representation of the object +print(PostDeerRequestDeersInnerClassesTradeFawn.to_json()) + +# convert the object into a dict +post_deer_request_deers_inner_classes_trade_fawn_dict = post_deer_request_deers_inner_classes_trade_fawn_instance.to_dict() +# create an instance of PostDeerRequestDeersInnerClassesTradeFawn from a dict +post_deer_request_deers_inner_classes_trade_fawn_from_dict = PostDeerRequestDeersInnerClassesTradeFawn.from_dict(post_deer_request_deers_inner_classes_trade_fawn_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeOtherDoes.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeOtherDoes.md new file mode 100644 index 00000000..51c7da1d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeOtherDoes.md @@ -0,0 +1,36 @@ +# PostDeerRequestDeersInnerClassesTradeOtherDoes + +Trade other does + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_deer_request_deers_inner_classes_trade_other_does import PostDeerRequestDeersInnerClassesTradeOtherDoes + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeerRequestDeersInnerClassesTradeOtherDoes from a JSON string +post_deer_request_deers_inner_classes_trade_other_does_instance = PostDeerRequestDeersInnerClassesTradeOtherDoes.from_json(json) +# print the JSON string representation of the object +print(PostDeerRequestDeersInnerClassesTradeOtherDoes.to_json()) + +# convert the object into a dict +post_deer_request_deers_inner_classes_trade_other_does_dict = post_deer_request_deers_inner_classes_trade_other_does_instance.to_dict() +# create an instance of PostDeerRequestDeersInnerClassesTradeOtherDoes from a dict +post_deer_request_deers_inner_classes_trade_other_does_from_dict = PostDeerRequestDeersInnerClassesTradeOtherDoes.from_dict(post_deer_request_deers_inner_classes_trade_other_does_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerDoesFawning.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerDoesFawning.md new file mode 100644 index 00000000..be0f4612 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerDoesFawning.md @@ -0,0 +1,33 @@ +# PostDeerRequestDeersInnerDoesFawning + +Proportion of does fawning in each season, from 0 to 1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spring** | **float** | | +**summer** | **float** | | +**autumn** | **float** | | +**winter** | **float** | | + +## Example + +```python +from openapi_client.models.post_deer_request_deers_inner_does_fawning import PostDeerRequestDeersInnerDoesFawning + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeerRequestDeersInnerDoesFawning from a JSON string +post_deer_request_deers_inner_does_fawning_instance = PostDeerRequestDeersInnerDoesFawning.from_json(json) +# print the JSON string representation of the object +print(PostDeerRequestDeersInnerDoesFawning.to_json()) + +# convert the object into a dict +post_deer_request_deers_inner_does_fawning_dict = post_deer_request_deers_inner_does_fawning_instance.to_dict() +# create an instance of PostDeerRequestDeersInnerDoesFawning from a dict +post_deer_request_deers_inner_does_fawning_from_dict = PostDeerRequestDeersInnerDoesFawning.from_dict(post_deer_request_deers_inner_does_fawning_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerSeasonalFawning.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerSeasonalFawning.md new file mode 100644 index 00000000..88c987cd --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerSeasonalFawning.md @@ -0,0 +1,33 @@ +# PostDeerRequestDeersInnerSeasonalFawning + +Seasonal fawning rates, from 0 to 1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spring** | **float** | | +**summer** | **float** | | +**autumn** | **float** | | +**winter** | **float** | | + +## Example + +```python +from openapi_client.models.post_deer_request_deers_inner_seasonal_fawning import PostDeerRequestDeersInnerSeasonalFawning + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeerRequestDeersInnerSeasonalFawning from a JSON string +post_deer_request_deers_inner_seasonal_fawning_instance = PostDeerRequestDeersInnerSeasonalFawning.from_json(json) +# print the JSON string representation of the object +print(PostDeerRequestDeersInnerSeasonalFawning.to_json()) + +# convert the object into a dict +post_deer_request_deers_inner_seasonal_fawning_dict = post_deer_request_deers_inner_seasonal_fawning_instance.to_dict() +# create an instance of PostDeerRequestDeersInnerSeasonalFawning from a dict +post_deer_request_deers_inner_seasonal_fawning_from_dict = PostDeerRequestDeersInnerSeasonalFawning.from_dict(post_deer_request_deers_inner_seasonal_fawning_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostDeerRequestVegetationInner.md new file mode 100644 index 00000000..aa8e2c47 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostDeerRequestVegetationInner.md @@ -0,0 +1,31 @@ +# PostDeerRequestVegetationInner + +Non-productive vegetation inputs along with allocations to deer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**deer_proportion** | **List[float]** | The proportion of the sequestration that is allocated to deer | + +## Example + +```python +from openapi_client.models.post_deer_request_vegetation_inner import PostDeerRequestVegetationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostDeerRequestVegetationInner from a JSON string +post_deer_request_vegetation_inner_instance = PostDeerRequestVegetationInner.from_json(json) +# print the JSON string representation of the object +print(PostDeerRequestVegetationInner.to_json()) + +# convert the object into a dict +post_deer_request_vegetation_inner_dict = post_deer_request_vegetation_inner_instance.to_dict() +# create an instance of PostDeerRequestVegetationInner from a dict +post_deer_request_vegetation_inner_from_dict = PostDeerRequestVegetationInner.from_dict(post_deer_request_vegetation_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlot200Response.md b/examples/python-api-client/api-client/docs/PostFeedlot200Response.md new file mode 100644 index 00000000..1d25e9c6 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlot200Response.md @@ -0,0 +1,36 @@ +# PostFeedlot200Response + +Emissions calculation output for the `feedlot` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostFeedlot200ResponseScope1**](PostFeedlot200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostFeedlot200ResponseScope3**](PostFeedlot200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**List[PostFeedlot200ResponseIntermediateInner]**](PostFeedlot200ResponseIntermediateInner.md) | | +**net** | [**PostFeedlot200ResponseIntermediateInnerNet**](PostFeedlot200ResponseIntermediateInnerNet.md) | | +**intensities** | [**PostFeedlot200ResponseIntermediateInnerIntensities**](PostFeedlot200ResponseIntermediateInnerIntensities.md) | | + +## Example + +```python +from openapi_client.models.post_feedlot200_response import PostFeedlot200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlot200Response from a JSON string +post_feedlot200_response_instance = PostFeedlot200Response.from_json(json) +# print the JSON string representation of the object +print(PostFeedlot200Response.to_json()) + +# convert the object into a dict +post_feedlot200_response_dict = post_feedlot200_response_instance.to_dict() +# create an instance of PostFeedlot200Response from a dict +post_feedlot200_response_from_dict = PostFeedlot200Response.from_dict(post_feedlot200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInner.md new file mode 100644 index 00000000..090b9990 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInner.md @@ -0,0 +1,35 @@ +# PostFeedlot200ResponseIntermediateInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostFeedlot200ResponseScope1**](PostFeedlot200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostFeedlot200ResponseScope3**](PostFeedlot200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | +**net** | [**PostFeedlot200ResponseIntermediateInnerNet**](PostFeedlot200ResponseIntermediateInnerNet.md) | | +**intensities** | [**PostFeedlot200ResponseIntermediateInnerIntensities**](PostFeedlot200ResponseIntermediateInnerIntensities.md) | | + +## Example + +```python +from openapi_client.models.post_feedlot200_response_intermediate_inner import PostFeedlot200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlot200ResponseIntermediateInner from a JSON string +post_feedlot200_response_intermediate_inner_instance = PostFeedlot200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostFeedlot200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_feedlot200_response_intermediate_inner_dict = post_feedlot200_response_intermediate_inner_instance.to_dict() +# create an instance of PostFeedlot200ResponseIntermediateInner from a dict +post_feedlot200_response_intermediate_inner_from_dict = PostFeedlot200ResponseIntermediateInner.from_dict(post_feedlot200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..e7607e8a --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,31 @@ +# PostFeedlot200ResponseIntermediateInnerIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**liveweight_produced_kg** | **float** | Amount of meat produced in kg liveweight | +**beef_including_sequestration** | **float** | Beef including carbon sequestration, in kg-CO2e/kg liveweight | +**beef_excluding_sequestration** | **float** | Beef excluding carbon sequestration, in kg-CO2e/kg liveweight | + +## Example + +```python +from openapi_client.models.post_feedlot200_response_intermediate_inner_intensities import PostFeedlot200ResponseIntermediateInnerIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlot200ResponseIntermediateInnerIntensities from a JSON string +post_feedlot200_response_intermediate_inner_intensities_instance = PostFeedlot200ResponseIntermediateInnerIntensities.from_json(json) +# print the JSON string representation of the object +print(PostFeedlot200ResponseIntermediateInnerIntensities.to_json()) + +# convert the object into a dict +post_feedlot200_response_intermediate_inner_intensities_dict = post_feedlot200_response_intermediate_inner_intensities_instance.to_dict() +# create an instance of PostFeedlot200ResponseIntermediateInnerIntensities from a dict +post_feedlot200_response_intermediate_inner_intensities_from_dict = PostFeedlot200ResponseIntermediateInnerIntensities.from_dict(post_feedlot200_response_intermediate_inner_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerNet.md b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerNet.md new file mode 100644 index 00000000..27a51380 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerNet.md @@ -0,0 +1,30 @@ +# PostFeedlot200ResponseIntermediateInnerNet + +Net emissions for feedlot + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | + +## Example + +```python +from openapi_client.models.post_feedlot200_response_intermediate_inner_net import PostFeedlot200ResponseIntermediateInnerNet + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlot200ResponseIntermediateInnerNet from a JSON string +post_feedlot200_response_intermediate_inner_net_instance = PostFeedlot200ResponseIntermediateInnerNet.from_json(json) +# print the JSON string representation of the object +print(PostFeedlot200ResponseIntermediateInnerNet.to_json()) + +# convert the object into a dict +post_feedlot200_response_intermediate_inner_net_dict = post_feedlot200_response_intermediate_inner_net_instance.to_dict() +# create an instance of PostFeedlot200ResponseIntermediateInnerNet from a dict +post_feedlot200_response_intermediate_inner_net_from_dict = PostFeedlot200ResponseIntermediateInnerNet.from_dict(post_feedlot200_response_intermediate_inner_net_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope1.md new file mode 100644 index 00000000..ae2922b2 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope1.md @@ -0,0 +1,47 @@ +# PostFeedlot200ResponseScope1 + +Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**transport_co2** | **float** | CO2 emissions from transport, in tonnes-CO2e | +**transport_ch4** | **float** | CH4 emissions from transport, in tonnes-CO2e | +**transport_n2_o** | **float** | N2O emissions from transport, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**manure_direct_n2_o** | **float** | CH4 emissions from manure management (direct), in tonnes-CO2e | +**manure_indirect_n2_o** | **float** | CH4 emissions from manure management (indirect), in tonnes-CO2e | +**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | +**manure_applied_to_soil_n2_o** | **float** | CH4 emissions from manure applied to soil, in tonnes-CO2e | +**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_feedlot200_response_scope1 import PostFeedlot200ResponseScope1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlot200ResponseScope1 from a JSON string +post_feedlot200_response_scope1_instance = PostFeedlot200ResponseScope1.from_json(json) +# print the JSON string representation of the object +print(PostFeedlot200ResponseScope1.to_json()) + +# convert the object into a dict +post_feedlot200_response_scope1_dict = post_feedlot200_response_scope1_instance.to_dict() +# create an instance of PostFeedlot200ResponseScope1 from a dict +post_feedlot200_response_scope1_from_dict = PostFeedlot200ResponseScope1.from_dict(post_feedlot200_response_scope1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope3.md new file mode 100644 index 00000000..f4fbcdc2 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope3.md @@ -0,0 +1,37 @@ +# PostFeedlot200ResponseScope3 + +Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**lime** | **float** | Emissions from lime, in tonnes-CO2e | +**feed** | **float** | Emissions from feed, in tonnes-CO2e | +**purchase_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_feedlot200_response_scope3 import PostFeedlot200ResponseScope3 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlot200ResponseScope3 from a JSON string +post_feedlot200_response_scope3_instance = PostFeedlot200ResponseScope3.from_json(json) +# print the JSON string representation of the object +print(PostFeedlot200ResponseScope3.to_json()) + +# convert the object into a dict +post_feedlot200_response_scope3_dict = post_feedlot200_response_scope3_instance.to_dict() +# create an instance of PostFeedlot200ResponseScope3 from a dict +post_feedlot200_response_scope3_from_dict = PostFeedlot200ResponseScope3.from_dict(post_feedlot200_response_scope3_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequest.md b/examples/python-api-client/api-client/docs/PostFeedlotRequest.md new file mode 100644 index 00000000..f7b48094 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlotRequest.md @@ -0,0 +1,32 @@ +# PostFeedlotRequest + +Input data required for the `feedlot` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**feedlots** | [**List[PostFeedlotRequestFeedlotsInner]**](PostFeedlotRequestFeedlotsInner.md) | | +**vegetation** | [**List[PostFeedlotRequestVegetationInner]**](PostFeedlotRequestVegetationInner.md) | | + +## Example + +```python +from openapi_client.models.post_feedlot_request import PostFeedlotRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlotRequest from a JSON string +post_feedlot_request_instance = PostFeedlotRequest.from_json(json) +# print the JSON string representation of the object +print(PostFeedlotRequest.to_json()) + +# convert the object into a dict +post_feedlot_request_dict = post_feedlot_request_instance.to_dict() +# create an instance of PostFeedlotRequest from a dict +post_feedlot_request_from_dict = PostFeedlotRequest.from_dict(post_feedlot_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInner.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInner.md new file mode 100644 index 00000000..6805c3b0 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInner.md @@ -0,0 +1,50 @@ +# PostFeedlotRequestFeedlotsInner + +All fields needed to describe the activity of a single feedlot enterprise + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for the feedlot enterprise | [optional] +**system** | **str** | Type of feedlot/production system | +**groups** | [**List[PostFeedlotRequestFeedlotsInnerGroupsInner]**](PostFeedlotRequestFeedlotsInnerGroupsInner.md) | | +**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**purchases** | [**PostFeedlotRequestFeedlotsInnerPurchases**](PostFeedlotRequestFeedlotsInnerPurchases.md) | | +**sales** | [**PostFeedlotRequestFeedlotsInnerSales**](PostFeedlotRequestFeedlotsInnerSales.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**electricity_source** | **str** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | +**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | +**cottonseed_feed** | **float** | Cotton seed purchased for cattle feed in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**distance_cattle_transported** | **float** | Distance cattle are transported to farm, in km (kilometres) | +**truck_type** | **str** | Type of truck used for cattle transport | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | + +## Example + +```python +from openapi_client.models.post_feedlot_request_feedlots_inner import PostFeedlotRequestFeedlotsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlotRequestFeedlotsInner from a JSON string +post_feedlot_request_feedlots_inner_instance = PostFeedlotRequestFeedlotsInner.from_json(json) +# print the JSON string representation of the object +print(PostFeedlotRequestFeedlotsInner.to_json()) + +# convert the object into a dict +post_feedlot_request_feedlots_inner_dict = post_feedlot_request_feedlots_inner_instance.to_dict() +# create an instance of PostFeedlotRequestFeedlotsInner from a dict +post_feedlot_request_feedlots_inner_from_dict = PostFeedlotRequestFeedlotsInner.from_dict(post_feedlot_request_feedlots_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInner.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInner.md new file mode 100644 index 00000000..1c6d733f --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInner.md @@ -0,0 +1,29 @@ +# PostFeedlotRequestFeedlotsInnerGroupsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stays** | [**List[PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner]**](PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md) | | + +## Example + +```python +from openapi_client.models.post_feedlot_request_feedlots_inner_groups_inner import PostFeedlotRequestFeedlotsInnerGroupsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlotRequestFeedlotsInnerGroupsInner from a JSON string +post_feedlot_request_feedlots_inner_groups_inner_instance = PostFeedlotRequestFeedlotsInnerGroupsInner.from_json(json) +# print the JSON string representation of the object +print(PostFeedlotRequestFeedlotsInnerGroupsInner.to_json()) + +# convert the object into a dict +post_feedlot_request_feedlots_inner_groups_inner_dict = post_feedlot_request_feedlots_inner_groups_inner_instance.to_dict() +# create an instance of PostFeedlotRequestFeedlotsInnerGroupsInner from a dict +post_feedlot_request_feedlots_inner_groups_inner_from_dict = PostFeedlotRequestFeedlotsInnerGroupsInner.from_dict(post_feedlot_request_feedlots_inner_groups_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md new file mode 100644 index 00000000..08d6eff5 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md @@ -0,0 +1,38 @@ +# PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner + +A class of cattle with a specific feedlot stay duration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**livestock** | **float** | Number of animals (head) | +**stay_average_duration** | **float** | Average stay length in feedlot, in days | +**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | +**dry_matter_digestibility** | **float** | Percent dry matter digestibility of the feed eaten, from 0 to 100 | +**crude_protein** | **float** | Percent crude protein of the whole diet, from 0 to 100 | +**nitrogen_retention** | **float** | Percent nitrogen retention of intake, from 0 to 100 | +**daily_intake** | **float** | Daily intake of dry matter in kilograms per head per day | +**ndf** | **float** | Percent Neutral detergent fibre (NDF) of intake, from 0 to 100 | +**ether_extract** | **float** | Percent ether extract of intake, from 0 to 100 | + +## Example + +```python +from openapi_client.models.post_feedlot_request_feedlots_inner_groups_inner_stays_inner import PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner from a JSON string +post_feedlot_request_feedlots_inner_groups_inner_stays_inner_instance = PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.from_json(json) +# print the JSON string representation of the object +print(PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.to_json()) + +# convert the object into a dict +post_feedlot_request_feedlots_inner_groups_inner_stays_inner_dict = post_feedlot_request_feedlots_inner_groups_inner_stays_inner_instance.to_dict() +# create an instance of PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner from a dict +post_feedlot_request_feedlots_inner_groups_inner_stays_inner_from_dict = PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.from_dict(post_feedlot_request_feedlots_inner_groups_inner_stays_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchases.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchases.md new file mode 100644 index 00000000..72712269 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchases.md @@ -0,0 +1,45 @@ +# PostFeedlotRequestFeedlotsInnerPurchases + +Note: passing a single `FeedlotPurchase` for each class is now deprecated, please pass an array (`FeedlotPurchases[]`) instead + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bulls_gt1** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for bulls whose age is greater than 1 year old | [optional] +**bulls_gt1_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded bulls whose age is greater than 1 year old | [optional] +**steers_lt1** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Steers whose age is less than 1 year old | [optional] +**steers_lt1_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Steers whose age is less than 1 year old | [optional] +**steers1_to2** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Steers whose age is between 1 and 2 years old | [optional] +**steers1_to2_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Steers whose age is between 1 and 2 years old | [optional] +**steers_gt2** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Steers whose age is greater than 2 years old | [optional] +**steers_gt2_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Steers whose age is greater than 2 years old | [optional] +**cows_gt2** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Cows whose age is greater than 2 years old | [optional] +**cows_gt2_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Cows whose age is greater than 2 years old | [optional] +**heifers_lt1** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Heifers whose age is less than 1 year old | [optional] +**heifers_lt1_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Heifers whose age is less than 1 year old | [optional] +**heifers1_to2** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Heifers whose age is between 1 and 2 years old | [optional] +**heifers1_to2_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Heifers whose age is between 1 and 2 years old | [optional] +**heifers_gt2** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Heifers whose age is greater than 2 years old | [optional] +**heifers_gt2_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Heifers whose age is greater than 2 years old | [optional] + +## Example + +```python +from openapi_client.models.post_feedlot_request_feedlots_inner_purchases import PostFeedlotRequestFeedlotsInnerPurchases + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlotRequestFeedlotsInnerPurchases from a JSON string +post_feedlot_request_feedlots_inner_purchases_instance = PostFeedlotRequestFeedlotsInnerPurchases.from_json(json) +# print the JSON string representation of the object +print(PostFeedlotRequestFeedlotsInnerPurchases.to_json()) + +# convert the object into a dict +post_feedlot_request_feedlots_inner_purchases_dict = post_feedlot_request_feedlots_inner_purchases_instance.to_dict() +# create an instance of PostFeedlotRequestFeedlotsInnerPurchases from a dict +post_feedlot_request_feedlots_inner_purchases_from_dict = PostFeedlotRequestFeedlotsInnerPurchases.from_dict(post_feedlot_request_feedlots_inner_purchases_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md new file mode 100644 index 00000000..786660b1 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md @@ -0,0 +1,31 @@ +# PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals purchased (head) | +**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | +**purchase_source** | **str** | Source location of trading cattle purchases | [default to 'sth NSW/VIC/sth SA'] + +## Example + +```python +from openapi_client.models.post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner from a JSON string +post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner_instance = PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_json(json) +# print the JSON string representation of the object +print(PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.to_json()) + +# convert the object into a dict +post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner_dict = post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner_instance.to_dict() +# create an instance of PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner from a dict +post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner_from_dict = PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSales.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSales.md new file mode 100644 index 00000000..b5c1be18 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSales.md @@ -0,0 +1,45 @@ +# PostFeedlotRequestFeedlotsInnerSales + +Note: passing a single `FeedlotSale` for each class is now deprecated, please pass an array (`FeedlotSales[]`) instead + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bulls_gt1** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for bulls whose age is greater than 1 year old | +**bulls_gt1_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded bulls whose age is greater than 1 year old | +**steers_lt1** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Steers whose age is less than 1 year old | +**steers_lt1_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Steers whose age is less than 1 year old | +**steers1_to2** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Steers whose age is between 1 and 2 years old | +**steers1_to2_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Steers whose age is between 1 and 2 years old | +**steers_gt2** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Steers whose age is greater than 2 years old | +**steers_gt2_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Steers whose age is greater than 2 years old | +**cows_gt2** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Cows whose age is greater than 2 years old | +**cows_gt2_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Cows whose age is greater than 2 years old | +**heifers_lt1** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Heifers whose age is less than 1 year old | +**heifers_lt1_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Heifers whose age is less than 1 year old | +**heifers1_to2** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Heifers whose age is between 1 and 2 years old | +**heifers1_to2_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Heifers whose age is between 1 and 2 years old | +**heifers_gt2** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Heifers whose age is greater than 2 years old | +**heifers_gt2_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Heifers whose age is greater than 2 years old | + +## Example + +```python +from openapi_client.models.post_feedlot_request_feedlots_inner_sales import PostFeedlotRequestFeedlotsInnerSales + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlotRequestFeedlotsInnerSales from a JSON string +post_feedlot_request_feedlots_inner_sales_instance = PostFeedlotRequestFeedlotsInnerSales.from_json(json) +# print the JSON string representation of the object +print(PostFeedlotRequestFeedlotsInnerSales.to_json()) + +# convert the object into a dict +post_feedlot_request_feedlots_inner_sales_dict = post_feedlot_request_feedlots_inner_sales_instance.to_dict() +# create an instance of PostFeedlotRequestFeedlotsInnerSales from a dict +post_feedlot_request_feedlots_inner_sales_from_dict = PostFeedlotRequestFeedlotsInnerSales.from_dict(post_feedlot_request_feedlots_inner_sales_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md new file mode 100644 index 00000000..13218801 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md @@ -0,0 +1,30 @@ +# PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | + +## Example + +```python +from openapi_client.models.post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner from a JSON string +post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner_instance = PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_json(json) +# print the JSON string representation of the object +print(PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.to_json()) + +# convert the object into a dict +post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner_dict = post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner_instance.to_dict() +# create an instance of PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner from a dict +post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner_from_dict = PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestVegetationInner.md new file mode 100644 index 00000000..16b9c7ed --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostFeedlotRequestVegetationInner.md @@ -0,0 +1,30 @@ +# PostFeedlotRequestVegetationInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**feedlot_proportion** | **List[float]** | | + +## Example + +```python +from openapi_client.models.post_feedlot_request_vegetation_inner import PostFeedlotRequestVegetationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostFeedlotRequestVegetationInner from a JSON string +post_feedlot_request_vegetation_inner_instance = PostFeedlotRequestVegetationInner.from_json(json) +# print the JSON string representation of the object +print(PostFeedlotRequestVegetationInner.to_json()) + +# convert the object into a dict +post_feedlot_request_vegetation_inner_dict = post_feedlot_request_vegetation_inner_instance.to_dict() +# create an instance of PostFeedlotRequestVegetationInner from a dict +post_feedlot_request_vegetation_inner_from_dict = PostFeedlotRequestVegetationInner.from_dict(post_feedlot_request_vegetation_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoat200Response.md b/examples/python-api-client/api-client/docs/PostGoat200Response.md new file mode 100644 index 00000000..4044c9d6 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoat200Response.md @@ -0,0 +1,36 @@ +# PostGoat200Response + +Emissions calculation output for the `goat` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**net** | [**PostGoat200ResponseNet**](PostGoat200ResponseNet.md) | | +**intensities** | [**PostGoat200ResponseIntensities**](PostGoat200ResponseIntensities.md) | | +**intermediate** | [**List[PostGoat200ResponseIntermediateInner]**](PostGoat200ResponseIntermediateInner.md) | | + +## Example + +```python +from openapi_client.models.post_goat200_response import PostGoat200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoat200Response from a JSON string +post_goat200_response_instance = PostGoat200Response.from_json(json) +# print the JSON string representation of the object +print(PostGoat200Response.to_json()) + +# convert the object into a dict +post_goat200_response_dict = post_goat200_response_instance.to_dict() +# create an instance of PostGoat200Response from a dict +post_goat200_response_from_dict = PostGoat200Response.from_dict(post_goat200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoat200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostGoat200ResponseIntensities.md new file mode 100644 index 00000000..e39eb73f --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoat200ResponseIntensities.md @@ -0,0 +1,34 @@ +# PostGoat200ResponseIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount_meat_produced** | **float** | Amount of goat meat produced in kg liveweight | +**amount_wool_produced** | **float** | Amount of wool produced in kg greasy | +**goat_meat_breeding_including_sequestration** | **float** | Goat meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight | +**goat_meat_breeding_excluding_sequestration** | **float** | Goat meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight | +**wool_including_sequestration** | **float** | Wool production including carbon sequestration, in kg-CO2e/kg greasy | +**wool_excluding_sequestration** | **float** | Wool production excluding carbon sequestration, in kg-CO2e/kg greasy | + +## Example + +```python +from openapi_client.models.post_goat200_response_intensities import PostGoat200ResponseIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoat200ResponseIntensities from a JSON string +post_goat200_response_intensities_instance = PostGoat200ResponseIntensities.from_json(json) +# print the JSON string representation of the object +print(PostGoat200ResponseIntensities.to_json()) + +# convert the object into a dict +post_goat200_response_intensities_dict = post_goat200_response_intensities_instance.to_dict() +# create an instance of PostGoat200ResponseIntensities from a dict +post_goat200_response_intensities_from_dict = PostGoat200ResponseIntensities.from_dict(post_goat200_response_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoat200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostGoat200ResponseIntermediateInner.md new file mode 100644 index 00000000..50e8c174 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoat200ResponseIntermediateInner.md @@ -0,0 +1,36 @@ +# PostGoat200ResponseIntermediateInner + +Intermediate emissions calculation output for the Goat calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**net** | [**PostGoat200ResponseNet**](PostGoat200ResponseNet.md) | | +**intensities** | [**PostGoat200ResponseIntensities**](PostGoat200ResponseIntensities.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +## Example + +```python +from openapi_client.models.post_goat200_response_intermediate_inner import PostGoat200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoat200ResponseIntermediateInner from a JSON string +post_goat200_response_intermediate_inner_instance = PostGoat200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostGoat200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_goat200_response_intermediate_inner_dict = post_goat200_response_intermediate_inner_instance.to_dict() +# create an instance of PostGoat200ResponseIntermediateInner from a dict +post_goat200_response_intermediate_inner_from_dict = PostGoat200ResponseIntermediateInner.from_dict(post_goat200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoat200ResponseNet.md b/examples/python-api-client/api-client/docs/PostGoat200ResponseNet.md new file mode 100644 index 00000000..c8bfe176 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoat200ResponseNet.md @@ -0,0 +1,30 @@ +# PostGoat200ResponseNet + +Net emissions for goat + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | + +## Example + +```python +from openapi_client.models.post_goat200_response_net import PostGoat200ResponseNet + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoat200ResponseNet from a JSON string +post_goat200_response_net_instance = PostGoat200ResponseNet.from_json(json) +# print the JSON string representation of the object +print(PostGoat200ResponseNet.to_json()) + +# convert the object into a dict +post_goat200_response_net_dict = post_goat200_response_net_instance.to_dict() +# create an instance of PostGoat200ResponseNet from a dict +post_goat200_response_net_from_dict = PostGoat200ResponseNet.from_dict(post_goat200_response_net_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequest.md b/examples/python-api-client/api-client/docs/PostGoatRequest.md new file mode 100644 index 00000000..b02332a8 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequest.md @@ -0,0 +1,33 @@ +# PostGoatRequest + +Input data required for the `goat` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**goats** | [**List[PostGoatRequestGoatsInner]**](PostGoatRequestGoatsInner.md) | | +**vegetation** | [**List[PostGoatRequestVegetationInner]**](PostGoatRequestVegetationInner.md) | | [default to []] + +## Example + +```python +from openapi_client.models.post_goat_request import PostGoatRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequest from a JSON string +post_goat_request_instance = PostGoatRequest.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequest.to_json()) + +# convert the object into a dict +post_goat_request_dict = post_goat_request_instance.to_dict() +# create an instance of PostGoatRequest from a dict +post_goat_request_from_dict = PostGoatRequest.from_dict(post_goat_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInner.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInner.md new file mode 100644 index 00000000..2c96a1cd --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInner.md @@ -0,0 +1,44 @@ +# PostGoatRequestGoatsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**classes** | [**PostGoatRequestGoatsInnerClasses**](PostGoatRequestGoatsInnerClasses.md) | | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**mineral_supplementation** | [**PostBeefRequestBeefInnerMineralSupplementation**](PostBeefRequestBeefInnerMineralSupplementation.md) | | +**electricity_source** | **str** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | +**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner import PostGoatRequestGoatsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInner from a JSON string +post_goat_request_goats_inner_instance = PostGoatRequestGoatsInner.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInner.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_dict = post_goat_request_goats_inner_instance.to_dict() +# create an instance of PostGoatRequestGoatsInner from a dict +post_goat_request_goats_inner_from_dict = PostGoatRequestGoatsInner.from_dict(post_goat_request_goats_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClasses.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClasses.md new file mode 100644 index 00000000..5bc39e55 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClasses.md @@ -0,0 +1,42 @@ +# PostGoatRequestGoatsInnerClasses + +Goat classes of different types + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bucks_billy** | [**PostGoatRequestGoatsInnerClassesBucksBilly**](PostGoatRequestGoatsInnerClassesBucksBilly.md) | | [optional] +**trade_bucks** | [**PostGoatRequestGoatsInnerClassesTradeBucks**](PostGoatRequestGoatsInnerClassesTradeBucks.md) | | [optional] +**wethers** | [**PostGoatRequestGoatsInnerClassesWethers**](PostGoatRequestGoatsInnerClassesWethers.md) | | [optional] +**trade_wethers** | [**PostGoatRequestGoatsInnerClassesTradeWethers**](PostGoatRequestGoatsInnerClassesTradeWethers.md) | | [optional] +**maiden_breeding_does_nannies** | [**PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md) | | [optional] +**trade_maiden_breeding_does_nannies** | [**PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md) | | [optional] +**breeding_does_nannies** | [**PostGoatRequestGoatsInnerClassesBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md) | | [optional] +**trade_breeding_does_nannies** | [**PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md) | | [optional] +**other_does_culled_females** | [**PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales**](PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md) | | [optional] +**trade_other_does_culled_females** | [**PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales**](PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md) | | [optional] +**kids** | [**PostGoatRequestGoatsInnerClassesKids**](PostGoatRequestGoatsInnerClassesKids.md) | | [optional] +**trade_kids** | [**PostGoatRequestGoatsInnerClassesTradeKids**](PostGoatRequestGoatsInnerClassesTradeKids.md) | | [optional] +**trade_does** | [**PostGoatRequestGoatsInnerClassesTradeDoes**](PostGoatRequestGoatsInnerClassesTradeDoes.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner_classes import PostGoatRequestGoatsInnerClasses + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInnerClasses from a JSON string +post_goat_request_goats_inner_classes_instance = PostGoatRequestGoatsInnerClasses.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInnerClasses.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_classes_dict = post_goat_request_goats_inner_classes_instance.to_dict() +# create an instance of PostGoatRequestGoatsInnerClasses from a dict +post_goat_request_goats_inner_classes_from_dict = PostGoatRequestGoatsInnerClasses.from_dict(post_goat_request_goats_inner_classes_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md new file mode 100644 index 00000000..172bd006 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md @@ -0,0 +1,41 @@ +# PostGoatRequestGoatsInnerClassesBreedingDoesNannies + +breeding does/nannies + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner_classes_breeding_does_nannies import PostGoatRequestGoatsInnerClassesBreedingDoesNannies + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInnerClassesBreedingDoesNannies from a JSON string +post_goat_request_goats_inner_classes_breeding_does_nannies_instance = PostGoatRequestGoatsInnerClassesBreedingDoesNannies.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInnerClassesBreedingDoesNannies.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_classes_breeding_does_nannies_dict = post_goat_request_goats_inner_classes_breeding_does_nannies_instance.to_dict() +# create an instance of PostGoatRequestGoatsInnerClassesBreedingDoesNannies from a dict +post_goat_request_goats_inner_classes_breeding_does_nannies_from_dict = PostGoatRequestGoatsInnerClassesBreedingDoesNannies.from_dict(post_goat_request_goats_inner_classes_breeding_does_nannies_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBucksBilly.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBucksBilly.md new file mode 100644 index 00000000..1a8fd243 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBucksBilly.md @@ -0,0 +1,41 @@ +# PostGoatRequestGoatsInnerClassesBucksBilly + +Bucks / Billy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner_classes_bucks_billy import PostGoatRequestGoatsInnerClassesBucksBilly + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInnerClassesBucksBilly from a JSON string +post_goat_request_goats_inner_classes_bucks_billy_instance = PostGoatRequestGoatsInnerClassesBucksBilly.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInnerClassesBucksBilly.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_classes_bucks_billy_dict = post_goat_request_goats_inner_classes_bucks_billy_instance.to_dict() +# create an instance of PostGoatRequestGoatsInnerClassesBucksBilly from a dict +post_goat_request_goats_inner_classes_bucks_billy_from_dict = PostGoatRequestGoatsInnerClassesBucksBilly.from_dict(post_goat_request_goats_inner_classes_bucks_billy_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesKids.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesKids.md new file mode 100644 index 00000000..bf65d919 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesKids.md @@ -0,0 +1,41 @@ +# PostGoatRequestGoatsInnerClassesKids + +kids + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner_classes_kids import PostGoatRequestGoatsInnerClassesKids + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInnerClassesKids from a JSON string +post_goat_request_goats_inner_classes_kids_instance = PostGoatRequestGoatsInnerClassesKids.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInnerClassesKids.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_classes_kids_dict = post_goat_request_goats_inner_classes_kids_instance.to_dict() +# create an instance of PostGoatRequestGoatsInnerClassesKids from a dict +post_goat_request_goats_inner_classes_kids_from_dict = PostGoatRequestGoatsInnerClassesKids.from_dict(post_goat_request_goats_inner_classes_kids_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md new file mode 100644 index 00000000..ad2fac4a --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md @@ -0,0 +1,41 @@ +# PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies + +maiden breeding does/nannies + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner_classes_maiden_breeding_does_nannies import PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies from a JSON string +post_goat_request_goats_inner_classes_maiden_breeding_does_nannies_instance = PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_classes_maiden_breeding_does_nannies_dict = post_goat_request_goats_inner_classes_maiden_breeding_does_nannies_instance.to_dict() +# create an instance of PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies from a dict +post_goat_request_goats_inner_classes_maiden_breeding_does_nannies_from_dict = PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.from_dict(post_goat_request_goats_inner_classes_maiden_breeding_does_nannies_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md new file mode 100644 index 00000000..86e2fc3e --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md @@ -0,0 +1,41 @@ +# PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales + +other does/culled females + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner_classes_other_does_culled_females import PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales from a JSON string +post_goat_request_goats_inner_classes_other_does_culled_females_instance = PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_classes_other_does_culled_females_dict = post_goat_request_goats_inner_classes_other_does_culled_females_instance.to_dict() +# create an instance of PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales from a dict +post_goat_request_goats_inner_classes_other_does_culled_females_from_dict = PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.from_dict(post_goat_request_goats_inner_classes_other_does_culled_females_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md new file mode 100644 index 00000000..de7aa08c --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md @@ -0,0 +1,41 @@ +# PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies + +trade breeding does/nannies + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner_classes_trade_breeding_does_nannies import PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies from a JSON string +post_goat_request_goats_inner_classes_trade_breeding_does_nannies_instance = PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_classes_trade_breeding_does_nannies_dict = post_goat_request_goats_inner_classes_trade_breeding_does_nannies_instance.to_dict() +# create an instance of PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies from a dict +post_goat_request_goats_inner_classes_trade_breeding_does_nannies_from_dict = PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.from_dict(post_goat_request_goats_inner_classes_trade_breeding_does_nannies_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBucks.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBucks.md new file mode 100644 index 00000000..129e8700 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBucks.md @@ -0,0 +1,41 @@ +# PostGoatRequestGoatsInnerClassesTradeBucks + +Trade Bucks / Billy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner_classes_trade_bucks import PostGoatRequestGoatsInnerClassesTradeBucks + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInnerClassesTradeBucks from a JSON string +post_goat_request_goats_inner_classes_trade_bucks_instance = PostGoatRequestGoatsInnerClassesTradeBucks.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInnerClassesTradeBucks.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_classes_trade_bucks_dict = post_goat_request_goats_inner_classes_trade_bucks_instance.to_dict() +# create an instance of PostGoatRequestGoatsInnerClassesTradeBucks from a dict +post_goat_request_goats_inner_classes_trade_bucks_from_dict = PostGoatRequestGoatsInnerClassesTradeBucks.from_dict(post_goat_request_goats_inner_classes_trade_bucks_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeDoes.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeDoes.md new file mode 100644 index 00000000..b6c483cb --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeDoes.md @@ -0,0 +1,41 @@ +# PostGoatRequestGoatsInnerClassesTradeDoes + +Trade does. Deprecation note: More specific trade doe classes now available + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner_classes_trade_does import PostGoatRequestGoatsInnerClassesTradeDoes + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInnerClassesTradeDoes from a JSON string +post_goat_request_goats_inner_classes_trade_does_instance = PostGoatRequestGoatsInnerClassesTradeDoes.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInnerClassesTradeDoes.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_classes_trade_does_dict = post_goat_request_goats_inner_classes_trade_does_instance.to_dict() +# create an instance of PostGoatRequestGoatsInnerClassesTradeDoes from a dict +post_goat_request_goats_inner_classes_trade_does_from_dict = PostGoatRequestGoatsInnerClassesTradeDoes.from_dict(post_goat_request_goats_inner_classes_trade_does_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeKids.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeKids.md new file mode 100644 index 00000000..ed6c89ab --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeKids.md @@ -0,0 +1,41 @@ +# PostGoatRequestGoatsInnerClassesTradeKids + +trade kids + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner_classes_trade_kids import PostGoatRequestGoatsInnerClassesTradeKids + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInnerClassesTradeKids from a JSON string +post_goat_request_goats_inner_classes_trade_kids_instance = PostGoatRequestGoatsInnerClassesTradeKids.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInnerClassesTradeKids.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_classes_trade_kids_dict = post_goat_request_goats_inner_classes_trade_kids_instance.to_dict() +# create an instance of PostGoatRequestGoatsInnerClassesTradeKids from a dict +post_goat_request_goats_inner_classes_trade_kids_from_dict = PostGoatRequestGoatsInnerClassesTradeKids.from_dict(post_goat_request_goats_inner_classes_trade_kids_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md new file mode 100644 index 00000000..341d2471 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md @@ -0,0 +1,41 @@ +# PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies + +trade maiden breeding does/nannies + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies import PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies from a JSON string +post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies_instance = PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies_dict = post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies_instance.to_dict() +# create an instance of PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies from a dict +post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies_from_dict = PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.from_dict(post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md new file mode 100644 index 00000000..5429b29b --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md @@ -0,0 +1,41 @@ +# PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales + +trade other does/culled females + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner_classes_trade_other_does_culled_females import PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales from a JSON string +post_goat_request_goats_inner_classes_trade_other_does_culled_females_instance = PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_classes_trade_other_does_culled_females_dict = post_goat_request_goats_inner_classes_trade_other_does_culled_females_instance.to_dict() +# create an instance of PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales from a dict +post_goat_request_goats_inner_classes_trade_other_does_culled_females_from_dict = PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.from_dict(post_goat_request_goats_inner_classes_trade_other_does_culled_females_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeWethers.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeWethers.md new file mode 100644 index 00000000..ea292e16 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeWethers.md @@ -0,0 +1,41 @@ +# PostGoatRequestGoatsInnerClassesTradeWethers + +trade wethers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner_classes_trade_wethers import PostGoatRequestGoatsInnerClassesTradeWethers + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInnerClassesTradeWethers from a JSON string +post_goat_request_goats_inner_classes_trade_wethers_instance = PostGoatRequestGoatsInnerClassesTradeWethers.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInnerClassesTradeWethers.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_classes_trade_wethers_dict = post_goat_request_goats_inner_classes_trade_wethers_instance.to_dict() +# create an instance of PostGoatRequestGoatsInnerClassesTradeWethers from a dict +post_goat_request_goats_inner_classes_trade_wethers_from_dict = PostGoatRequestGoatsInnerClassesTradeWethers.from_dict(post_goat_request_goats_inner_classes_trade_wethers_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesWethers.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesWethers.md new file mode 100644 index 00000000..00d2a1bf --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesWethers.md @@ -0,0 +1,41 @@ +# PostGoatRequestGoatsInnerClassesWethers + +wethers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_goat_request_goats_inner_classes_wethers import PostGoatRequestGoatsInnerClassesWethers + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestGoatsInnerClassesWethers from a JSON string +post_goat_request_goats_inner_classes_wethers_instance = PostGoatRequestGoatsInnerClassesWethers.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestGoatsInnerClassesWethers.to_json()) + +# convert the object into a dict +post_goat_request_goats_inner_classes_wethers_dict = post_goat_request_goats_inner_classes_wethers_instance.to_dict() +# create an instance of PostGoatRequestGoatsInnerClassesWethers from a dict +post_goat_request_goats_inner_classes_wethers_from_dict = PostGoatRequestGoatsInnerClassesWethers.from_dict(post_goat_request_goats_inner_classes_wethers_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostGoatRequestVegetationInner.md new file mode 100644 index 00000000..fe6b9970 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGoatRequestVegetationInner.md @@ -0,0 +1,31 @@ +# PostGoatRequestVegetationInner + +Non-productive vegetation inputs along with allocations to goat + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**goat_proportion** | **List[float]** | The proportion of the sequestration that is allocated to goat | + +## Example + +```python +from openapi_client.models.post_goat_request_vegetation_inner import PostGoatRequestVegetationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGoatRequestVegetationInner from a JSON string +post_goat_request_vegetation_inner_instance = PostGoatRequestVegetationInner.from_json(json) +# print the JSON string representation of the object +print(PostGoatRequestVegetationInner.to_json()) + +# convert the object into a dict +post_goat_request_vegetation_inner_dict = post_goat_request_vegetation_inner_instance.to_dict() +# create an instance of PostGoatRequestVegetationInner from a dict +post_goat_request_vegetation_inner_from_dict = PostGoatRequestVegetationInner.from_dict(post_goat_request_vegetation_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGrains200Response.md b/examples/python-api-client/api-client/docs/PostGrains200Response.md new file mode 100644 index 00000000..dc7eef5a --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGrains200Response.md @@ -0,0 +1,37 @@ +# PostGrains200Response + +Emissions calculation output for the `grains` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**List[PostGrains200ResponseIntermediateInner]**](PostGrains200ResponseIntermediateInner.md) | | +**net** | [**PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | +**intensities_with_sequestration** | [**List[PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration]**](PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md) | Emissions intensity for each crop (in order), in t-CO2e/t crop | +**intensities** | **List[float]** | Emissions intensity for each crop (in order), in t-CO2e/t crop | + +## Example + +```python +from openapi_client.models.post_grains200_response import PostGrains200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGrains200Response from a JSON string +post_grains200_response_instance = PostGrains200Response.from_json(json) +# print the JSON string representation of the object +print(PostGrains200Response.to_json()) + +# convert the object into a dict +post_grains200_response_dict = post_grains200_response_instance.to_dict() +# create an instance of PostGrains200Response from a dict +post_grains200_response_from_dict = PostGrains200Response.from_dict(post_grains200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInner.md new file mode 100644 index 00000000..edaad799 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInner.md @@ -0,0 +1,36 @@ +# PostGrains200ResponseIntermediateInner + +Intermediate emissions calculation output for the Grains calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**intensities_with_sequestration** | [**PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration**](PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +## Example + +```python +from openapi_client.models.post_grains200_response_intermediate_inner import PostGrains200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGrains200ResponseIntermediateInner from a JSON string +post_grains200_response_intermediate_inner_instance = PostGrains200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostGrains200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_grains200_response_intermediate_inner_dict = post_grains200_response_intermediate_inner_instance.to_dict() +# create an instance of PostGrains200ResponseIntermediateInner from a dict +post_grains200_response_intermediate_inner_from_dict = PostGrains200ResponseIntermediateInner.from_dict(post_grains200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md b/examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md new file mode 100644 index 00000000..4ec5d2c3 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md @@ -0,0 +1,31 @@ +# PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**grain_produced_tonnes** | **float** | Grain produced in tonnes | +**grains_excluding_sequestration** | **float** | Grains excluding sequestration, in t-CO2e/t grain | +**grains_including_sequestration** | **float** | Grains including sequestration, in t-CO2e/t grain | + +## Example + +```python +from openapi_client.models.post_grains200_response_intermediate_inner_intensities_with_sequestration import PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration from a JSON string +post_grains200_response_intermediate_inner_intensities_with_sequestration_instance = PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.from_json(json) +# print the JSON string representation of the object +print(PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.to_json()) + +# convert the object into a dict +post_grains200_response_intermediate_inner_intensities_with_sequestration_dict = post_grains200_response_intermediate_inner_intensities_with_sequestration_instance.to_dict() +# create an instance of PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration from a dict +post_grains200_response_intermediate_inner_intensities_with_sequestration_from_dict = PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.from_dict(post_grains200_response_intermediate_inner_intensities_with_sequestration_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGrainsRequest.md b/examples/python-api-client/api-client/docs/PostGrainsRequest.md new file mode 100644 index 00000000..0c05577d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGrainsRequest.md @@ -0,0 +1,34 @@ +# PostGrainsRequest + +Input data required for the `grains` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**crops** | [**List[PostGrainsRequestCropsInner]**](PostGrainsRequestCropsInner.md) | | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**vegetation** | [**List[PostCottonRequestVegetationInner]**](PostCottonRequestVegetationInner.md) | | + +## Example + +```python +from openapi_client.models.post_grains_request import PostGrainsRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGrainsRequest from a JSON string +post_grains_request_instance = PostGrainsRequest.from_json(json) +# print the JSON string representation of the object +print(PostGrainsRequest.to_json()) + +# convert the object into a dict +post_grains_request_dict = post_grains_request_instance.to_dict() +# create an instance of PostGrainsRequest from a dict +post_grains_request_from_dict = PostGrainsRequest.from_dict(post_grains_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostGrainsRequestCropsInner.md b/examples/python-api-client/api-client/docs/PostGrainsRequestCropsInner.md new file mode 100644 index 00000000..41bf5b0e --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostGrainsRequestCropsInner.md @@ -0,0 +1,50 @@ +# PostGrainsRequestCropsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**type** | **str** | Crop type. Note that the following crop types are now deprecated, the relevant full calculator should be used instead: 'Cotton', 'Rice', 'Sugar Cane' | +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**production_system** | **str** | Production system of this crop. Note that the following production systems are now deprecated, the relevant full calculator should be used instead: 'Cotton', 'Rice', 'Sugar cane' | +**average_grain_yield** | **float** | Average grain yield, in t/ha (tonnes per hectare) | +**area_sown** | **float** | Area sown, in ha (hectares) | +**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | +**urea_application** | **float** | Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) | +**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | +**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | +**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | +**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | +**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | +**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | +**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | +**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | +**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**diesel_use** | **float** | Diesel usage in L (litres) | +**petrol_use** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | + +## Example + +```python +from openapi_client.models.post_grains_request_crops_inner import PostGrainsRequestCropsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostGrainsRequestCropsInner from a JSON string +post_grains_request_crops_inner_instance = PostGrainsRequestCropsInner.from_json(json) +# print the JSON string representation of the object +print(PostGrainsRequestCropsInner.to_json()) + +# convert the object into a dict +post_grains_request_crops_inner_dict = post_grains_request_crops_inner_instance.to_dict() +# create an instance of PostGrainsRequestCropsInner from a dict +post_grains_request_crops_inner_from_dict = PostGrainsRequestCropsInner.from_dict(post_grains_request_crops_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostHorticulture200Response.md b/examples/python-api-client/api-client/docs/PostHorticulture200Response.md new file mode 100644 index 00000000..938a46f4 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostHorticulture200Response.md @@ -0,0 +1,36 @@ +# PostHorticulture200Response + +Emissions calculation output for the `horticulture` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostHorticulture200ResponseScope1**](PostHorticulture200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**List[PostHorticulture200ResponseIntermediateInner]**](PostHorticulture200ResponseIntermediateInner.md) | | +**net** | [**PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | +**intensities** | [**List[PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration]**](PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md) | Emissions intensity for each crop (in order) | + +## Example + +```python +from openapi_client.models.post_horticulture200_response import PostHorticulture200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostHorticulture200Response from a JSON string +post_horticulture200_response_instance = PostHorticulture200Response.from_json(json) +# print the JSON string representation of the object +print(PostHorticulture200Response.to_json()) + +# convert the object into a dict +post_horticulture200_response_dict = post_horticulture200_response_instance.to_dict() +# create an instance of PostHorticulture200Response from a dict +post_horticulture200_response_from_dict = PostHorticulture200Response.from_dict(post_horticulture200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInner.md new file mode 100644 index 00000000..39983722 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInner.md @@ -0,0 +1,36 @@ +# PostHorticulture200ResponseIntermediateInner + +Intermediate emissions calculation output for the Horticulture calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostHorticulture200ResponseScope1**](PostHorticulture200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**intensities_with_sequestration** | [**PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration**](PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +## Example + +```python +from openapi_client.models.post_horticulture200_response_intermediate_inner import PostHorticulture200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostHorticulture200ResponseIntermediateInner from a JSON string +post_horticulture200_response_intermediate_inner_instance = PostHorticulture200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostHorticulture200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_horticulture200_response_intermediate_inner_dict = post_horticulture200_response_intermediate_inner_instance.to_dict() +# create an instance of PostHorticulture200ResponseIntermediateInner from a dict +post_horticulture200_response_intermediate_inner_from_dict = PostHorticulture200ResponseIntermediateInner.from_dict(post_horticulture200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md b/examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md new file mode 100644 index 00000000..e72bc699 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md @@ -0,0 +1,32 @@ +# PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration + +Horticulture intensities output + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**crop_produced_tonnes** | **float** | Horticultural crop produced in tonnes | +**tonnes_crop_excluding_sequestration** | **float** | Emissions intensity excluding sequestration, in t-CO2e/t crop | +**tonnes_crop_including_sequestration** | **float** | Emissions intensity including sequestration, in t-CO2e/t crop | + +## Example + +```python +from openapi_client.models.post_horticulture200_response_intermediate_inner_intensities_with_sequestration import PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration + +# TODO update the JSON string below +json = "{}" +# create an instance of PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration from a JSON string +post_horticulture200_response_intermediate_inner_intensities_with_sequestration_instance = PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.from_json(json) +# print the JSON string representation of the object +print(PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.to_json()) + +# convert the object into a dict +post_horticulture200_response_intermediate_inner_intensities_with_sequestration_dict = post_horticulture200_response_intermediate_inner_intensities_with_sequestration_instance.to_dict() +# create an instance of PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration from a dict +post_horticulture200_response_intermediate_inner_intensities_with_sequestration_from_dict = PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.from_dict(post_horticulture200_response_intermediate_inner_intensities_with_sequestration_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostHorticulture200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostHorticulture200ResponseScope1.md new file mode 100644 index 00000000..12e1f1ca --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostHorticulture200ResponseScope1.md @@ -0,0 +1,46 @@ +# PostHorticulture200ResponseScope1 + +Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | +**field_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | +**field_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | +**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_horticulture200_response_scope1 import PostHorticulture200ResponseScope1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostHorticulture200ResponseScope1 from a JSON string +post_horticulture200_response_scope1_instance = PostHorticulture200ResponseScope1.from_json(json) +# print the JSON string representation of the object +print(PostHorticulture200ResponseScope1.to_json()) + +# convert the object into a dict +post_horticulture200_response_scope1_dict = post_horticulture200_response_scope1_instance.to_dict() +# create an instance of PostHorticulture200ResponseScope1 from a dict +post_horticulture200_response_scope1_from_dict = PostHorticulture200ResponseScope1.from_dict(post_horticulture200_response_scope1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostHorticultureRequest.md b/examples/python-api-client/api-client/docs/PostHorticultureRequest.md new file mode 100644 index 00000000..9742cfe7 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostHorticultureRequest.md @@ -0,0 +1,34 @@ +# PostHorticultureRequest + +Input data required for the `horticulture` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**crops** | [**List[PostHorticultureRequestCropsInner]**](PostHorticultureRequestCropsInner.md) | | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**vegetation** | [**List[PostCottonRequestVegetationInner]**](PostCottonRequestVegetationInner.md) | | + +## Example + +```python +from openapi_client.models.post_horticulture_request import PostHorticultureRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostHorticultureRequest from a JSON string +post_horticulture_request_instance = PostHorticultureRequest.from_json(json) +# print the JSON string representation of the object +print(PostHorticultureRequest.to_json()) + +# convert the object into a dict +post_horticulture_request_dict = post_horticulture_request_instance.to_dict() +# create an instance of PostHorticultureRequest from a dict +post_horticulture_request_from_dict = PostHorticultureRequest.from_dict(post_horticulture_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInner.md b/examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInner.md new file mode 100644 index 00000000..6d13128f --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInner.md @@ -0,0 +1,51 @@ +# PostHorticultureRequestCropsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**type** | **str** | Crop type | +**average_yield** | **float** | Average crop yield, in t/ha (tonnes per hectare) | +**area_sown** | **float** | Area sown, in ha (hectares) | +**urea_application** | **float** | Urea application, in kg Urea/ha (kilograms of urea per hectare) | +**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | +**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | +**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | +**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | +**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | +**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | +**urease_inhibitor_used** | **bool** | Urease inhibitor used. Deprecation note: No longer used (since v1.1.0) | [optional] +**nitrification_inhibitor_used** | **bool** | Nitrification inhibitor used. Deprecation note: No longer used (since v1.1.0) | [optional] +**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | +**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | +**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | +**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**diesel_use** | **float** | Diesel usage in L (litres) | +**petrol_use** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**refrigerants** | [**List[PostHorticultureRequestCropsInnerRefrigerantsInner]**](PostHorticultureRequestCropsInnerRefrigerantsInner.md) | | + +## Example + +```python +from openapi_client.models.post_horticulture_request_crops_inner import PostHorticultureRequestCropsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostHorticultureRequestCropsInner from a JSON string +post_horticulture_request_crops_inner_instance = PostHorticultureRequestCropsInner.from_json(json) +# print the JSON string representation of the object +print(PostHorticultureRequestCropsInner.to_json()) + +# convert the object into a dict +post_horticulture_request_crops_inner_dict = post_horticulture_request_crops_inner_instance.to_dict() +# create an instance of PostHorticultureRequestCropsInner from a dict +post_horticulture_request_crops_inner_from_dict = PostHorticultureRequestCropsInner.from_dict(post_horticulture_request_crops_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInnerRefrigerantsInner.md b/examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInnerRefrigerantsInner.md new file mode 100644 index 00000000..6d34c3ed --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInnerRefrigerantsInner.md @@ -0,0 +1,30 @@ +# PostHorticultureRequestCropsInnerRefrigerantsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**refrigerant** | **str** | Refrigerant type | +**charge_size** | **float** | Amount of refrigerant contained in the appliance, in kg | + +## Example + +```python +from openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner import PostHorticultureRequestCropsInnerRefrigerantsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostHorticultureRequestCropsInnerRefrigerantsInner from a JSON string +post_horticulture_request_crops_inner_refrigerants_inner_instance = PostHorticultureRequestCropsInnerRefrigerantsInner.from_json(json) +# print the JSON string representation of the object +print(PostHorticultureRequestCropsInnerRefrigerantsInner.to_json()) + +# convert the object into a dict +post_horticulture_request_crops_inner_refrigerants_inner_dict = post_horticulture_request_crops_inner_refrigerants_inner_instance.to_dict() +# create an instance of PostHorticultureRequestCropsInnerRefrigerantsInner from a dict +post_horticulture_request_crops_inner_refrigerants_inner_from_dict = PostHorticultureRequestCropsInnerRefrigerantsInner.from_dict(post_horticulture_request_crops_inner_refrigerants_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPork200Response.md b/examples/python-api-client/api-client/docs/PostPork200Response.md new file mode 100644 index 00000000..d302317d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPork200Response.md @@ -0,0 +1,36 @@ +# PostPork200Response + +Emissions calculation output for the `pork` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostPork200ResponseScope1**](PostPork200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostPork200ResponseScope3**](PostPork200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**net** | [**PostPork200ResponseNet**](PostPork200ResponseNet.md) | | +**intensities** | [**PostPork200ResponseIntensities**](PostPork200ResponseIntensities.md) | | +**intermediate** | [**List[PostPork200ResponseIntermediateInner]**](PostPork200ResponseIntermediateInner.md) | | + +## Example + +```python +from openapi_client.models.post_pork200_response import PostPork200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPork200Response from a JSON string +post_pork200_response_instance = PostPork200Response.from_json(json) +# print the JSON string representation of the object +print(PostPork200Response.to_json()) + +# convert the object into a dict +post_pork200_response_dict = post_pork200_response_instance.to_dict() +# create an instance of PostPork200Response from a dict +post_pork200_response_from_dict = PostPork200Response.from_dict(post_pork200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPork200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostPork200ResponseIntensities.md new file mode 100644 index 00000000..d6aefac2 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPork200ResponseIntensities.md @@ -0,0 +1,31 @@ +# PostPork200ResponseIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pork_meat_including_sequestration** | **float** | Pork meat including carbon sequestration, in kg-CO2e/kg liveweight | +**pork_meat_excluding_sequestration** | **float** | Pork meat excluding carbon sequestration, in kg-CO2e/kg liveweight | +**liveweight_produced_kg** | **float** | Pork meat produced in kg liveweight | + +## Example + +```python +from openapi_client.models.post_pork200_response_intensities import PostPork200ResponseIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPork200ResponseIntensities from a JSON string +post_pork200_response_intensities_instance = PostPork200ResponseIntensities.from_json(json) +# print the JSON string representation of the object +print(PostPork200ResponseIntensities.to_json()) + +# convert the object into a dict +post_pork200_response_intensities_dict = post_pork200_response_intensities_instance.to_dict() +# create an instance of PostPork200ResponseIntensities from a dict +post_pork200_response_intensities_from_dict = PostPork200ResponseIntensities.from_dict(post_pork200_response_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPork200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostPork200ResponseIntermediateInner.md new file mode 100644 index 00000000..8fd4491f --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPork200ResponseIntermediateInner.md @@ -0,0 +1,35 @@ +# PostPork200ResponseIntermediateInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**scope1** | [**PostPork200ResponseScope1**](PostPork200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostPork200ResponseScope3**](PostPork200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**net** | [**PostPork200ResponseNet**](PostPork200ResponseNet.md) | | +**intensities** | [**PostPork200ResponseIntensities**](PostPork200ResponseIntensities.md) | | + +## Example + +```python +from openapi_client.models.post_pork200_response_intermediate_inner import PostPork200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPork200ResponseIntermediateInner from a JSON string +post_pork200_response_intermediate_inner_instance = PostPork200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostPork200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_pork200_response_intermediate_inner_dict = post_pork200_response_intermediate_inner_instance.to_dict() +# create an instance of PostPork200ResponseIntermediateInner from a dict +post_pork200_response_intermediate_inner_from_dict = PostPork200ResponseIntermediateInner.from_dict(post_pork200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPork200ResponseNet.md b/examples/python-api-client/api-client/docs/PostPork200ResponseNet.md new file mode 100644 index 00000000..9a2b22f5 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPork200ResponseNet.md @@ -0,0 +1,30 @@ +# PostPork200ResponseNet + +Net emissions for pork + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | + +## Example + +```python +from openapi_client.models.post_pork200_response_net import PostPork200ResponseNet + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPork200ResponseNet from a JSON string +post_pork200_response_net_instance = PostPork200ResponseNet.from_json(json) +# print the JSON string representation of the object +print(PostPork200ResponseNet.to_json()) + +# convert the object into a dict +post_pork200_response_net_dict = post_pork200_response_net_instance.to_dict() +# create an instance of PostPork200ResponseNet from a dict +post_pork200_response_net_from_dict = PostPork200ResponseNet.from_dict(post_pork200_response_net_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPork200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostPork200ResponseScope1.md new file mode 100644 index 00000000..7bf4a805 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPork200ResponseScope1.md @@ -0,0 +1,46 @@ +# PostPork200ResponseScope1 + +Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | +**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | +**manure_management_direct_n2_o** | **float** | CH4 emissions from manure management (direct), in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**atmospheric_deposition_indirect_n2_o** | **float** | N2O emissions from atmospheric deposition indirect, in tonnes-CO2e | +**leaching_and_runoff_soil_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**leaching_and_runoff_mmsn2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_pork200_response_scope1 import PostPork200ResponseScope1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPork200ResponseScope1 from a JSON string +post_pork200_response_scope1_instance = PostPork200ResponseScope1.from_json(json) +# print the JSON string representation of the object +print(PostPork200ResponseScope1.to_json()) + +# convert the object into a dict +post_pork200_response_scope1_dict = post_pork200_response_scope1_instance.to_dict() +# create an instance of PostPork200ResponseScope1 from a dict +post_pork200_response_scope1_from_dict = PostPork200ResponseScope1.from_dict(post_pork200_response_scope1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPork200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostPork200ResponseScope3.md new file mode 100644 index 00000000..f87a8d78 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPork200ResponseScope3.md @@ -0,0 +1,38 @@ +# PostPork200ResponseScope3 + +Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | +**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**lime** | **float** | Emissions from lime, in tonnes-CO2e | +**purchased_livestock** | **float** | Emissions from purchased pigs, in tonnes-CO2e | +**bedding** | **float** | Emissions from purchased bedding, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_pork200_response_scope3 import PostPork200ResponseScope3 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPork200ResponseScope3 from a JSON string +post_pork200_response_scope3_instance = PostPork200ResponseScope3.from_json(json) +# print the JSON string representation of the object +print(PostPork200ResponseScope3.to_json()) + +# convert the object into a dict +post_pork200_response_scope3_dict = post_pork200_response_scope3_instance.to_dict() +# create an instance of PostPork200ResponseScope3 from a dict +post_pork200_response_scope3_from_dict = PostPork200ResponseScope3.from_dict(post_pork200_response_scope3_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequest.md b/examples/python-api-client/api-client/docs/PostPorkRequest.md new file mode 100644 index 00000000..1673ee68 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequest.md @@ -0,0 +1,34 @@ +# PostPorkRequest + +Input data required for the `pork` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude. Deprecation note: This field is deprecated | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**pork** | [**List[PostPorkRequestPorkInner]**](PostPorkRequestPorkInner.md) | | +**vegetation** | [**List[PostPorkRequestVegetationInner]**](PostPorkRequestVegetationInner.md) | | + +## Example + +```python +from openapi_client.models.post_pork_request import PostPorkRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequest from a JSON string +post_pork_request_instance = PostPorkRequest.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequest.to_json()) + +# convert the object into a dict +post_pork_request_dict = post_pork_request_instance.to_dict() +# create an instance of PostPorkRequest from a dict +post_pork_request_from_dict = PostPorkRequest.from_dict(post_pork_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInner.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInner.md new file mode 100644 index 00000000..59b9a6ef --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInner.md @@ -0,0 +1,43 @@ +# PostPorkRequestPorkInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**classes** | [**PostPorkRequestPorkInnerClasses**](PostPorkRequestPorkInnerClasses.md) | | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**electricity_source** | **str** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**bedding_hay_barley_straw** | **float** | Hay, barley, straw, etc. purchased for pig bedding, in tonnes | +**feed_products** | [**List[PostPorkRequestPorkInnerFeedProductsInner]**](PostPorkRequestPorkInnerFeedProductsInner.md) | | + +## Example + +```python +from openapi_client.models.post_pork_request_pork_inner import PostPorkRequestPorkInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequestPorkInner from a JSON string +post_pork_request_pork_inner_instance = PostPorkRequestPorkInner.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequestPorkInner.to_json()) + +# convert the object into a dict +post_pork_request_pork_inner_dict = post_pork_request_pork_inner_instance.to_dict() +# create an instance of PostPorkRequestPorkInner from a dict +post_pork_request_pork_inner_from_dict = PostPorkRequestPorkInner.from_dict(post_pork_request_pork_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClasses.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClasses.md new file mode 100644 index 00000000..dfbc255b --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClasses.md @@ -0,0 +1,36 @@ +# PostPorkRequestPorkInnerClasses + +Pork classes of different types + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sows** | [**PostPorkRequestPorkInnerClassesSows**](PostPorkRequestPorkInnerClassesSows.md) | | [optional] +**boars** | [**PostPorkRequestPorkInnerClassesBoars**](PostPorkRequestPorkInnerClassesBoars.md) | | [optional] +**gilts** | [**PostPorkRequestPorkInnerClassesGilts**](PostPorkRequestPorkInnerClassesGilts.md) | | [optional] +**suckers** | [**PostPorkRequestPorkInnerClassesSuckers**](PostPorkRequestPorkInnerClassesSuckers.md) | | [optional] +**weaners** | [**PostPorkRequestPorkInnerClassesWeaners**](PostPorkRequestPorkInnerClassesWeaners.md) | | [optional] +**growers** | [**PostPorkRequestPorkInnerClassesGrowers**](PostPorkRequestPorkInnerClassesGrowers.md) | | [optional] +**slaughter_pigs** | [**PostPorkRequestPorkInnerClassesSlaughterPigs**](PostPorkRequestPorkInnerClassesSlaughterPigs.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_pork_request_pork_inner_classes import PostPorkRequestPorkInnerClasses + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequestPorkInnerClasses from a JSON string +post_pork_request_pork_inner_classes_instance = PostPorkRequestPorkInnerClasses.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequestPorkInnerClasses.to_json()) + +# convert the object into a dict +post_pork_request_pork_inner_classes_dict = post_pork_request_pork_inner_classes_instance.to_dict() +# create an instance of PostPorkRequestPorkInnerClasses from a dict +post_pork_request_pork_inner_classes_from_dict = PostPorkRequestPorkInnerClasses.from_dict(post_pork_request_pork_inner_classes_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesBoars.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesBoars.md new file mode 100644 index 00000000..31e8c1d8 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesBoars.md @@ -0,0 +1,39 @@ +# PostPorkRequestPorkInnerClassesBoars + +Boars + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Pig numbers in autumn | +**winter** | **float** | Pig numbers in winter | +**spring** | **float** | Pig numbers in spring | +**summer** | **float** | Pig numbers in summer | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] +**manure** | [**PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | + +## Example + +```python +from openapi_client.models.post_pork_request_pork_inner_classes_boars import PostPorkRequestPorkInnerClassesBoars + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequestPorkInnerClassesBoars from a JSON string +post_pork_request_pork_inner_classes_boars_instance = PostPorkRequestPorkInnerClassesBoars.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequestPorkInnerClassesBoars.to_json()) + +# convert the object into a dict +post_pork_request_pork_inner_classes_boars_dict = post_pork_request_pork_inner_classes_boars_instance.to_dict() +# create an instance of PostPorkRequestPorkInnerClassesBoars from a dict +post_pork_request_pork_inner_classes_boars_from_dict = PostPorkRequestPorkInnerClassesBoars.from_dict(post_pork_request_pork_inner_classes_boars_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGilts.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGilts.md new file mode 100644 index 00000000..c52275d3 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGilts.md @@ -0,0 +1,39 @@ +# PostPorkRequestPorkInnerClassesGilts + +Gilts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Pig numbers in autumn | +**winter** | **float** | Pig numbers in winter | +**spring** | **float** | Pig numbers in spring | +**summer** | **float** | Pig numbers in summer | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] +**manure** | [**PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | + +## Example + +```python +from openapi_client.models.post_pork_request_pork_inner_classes_gilts import PostPorkRequestPorkInnerClassesGilts + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequestPorkInnerClassesGilts from a JSON string +post_pork_request_pork_inner_classes_gilts_instance = PostPorkRequestPorkInnerClassesGilts.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequestPorkInnerClassesGilts.to_json()) + +# convert the object into a dict +post_pork_request_pork_inner_classes_gilts_dict = post_pork_request_pork_inner_classes_gilts_instance.to_dict() +# create an instance of PostPorkRequestPorkInnerClassesGilts from a dict +post_pork_request_pork_inner_classes_gilts_from_dict = PostPorkRequestPorkInnerClassesGilts.from_dict(post_pork_request_pork_inner_classes_gilts_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGrowers.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGrowers.md new file mode 100644 index 00000000..1ca69147 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGrowers.md @@ -0,0 +1,39 @@ +# PostPorkRequestPorkInnerClassesGrowers + +Growers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Pig numbers in autumn | +**winter** | **float** | Pig numbers in winter | +**spring** | **float** | Pig numbers in spring | +**summer** | **float** | Pig numbers in summer | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] +**manure** | [**PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | + +## Example + +```python +from openapi_client.models.post_pork_request_pork_inner_classes_growers import PostPorkRequestPorkInnerClassesGrowers + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequestPorkInnerClassesGrowers from a JSON string +post_pork_request_pork_inner_classes_growers_instance = PostPorkRequestPorkInnerClassesGrowers.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequestPorkInnerClassesGrowers.to_json()) + +# convert the object into a dict +post_pork_request_pork_inner_classes_growers_dict = post_pork_request_pork_inner_classes_growers_instance.to_dict() +# create an instance of PostPorkRequestPorkInnerClassesGrowers from a dict +post_pork_request_pork_inner_classes_growers_from_dict = PostPorkRequestPorkInnerClassesGrowers.from_dict(post_pork_request_pork_inner_classes_growers_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSlaughterPigs.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSlaughterPigs.md new file mode 100644 index 00000000..2569dc5f --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSlaughterPigs.md @@ -0,0 +1,39 @@ +# PostPorkRequestPorkInnerClassesSlaughterPigs + +Slaughter Pigs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Pig numbers in autumn | +**winter** | **float** | Pig numbers in winter | +**spring** | **float** | Pig numbers in spring | +**summer** | **float** | Pig numbers in summer | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] +**manure** | [**PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | + +## Example + +```python +from openapi_client.models.post_pork_request_pork_inner_classes_slaughter_pigs import PostPorkRequestPorkInnerClassesSlaughterPigs + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequestPorkInnerClassesSlaughterPigs from a JSON string +post_pork_request_pork_inner_classes_slaughter_pigs_instance = PostPorkRequestPorkInnerClassesSlaughterPigs.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequestPorkInnerClassesSlaughterPigs.to_json()) + +# convert the object into a dict +post_pork_request_pork_inner_classes_slaughter_pigs_dict = post_pork_request_pork_inner_classes_slaughter_pigs_instance.to_dict() +# create an instance of PostPorkRequestPorkInnerClassesSlaughterPigs from a dict +post_pork_request_pork_inner_classes_slaughter_pigs_from_dict = PostPorkRequestPorkInnerClassesSlaughterPigs.from_dict(post_pork_request_pork_inner_classes_slaughter_pigs_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSows.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSows.md new file mode 100644 index 00000000..c1b366ea --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSows.md @@ -0,0 +1,39 @@ +# PostPorkRequestPorkInnerClassesSows + +Sows + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Pig numbers in autumn | +**winter** | **float** | Pig numbers in winter | +**spring** | **float** | Pig numbers in spring | +**summer** | **float** | Pig numbers in summer | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] +**manure** | [**PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | + +## Example + +```python +from openapi_client.models.post_pork_request_pork_inner_classes_sows import PostPorkRequestPorkInnerClassesSows + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequestPorkInnerClassesSows from a JSON string +post_pork_request_pork_inner_classes_sows_instance = PostPorkRequestPorkInnerClassesSows.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequestPorkInnerClassesSows.to_json()) + +# convert the object into a dict +post_pork_request_pork_inner_classes_sows_dict = post_pork_request_pork_inner_classes_sows_instance.to_dict() +# create an instance of PostPorkRequestPorkInnerClassesSows from a dict +post_pork_request_pork_inner_classes_sows_from_dict = PostPorkRequestPorkInnerClassesSows.from_dict(post_pork_request_pork_inner_classes_sows_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManure.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManure.md new file mode 100644 index 00000000..4fcf7eca --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManure.md @@ -0,0 +1,32 @@ +# PostPorkRequestPorkInnerClassesSowsManure + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spring** | [**PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | +**summer** | [**PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | +**autumn** | [**PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | +**winter** | [**PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | + +## Example + +```python +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure import PostPorkRequestPorkInnerClassesSowsManure + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequestPorkInnerClassesSowsManure from a JSON string +post_pork_request_pork_inner_classes_sows_manure_instance = PostPorkRequestPorkInnerClassesSowsManure.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequestPorkInnerClassesSowsManure.to_json()) + +# convert the object into a dict +post_pork_request_pork_inner_classes_sows_manure_dict = post_pork_request_pork_inner_classes_sows_manure_instance.to_dict() +# create an instance of PostPorkRequestPorkInnerClassesSowsManure from a dict +post_pork_request_pork_inner_classes_sows_manure_from_dict = PostPorkRequestPorkInnerClassesSowsManure.from_dict(post_pork_request_pork_inner_classes_sows_manure_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManureSpring.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManureSpring.md new file mode 100644 index 00000000..1c66c3d7 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManureSpring.md @@ -0,0 +1,33 @@ +# PostPorkRequestPorkInnerClassesSowsManureSpring + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**outdoor_systems** | **float** | Amount of volatile solids sent to outoor systems in t (tonnes) | [optional] +**covered_anaerobic_pond** | **float** | Amount of volatile solids sent to covered anaerobic pond in t (tonnes) | [optional] +**uncovered_anaerobic_pond** | **float** | Amount of volatile solids sent to uncovered anaerobic pond in t (tonnes) | [optional] +**deep_litter** | **float** | Amount of volatile solids sent to deep litter in t (tonnes) | [optional] +**undefined_system** | **float** | Amount of volatile solids where manure management system is not known or defined, in t (tonnes) | [optional] + +## Example + +```python +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure_spring import PostPorkRequestPorkInnerClassesSowsManureSpring + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequestPorkInnerClassesSowsManureSpring from a JSON string +post_pork_request_pork_inner_classes_sows_manure_spring_instance = PostPorkRequestPorkInnerClassesSowsManureSpring.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequestPorkInnerClassesSowsManureSpring.to_json()) + +# convert the object into a dict +post_pork_request_pork_inner_classes_sows_manure_spring_dict = post_pork_request_pork_inner_classes_sows_manure_spring_instance.to_dict() +# create an instance of PostPorkRequestPorkInnerClassesSowsManureSpring from a dict +post_pork_request_pork_inner_classes_sows_manure_spring_from_dict = PostPorkRequestPorkInnerClassesSowsManureSpring.from_dict(post_pork_request_pork_inner_classes_sows_manure_spring_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSuckers.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSuckers.md new file mode 100644 index 00000000..5b925e5d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSuckers.md @@ -0,0 +1,39 @@ +# PostPorkRequestPorkInnerClassesSuckers + +Suckers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Pig numbers in autumn | +**winter** | **float** | Pig numbers in winter | +**spring** | **float** | Pig numbers in spring | +**summer** | **float** | Pig numbers in summer | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] +**manure** | [**PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | + +## Example + +```python +from openapi_client.models.post_pork_request_pork_inner_classes_suckers import PostPorkRequestPorkInnerClassesSuckers + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequestPorkInnerClassesSuckers from a JSON string +post_pork_request_pork_inner_classes_suckers_instance = PostPorkRequestPorkInnerClassesSuckers.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequestPorkInnerClassesSuckers.to_json()) + +# convert the object into a dict +post_pork_request_pork_inner_classes_suckers_dict = post_pork_request_pork_inner_classes_suckers_instance.to_dict() +# create an instance of PostPorkRequestPorkInnerClassesSuckers from a dict +post_pork_request_pork_inner_classes_suckers_from_dict = PostPorkRequestPorkInnerClassesSuckers.from_dict(post_pork_request_pork_inner_classes_suckers_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesWeaners.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesWeaners.md new file mode 100644 index 00000000..e29f7c26 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesWeaners.md @@ -0,0 +1,39 @@ +# PostPorkRequestPorkInnerClassesWeaners + +Weaners + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Pig numbers in autumn | +**winter** | **float** | Pig numbers in winter | +**spring** | **float** | Pig numbers in spring | +**summer** | **float** | Pig numbers in summer | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] +**manure** | [**PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | + +## Example + +```python +from openapi_client.models.post_pork_request_pork_inner_classes_weaners import PostPorkRequestPorkInnerClassesWeaners + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequestPorkInnerClassesWeaners from a JSON string +post_pork_request_pork_inner_classes_weaners_instance = PostPorkRequestPorkInnerClassesWeaners.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequestPorkInnerClassesWeaners.to_json()) + +# convert the object into a dict +post_pork_request_pork_inner_classes_weaners_dict = post_pork_request_pork_inner_classes_weaners_instance.to_dict() +# create an instance of PostPorkRequestPorkInnerClassesWeaners from a dict +post_pork_request_pork_inner_classes_weaners_from_dict = PostPorkRequestPorkInnerClassesWeaners.from_dict(post_pork_request_pork_inner_classes_weaners_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInner.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInner.md new file mode 100644 index 00000000..c4abf9ce --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInner.md @@ -0,0 +1,33 @@ +# PostPorkRequestPorkInnerFeedProductsInner + +Pig feed product + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feed_purchased** | **float** | Pig feed purchased, in tonnes | +**additional_ingredients** | **float** | Fraction of additional ingredient in feed mix, from 0 to 1 | +**emissions_intensity** | **float** | Emissions intensity of feed product in GHG (kg CO2-e/kg input) | +**ingredients** | [**PostPorkRequestPorkInnerFeedProductsInnerIngredients**](PostPorkRequestPorkInnerFeedProductsInnerIngredients.md) | | + +## Example + +```python +from openapi_client.models.post_pork_request_pork_inner_feed_products_inner import PostPorkRequestPorkInnerFeedProductsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequestPorkInnerFeedProductsInner from a JSON string +post_pork_request_pork_inner_feed_products_inner_instance = PostPorkRequestPorkInnerFeedProductsInner.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequestPorkInnerFeedProductsInner.to_json()) + +# convert the object into a dict +post_pork_request_pork_inner_feed_products_inner_dict = post_pork_request_pork_inner_feed_products_inner_instance.to_dict() +# create an instance of PostPorkRequestPorkInnerFeedProductsInner from a dict +post_pork_request_pork_inner_feed_products_inner_from_dict = PostPorkRequestPorkInnerFeedProductsInner.from_dict(post_pork_request_pork_inner_feed_products_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md new file mode 100644 index 00000000..3d2f4fc6 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md @@ -0,0 +1,41 @@ +# PostPorkRequestPorkInnerFeedProductsInnerIngredients + +Feed product ingredients, each ingredient is a fraction from 0 to 1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**wheat** | **float** | | [optional] +**barley** | **float** | | [optional] +**whey_powder** | **float** | | [optional] +**canola_meal** | **float** | | [optional] +**soybean_meal** | **float** | | [optional] +**meat_meal** | **float** | | [optional] +**blood_meal** | **float** | | [optional] +**fishmeal** | **float** | | [optional] +**tallow** | **float** | | [optional] +**wheat_bran** | **float** | | [optional] +**beet_pulp** | **float** | | [optional] +**mill_mix** | **float** | | [optional] + +## Example + +```python +from openapi_client.models.post_pork_request_pork_inner_feed_products_inner_ingredients import PostPorkRequestPorkInnerFeedProductsInnerIngredients + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequestPorkInnerFeedProductsInnerIngredients from a JSON string +post_pork_request_pork_inner_feed_products_inner_ingredients_instance = PostPorkRequestPorkInnerFeedProductsInnerIngredients.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequestPorkInnerFeedProductsInnerIngredients.to_json()) + +# convert the object into a dict +post_pork_request_pork_inner_feed_products_inner_ingredients_dict = post_pork_request_pork_inner_feed_products_inner_ingredients_instance.to_dict() +# create an instance of PostPorkRequestPorkInnerFeedProductsInnerIngredients from a dict +post_pork_request_pork_inner_feed_products_inner_ingredients_from_dict = PostPorkRequestPorkInnerFeedProductsInnerIngredients.from_dict(post_pork_request_pork_inner_feed_products_inner_ingredients_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostPorkRequestVegetationInner.md new file mode 100644 index 00000000..c63431c0 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPorkRequestVegetationInner.md @@ -0,0 +1,31 @@ +# PostPorkRequestVegetationInner + +Non-productive vegetation inputs allocated to a particular activity type + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**allocated_proportion** | **List[float]** | The proportion of the sequestration that is allocated to the activity | + +## Example + +```python +from openapi_client.models.post_pork_request_vegetation_inner import PostPorkRequestVegetationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPorkRequestVegetationInner from a JSON string +post_pork_request_vegetation_inner_instance = PostPorkRequestVegetationInner.from_json(json) +# print the JSON string representation of the object +print(PostPorkRequestVegetationInner.to_json()) + +# convert the object into a dict +post_pork_request_vegetation_inner_dict = post_pork_request_vegetation_inner_instance.to_dict() +# create an instance of PostPorkRequestVegetationInner from a dict +post_pork_request_vegetation_inner_from_dict = PostPorkRequestVegetationInner.from_dict(post_pork_request_vegetation_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultry200Response.md b/examples/python-api-client/api-client/docs/PostPoultry200Response.md new file mode 100644 index 00000000..5c4b5c75 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultry200Response.md @@ -0,0 +1,37 @@ +# PostPoultry200Response + +Emissions calculation output for the `poultry` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostPoultry200ResponseScope1**](PostPoultry200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostPoultry200ResponseScope3**](PostPoultry200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate_broilers** | [**List[PostPoultry200ResponseIntermediateBroilersInner]**](PostPoultry200ResponseIntermediateBroilersInner.md) | | +**intermediate_layers** | [**List[PostPoultry200ResponseIntermediateLayersInner]**](PostPoultry200ResponseIntermediateLayersInner.md) | | +**net** | [**PostPoultry200ResponseNet**](PostPoultry200ResponseNet.md) | | +**intensities** | [**PostPoultry200ResponseIntensities**](PostPoultry200ResponseIntensities.md) | | + +## Example + +```python +from openapi_client.models.post_poultry200_response import PostPoultry200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultry200Response from a JSON string +post_poultry200_response_instance = PostPoultry200Response.from_json(json) +# print the JSON string representation of the object +print(PostPoultry200Response.to_json()) + +# convert the object into a dict +post_poultry200_response_dict = post_poultry200_response_instance.to_dict() +# create an instance of PostPoultry200Response from a dict +post_poultry200_response_from_dict = PostPoultry200Response.from_dict(post_poultry200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntensities.md new file mode 100644 index 00000000..6198d3f5 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntensities.md @@ -0,0 +1,34 @@ +# PostPoultry200ResponseIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**poultry_meat_including_sequestration** | **float** | Poultry meat including carbon sequestration, in kg-CO2e/kg liveweight | +**poultry_meat_excluding_sequestration** | **float** | Poultry meat excluding carbon sequestration, in kg-CO2e/kg liveweight | +**poultry_eggs_including_sequestration** | **float** | Poultry eggs including carbon sequestration, in kg-CO2e/kg liveweight | +**poultry_eggs_excluding_sequestration** | **float** | Poultry eggs excluding carbon sequestration, in kg-CO2e/kg liveweight | +**meat_produced_kg** | **float** | Poultry meat produced in kg | +**eggs_produced_kg** | **float** | Amount of eggs produced, in kg | + +## Example + +```python +from openapi_client.models.post_poultry200_response_intensities import PostPoultry200ResponseIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultry200ResponseIntensities from a JSON string +post_poultry200_response_intensities_instance = PostPoultry200ResponseIntensities.from_json(json) +# print the JSON string representation of the object +print(PostPoultry200ResponseIntensities.to_json()) + +# convert the object into a dict +post_poultry200_response_intensities_dict = post_poultry200_response_intensities_instance.to_dict() +# create an instance of PostPoultry200ResponseIntensities from a dict +post_poultry200_response_intensities_from_dict = PostPoultry200ResponseIntensities.from_dict(post_poultry200_response_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInner.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInner.md new file mode 100644 index 00000000..39460303 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInner.md @@ -0,0 +1,35 @@ +# PostPoultry200ResponseIntermediateBroilersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**scope1** | [**PostPoultry200ResponseScope1**](PostPoultry200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostPoultry200ResponseScope3**](PostPoultry200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | +**intensities** | [**PostPoultry200ResponseIntermediateBroilersInnerIntensities**](PostPoultry200ResponseIntermediateBroilersInnerIntensities.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +## Example + +```python +from openapi_client.models.post_poultry200_response_intermediate_broilers_inner import PostPoultry200ResponseIntermediateBroilersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultry200ResponseIntermediateBroilersInner from a JSON string +post_poultry200_response_intermediate_broilers_inner_instance = PostPoultry200ResponseIntermediateBroilersInner.from_json(json) +# print the JSON string representation of the object +print(PostPoultry200ResponseIntermediateBroilersInner.to_json()) + +# convert the object into a dict +post_poultry200_response_intermediate_broilers_inner_dict = post_poultry200_response_intermediate_broilers_inner_instance.to_dict() +# create an instance of PostPoultry200ResponseIntermediateBroilersInner from a dict +post_poultry200_response_intermediate_broilers_inner_from_dict = PostPoultry200ResponseIntermediateBroilersInner.from_dict(post_poultry200_response_intermediate_broilers_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md new file mode 100644 index 00000000..29755e1d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md @@ -0,0 +1,31 @@ +# PostPoultry200ResponseIntermediateBroilersInnerIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**poultry_meat_including_sequestration** | **float** | Poultry meat including carbon sequestration, in kg-CO2e/kg liveweight | +**poultry_meat_excluding_sequestration** | **float** | Poultry meat excluding carbon sequestration, in kg-CO2e/kg liveweight | +**meat_produced_kg** | **float** | Poultry meat produced in kg liveweight | + +## Example + +```python +from openapi_client.models.post_poultry200_response_intermediate_broilers_inner_intensities import PostPoultry200ResponseIntermediateBroilersInnerIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultry200ResponseIntermediateBroilersInnerIntensities from a JSON string +post_poultry200_response_intermediate_broilers_inner_intensities_instance = PostPoultry200ResponseIntermediateBroilersInnerIntensities.from_json(json) +# print the JSON string representation of the object +print(PostPoultry200ResponseIntermediateBroilersInnerIntensities.to_json()) + +# convert the object into a dict +post_poultry200_response_intermediate_broilers_inner_intensities_dict = post_poultry200_response_intermediate_broilers_inner_intensities_instance.to_dict() +# create an instance of PostPoultry200ResponseIntermediateBroilersInnerIntensities from a dict +post_poultry200_response_intermediate_broilers_inner_intensities_from_dict = PostPoultry200ResponseIntermediateBroilersInnerIntensities.from_dict(post_poultry200_response_intermediate_broilers_inner_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInner.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInner.md new file mode 100644 index 00000000..a6e1e4e2 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInner.md @@ -0,0 +1,35 @@ +# PostPoultry200ResponseIntermediateLayersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**scope1** | [**PostPoultry200ResponseScope1**](PostPoultry200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostPoultry200ResponseScope3**](PostPoultry200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | +**intensities** | [**PostPoultry200ResponseIntermediateLayersInnerIntensities**](PostPoultry200ResponseIntermediateLayersInnerIntensities.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +## Example + +```python +from openapi_client.models.post_poultry200_response_intermediate_layers_inner import PostPoultry200ResponseIntermediateLayersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultry200ResponseIntermediateLayersInner from a JSON string +post_poultry200_response_intermediate_layers_inner_instance = PostPoultry200ResponseIntermediateLayersInner.from_json(json) +# print the JSON string representation of the object +print(PostPoultry200ResponseIntermediateLayersInner.to_json()) + +# convert the object into a dict +post_poultry200_response_intermediate_layers_inner_dict = post_poultry200_response_intermediate_layers_inner_instance.to_dict() +# create an instance of PostPoultry200ResponseIntermediateLayersInner from a dict +post_poultry200_response_intermediate_layers_inner_from_dict = PostPoultry200ResponseIntermediateLayersInner.from_dict(post_poultry200_response_intermediate_layers_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInnerIntensities.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInnerIntensities.md new file mode 100644 index 00000000..4d215f20 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInnerIntensities.md @@ -0,0 +1,31 @@ +# PostPoultry200ResponseIntermediateLayersInnerIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**poultry_eggs_including_sequestration** | **float** | Poultry eggs including carbon sequestration, in kg-CO2e/kg eggs | +**poultry_eggs_excluding_sequestration** | **float** | Poultry eggs excluding carbon sequestration, in kg-CO2e/kg eggs | +**eggs_produced_kg** | **float** | Poultry eggs produced in kg | + +## Example + +```python +from openapi_client.models.post_poultry200_response_intermediate_layers_inner_intensities import PostPoultry200ResponseIntermediateLayersInnerIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultry200ResponseIntermediateLayersInnerIntensities from a JSON string +post_poultry200_response_intermediate_layers_inner_intensities_instance = PostPoultry200ResponseIntermediateLayersInnerIntensities.from_json(json) +# print the JSON string representation of the object +print(PostPoultry200ResponseIntermediateLayersInnerIntensities.to_json()) + +# convert the object into a dict +post_poultry200_response_intermediate_layers_inner_intensities_dict = post_poultry200_response_intermediate_layers_inner_intensities_instance.to_dict() +# create an instance of PostPoultry200ResponseIntermediateLayersInnerIntensities from a dict +post_poultry200_response_intermediate_layers_inner_intensities_from_dict = PostPoultry200ResponseIntermediateLayersInnerIntensities.from_dict(post_poultry200_response_intermediate_layers_inner_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseNet.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseNet.md new file mode 100644 index 00000000..35db5c1e --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultry200ResponseNet.md @@ -0,0 +1,31 @@ +# PostPoultry200ResponseNet + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | +**broilers** | **float** | Net emissions of broilers, in tonnes-CO2e/year | +**layers** | **float** | Net emissions of layers, in tonnes-CO2e/year | + +## Example + +```python +from openapi_client.models.post_poultry200_response_net import PostPoultry200ResponseNet + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultry200ResponseNet from a JSON string +post_poultry200_response_net_instance = PostPoultry200ResponseNet.from_json(json) +# print the JSON string representation of the object +print(PostPoultry200ResponseNet.to_json()) + +# convert the object into a dict +post_poultry200_response_net_dict = post_poultry200_response_net_instance.to_dict() +# create an instance of PostPoultry200ResponseNet from a dict +post_poultry200_response_net_from_dict = PostPoultry200ResponseNet.from_dict(post_poultry200_response_net_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseScope1.md new file mode 100644 index 00000000..a693a538 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultry200ResponseScope1.md @@ -0,0 +1,40 @@ +# PostPoultry200ResponseScope1 + +Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | +**manure_management_n2_o** | **float** | N2O emissions from manure management, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_poultry200_response_scope1 import PostPoultry200ResponseScope1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultry200ResponseScope1 from a JSON string +post_poultry200_response_scope1_instance = PostPoultry200ResponseScope1.from_json(json) +# print the JSON string representation of the object +print(PostPoultry200ResponseScope1.to_json()) + +# convert the object into a dict +post_poultry200_response_scope1_dict = post_poultry200_response_scope1_instance.to_dict() +# create an instance of PostPoultry200ResponseScope1 from a dict +post_poultry200_response_scope1_from_dict = PostPoultry200ResponseScope1.from_dict(post_poultry200_response_scope1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseScope3.md new file mode 100644 index 00000000..a3aac991 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultry200ResponseScope3.md @@ -0,0 +1,36 @@ +# PostPoultry200ResponseScope3 + +Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | +**purchased_hay** | **float** | Emissions from purchased hay, in tonnes-CO2e | +**purchased_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_poultry200_response_scope3 import PostPoultry200ResponseScope3 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultry200ResponseScope3 from a JSON string +post_poultry200_response_scope3_instance = PostPoultry200ResponseScope3.from_json(json) +# print the JSON string representation of the object +print(PostPoultry200ResponseScope3.to_json()) + +# convert the object into a dict +post_poultry200_response_scope3_dict = post_poultry200_response_scope3_instance.to_dict() +# create an instance of PostPoultry200ResponseScope3 from a dict +post_poultry200_response_scope3_from_dict = PostPoultry200ResponseScope3.from_dict(post_poultry200_response_scope3_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequest.md b/examples/python-api-client/api-client/docs/PostPoultryRequest.md new file mode 100644 index 00000000..9ccaba9d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequest.md @@ -0,0 +1,35 @@ +# PostPoultryRequest + +Input data required for the `poultry` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**broilers** | [**List[PostPoultryRequestBroilersInner]**](PostPoultryRequestBroilersInner.md) | | +**layers** | [**List[PostPoultryRequestLayersInner]**](PostPoultryRequestLayersInner.md) | | +**vegetation** | [**List[PostPoultryRequestVegetationInner]**](PostPoultryRequestVegetationInner.md) | | + +## Example + +```python +from openapi_client.models.post_poultry_request import PostPoultryRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequest from a JSON string +post_poultry_request_instance = PostPoultryRequest.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequest.to_json()) + +# convert the object into a dict +post_poultry_request_dict = post_poultry_request_instance.to_dict() +# create an instance of PostPoultryRequest from a dict +post_poultry_request_from_dict = PostPoultryRequest.from_dict(post_poultry_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInner.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInner.md new file mode 100644 index 00000000..a3e0817e --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInner.md @@ -0,0 +1,48 @@ +# PostPoultryRequestBroilersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**groups** | [**List[PostPoultryRequestBroilersInnerGroupsInner]**](PostPoultryRequestBroilersInnerGroupsInner.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**electricity_source** | **str** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**hay** | **float** | Hay purchased in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**manure_waste_allocation** | **float** | Fraction allocation of manure waste, from 0 to 1. Note: only for pasture range, paddock and free range systems | +**waste_handled_drylot_or_storage** | **float** | Fraction of waste handled through dryland and solid storage, from 0 to 1 | +**litter_recycled** | **float** | Fraction of litter recycled, from 0 to 1 | +**litter_recycle_frequency** | **float** | Number of litter cycles per year | +**purchased_free_range** | **float** | Fraction of chickens purchased that are free range. Note: fraction of chickens purchased that are conventional is `1 - purchasedFreeRange` | +**meat_chicken_growers_purchases** | [**PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases**](PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md) | | +**meat_chicken_layers_purchases** | [**PostPoultryRequestBroilersInnerMeatChickenLayersPurchases**](PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md) | | +**meat_other_purchases** | [**PostPoultryRequestBroilersInnerMeatOtherPurchases**](PostPoultryRequestBroilersInnerMeatOtherPurchases.md) | | +**sales** | [**List[PostPoultryRequestBroilersInnerSalesInner]**](PostPoultryRequestBroilersInnerSalesInner.md) | Broiler sales | + +## Example + +```python +from openapi_client.models.post_poultry_request_broilers_inner import PostPoultryRequestBroilersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestBroilersInner from a JSON string +post_poultry_request_broilers_inner_instance = PostPoultryRequestBroilersInner.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestBroilersInner.to_json()) + +# convert the object into a dict +post_poultry_request_broilers_inner_dict = post_poultry_request_broilers_inner_instance.to_dict() +# create an instance of PostPoultryRequestBroilersInner from a dict +post_poultry_request_broilers_inner_from_dict = PostPoultryRequestBroilersInner.from_dict(post_poultry_request_broilers_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInner.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInner.md new file mode 100644 index 00000000..5d03eec3 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInner.md @@ -0,0 +1,35 @@ +# PostPoultryRequestBroilersInnerGroupsInner + +Poultry broiler group + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meat_chicken_growers** | [**PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers**](PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md) | | +**meat_chicken_layers** | [**PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers**](PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md) | | +**meat_other** | [**PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers**](PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md) | | +**feed** | [**List[PostPoultryRequestBroilersInnerGroupsInnerFeedInner]**](PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md) | | +**custom_feed_purchased** | **float** | Custom feed purchased, in tonnes | +**custom_feed_emission_intensity** | **float** | Emissions intensity of custom feed in GHG (kg CO2-e/kg input) | + +## Example + +```python +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner import PostPoultryRequestBroilersInnerGroupsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestBroilersInnerGroupsInner from a JSON string +post_poultry_request_broilers_inner_groups_inner_instance = PostPoultryRequestBroilersInnerGroupsInner.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestBroilersInnerGroupsInner.to_json()) + +# convert the object into a dict +post_poultry_request_broilers_inner_groups_inner_dict = post_poultry_request_broilers_inner_groups_inner_instance.to_dict() +# create an instance of PostPoultryRequestBroilersInnerGroupsInner from a dict +post_poultry_request_broilers_inner_groups_inner_from_dict = PostPoultryRequestBroilersInnerGroupsInner.from_dict(post_poultry_request_broilers_inner_groups_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md new file mode 100644 index 00000000..a8f3ea08 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md @@ -0,0 +1,33 @@ +# PostPoultryRequestBroilersInnerGroupsInnerFeedInner + +Poultry feed + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ingredients** | [**PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients**](PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md) | | +**feed_purchased** | **float** | Feed purchased, in tonnes | +**additional_ingredient** | **float** | Fraction of additional ingredients in feed mix, from 0 to 1 | +**emission_intensity** | **float** | Emissions intensity of feed product in GHG (kg CO2-e/kg input) | + +## Example + +```python +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner import PostPoultryRequestBroilersInnerGroupsInnerFeedInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestBroilersInnerGroupsInnerFeedInner from a JSON string +post_poultry_request_broilers_inner_groups_inner_feed_inner_instance = PostPoultryRequestBroilersInnerGroupsInnerFeedInner.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestBroilersInnerGroupsInnerFeedInner.to_json()) + +# convert the object into a dict +post_poultry_request_broilers_inner_groups_inner_feed_inner_dict = post_poultry_request_broilers_inner_groups_inner_feed_inner_instance.to_dict() +# create an instance of PostPoultryRequestBroilersInnerGroupsInnerFeedInner from a dict +post_poultry_request_broilers_inner_groups_inner_feed_inner_from_dict = PostPoultryRequestBroilersInnerGroupsInnerFeedInner.from_dict(post_poultry_request_broilers_inner_groups_inner_feed_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md new file mode 100644 index 00000000..d4312fda --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md @@ -0,0 +1,34 @@ +# PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients + +Poultry broiler feed ingredients as fractions, each from 0 to 1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**wheat** | **float** | | [optional] +**barley** | **float** | | [optional] +**sorghum** | **float** | | [optional] +**soybean** | **float** | | [optional] +**millrun** | **float** | | [optional] + +## Example + +```python +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients import PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients from a JSON string +post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients_instance = PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.to_json()) + +# convert the object into a dict +post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients_dict = post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients_instance.to_dict() +# create an instance of PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients from a dict +post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients_from_dict = PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.from_dict(post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md new file mode 100644 index 00000000..0341f330 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md @@ -0,0 +1,39 @@ +# PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers + +Broiler class with seasonal data + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**birds** | **float** | Total number of birds/head | +**average_stay_length50** | **float** | Average length of stay until 50% of the flock is depleted, in days | +**liveweight50** | **float** | Average liveweight during the 50% depletion period, in kg | +**average_stay_length100** | **float** | Average length of stay until 100% of the flock is depleted, in days | +**liveweight100** | **float** | Average liveweight during the 100% depletion period, in kg | +**dry_matter_intake** | **float** | Dry matter intake, in kg/head/day | [optional] +**dry_matter_digestibility** | **float** | Dry matter digestibility fraction, from 0 to 1 | [optional] +**crude_protein** | **float** | Crude protein fraction, from 0 to 1 | [optional] +**manure_ash** | **float** | Manure ash fraction, from 0 to 1 | [optional] +**nitrogen_retention_rate** | **float** | Nitrogen retention rate fraction, from 0 to 1 | [optional] + +## Example + +```python +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers import PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers from a JSON string +post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers_instance = PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.to_json()) + +# convert the object into a dict +post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers_dict = post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers_instance.to_dict() +# create an instance of PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers from a dict +post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers_from_dict = PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.from_dict(post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md new file mode 100644 index 00000000..e006b5bd --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md @@ -0,0 +1,31 @@ +# PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases + +Livestock purchases of meat chicken growers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals purchased (head) | +**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | + +## Example + +```python +from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_growers_purchases import PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases from a JSON string +post_poultry_request_broilers_inner_meat_chicken_growers_purchases_instance = PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.to_json()) + +# convert the object into a dict +post_poultry_request_broilers_inner_meat_chicken_growers_purchases_dict = post_poultry_request_broilers_inner_meat_chicken_growers_purchases_instance.to_dict() +# create an instance of PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases from a dict +post_poultry_request_broilers_inner_meat_chicken_growers_purchases_from_dict = PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.from_dict(post_poultry_request_broilers_inner_meat_chicken_growers_purchases_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md new file mode 100644 index 00000000..35e627b3 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md @@ -0,0 +1,31 @@ +# PostPoultryRequestBroilersInnerMeatChickenLayersPurchases + +Livestock purchases of meat chicken layers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals purchased (head) | +**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | + +## Example + +```python +from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_layers_purchases import PostPoultryRequestBroilersInnerMeatChickenLayersPurchases + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestBroilersInnerMeatChickenLayersPurchases from a JSON string +post_poultry_request_broilers_inner_meat_chicken_layers_purchases_instance = PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.to_json()) + +# convert the object into a dict +post_poultry_request_broilers_inner_meat_chicken_layers_purchases_dict = post_poultry_request_broilers_inner_meat_chicken_layers_purchases_instance.to_dict() +# create an instance of PostPoultryRequestBroilersInnerMeatChickenLayersPurchases from a dict +post_poultry_request_broilers_inner_meat_chicken_layers_purchases_from_dict = PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.from_dict(post_poultry_request_broilers_inner_meat_chicken_layers_purchases_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatOtherPurchases.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatOtherPurchases.md new file mode 100644 index 00000000..a74e34d6 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatOtherPurchases.md @@ -0,0 +1,31 @@ +# PostPoultryRequestBroilersInnerMeatOtherPurchases + +Livestock purchases of meat other + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals purchased (head) | +**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | + +## Example + +```python +from openapi_client.models.post_poultry_request_broilers_inner_meat_other_purchases import PostPoultryRequestBroilersInnerMeatOtherPurchases + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestBroilersInnerMeatOtherPurchases from a JSON string +post_poultry_request_broilers_inner_meat_other_purchases_instance = PostPoultryRequestBroilersInnerMeatOtherPurchases.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestBroilersInnerMeatOtherPurchases.to_json()) + +# convert the object into a dict +post_poultry_request_broilers_inner_meat_other_purchases_dict = post_poultry_request_broilers_inner_meat_other_purchases_instance.to_dict() +# create an instance of PostPoultryRequestBroilersInnerMeatOtherPurchases from a dict +post_poultry_request_broilers_inner_meat_other_purchases_from_dict = PostPoultryRequestBroilersInnerMeatOtherPurchases.from_dict(post_poultry_request_broilers_inner_meat_other_purchases_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerSalesInner.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerSalesInner.md new file mode 100644 index 00000000..b99cb3d6 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerSalesInner.md @@ -0,0 +1,32 @@ +# PostPoultryRequestBroilersInnerSalesInner + +Poultry broiler sales + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meat_chicken_growers_sales** | [**PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | | +**meat_chicken_layers** | [**PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | | +**meat_other** | [**PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | | + +## Example + +```python +from openapi_client.models.post_poultry_request_broilers_inner_sales_inner import PostPoultryRequestBroilersInnerSalesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestBroilersInnerSalesInner from a JSON string +post_poultry_request_broilers_inner_sales_inner_instance = PostPoultryRequestBroilersInnerSalesInner.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestBroilersInnerSalesInner.to_json()) + +# convert the object into a dict +post_poultry_request_broilers_inner_sales_inner_dict = post_poultry_request_broilers_inner_sales_inner_instance.to_dict() +# create an instance of PostPoultryRequestBroilersInnerSalesInner from a dict +post_poultry_request_broilers_inner_sales_inner_from_dict = PostPoultryRequestBroilersInnerSalesInner.from_dict(post_poultry_request_broilers_inner_sales_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInner.md b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInner.md new file mode 100644 index 00000000..74b0e8b6 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInner.md @@ -0,0 +1,52 @@ +# PostPoultryRequestLayersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**layers** | [**PostPoultryRequestLayersInnerLayers**](PostPoultryRequestLayersInnerLayers.md) | | +**meat_chicken_layers** | [**PostPoultryRequestLayersInnerMeatChickenLayers**](PostPoultryRequestLayersInnerMeatChickenLayers.md) | | +**feed** | [**List[PostPoultryRequestBroilersInnerGroupsInnerFeedInner]**](PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md) | | +**purchased_free_range** | **float** | Fraction of chickens purchased that are free range. Note: fraction of chickens purchased that are conventional is `1 - purchasedFreeRange` | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**electricity_source** | **str** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**hay** | **float** | Hay purchased in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**manure_waste_allocation** | **float** | Fraction allocation of manure waste, from 0 to 1. Note: only for pasture range, paddock and free range systems | +**waste_handled_drylot_or_storage** | **float** | Fraction of waste handled through dryland and solid storage, from 0 to 1 | +**litter_recycled** | **float** | Fraction of litter recycled, from 0 to 1 | +**litter_recycle_frequency** | **float** | Number of litter cycles per year | +**meat_chicken_layers_purchases** | [**PostPoultryRequestBroilersInnerMeatChickenLayersPurchases**](PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md) | | +**layers_purchases** | [**PostPoultryRequestLayersInnerLayersPurchases**](PostPoultryRequestLayersInnerLayersPurchases.md) | | +**custom_feed_purchased** | **float** | Custom feed purchased, in tonnes | +**custom_feed_emission_intensity** | **float** | Emissions intensity of custom feed in GHG (kg CO2-e/kg input) | +**meat_chicken_layers_egg_sale** | [**PostPoultryRequestLayersInnerMeatChickenLayersEggSale**](PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md) | | +**layers_egg_sale** | [**PostPoultryRequestLayersInnerLayersEggSale**](PostPoultryRequestLayersInnerLayersEggSale.md) | | + +## Example + +```python +from openapi_client.models.post_poultry_request_layers_inner import PostPoultryRequestLayersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestLayersInner from a JSON string +post_poultry_request_layers_inner_instance = PostPoultryRequestLayersInner.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestLayersInner.to_json()) + +# convert the object into a dict +post_poultry_request_layers_inner_dict = post_poultry_request_layers_inner_instance.to_dict() +# create an instance of PostPoultryRequestLayersInner from a dict +post_poultry_request_layers_inner_from_dict = PostPoultryRequestLayersInner.from_dict(post_poultry_request_layers_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayers.md b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayers.md new file mode 100644 index 00000000..9ec3228d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayers.md @@ -0,0 +1,33 @@ +# PostPoultryRequestLayersInnerLayers + +Layers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Flock numbers in autumn | +**winter** | **float** | Flock numbers in winter | +**spring** | **float** | Flock numbers in spring | +**summer** | **float** | Flock numbers in summer | + +## Example + +```python +from openapi_client.models.post_poultry_request_layers_inner_layers import PostPoultryRequestLayersInnerLayers + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestLayersInnerLayers from a JSON string +post_poultry_request_layers_inner_layers_instance = PostPoultryRequestLayersInnerLayers.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestLayersInnerLayers.to_json()) + +# convert the object into a dict +post_poultry_request_layers_inner_layers_dict = post_poultry_request_layers_inner_layers_instance.to_dict() +# create an instance of PostPoultryRequestLayersInnerLayers from a dict +post_poultry_request_layers_inner_layers_from_dict = PostPoultryRequestLayersInnerLayers.from_dict(post_poultry_request_layers_inner_layers_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersEggSale.md b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersEggSale.md new file mode 100644 index 00000000..5dde1643 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersEggSale.md @@ -0,0 +1,31 @@ +# PostPoultryRequestLayersInnerLayersEggSale + +Layers egg sales + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eggs_produced** | **float** | Number of eggs produced in a year per bird | +**average_weight** | **float** | Average egg weight in grams | + +## Example + +```python +from openapi_client.models.post_poultry_request_layers_inner_layers_egg_sale import PostPoultryRequestLayersInnerLayersEggSale + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestLayersInnerLayersEggSale from a JSON string +post_poultry_request_layers_inner_layers_egg_sale_instance = PostPoultryRequestLayersInnerLayersEggSale.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestLayersInnerLayersEggSale.to_json()) + +# convert the object into a dict +post_poultry_request_layers_inner_layers_egg_sale_dict = post_poultry_request_layers_inner_layers_egg_sale_instance.to_dict() +# create an instance of PostPoultryRequestLayersInnerLayersEggSale from a dict +post_poultry_request_layers_inner_layers_egg_sale_from_dict = PostPoultryRequestLayersInnerLayersEggSale.from_dict(post_poultry_request_layers_inner_layers_egg_sale_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersPurchases.md b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersPurchases.md new file mode 100644 index 00000000..d4fbebd2 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersPurchases.md @@ -0,0 +1,31 @@ +# PostPoultryRequestLayersInnerLayersPurchases + +Livestock purchases of layers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals purchased (head) | +**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | + +## Example + +```python +from openapi_client.models.post_poultry_request_layers_inner_layers_purchases import PostPoultryRequestLayersInnerLayersPurchases + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestLayersInnerLayersPurchases from a JSON string +post_poultry_request_layers_inner_layers_purchases_instance = PostPoultryRequestLayersInnerLayersPurchases.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestLayersInnerLayersPurchases.to_json()) + +# convert the object into a dict +post_poultry_request_layers_inner_layers_purchases_dict = post_poultry_request_layers_inner_layers_purchases_instance.to_dict() +# create an instance of PostPoultryRequestLayersInnerLayersPurchases from a dict +post_poultry_request_layers_inner_layers_purchases_from_dict = PostPoultryRequestLayersInnerLayersPurchases.from_dict(post_poultry_request_layers_inner_layers_purchases_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayers.md b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayers.md new file mode 100644 index 00000000..397791c1 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayers.md @@ -0,0 +1,33 @@ +# PostPoultryRequestLayersInnerMeatChickenLayers + +Meat chicken layers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Flock numbers in autumn | +**winter** | **float** | Flock numbers in winter | +**spring** | **float** | Flock numbers in spring | +**summer** | **float** | Flock numbers in summer | + +## Example + +```python +from openapi_client.models.post_poultry_request_layers_inner_meat_chicken_layers import PostPoultryRequestLayersInnerMeatChickenLayers + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestLayersInnerMeatChickenLayers from a JSON string +post_poultry_request_layers_inner_meat_chicken_layers_instance = PostPoultryRequestLayersInnerMeatChickenLayers.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestLayersInnerMeatChickenLayers.to_json()) + +# convert the object into a dict +post_poultry_request_layers_inner_meat_chicken_layers_dict = post_poultry_request_layers_inner_meat_chicken_layers_instance.to_dict() +# create an instance of PostPoultryRequestLayersInnerMeatChickenLayers from a dict +post_poultry_request_layers_inner_meat_chicken_layers_from_dict = PostPoultryRequestLayersInnerMeatChickenLayers.from_dict(post_poultry_request_layers_inner_meat_chicken_layers_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md new file mode 100644 index 00000000..d0ade43d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md @@ -0,0 +1,31 @@ +# PostPoultryRequestLayersInnerMeatChickenLayersEggSale + +Meat chicken layers egg sales + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eggs_produced** | **float** | Number of eggs produced in a year per bird | +**average_weight** | **float** | Average egg weight in grams | + +## Example + +```python +from openapi_client.models.post_poultry_request_layers_inner_meat_chicken_layers_egg_sale import PostPoultryRequestLayersInnerMeatChickenLayersEggSale + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestLayersInnerMeatChickenLayersEggSale from a JSON string +post_poultry_request_layers_inner_meat_chicken_layers_egg_sale_instance = PostPoultryRequestLayersInnerMeatChickenLayersEggSale.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestLayersInnerMeatChickenLayersEggSale.to_json()) + +# convert the object into a dict +post_poultry_request_layers_inner_meat_chicken_layers_egg_sale_dict = post_poultry_request_layers_inner_meat_chicken_layers_egg_sale_instance.to_dict() +# create an instance of PostPoultryRequestLayersInnerMeatChickenLayersEggSale from a dict +post_poultry_request_layers_inner_meat_chicken_layers_egg_sale_from_dict = PostPoultryRequestLayersInnerMeatChickenLayersEggSale.from_dict(post_poultry_request_layers_inner_meat_chicken_layers_egg_sale_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostPoultryRequestVegetationInner.md new file mode 100644 index 00000000..7d3b2d42 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostPoultryRequestVegetationInner.md @@ -0,0 +1,32 @@ +# PostPoultryRequestVegetationInner + +Non-productive vegetation inputs along with allocations to broilers and layers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**broilers_proportion** | **List[float]** | The proportion of the sequestration that is allocated to broilers | +**layers_proportion** | **List[float]** | The proportion of the sequestration that is allocated to layers | + +## Example + +```python +from openapi_client.models.post_poultry_request_vegetation_inner import PostPoultryRequestVegetationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostPoultryRequestVegetationInner from a JSON string +post_poultry_request_vegetation_inner_instance = PostPoultryRequestVegetationInner.from_json(json) +# print the JSON string representation of the object +print(PostPoultryRequestVegetationInner.to_json()) + +# convert the object into a dict +post_poultry_request_vegetation_inner_dict = post_poultry_request_vegetation_inner_instance.to_dict() +# create an instance of PostPoultryRequestVegetationInner from a dict +post_poultry_request_vegetation_inner_from_dict = PostPoultryRequestVegetationInner.from_dict(post_poultry_request_vegetation_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostProcessing200Response.md b/examples/python-api-client/api-client/docs/PostProcessing200Response.md new file mode 100644 index 00000000..e58a6bb5 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostProcessing200Response.md @@ -0,0 +1,37 @@ +# PostProcessing200Response + +Emissions calculation output for the `processing` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostProcessing200ResponseScope1**](PostProcessing200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostProcessing200ResponseScope3**](PostProcessing200ResponseScope3.md) | | +**purchased_offsets** | [**PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | +**net** | [**PostProcessing200ResponseNet**](PostProcessing200ResponseNet.md) | | +**intensities** | [**List[PostProcessing200ResponseIntensitiesInner]**](PostProcessing200ResponseIntensitiesInner.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**List[PostProcessing200ResponseIntermediateInner]**](PostProcessing200ResponseIntermediateInner.md) | | + +## Example + +```python +from openapi_client.models.post_processing200_response import PostProcessing200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostProcessing200Response from a JSON string +post_processing200_response_instance = PostProcessing200Response.from_json(json) +# print the JSON string representation of the object +print(PostProcessing200Response.to_json()) + +# convert the object into a dict +post_processing200_response_dict = post_processing200_response_instance.to_dict() +# create an instance of PostProcessing200Response from a dict +post_processing200_response_from_dict = PostProcessing200Response.from_dict(post_processing200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostProcessing200ResponseIntensitiesInner.md b/examples/python-api-client/api-client/docs/PostProcessing200ResponseIntensitiesInner.md new file mode 100644 index 00000000..771dacd3 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostProcessing200ResponseIntensitiesInner.md @@ -0,0 +1,32 @@ +# PostProcessing200ResponseIntensitiesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units_produced** | **float** | Number of processed product units produced | +**unit_of_product** | **str** | Unit type of the product being produced (used by \"unitsProduced\") | +**processing_excluding_carbon_offsets** | **float** | Processing emissions intensity excluding carbon offsets, in kg-CO2e/number of units produced | +**processing_including_carbon_offsets** | **float** | Processing emissions intensity including carbon offsets, in kg-CO2e/number of units produced | + +## Example + +```python +from openapi_client.models.post_processing200_response_intensities_inner import PostProcessing200ResponseIntensitiesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostProcessing200ResponseIntensitiesInner from a JSON string +post_processing200_response_intensities_inner_instance = PostProcessing200ResponseIntensitiesInner.from_json(json) +# print the JSON string representation of the object +print(PostProcessing200ResponseIntensitiesInner.to_json()) + +# convert the object into a dict +post_processing200_response_intensities_inner_dict = post_processing200_response_intensities_inner_instance.to_dict() +# create an instance of PostProcessing200ResponseIntensitiesInner from a dict +post_processing200_response_intensities_inner_from_dict = PostProcessing200ResponseIntensitiesInner.from_dict(post_processing200_response_intensities_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostProcessing200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostProcessing200ResponseIntermediateInner.md new file mode 100644 index 00000000..7eda03b6 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostProcessing200ResponseIntermediateInner.md @@ -0,0 +1,35 @@ +# PostProcessing200ResponseIntermediateInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostProcessing200ResponseScope1**](PostProcessing200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostProcessing200ResponseScope3**](PostProcessing200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | +**intensities** | [**PostProcessing200ResponseIntensitiesInner**](PostProcessing200ResponseIntensitiesInner.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +## Example + +```python +from openapi_client.models.post_processing200_response_intermediate_inner import PostProcessing200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostProcessing200ResponseIntermediateInner from a JSON string +post_processing200_response_intermediate_inner_instance = PostProcessing200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostProcessing200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_processing200_response_intermediate_inner_dict = post_processing200_response_intermediate_inner_instance.to_dict() +# create an instance of PostProcessing200ResponseIntermediateInner from a dict +post_processing200_response_intermediate_inner_from_dict = PostProcessing200ResponseIntermediateInner.from_dict(post_processing200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostProcessing200ResponseNet.md b/examples/python-api-client/api-client/docs/PostProcessing200ResponseNet.md new file mode 100644 index 00000000..4ab343d7 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostProcessing200ResponseNet.md @@ -0,0 +1,30 @@ +# PostProcessing200ResponseNet + +Net emissions for the processing activity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | + +## Example + +```python +from openapi_client.models.post_processing200_response_net import PostProcessing200ResponseNet + +# TODO update the JSON string below +json = "{}" +# create an instance of PostProcessing200ResponseNet from a JSON string +post_processing200_response_net_instance = PostProcessing200ResponseNet.from_json(json) +# print the JSON string representation of the object +print(PostProcessing200ResponseNet.to_json()) + +# convert the object into a dict +post_processing200_response_net_dict = post_processing200_response_net_instance.to_dict() +# create an instance of PostProcessing200ResponseNet from a dict +post_processing200_response_net_from_dict = PostProcessing200ResponseNet.from_dict(post_processing200_response_net_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostProcessing200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostProcessing200ResponseScope1.md new file mode 100644 index 00000000..3eb65000 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostProcessing200ResponseScope1.md @@ -0,0 +1,41 @@ +# PostProcessing200ResponseScope1 + +Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | +**purchased_co2** | **float** | Emissions from purchased CO2, in tonnes-CO2e | +**wastewater_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | +**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_processing200_response_scope1 import PostProcessing200ResponseScope1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostProcessing200ResponseScope1 from a JSON string +post_processing200_response_scope1_instance = PostProcessing200ResponseScope1.from_json(json) +# print the JSON string representation of the object +print(PostProcessing200ResponseScope1.to_json()) + +# convert the object into a dict +post_processing200_response_scope1_dict = post_processing200_response_scope1_instance.to_dict() +# create an instance of PostProcessing200ResponseScope1 from a dict +post_processing200_response_scope1_from_dict = PostProcessing200ResponseScope1.from_dict(post_processing200_response_scope1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostProcessing200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostProcessing200ResponseScope3.md new file mode 100644 index 00000000..d4c747e2 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostProcessing200ResponseScope3.md @@ -0,0 +1,33 @@ +# PostProcessing200ResponseScope3 + +Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**solid_waste_sent_offsite** | **float** | Emissions from solid waste sent offsite, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_processing200_response_scope3 import PostProcessing200ResponseScope3 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostProcessing200ResponseScope3 from a JSON string +post_processing200_response_scope3_instance = PostProcessing200ResponseScope3.from_json(json) +# print the JSON string representation of the object +print(PostProcessing200ResponseScope3.to_json()) + +# convert the object into a dict +post_processing200_response_scope3_dict = post_processing200_response_scope3_instance.to_dict() +# create an instance of PostProcessing200ResponseScope3 from a dict +post_processing200_response_scope3_from_dict = PostProcessing200ResponseScope3.from_dict(post_processing200_response_scope3_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostProcessingRequest.md b/examples/python-api-client/api-client/docs/PostProcessingRequest.md new file mode 100644 index 00000000..9190ecc9 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostProcessingRequest.md @@ -0,0 +1,31 @@ +# PostProcessingRequest + +Input data required for the `processing` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**products** | [**List[PostProcessingRequestProductsInner]**](PostProcessingRequestProductsInner.md) | | + +## Example + +```python +from openapi_client.models.post_processing_request import PostProcessingRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostProcessingRequest from a JSON string +post_processing_request_instance = PostProcessingRequest.from_json(json) +# print the JSON string representation of the object +print(PostProcessingRequest.to_json()) + +# convert the object into a dict +post_processing_request_dict = post_processing_request_instance.to_dict() +# create an instance of PostProcessingRequest from a dict +post_processing_request_from_dict = PostProcessingRequest.from_dict(post_processing_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostProcessingRequestProductsInner.md b/examples/python-api-client/api-client/docs/PostProcessingRequestProductsInner.md new file mode 100644 index 00000000..c070d6c9 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostProcessingRequestProductsInner.md @@ -0,0 +1,40 @@ +# PostProcessingRequestProductsInner + +Input data required for processing a specific product + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**product** | [**PostProcessingRequestProductsInnerProduct**](PostProcessingRequestProductsInnerProduct.md) | | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**electricity_source** | **str** | Source of electricity | +**fuel** | [**PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | +**refrigerants** | [**List[PostHorticultureRequestCropsInnerRefrigerantsInner]**](PostHorticultureRequestCropsInnerRefrigerantsInner.md) | Refrigerant type | +**fluid_waste** | [**List[PostAquacultureRequestEnterprisesInnerFluidWasteInner]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | +**solid_waste** | [**PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | +**purchased_co2** | **float** | Quantity of CO2 purchased, in kg CO2 | +**carbon_offsets** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | [optional] + +## Example + +```python +from openapi_client.models.post_processing_request_products_inner import PostProcessingRequestProductsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostProcessingRequestProductsInner from a JSON string +post_processing_request_products_inner_instance = PostProcessingRequestProductsInner.from_json(json) +# print the JSON string representation of the object +print(PostProcessingRequestProductsInner.to_json()) + +# convert the object into a dict +post_processing_request_products_inner_dict = post_processing_request_products_inner_instance.to_dict() +# create an instance of PostProcessingRequestProductsInner from a dict +post_processing_request_products_inner_from_dict = PostProcessingRequestProductsInner.from_dict(post_processing_request_products_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostProcessingRequestProductsInnerProduct.md b/examples/python-api-client/api-client/docs/PostProcessingRequestProductsInnerProduct.md new file mode 100644 index 00000000..892df028 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostProcessingRequestProductsInnerProduct.md @@ -0,0 +1,31 @@ +# PostProcessingRequestProductsInnerProduct + +Product being processed + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit** | **str** | | +**amount_made_per_year** | **float** | | + +## Example + +```python +from openapi_client.models.post_processing_request_products_inner_product import PostProcessingRequestProductsInnerProduct + +# TODO update the JSON string below +json = "{}" +# create an instance of PostProcessingRequestProductsInnerProduct from a JSON string +post_processing_request_products_inner_product_instance = PostProcessingRequestProductsInnerProduct.from_json(json) +# print the JSON string representation of the object +print(PostProcessingRequestProductsInnerProduct.to_json()) + +# convert the object into a dict +post_processing_request_products_inner_product_dict = post_processing_request_products_inner_product_instance.to_dict() +# create an instance of PostProcessingRequestProductsInnerProduct from a dict +post_processing_request_products_inner_product_from_dict = PostProcessingRequestProductsInnerProduct.from_dict(post_processing_request_products_inner_product_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostRice200Response.md b/examples/python-api-client/api-client/docs/PostRice200Response.md new file mode 100644 index 00000000..77fe2758 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostRice200Response.md @@ -0,0 +1,36 @@ +# PostRice200Response + +Emissions calculation output for the `rice` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostRice200ResponseScope1**](PostRice200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**List[PostRice200ResponseIntermediateInner]**](PostRice200ResponseIntermediateInner.md) | | +**net** | [**PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | +**intensities** | [**PostRice200ResponseIntensities**](PostRice200ResponseIntensities.md) | | + +## Example + +```python +from openapi_client.models.post_rice200_response import PostRice200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostRice200Response from a JSON string +post_rice200_response_instance = PostRice200Response.from_json(json) +# print the JSON string representation of the object +print(PostRice200Response.to_json()) + +# convert the object into a dict +post_rice200_response_dict = post_rice200_response_instance.to_dict() +# create an instance of PostRice200Response from a dict +post_rice200_response_from_dict = PostRice200Response.from_dict(post_rice200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostRice200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostRice200ResponseIntensities.md new file mode 100644 index 00000000..838afea3 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostRice200ResponseIntensities.md @@ -0,0 +1,33 @@ +# PostRice200ResponseIntensities + +Emissions intensities for the crop + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rice_produced_tonnes** | **float** | Rice produced in tonnes | +**rice_excluding_sequestration** | **float** | Rice excluding sequestration, in t-CO2e/t rice | +**rice_including_sequestration** | **float** | Rice including sequestration, in t-CO2e/t rice | +**intensity** | **float** | Emissions intensity of rice production. Deprecation note: Use `riceIncludingSequestration` instead | + +## Example + +```python +from openapi_client.models.post_rice200_response_intensities import PostRice200ResponseIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostRice200ResponseIntensities from a JSON string +post_rice200_response_intensities_instance = PostRice200ResponseIntensities.from_json(json) +# print the JSON string representation of the object +print(PostRice200ResponseIntensities.to_json()) + +# convert the object into a dict +post_rice200_response_intensities_dict = post_rice200_response_intensities_instance.to_dict() +# create an instance of PostRice200ResponseIntensities from a dict +post_rice200_response_intensities_from_dict = PostRice200ResponseIntensities.from_dict(post_rice200_response_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInner.md new file mode 100644 index 00000000..1eb1efd9 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInner.md @@ -0,0 +1,36 @@ +# PostRice200ResponseIntermediateInner + +Intermediate emissions calculation output for the Rice calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostRice200ResponseScope1**](PostRice200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**intensities** | [**PostRice200ResponseIntermediateInnerIntensities**](PostRice200ResponseIntermediateInnerIntensities.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +## Example + +```python +from openapi_client.models.post_rice200_response_intermediate_inner import PostRice200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostRice200ResponseIntermediateInner from a JSON string +post_rice200_response_intermediate_inner_instance = PostRice200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostRice200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_rice200_response_intermediate_inner_dict = post_rice200_response_intermediate_inner_instance.to_dict() +# create an instance of PostRice200ResponseIntermediateInner from a dict +post_rice200_response_intermediate_inner_from_dict = PostRice200ResponseIntermediateInner.from_dict(post_rice200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..19531406 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,32 @@ +# PostRice200ResponseIntermediateInnerIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rice_produced_tonnes** | **float** | Rice produced in tonnes | +**rice_excluding_sequestration** | **float** | Rice excluding sequestration, in t-CO2e/t rice | +**rice_including_sequestration** | **float** | Rice including sequestration, in t-CO2e/t rice | +**intensity** | **float** | Emissions intensity of rice production. Deprecation note: Use `riceIncludingSequestration` instead | + +## Example + +```python +from openapi_client.models.post_rice200_response_intermediate_inner_intensities import PostRice200ResponseIntermediateInnerIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostRice200ResponseIntermediateInnerIntensities from a JSON string +post_rice200_response_intermediate_inner_intensities_instance = PostRice200ResponseIntermediateInnerIntensities.from_json(json) +# print the JSON string representation of the object +print(PostRice200ResponseIntermediateInnerIntensities.to_json()) + +# convert the object into a dict +post_rice200_response_intermediate_inner_intensities_dict = post_rice200_response_intermediate_inner_intensities_instance.to_dict() +# create an instance of PostRice200ResponseIntermediateInnerIntensities from a dict +post_rice200_response_intermediate_inner_intensities_from_dict = PostRice200ResponseIntermediateInnerIntensities.from_dict(post_rice200_response_intermediate_inner_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostRice200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostRice200ResponseScope1.md new file mode 100644 index 00000000..73152e2b --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostRice200ResponseScope1.md @@ -0,0 +1,45 @@ +# PostRice200ResponseScope1 + +Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**field_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | +**rice_cultivation_ch4** | **float** | CH4 emissions from rice cultivation, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**field_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | +**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_rice200_response_scope1 import PostRice200ResponseScope1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostRice200ResponseScope1 from a JSON string +post_rice200_response_scope1_instance = PostRice200ResponseScope1.from_json(json) +# print the JSON string representation of the object +print(PostRice200ResponseScope1.to_json()) + +# convert the object into a dict +post_rice200_response_scope1_dict = post_rice200_response_scope1_instance.to_dict() +# create an instance of PostRice200ResponseScope1 from a dict +post_rice200_response_scope1_from_dict = PostRice200ResponseScope1.from_dict(post_rice200_response_scope1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostRiceRequest.md b/examples/python-api-client/api-client/docs/PostRiceRequest.md new file mode 100644 index 00000000..8d2a1591 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostRiceRequest.md @@ -0,0 +1,34 @@ +# PostRiceRequest + +Input data required for the `rice` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**crops** | [**List[PostRiceRequestCropsInner]**](PostRiceRequestCropsInner.md) | | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**vegetation** | [**List[PostCottonRequestVegetationInner]**](PostCottonRequestVegetationInner.md) | | + +## Example + +```python +from openapi_client.models.post_rice_request import PostRiceRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostRiceRequest from a JSON string +post_rice_request_instance = PostRiceRequest.from_json(json) +# print the JSON string representation of the object +print(PostRiceRequest.to_json()) + +# convert the object into a dict +post_rice_request_dict = post_rice_request_instance.to_dict() +# create an instance of PostRiceRequest from a dict +post_rice_request_from_dict = PostRiceRequest.from_dict(post_rice_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostRiceRequestCropsInner.md b/examples/python-api-client/api-client/docs/PostRiceRequestCropsInner.md new file mode 100644 index 00000000..75243e21 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostRiceRequestCropsInner.md @@ -0,0 +1,51 @@ +# PostRiceRequestCropsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**average_rice_yield** | **float** | Average rice yield, in t/ha (tonnes per hectare) | +**area_sown** | **float** | Area sown, in ha (hectares) | +**growing_season_days** | **float** | The length of the growing season for this crop, in days | +**water_regime_type** | **str** | | +**water_regime_sub_type** | **str** | | +**rice_preseason_flooding_period** | **str** | | +**urea_application** | **float** | Urea application, in kg Urea/ha (kilograms of urea per hectare) | +**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | +**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | +**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | +**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | +**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | +**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | +**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | +**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | +**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**diesel_use** | **float** | Diesel usage in L (litres) | +**petrol_use** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | + +## Example + +```python +from openapi_client.models.post_rice_request_crops_inner import PostRiceRequestCropsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostRiceRequestCropsInner from a JSON string +post_rice_request_crops_inner_instance = PostRiceRequestCropsInner.from_json(json) +# print the JSON string representation of the object +print(PostRiceRequestCropsInner.to_json()) + +# convert the object into a dict +post_rice_request_crops_inner_dict = post_rice_request_crops_inner_instance.to_dict() +# create an instance of PostRiceRequestCropsInner from a dict +post_rice_request_crops_inner_from_dict = PostRiceRequestCropsInner.from_dict(post_rice_request_crops_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheep200Response.md b/examples/python-api-client/api-client/docs/PostSheep200Response.md new file mode 100644 index 00000000..9835ffb1 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheep200Response.md @@ -0,0 +1,36 @@ +# PostSheep200Response + +Emissions calculation output for the `sheep` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**List[PostSheep200ResponseIntermediateInner]**](PostSheep200ResponseIntermediateInner.md) | | +**net** | [**PostSheep200ResponseNet**](PostSheep200ResponseNet.md) | | +**intensities** | [**PostSheep200ResponseIntermediateInnerIntensities**](PostSheep200ResponseIntermediateInnerIntensities.md) | | + +## Example + +```python +from openapi_client.models.post_sheep200_response import PostSheep200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheep200Response from a JSON string +post_sheep200_response_instance = PostSheep200Response.from_json(json) +# print the JSON string representation of the object +print(PostSheep200Response.to_json()) + +# convert the object into a dict +post_sheep200_response_dict = post_sheep200_response_instance.to_dict() +# create an instance of PostSheep200Response from a dict +post_sheep200_response_from_dict = PostSheep200Response.from_dict(post_sheep200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInner.md new file mode 100644 index 00000000..4d627702 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInner.md @@ -0,0 +1,35 @@ +# PostSheep200ResponseIntermediateInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**intensities** | [**PostSheep200ResponseIntermediateInnerIntensities**](PostSheep200ResponseIntermediateInnerIntensities.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +## Example + +```python +from openapi_client.models.post_sheep200_response_intermediate_inner import PostSheep200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheep200ResponseIntermediateInner from a JSON string +post_sheep200_response_intermediate_inner_instance = PostSheep200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostSheep200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_sheep200_response_intermediate_inner_dict = post_sheep200_response_intermediate_inner_instance.to_dict() +# create an instance of PostSheep200ResponseIntermediateInner from a dict +post_sheep200_response_intermediate_inner_from_dict = PostSheep200ResponseIntermediateInner.from_dict(post_sheep200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..f76f475b --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,34 @@ +# PostSheep200ResponseIntermediateInnerIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**wool_produced_kg** | **float** | Greasy wool produced in kg | +**sheep_meat_produced_kg** | **float** | Sheep meat produced in kg liveweight | +**wool_including_sequestration** | **float** | Wool production including carbon sequestration, in kg-CO2e/kg greasy | +**wool_excluding_sequestration** | **float** | Wool production excluding carbon sequestration, in kg-CO2e/kg greasy | +**sheep_meat_breeding_including_sequestration** | **float** | Sheep meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight | +**sheep_meat_breeding_excluding_sequestration** | **float** | Sheep meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight | + +## Example + +```python +from openapi_client.models.post_sheep200_response_intermediate_inner_intensities import PostSheep200ResponseIntermediateInnerIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheep200ResponseIntermediateInnerIntensities from a JSON string +post_sheep200_response_intermediate_inner_intensities_instance = PostSheep200ResponseIntermediateInnerIntensities.from_json(json) +# print the JSON string representation of the object +print(PostSheep200ResponseIntermediateInnerIntensities.to_json()) + +# convert the object into a dict +post_sheep200_response_intermediate_inner_intensities_dict = post_sheep200_response_intermediate_inner_intensities_instance.to_dict() +# create an instance of PostSheep200ResponseIntermediateInnerIntensities from a dict +post_sheep200_response_intermediate_inner_intensities_from_dict = PostSheep200ResponseIntermediateInnerIntensities.from_dict(post_sheep200_response_intermediate_inner_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheep200ResponseNet.md b/examples/python-api-client/api-client/docs/PostSheep200ResponseNet.md new file mode 100644 index 00000000..dd80a0ca --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheep200ResponseNet.md @@ -0,0 +1,30 @@ +# PostSheep200ResponseNet + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | +**sheep** | **float** | Net emissions of sheep, in tonnes-CO2e/year | + +## Example + +```python +from openapi_client.models.post_sheep200_response_net import PostSheep200ResponseNet + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheep200ResponseNet from a JSON string +post_sheep200_response_net_instance = PostSheep200ResponseNet.from_json(json) +# print the JSON string representation of the object +print(PostSheep200ResponseNet.to_json()) + +# convert the object into a dict +post_sheep200_response_net_dict = post_sheep200_response_net_instance.to_dict() +# create an instance of PostSheep200ResponseNet from a dict +post_sheep200_response_net_from_dict = PostSheep200ResponseNet.from_dict(post_sheep200_response_net_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepRequest.md b/examples/python-api-client/api-client/docs/PostSheepRequest.md new file mode 100644 index 00000000..85af29ca --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepRequest.md @@ -0,0 +1,34 @@ +# PostSheepRequest + +Input data required for the `sheep` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**sheep** | [**List[PostSheepRequestSheepInner]**](PostSheepRequestSheepInner.md) | | +**vegetation** | [**List[PostSheepRequestVegetationInner]**](PostSheepRequestVegetationInner.md) | | + +## Example + +```python +from openapi_client.models.post_sheep_request import PostSheepRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepRequest from a JSON string +post_sheep_request_instance = PostSheepRequest.from_json(json) +# print the JSON string representation of the object +print(PostSheepRequest.to_json()) + +# convert the object into a dict +post_sheep_request_dict = post_sheep_request_instance.to_dict() +# create an instance of PostSheepRequest from a dict +post_sheep_request_from_dict = PostSheepRequest.from_dict(post_sheep_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInner.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInner.md new file mode 100644 index 00000000..cef9205a --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInner.md @@ -0,0 +1,47 @@ +# PostSheepRequestSheepInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**classes** | [**PostSheepRequestSheepInnerClasses**](PostSheepRequestSheepInnerClasses.md) | | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**mineral_supplementation** | [**PostBeefRequestBeefInnerMineralSupplementation**](PostBeefRequestBeefInnerMineralSupplementation.md) | | +**electricity_source** | **str** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | +**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**merino_percent** | **float** | Percent of sheep purchases that are of type Merino, from 0 to 100 | +**ewes_lambing** | [**PostSheepRequestSheepInnerEwesLambing**](PostSheepRequestSheepInnerEwesLambing.md) | | +**seasonal_lambing** | [**PostSheepRequestSheepInnerSeasonalLambing**](PostSheepRequestSheepInnerSeasonalLambing.md) | | + +## Example + +```python +from openapi_client.models.post_sheep_request_sheep_inner import PostSheepRequestSheepInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepRequestSheepInner from a JSON string +post_sheep_request_sheep_inner_instance = PostSheepRequestSheepInner.from_json(json) +# print the JSON string representation of the object +print(PostSheepRequestSheepInner.to_json()) + +# convert the object into a dict +post_sheep_request_sheep_inner_dict = post_sheep_request_sheep_inner_instance.to_dict() +# create an instance of PostSheepRequestSheepInner from a dict +post_sheep_request_sheep_inner_from_dict = PostSheepRequestSheepInner.from_dict(post_sheep_request_sheep_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClasses.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClasses.md new file mode 100644 index 00000000..e06cd728 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClasses.md @@ -0,0 +1,44 @@ +# PostSheepRequestSheepInnerClasses + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rams** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**trade_rams** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**wethers** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**trade_wethers** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**maiden_breeding_ewes** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**trade_maiden_breeding_ewes** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**breeding_ewes** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | +**trade_breeding_ewes** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**other_ewes** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**trade_other_ewes** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**ewe_lambs** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | +**trade_ewe_lambs** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**wether_lambs** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | +**trade_wether_lambs** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**trade_ewes** | [**PostSheepRequestSheepInnerClassesTradeEwes**](PostSheepRequestSheepInnerClassesTradeEwes.md) | | [optional] +**trade_lambs_and_hoggets** | [**PostSheepRequestSheepInnerClassesTradeLambsAndHoggets**](PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_sheep_request_sheep_inner_classes import PostSheepRequestSheepInnerClasses + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepRequestSheepInnerClasses from a JSON string +post_sheep_request_sheep_inner_classes_instance = PostSheepRequestSheepInnerClasses.from_json(json) +# print the JSON string representation of the object +print(PostSheepRequestSheepInnerClasses.to_json()) + +# convert the object into a dict +post_sheep_request_sheep_inner_classes_dict = post_sheep_request_sheep_inner_classes_instance.to_dict() +# create an instance of PostSheepRequestSheepInnerClasses from a dict +post_sheep_request_sheep_inner_classes_from_dict = PostSheepRequestSheepInnerClasses.from_dict(post_sheep_request_sheep_inner_classes_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRams.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRams.md new file mode 100644 index 00000000..36ad7170 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRams.md @@ -0,0 +1,40 @@ +# PostSheepRequestSheepInnerClassesRams + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**winter** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**spring** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**summer** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**head_shorn** | **float** | Number of sheep shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_sheep_request_sheep_inner_classes_rams import PostSheepRequestSheepInnerClassesRams + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepRequestSheepInnerClassesRams from a JSON string +post_sheep_request_sheep_inner_classes_rams_instance = PostSheepRequestSheepInnerClassesRams.from_json(json) +# print the JSON string representation of the object +print(PostSheepRequestSheepInnerClassesRams.to_json()) + +# convert the object into a dict +post_sheep_request_sheep_inner_classes_rams_dict = post_sheep_request_sheep_inner_classes_rams_instance.to_dict() +# create an instance of PostSheepRequestSheepInnerClassesRams from a dict +post_sheep_request_sheep_inner_classes_rams_from_dict = PostSheepRequestSheepInnerClassesRams.from_dict(post_sheep_request_sheep_inner_classes_rams_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRamsAutumn.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRamsAutumn.md new file mode 100644 index 00000000..2483edbf --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRamsAutumn.md @@ -0,0 +1,34 @@ +# PostSheepRequestSheepInnerClassesRamsAutumn + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals (head) | +**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | +**liveweight_gain** | **float** | Average liveweight gain in kg/day (kilogram per day) | +**crude_protein** | **float** | Crude protein percent, between 0 and 100 | [optional] +**dry_matter_digestibility** | **float** | Dry matter digestibility percent, between 0 and 100 | [optional] +**feed_availability** | **float** | Feed availability, in t/ha (tonnes per hectare) | [optional] + +## Example + +```python +from openapi_client.models.post_sheep_request_sheep_inner_classes_rams_autumn import PostSheepRequestSheepInnerClassesRamsAutumn + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepRequestSheepInnerClassesRamsAutumn from a JSON string +post_sheep_request_sheep_inner_classes_rams_autumn_instance = PostSheepRequestSheepInnerClassesRamsAutumn.from_json(json) +# print the JSON string representation of the object +print(PostSheepRequestSheepInnerClassesRamsAutumn.to_json()) + +# convert the object into a dict +post_sheep_request_sheep_inner_classes_rams_autumn_dict = post_sheep_request_sheep_inner_classes_rams_autumn_instance.to_dict() +# create an instance of PostSheepRequestSheepInnerClassesRamsAutumn from a dict +post_sheep_request_sheep_inner_classes_rams_autumn_from_dict = PostSheepRequestSheepInnerClassesRamsAutumn.from_dict(post_sheep_request_sheep_inner_classes_rams_autumn_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeEwes.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeEwes.md new file mode 100644 index 00000000..55865d8b --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeEwes.md @@ -0,0 +1,41 @@ +# PostSheepRequestSheepInnerClassesTradeEwes + +Trading ewes. Deprecation note: More specific trading classes are now available + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**winter** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**spring** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**summer** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**head_shorn** | **float** | Number of sheep shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_sheep_request_sheep_inner_classes_trade_ewes import PostSheepRequestSheepInnerClassesTradeEwes + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepRequestSheepInnerClassesTradeEwes from a JSON string +post_sheep_request_sheep_inner_classes_trade_ewes_instance = PostSheepRequestSheepInnerClassesTradeEwes.from_json(json) +# print the JSON string representation of the object +print(PostSheepRequestSheepInnerClassesTradeEwes.to_json()) + +# convert the object into a dict +post_sheep_request_sheep_inner_classes_trade_ewes_dict = post_sheep_request_sheep_inner_classes_trade_ewes_instance.to_dict() +# create an instance of PostSheepRequestSheepInnerClassesTradeEwes from a dict +post_sheep_request_sheep_inner_classes_trade_ewes_from_dict = PostSheepRequestSheepInnerClassesTradeEwes.from_dict(post_sheep_request_sheep_inner_classes_trade_ewes_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md new file mode 100644 index 00000000..a59a6d46 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md @@ -0,0 +1,41 @@ +# PostSheepRequestSheepInnerClassesTradeLambsAndHoggets + +Trading lambs and hoggets. Deprecation note: More specific trading classes are now available + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**winter** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**spring** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**summer** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**head_shorn** | **float** | Number of sheep shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets import PostSheepRequestSheepInnerClassesTradeLambsAndHoggets + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepRequestSheepInnerClassesTradeLambsAndHoggets from a JSON string +post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets_instance = PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.from_json(json) +# print the JSON string representation of the object +print(PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.to_json()) + +# convert the object into a dict +post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets_dict = post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets_instance.to_dict() +# create an instance of PostSheepRequestSheepInnerClassesTradeLambsAndHoggets from a dict +post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets_from_dict = PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.from_dict(post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerEwesLambing.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerEwesLambing.md new file mode 100644 index 00000000..c13e6d07 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerEwesLambing.md @@ -0,0 +1,33 @@ +# PostSheepRequestSheepInnerEwesLambing + +The proportion of ewes lambing in each season, as a value from 0 to 1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | | +**winter** | **float** | | +**spring** | **float** | | +**summer** | **float** | | + +## Example + +```python +from openapi_client.models.post_sheep_request_sheep_inner_ewes_lambing import PostSheepRequestSheepInnerEwesLambing + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepRequestSheepInnerEwesLambing from a JSON string +post_sheep_request_sheep_inner_ewes_lambing_instance = PostSheepRequestSheepInnerEwesLambing.from_json(json) +# print the JSON string representation of the object +print(PostSheepRequestSheepInnerEwesLambing.to_json()) + +# convert the object into a dict +post_sheep_request_sheep_inner_ewes_lambing_dict = post_sheep_request_sheep_inner_ewes_lambing_instance.to_dict() +# create an instance of PostSheepRequestSheepInnerEwesLambing from a dict +post_sheep_request_sheep_inner_ewes_lambing_from_dict = PostSheepRequestSheepInnerEwesLambing.from_dict(post_sheep_request_sheep_inner_ewes_lambing_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerSeasonalLambing.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerSeasonalLambing.md new file mode 100644 index 00000000..4b698655 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerSeasonalLambing.md @@ -0,0 +1,33 @@ +# PostSheepRequestSheepInnerSeasonalLambing + +Seasonal lamb marking rates, i.e. the rate of lambs marked per ewe lambed. Values may exceed 1 if there are more lambs marked than ewes lambed in a season. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | | +**winter** | **float** | | +**spring** | **float** | | +**summer** | **float** | | + +## Example + +```python +from openapi_client.models.post_sheep_request_sheep_inner_seasonal_lambing import PostSheepRequestSheepInnerSeasonalLambing + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepRequestSheepInnerSeasonalLambing from a JSON string +post_sheep_request_sheep_inner_seasonal_lambing_instance = PostSheepRequestSheepInnerSeasonalLambing.from_json(json) +# print the JSON string representation of the object +print(PostSheepRequestSheepInnerSeasonalLambing.to_json()) + +# convert the object into a dict +post_sheep_request_sheep_inner_seasonal_lambing_dict = post_sheep_request_sheep_inner_seasonal_lambing_instance.to_dict() +# create an instance of PostSheepRequestSheepInnerSeasonalLambing from a dict +post_sheep_request_sheep_inner_seasonal_lambing_from_dict = PostSheepRequestSheepInnerSeasonalLambing.from_dict(post_sheep_request_sheep_inner_seasonal_lambing_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostSheepRequestVegetationInner.md new file mode 100644 index 00000000..87318d65 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepRequestVegetationInner.md @@ -0,0 +1,31 @@ +# PostSheepRequestVegetationInner + +Non-productive vegetation inputs along with allocations to sheep + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**sheep_proportion** | **List[float]** | The proportion of the sequestration that is allocated to sheep | + +## Example + +```python +from openapi_client.models.post_sheep_request_vegetation_inner import PostSheepRequestVegetationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepRequestVegetationInner from a JSON string +post_sheep_request_vegetation_inner_instance = PostSheepRequestVegetationInner.from_json(json) +# print the JSON string representation of the object +print(PostSheepRequestVegetationInner.to_json()) + +# convert the object into a dict +post_sheep_request_vegetation_inner_dict = post_sheep_request_vegetation_inner_instance.to_dict() +# create an instance of PostSheepRequestVegetationInner from a dict +post_sheep_request_vegetation_inner_from_dict = PostSheepRequestVegetationInner.from_dict(post_sheep_request_vegetation_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepbeef200Response.md b/examples/python-api-client/api-client/docs/PostSheepbeef200Response.md new file mode 100644 index 00000000..3d130cb4 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepbeef200Response.md @@ -0,0 +1,38 @@ +# PostSheepbeef200Response + +Emissions calculation output for the `sheepbeef` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**PostSheepbeef200ResponseIntermediate**](PostSheepbeef200ResponseIntermediate.md) | | +**intermediate_beef** | [**List[PostBeef200ResponseIntermediateInner]**](PostBeef200ResponseIntermediateInner.md) | | +**intermediate_sheep** | [**List[PostSheep200ResponseIntermediateInner]**](PostSheep200ResponseIntermediateInner.md) | | +**net** | [**PostSheepbeef200ResponseNet**](PostSheepbeef200ResponseNet.md) | | +**intensities** | [**PostSheepbeef200ResponseIntensities**](PostSheepbeef200ResponseIntensities.md) | | + +## Example + +```python +from openapi_client.models.post_sheepbeef200_response import PostSheepbeef200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepbeef200Response from a JSON string +post_sheepbeef200_response_instance = PostSheepbeef200Response.from_json(json) +# print the JSON string representation of the object +print(PostSheepbeef200Response.to_json()) + +# convert the object into a dict +post_sheepbeef200_response_dict = post_sheepbeef200_response_instance.to_dict() +# create an instance of PostSheepbeef200Response from a dict +post_sheepbeef200_response_from_dict = PostSheepbeef200Response.from_dict(post_sheepbeef200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntensities.md new file mode 100644 index 00000000..40c7b293 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntensities.md @@ -0,0 +1,37 @@ +# PostSheepbeef200ResponseIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**beef_including_sequestration** | **float** | Beef including carbon sequestration, in kg-CO2e/kg liveweight | +**beef_excluding_sequestration** | **float** | Beef excluding carbon sequestration, in kg-CO2e/kg liveweight | +**liveweight_beef_produced_kg** | **float** | Liveweight produced in kg | +**wool_including_sequestration** | **float** | Wool production including carbon sequestration, in kg-CO2e/kg greasy | +**wool_excluding_sequestration** | **float** | Wool production excluding carbon sequestration, in kg-CO2e/kg greasy | +**sheep_meat_breeding_including_sequestration** | **float** | Sheep meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight | +**sheep_meat_breeding_excluding_sequestration** | **float** | Sheep meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight | +**wool_produced_kg** | **float** | Greasy wool produced in kg | +**sheep_meat_produced_kg** | **float** | Sheep meat produced in kg liveweight | + +## Example + +```python +from openapi_client.models.post_sheepbeef200_response_intensities import PostSheepbeef200ResponseIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepbeef200ResponseIntensities from a JSON string +post_sheepbeef200_response_intensities_instance = PostSheepbeef200ResponseIntensities.from_json(json) +# print the JSON string representation of the object +print(PostSheepbeef200ResponseIntensities.to_json()) + +# convert the object into a dict +post_sheepbeef200_response_intensities_dict = post_sheepbeef200_response_intensities_instance.to_dict() +# create an instance of PostSheepbeef200ResponseIntensities from a dict +post_sheepbeef200_response_intensities_from_dict = PostSheepbeef200ResponseIntensities.from_dict(post_sheepbeef200_response_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediate.md b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediate.md new file mode 100644 index 00000000..a2c72dc4 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediate.md @@ -0,0 +1,31 @@ +# PostSheepbeef200ResponseIntermediate + +Intermediate emission output breakdown just for sheep and beef livestock. These combine to make up the total emission output for each scope + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**beef** | [**PostSheepbeef200ResponseIntermediateBeef**](PostSheepbeef200ResponseIntermediateBeef.md) | | +**sheep** | [**PostSheepbeef200ResponseIntermediateSheep**](PostSheepbeef200ResponseIntermediateSheep.md) | | + +## Example + +```python +from openapi_client.models.post_sheepbeef200_response_intermediate import PostSheepbeef200ResponseIntermediate + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepbeef200ResponseIntermediate from a JSON string +post_sheepbeef200_response_intermediate_instance = PostSheepbeef200ResponseIntermediate.from_json(json) +# print the JSON string representation of the object +print(PostSheepbeef200ResponseIntermediate.to_json()) + +# convert the object into a dict +post_sheepbeef200_response_intermediate_dict = post_sheepbeef200_response_intermediate_instance.to_dict() +# create an instance of PostSheepbeef200ResponseIntermediate from a dict +post_sheepbeef200_response_intermediate_from_dict = PostSheepbeef200ResponseIntermediate.from_dict(post_sheepbeef200_response_intermediate_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateBeef.md b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateBeef.md new file mode 100644 index 00000000..9ba3d83e --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateBeef.md @@ -0,0 +1,35 @@ +# PostSheepbeef200ResponseIntermediateBeef + +Emission output breakdown just for beef livestock + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**intensities** | [**PostBeef200ResponseIntermediateInnerIntensities**](PostBeef200ResponseIntermediateInnerIntensities.md) | | + +## Example + +```python +from openapi_client.models.post_sheepbeef200_response_intermediate_beef import PostSheepbeef200ResponseIntermediateBeef + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepbeef200ResponseIntermediateBeef from a JSON string +post_sheepbeef200_response_intermediate_beef_instance = PostSheepbeef200ResponseIntermediateBeef.from_json(json) +# print the JSON string representation of the object +print(PostSheepbeef200ResponseIntermediateBeef.to_json()) + +# convert the object into a dict +post_sheepbeef200_response_intermediate_beef_dict = post_sheepbeef200_response_intermediate_beef_instance.to_dict() +# create an instance of PostSheepbeef200ResponseIntermediateBeef from a dict +post_sheepbeef200_response_intermediate_beef_from_dict = PostSheepbeef200ResponseIntermediateBeef.from_dict(post_sheepbeef200_response_intermediate_beef_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateSheep.md b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateSheep.md new file mode 100644 index 00000000..aafe1d39 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateSheep.md @@ -0,0 +1,35 @@ +# PostSheepbeef200ResponseIntermediateSheep + +Emission output breakdown just for sheep livestock + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**intensities** | [**PostSheep200ResponseIntermediateInnerIntensities**](PostSheep200ResponseIntermediateInnerIntensities.md) | | + +## Example + +```python +from openapi_client.models.post_sheepbeef200_response_intermediate_sheep import PostSheepbeef200ResponseIntermediateSheep + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepbeef200ResponseIntermediateSheep from a JSON string +post_sheepbeef200_response_intermediate_sheep_instance = PostSheepbeef200ResponseIntermediateSheep.from_json(json) +# print the JSON string representation of the object +print(PostSheepbeef200ResponseIntermediateSheep.to_json()) + +# convert the object into a dict +post_sheepbeef200_response_intermediate_sheep_dict = post_sheepbeef200_response_intermediate_sheep_instance.to_dict() +# create an instance of PostSheepbeef200ResponseIntermediateSheep from a dict +post_sheepbeef200_response_intermediate_sheep_from_dict = PostSheepbeef200ResponseIntermediateSheep.from_dict(post_sheepbeef200_response_intermediate_sheep_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseNet.md b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseNet.md new file mode 100644 index 00000000..e04dcf42 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseNet.md @@ -0,0 +1,31 @@ +# PostSheepbeef200ResponseNet + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | +**beef** | **float** | Net emissions of beef, in tonnes-CO2e/year | +**sheep** | **float** | Net emissions of sheep, in tonnes-CO2e/year | + +## Example + +```python +from openapi_client.models.post_sheepbeef200_response_net import PostSheepbeef200ResponseNet + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepbeef200ResponseNet from a JSON string +post_sheepbeef200_response_net_instance = PostSheepbeef200ResponseNet.from_json(json) +# print the JSON string representation of the object +print(PostSheepbeef200ResponseNet.to_json()) + +# convert the object into a dict +post_sheepbeef200_response_net_dict = post_sheepbeef200_response_net_instance.to_dict() +# create an instance of PostSheepbeef200ResponseNet from a dict +post_sheepbeef200_response_net_from_dict = PostSheepbeef200ResponseNet.from_dict(post_sheepbeef200_response_net_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepbeefRequest.md b/examples/python-api-client/api-client/docs/PostSheepbeefRequest.md new file mode 100644 index 00000000..7be7034a --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepbeefRequest.md @@ -0,0 +1,36 @@ +# PostSheepbeefRequest + +Input data required for the `sheepbeef` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**beef** | [**List[PostBeefRequestBeefInner]**](PostBeefRequestBeefInner.md) | | +**sheep** | [**List[PostSheepRequestSheepInner]**](PostSheepRequestSheepInner.md) | | +**burning** | [**List[PostBeefRequestBurningInnerBurning]**](PostBeefRequestBurningInnerBurning.md) | | +**vegetation** | [**List[PostSheepbeefRequestVegetationInner]**](PostSheepbeefRequestVegetationInner.md) | | [default to []] + +## Example + +```python +from openapi_client.models.post_sheepbeef_request import PostSheepbeefRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepbeefRequest from a JSON string +post_sheepbeef_request_instance = PostSheepbeefRequest.from_json(json) +# print the JSON string representation of the object +print(PostSheepbeefRequest.to_json()) + +# convert the object into a dict +post_sheepbeef_request_dict = post_sheepbeef_request_instance.to_dict() +# create an instance of PostSheepbeefRequest from a dict +post_sheepbeef_request_from_dict = PostSheepbeefRequest.from_dict(post_sheepbeef_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSheepbeefRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostSheepbeefRequestVegetationInner.md new file mode 100644 index 00000000..ef5d8e27 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSheepbeefRequestVegetationInner.md @@ -0,0 +1,32 @@ +# PostSheepbeefRequestVegetationInner + +Non-productive vegetation inputs along with allocations to sheep and beef + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**beef_proportion** | **List[float]** | The proportion of the sequestration that is allocated to beef | +**sheep_proportion** | **List[float]** | The proportion of the sequestration that is allocated to sheep | + +## Example + +```python +from openapi_client.models.post_sheepbeef_request_vegetation_inner import PostSheepbeefRequestVegetationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSheepbeefRequestVegetationInner from a JSON string +post_sheepbeef_request_vegetation_inner_instance = PostSheepbeefRequestVegetationInner.from_json(json) +# print the JSON string representation of the object +print(PostSheepbeefRequestVegetationInner.to_json()) + +# convert the object into a dict +post_sheepbeef_request_vegetation_inner_dict = post_sheepbeef_request_vegetation_inner_instance.to_dict() +# create an instance of PostSheepbeefRequestVegetationInner from a dict +post_sheepbeef_request_vegetation_inner_from_dict = PostSheepbeefRequestVegetationInner.from_dict(post_sheepbeef_request_vegetation_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSugar200Response.md b/examples/python-api-client/api-client/docs/PostSugar200Response.md new file mode 100644 index 00000000..393bf484 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSugar200Response.md @@ -0,0 +1,36 @@ +# PostSugar200Response + +Emissions calculation output for the `sugar` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**List[PostSugar200ResponseIntermediateInner]**](PostSugar200ResponseIntermediateInner.md) | | +**net** | [**PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | +**intensities** | [**List[PostSugar200ResponseIntermediateInnerIntensities]**](PostSugar200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each crop (in order), in t-CO2e/t crop | + +## Example + +```python +from openapi_client.models.post_sugar200_response import PostSugar200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSugar200Response from a JSON string +post_sugar200_response_instance = PostSugar200Response.from_json(json) +# print the JSON string representation of the object +print(PostSugar200Response.to_json()) + +# convert the object into a dict +post_sugar200_response_dict = post_sugar200_response_instance.to_dict() +# create an instance of PostSugar200Response from a dict +post_sugar200_response_from_dict = PostSugar200Response.from_dict(post_sugar200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInner.md new file mode 100644 index 00000000..26065cd7 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInner.md @@ -0,0 +1,36 @@ +# PostSugar200ResponseIntermediateInner + +Intermediate emissions calculation output for the Sugar calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**intensities** | [**PostSugar200ResponseIntermediateInnerIntensities**](PostSugar200ResponseIntermediateInnerIntensities.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +## Example + +```python +from openapi_client.models.post_sugar200_response_intermediate_inner import PostSugar200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSugar200ResponseIntermediateInner from a JSON string +post_sugar200_response_intermediate_inner_instance = PostSugar200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostSugar200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_sugar200_response_intermediate_inner_dict = post_sugar200_response_intermediate_inner_instance.to_dict() +# create an instance of PostSugar200ResponseIntermediateInner from a dict +post_sugar200_response_intermediate_inner_from_dict = PostSugar200ResponseIntermediateInner.from_dict(post_sugar200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..e8add89c --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,31 @@ +# PostSugar200ResponseIntermediateInnerIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sugar_excluding_sequestration** | **float** | Sugar emissions intensity excluding sequestration, in kg-CO2e/kg sugar | +**sugar_including_sequestration** | **float** | Sugar emissions intensity including sequestration, in kg-CO2e/kg sugar | +**sugar_produced_kg** | **float** | Sugar produced in kg | + +## Example + +```python +from openapi_client.models.post_sugar200_response_intermediate_inner_intensities import PostSugar200ResponseIntermediateInnerIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSugar200ResponseIntermediateInnerIntensities from a JSON string +post_sugar200_response_intermediate_inner_intensities_instance = PostSugar200ResponseIntermediateInnerIntensities.from_json(json) +# print the JSON string representation of the object +print(PostSugar200ResponseIntermediateInnerIntensities.to_json()) + +# convert the object into a dict +post_sugar200_response_intermediate_inner_intensities_dict = post_sugar200_response_intermediate_inner_intensities_instance.to_dict() +# create an instance of PostSugar200ResponseIntermediateInnerIntensities from a dict +post_sugar200_response_intermediate_inner_intensities_from_dict = PostSugar200ResponseIntermediateInnerIntensities.from_dict(post_sugar200_response_intermediate_inner_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSugarRequest.md b/examples/python-api-client/api-client/docs/PostSugarRequest.md new file mode 100644 index 00000000..9b849021 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSugarRequest.md @@ -0,0 +1,34 @@ +# PostSugarRequest + +Input data required for the `sugar` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**crops** | [**List[PostSugarRequestCropsInner]**](PostSugarRequestCropsInner.md) | | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**vegetation** | [**List[PostCottonRequestVegetationInner]**](PostCottonRequestVegetationInner.md) | | + +## Example + +```python +from openapi_client.models.post_sugar_request import PostSugarRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSugarRequest from a JSON string +post_sugar_request_instance = PostSugarRequest.from_json(json) +# print the JSON string representation of the object +print(PostSugarRequest.to_json()) + +# convert the object into a dict +post_sugar_request_dict = post_sugar_request_instance.to_dict() +# create an instance of PostSugarRequest from a dict +post_sugar_request_from_dict = PostSugarRequest.from_dict(post_sugar_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostSugarRequestCropsInner.md b/examples/python-api-client/api-client/docs/PostSugarRequestCropsInner.md new file mode 100644 index 00000000..8e38f627 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostSugarRequestCropsInner.md @@ -0,0 +1,50 @@ +# PostSugarRequestCropsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**production_system** | **str** | Production system of this crop | +**average_cane_yield** | **float** | Average cane/crop yield, in t/ha (tonnes per hectare) | +**percent_milled_cane_yield** | **float** | Percentage of cane yield that becomes milled sugar, from 0 to 1 | [optional] +**area_sown** | **float** | Area sown, in ha (hectares) | +**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | +**urea_application** | **float** | Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) | +**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | +**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | +**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | +**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | +**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | +**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | +**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | +**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | +**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**diesel_use** | **float** | Diesel usage in L (litres) | +**petrol_use** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | + +## Example + +```python +from openapi_client.models.post_sugar_request_crops_inner import PostSugarRequestCropsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostSugarRequestCropsInner from a JSON string +post_sugar_request_crops_inner_instance = PostSugarRequestCropsInner.from_json(json) +# print the JSON string representation of the object +print(PostSugarRequestCropsInner.to_json()) + +# convert the object into a dict +post_sugar_request_crops_inner_dict = post_sugar_request_crops_inner_instance.to_dict() +# create an instance of PostSugarRequestCropsInner from a dict +post_sugar_request_crops_inner_from_dict = PostSugarRequestCropsInner.from_dict(post_sugar_request_crops_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostVineyard200Response.md b/examples/python-api-client/api-client/docs/PostVineyard200Response.md new file mode 100644 index 00000000..5fa27c18 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostVineyard200Response.md @@ -0,0 +1,36 @@ +# PostVineyard200Response + +Emissions calculation output for the `vineyard` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostVineyard200ResponseScope1**](PostVineyard200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostVineyard200ResponseScope3**](PostVineyard200ResponseScope3.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**List[PostVineyard200ResponseIntermediateInner]**](PostVineyard200ResponseIntermediateInner.md) | | +**net** | [**PostVineyard200ResponseNet**](PostVineyard200ResponseNet.md) | | +**intensities** | [**List[PostVineyard200ResponseIntermediateInnerIntensities]**](PostVineyard200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each vineyard (in order), in t-CO2e/t yield | + +## Example + +```python +from openapi_client.models.post_vineyard200_response import PostVineyard200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostVineyard200Response from a JSON string +post_vineyard200_response_instance = PostVineyard200Response.from_json(json) +# print the JSON string representation of the object +print(PostVineyard200Response.to_json()) + +# convert the object into a dict +post_vineyard200_response_dict = post_vineyard200_response_instance.to_dict() +# create an instance of PostVineyard200Response from a dict +post_vineyard200_response_from_dict = PostVineyard200Response.from_dict(post_vineyard200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInner.md new file mode 100644 index 00000000..511e689c --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInner.md @@ -0,0 +1,36 @@ +# PostVineyard200ResponseIntermediateInner + +Intermediate emissions calculation output for the Vineyard calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostVineyard200ResponseScope1**](PostVineyard200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostVineyard200ResponseScope3**](PostVineyard200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**intensities** | [**PostVineyard200ResponseIntermediateInnerIntensities**](PostVineyard200ResponseIntermediateInnerIntensities.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +## Example + +```python +from openapi_client.models.post_vineyard200_response_intermediate_inner import PostVineyard200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostVineyard200ResponseIntermediateInner from a JSON string +post_vineyard200_response_intermediate_inner_instance = PostVineyard200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostVineyard200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_vineyard200_response_intermediate_inner_dict = post_vineyard200_response_intermediate_inner_instance.to_dict() +# create an instance of PostVineyard200ResponseIntermediateInner from a dict +post_vineyard200_response_intermediate_inner_from_dict = PostVineyard200ResponseIntermediateInner.from_dict(post_vineyard200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..9512fedc --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,31 @@ +# PostVineyard200ResponseIntermediateInnerIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vineyards_excluding_sequestration** | **float** | Vineyard emissions intensity excluding sequestration, in kg-CO2e/kg crop | +**vineyards_including_sequestration** | **float** | Vineyard emissions intensity including sequestration, in kg-CO2e/kg crop | +**crop_produced_kg** | **float** | Vineyard crop produced in kg | + +## Example + +```python +from openapi_client.models.post_vineyard200_response_intermediate_inner_intensities import PostVineyard200ResponseIntermediateInnerIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostVineyard200ResponseIntermediateInnerIntensities from a JSON string +post_vineyard200_response_intermediate_inner_intensities_instance = PostVineyard200ResponseIntermediateInnerIntensities.from_json(json) +# print the JSON string representation of the object +print(PostVineyard200ResponseIntermediateInnerIntensities.to_json()) + +# convert the object into a dict +post_vineyard200_response_intermediate_inner_intensities_dict = post_vineyard200_response_intermediate_inner_intensities_instance.to_dict() +# create an instance of PostVineyard200ResponseIntermediateInnerIntensities from a dict +post_vineyard200_response_intermediate_inner_intensities_from_dict = PostVineyard200ResponseIntermediateInnerIntensities.from_dict(post_vineyard200_response_intermediate_inner_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostVineyard200ResponseNet.md b/examples/python-api-client/api-client/docs/PostVineyard200ResponseNet.md new file mode 100644 index 00000000..6512748e --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostVineyard200ResponseNet.md @@ -0,0 +1,31 @@ +# PostVineyard200ResponseNet + +Net emissions for each vineyard (in order) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | +**vineyards** | **List[float]** | | + +## Example + +```python +from openapi_client.models.post_vineyard200_response_net import PostVineyard200ResponseNet + +# TODO update the JSON string below +json = "{}" +# create an instance of PostVineyard200ResponseNet from a JSON string +post_vineyard200_response_net_instance = PostVineyard200ResponseNet.from_json(json) +# print the JSON string representation of the object +print(PostVineyard200ResponseNet.to_json()) + +# convert the object into a dict +post_vineyard200_response_net_dict = post_vineyard200_response_net_instance.to_dict() +# create an instance of PostVineyard200ResponseNet from a dict +post_vineyard200_response_net_from_dict = PostVineyard200ResponseNet.from_dict(post_vineyard200_response_net_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostVineyard200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostVineyard200ResponseScope1.md new file mode 100644 index 00000000..21510d36 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostVineyard200ResponseScope1.md @@ -0,0 +1,44 @@ +# PostVineyard200ResponseScope1 + +Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**waste_water_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | +**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_vineyard200_response_scope1 import PostVineyard200ResponseScope1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostVineyard200ResponseScope1 from a JSON string +post_vineyard200_response_scope1_instance = PostVineyard200ResponseScope1.from_json(json) +# print the JSON string representation of the object +print(PostVineyard200ResponseScope1.to_json()) + +# convert the object into a dict +post_vineyard200_response_scope1_dict = post_vineyard200_response_scope1_instance.to_dict() +# create an instance of PostVineyard200ResponseScope1 from a dict +post_vineyard200_response_scope1_from_dict = PostVineyard200ResponseScope1.from_dict(post_vineyard200_response_scope1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostVineyard200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostVineyard200ResponseScope3.md new file mode 100644 index 00000000..b8bcc4c9 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostVineyard200ResponseScope3.md @@ -0,0 +1,39 @@ +# PostVineyard200ResponseScope3 + +Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**lime** | **float** | Emissions from lime, in tonnes-CO2e | +**commercial_flights** | **float** | Emissions from commercial flights, in tonnes-CO2e | +**inbound_freight** | **float** | Emissions from inbound freight, in tonnes-CO2e | +**solid_waste_sent_offsite** | **float** | Emissions from solid waste sent offsite, in tonnes-CO2e | +**outbound_freight** | **float** | Emissions from outbound freight, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_vineyard200_response_scope3 import PostVineyard200ResponseScope3 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostVineyard200ResponseScope3 from a JSON string +post_vineyard200_response_scope3_instance = PostVineyard200ResponseScope3.from_json(json) +# print the JSON string representation of the object +print(PostVineyard200ResponseScope3.to_json()) + +# convert the object into a dict +post_vineyard200_response_scope3_dict = post_vineyard200_response_scope3_instance.to_dict() +# create an instance of PostVineyard200ResponseScope3 from a dict +post_vineyard200_response_scope3_from_dict = PostVineyard200ResponseScope3.from_dict(post_vineyard200_response_scope3_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostVineyardRequest.md b/examples/python-api-client/api-client/docs/PostVineyardRequest.md new file mode 100644 index 00000000..d47bf2d4 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostVineyardRequest.md @@ -0,0 +1,31 @@ +# PostVineyardRequest + +Input data required for the `vineyard` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vineyards** | [**List[PostVineyardRequestVineyardsInner]**](PostVineyardRequestVineyardsInner.md) | | +**vegetation** | [**List[PostVineyardRequestVegetationInner]**](PostVineyardRequestVegetationInner.md) | | + +## Example + +```python +from openapi_client.models.post_vineyard_request import PostVineyardRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostVineyardRequest from a JSON string +post_vineyard_request_instance = PostVineyardRequest.from_json(json) +# print the JSON string representation of the object +print(PostVineyardRequest.to_json()) + +# convert the object into a dict +post_vineyard_request_dict = post_vineyard_request_instance.to_dict() +# create an instance of PostVineyardRequest from a dict +post_vineyard_request_from_dict = PostVineyardRequest.from_dict(post_vineyard_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostVineyardRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostVineyardRequestVegetationInner.md new file mode 100644 index 00000000..102b9318 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostVineyardRequestVegetationInner.md @@ -0,0 +1,30 @@ +# PostVineyardRequestVegetationInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**allocation_to_vineyards** | **List[float]** | | + +## Example + +```python +from openapi_client.models.post_vineyard_request_vegetation_inner import PostVineyardRequestVegetationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostVineyardRequestVegetationInner from a JSON string +post_vineyard_request_vegetation_inner_instance = PostVineyardRequestVegetationInner.from_json(json) +# print the JSON string representation of the object +print(PostVineyardRequestVegetationInner.to_json()) + +# convert the object into a dict +post_vineyard_request_vegetation_inner_dict = post_vineyard_request_vegetation_inner_instance.to_dict() +# create an instance of PostVineyardRequestVegetationInner from a dict +post_vineyard_request_vegetation_inner_from_dict = PostVineyardRequestVegetationInner.from_dict(post_vineyard_request_vegetation_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostVineyardRequestVineyardsInner.md b/examples/python-api-client/api-client/docs/PostVineyardRequestVineyardsInner.md new file mode 100644 index 00000000..2f625c87 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostVineyardRequestVineyardsInner.md @@ -0,0 +1,53 @@ +# PostVineyardRequestVineyardsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | +**irrigated** | **bool** | Is the crop irrigated? | +**area_planted** | **float** | Area planted, in ha (hectares) | +**average_yield** | **float** | Average yield, in t/ha (tonnes per hectare) | +**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | +**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | +**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | +**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | +**urea_application** | **float** | Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) | +**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | +**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**electricity_source** | **str** | Source of electricity | +**fuel** | [**PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | +**fluid_waste** | [**List[PostAquacultureRequestEnterprisesInnerFluidWasteInner]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | +**solid_waste** | [**PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | +**inbound_freight** | [**List[PostAquacultureRequestEnterprisesInnerInboundFreightInner]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods to the enterprise | +**outbound_freight** | [**List[PostAquacultureRequestEnterprisesInnerInboundFreightInner]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods from the enterprise | +**total_commercial_flights_km** | **float** | Total distance of commercial flights, in km (kilometers) | + +## Example + +```python +from openapi_client.models.post_vineyard_request_vineyards_inner import PostVineyardRequestVineyardsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostVineyardRequestVineyardsInner from a JSON string +post_vineyard_request_vineyards_inner_instance = PostVineyardRequestVineyardsInner.from_json(json) +# print the JSON string representation of the object +print(PostVineyardRequestVineyardsInner.to_json()) + +# convert the object into a dict +post_vineyard_request_vineyards_inner_dict = post_vineyard_request_vineyards_inner_instance.to_dict() +# create an instance of PostVineyardRequestVineyardsInner from a dict +post_vineyard_request_vineyards_inner_from_dict = PostVineyardRequestVineyardsInner.from_dict(post_vineyard_request_vineyards_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildcatchfishery200Response.md b/examples/python-api-client/api-client/docs/PostWildcatchfishery200Response.md new file mode 100644 index 00000000..7aed3607 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildcatchfishery200Response.md @@ -0,0 +1,37 @@ +# PostWildcatchfishery200Response + +Emissions calculation output for the `wildcatchfishery` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostWildcatchfishery200ResponseScope1**](PostWildcatchfishery200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | +**purchased_offsets** | [**PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**intensities** | [**PostWildcatchfishery200ResponseIntensities**](PostWildcatchfishery200ResponseIntensities.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**List[PostWildcatchfishery200ResponseIntermediateInner]**](PostWildcatchfishery200ResponseIntermediateInner.md) | | + +## Example + +```python +from openapi_client.models.post_wildcatchfishery200_response import PostWildcatchfishery200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildcatchfishery200Response from a JSON string +post_wildcatchfishery200_response_instance = PostWildcatchfishery200Response.from_json(json) +# print the JSON string representation of the object +print(PostWildcatchfishery200Response.to_json()) + +# convert the object into a dict +post_wildcatchfishery200_response_dict = post_wildcatchfishery200_response_instance.to_dict() +# create an instance of PostWildcatchfishery200Response from a dict +post_wildcatchfishery200_response_from_dict = PostWildcatchfishery200Response.from_dict(post_wildcatchfishery200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntensities.md new file mode 100644 index 00000000..76721620 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntensities.md @@ -0,0 +1,31 @@ +# PostWildcatchfishery200ResponseIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_harvest_weight_kg** | **float** | Total harvest weight in kg | +**wild_catch_fishery_excluding_carbon_offsets** | **float** | Wild catch fishery emissions intensity excluding sequestration, in kg-CO2e/kg harvest weight | +**wild_catch_fishery_including_carbon_offsets** | **float** | Wild catch fishery emissions intensity including sequestration, in kg-CO2e/kg harvest weight | + +## Example + +```python +from openapi_client.models.post_wildcatchfishery200_response_intensities import PostWildcatchfishery200ResponseIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildcatchfishery200ResponseIntensities from a JSON string +post_wildcatchfishery200_response_intensities_instance = PostWildcatchfishery200ResponseIntensities.from_json(json) +# print the JSON string representation of the object +print(PostWildcatchfishery200ResponseIntensities.to_json()) + +# convert the object into a dict +post_wildcatchfishery200_response_intensities_dict = post_wildcatchfishery200_response_intensities_instance.to_dict() +# create an instance of PostWildcatchfishery200ResponseIntensities from a dict +post_wildcatchfishery200_response_intensities_from_dict = PostWildcatchfishery200ResponseIntensities.from_dict(post_wildcatchfishery200_response_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntermediateInner.md new file mode 100644 index 00000000..2b9ac241 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntermediateInner.md @@ -0,0 +1,36 @@ +# PostWildcatchfishery200ResponseIntermediateInner + +Intermediate emissions calculation output for the `wildcatchfishery` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostWildcatchfishery200ResponseScope1**](PostWildcatchfishery200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | +**intensities** | [**PostWildcatchfishery200ResponseIntensities**](PostWildcatchfishery200ResponseIntensities.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +## Example + +```python +from openapi_client.models.post_wildcatchfishery200_response_intermediate_inner import PostWildcatchfishery200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildcatchfishery200ResponseIntermediateInner from a JSON string +post_wildcatchfishery200_response_intermediate_inner_instance = PostWildcatchfishery200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostWildcatchfishery200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_wildcatchfishery200_response_intermediate_inner_dict = post_wildcatchfishery200_response_intermediate_inner_instance.to_dict() +# create an instance of PostWildcatchfishery200ResponseIntermediateInner from a dict +post_wildcatchfishery200_response_intermediate_inner_from_dict = PostWildcatchfishery200ResponseIntermediateInner.from_dict(post_wildcatchfishery200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseScope1.md new file mode 100644 index 00000000..97634f69 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseScope1.md @@ -0,0 +1,40 @@ +# PostWildcatchfishery200ResponseScope1 + +Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**waste_water_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | +**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | +**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_wildcatchfishery200_response_scope1 import PostWildcatchfishery200ResponseScope1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildcatchfishery200ResponseScope1 from a JSON string +post_wildcatchfishery200_response_scope1_instance = PostWildcatchfishery200ResponseScope1.from_json(json) +# print the JSON string representation of the object +print(PostWildcatchfishery200ResponseScope1.to_json()) + +# convert the object into a dict +post_wildcatchfishery200_response_scope1_dict = post_wildcatchfishery200_response_scope1_instance.to_dict() +# create an instance of PostWildcatchfishery200ResponseScope1 from a dict +post_wildcatchfishery200_response_scope1_from_dict = PostWildcatchfishery200ResponseScope1.from_dict(post_wildcatchfishery200_response_scope1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequest.md b/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequest.md new file mode 100644 index 00000000..df34db74 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequest.md @@ -0,0 +1,30 @@ +# PostWildcatchfisheryRequest + +Input data required for the `wildcatchfishery` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enterprises** | [**List[PostWildcatchfisheryRequestEnterprisesInner]**](PostWildcatchfisheryRequestEnterprisesInner.md) | | + +## Example + +```python +from openapi_client.models.post_wildcatchfishery_request import PostWildcatchfisheryRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildcatchfisheryRequest from a JSON string +post_wildcatchfishery_request_instance = PostWildcatchfisheryRequest.from_json(json) +# print the JSON string representation of the object +print(PostWildcatchfisheryRequest.to_json()) + +# convert the object into a dict +post_wildcatchfishery_request_dict = post_wildcatchfishery_request_instance.to_dict() +# create an instance of PostWildcatchfisheryRequest from a dict +post_wildcatchfishery_request_from_dict = PostWildcatchfisheryRequest.from_dict(post_wildcatchfishery_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInner.md b/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInner.md new file mode 100644 index 00000000..e890d195 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInner.md @@ -0,0 +1,46 @@ +# PostWildcatchfisheryRequestEnterprisesInner + +Input data required for a single wild catch fishery enterprise + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**production_system** | **str** | Production system of the wild catch fishery enterprise | +**total_harvest_kg** | **float** | Total harvest in kg | +**refrigerants** | [**List[PostHorticultureRequestCropsInnerRefrigerantsInner]**](PostHorticultureRequestCropsInnerRefrigerantsInner.md) | Refrigerant type | +**bait** | [**List[PostWildcatchfisheryRequestEnterprisesInnerBaitInner]**](PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md) | Bait purchases | +**custom_bait** | [**List[PostAquacultureRequestEnterprisesInnerCustomBaitInner]**](PostAquacultureRequestEnterprisesInnerCustomBaitInner.md) | Custom bait purchases | +**inbound_freight** | [**List[PostAquacultureRequestEnterprisesInnerInboundFreightInner]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods to the enterprise | +**outbound_freight** | [**List[PostAquacultureRequestEnterprisesInnerInboundFreightInner]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods from the enterprise | +**total_commercial_flights_km** | **float** | Total distance of commercial flights, in km (kilometers) | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**electricity_source** | **str** | Source of electricity | +**fuel** | [**PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | +**fluid_waste** | [**List[PostAquacultureRequestEnterprisesInnerFluidWasteInner]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | +**solid_waste** | [**PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | +**carbon_offsets** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | [optional] + +## Example + +```python +from openapi_client.models.post_wildcatchfishery_request_enterprises_inner import PostWildcatchfisheryRequestEnterprisesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildcatchfisheryRequestEnterprisesInner from a JSON string +post_wildcatchfishery_request_enterprises_inner_instance = PostWildcatchfisheryRequestEnterprisesInner.from_json(json) +# print the JSON string representation of the object +print(PostWildcatchfisheryRequestEnterprisesInner.to_json()) + +# convert the object into a dict +post_wildcatchfishery_request_enterprises_inner_dict = post_wildcatchfishery_request_enterprises_inner_instance.to_dict() +# create an instance of PostWildcatchfisheryRequestEnterprisesInner from a dict +post_wildcatchfishery_request_enterprises_inner_from_dict = PostWildcatchfisheryRequestEnterprisesInner.from_dict(post_wildcatchfishery_request_enterprises_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md b/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md new file mode 100644 index 00000000..c7c386a2 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md @@ -0,0 +1,32 @@ +# PostWildcatchfisheryRequestEnterprisesInnerBaitInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Bait product type | +**purchased_tonnes** | **float** | Purchased product in tonnes | +**additional_ingredients** | **float** | Additional ingredient fraction, from 0 to 1 | +**emissions_intensity** | **float** | Emissions intensity of additional ingredients, in kg CO2e/kg bait (default 0) | [default to 0] + +## Example + +```python +from openapi_client.models.post_wildcatchfishery_request_enterprises_inner_bait_inner import PostWildcatchfisheryRequestEnterprisesInnerBaitInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildcatchfisheryRequestEnterprisesInnerBaitInner from a JSON string +post_wildcatchfishery_request_enterprises_inner_bait_inner_instance = PostWildcatchfisheryRequestEnterprisesInnerBaitInner.from_json(json) +# print the JSON string representation of the object +print(PostWildcatchfisheryRequestEnterprisesInnerBaitInner.to_json()) + +# convert the object into a dict +post_wildcatchfishery_request_enterprises_inner_bait_inner_dict = post_wildcatchfishery_request_enterprises_inner_bait_inner_instance.to_dict() +# create an instance of PostWildcatchfisheryRequestEnterprisesInnerBaitInner from a dict +post_wildcatchfishery_request_enterprises_inner_bait_inner_from_dict = PostWildcatchfisheryRequestEnterprisesInnerBaitInner.from_dict(post_wildcatchfishery_request_enterprises_inner_bait_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheries200Response.md b/examples/python-api-client/api-client/docs/PostWildseafisheries200Response.md new file mode 100644 index 00000000..25baba3e --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildseafisheries200Response.md @@ -0,0 +1,36 @@ +# PostWildseafisheries200Response + +Emissions calculation output for the `wildseafisheries` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**PostWildseafisheries200ResponseScope1**](PostWildseafisheries200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostWildseafisheries200ResponseScope3**](PostWildseafisheries200ResponseScope3.md) | | +**purchased_offsets** | [**PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | +**intermediate** | [**List[PostWildseafisheries200ResponseIntermediateInner]**](PostWildseafisheries200ResponseIntermediateInner.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**intensities** | [**List[PostWildseafisheries200ResponseIntermediateInnerIntensities]**](PostWildseafisheries200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each enterprise (in order), in t-CO2e/t product caught | + +## Example + +```python +from openapi_client.models.post_wildseafisheries200_response import PostWildseafisheries200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildseafisheries200Response from a JSON string +post_wildseafisheries200_response_instance = PostWildseafisheries200Response.from_json(json) +# print the JSON string representation of the object +print(PostWildseafisheries200Response.to_json()) + +# convert the object into a dict +post_wildseafisheries200_response_dict = post_wildseafisheries200_response_instance.to_dict() +# create an instance of PostWildseafisheries200Response from a dict +post_wildseafisheries200_response_from_dict = PostWildseafisheries200Response.from_dict(post_wildseafisheries200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInner.md new file mode 100644 index 00000000..d9502055 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInner.md @@ -0,0 +1,37 @@ +# PostWildseafisheries200ResponseIntermediateInner + +Intermediate emissions calculation output for the Wild Sea Fisheries calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | +**scope1** | [**PostWildseafisheries200ResponseScope1**](PostWildseafisheries200ResponseScope1.md) | | +**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**PostWildseafisheries200ResponseScope3**](PostWildseafisheries200ResponseScope3.md) | | +**purchased_offsets** | [**PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**intensities** | [**PostWildseafisheries200ResponseIntermediateInnerIntensities**](PostWildseafisheries200ResponseIntermediateInnerIntensities.md) | | +**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +## Example + +```python +from openapi_client.models.post_wildseafisheries200_response_intermediate_inner import PostWildseafisheries200ResponseIntermediateInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildseafisheries200ResponseIntermediateInner from a JSON string +post_wildseafisheries200_response_intermediate_inner_instance = PostWildseafisheries200ResponseIntermediateInner.from_json(json) +# print the JSON string representation of the object +print(PostWildseafisheries200ResponseIntermediateInner.to_json()) + +# convert the object into a dict +post_wildseafisheries200_response_intermediate_inner_dict = post_wildseafisheries200_response_intermediate_inner_instance.to_dict() +# create an instance of PostWildseafisheries200ResponseIntermediateInner from a dict +post_wildseafisheries200_response_intermediate_inner_from_dict = PostWildseafisheries200ResponseIntermediateInner.from_dict(post_wildseafisheries200_response_intermediate_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..3886aca0 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,31 @@ +# PostWildseafisheries200ResponseIntermediateInnerIntensities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**intensity_excluding_carbon_offset** | **float** | Wild sea fisheries emissions intensity excluding carbon offsets, in kg-CO2e/kg | +**intensity_including_carbon_offset** | **float** | Wild sea fisheries emissions intensity including carbon offsets, in kg-CO2e/kg | +**total_harvest_weight_tonnes** | **float** | Total harvest weight in tonnes | + +## Example + +```python +from openapi_client.models.post_wildseafisheries200_response_intermediate_inner_intensities import PostWildseafisheries200ResponseIntermediateInnerIntensities + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildseafisheries200ResponseIntermediateInnerIntensities from a JSON string +post_wildseafisheries200_response_intermediate_inner_intensities_instance = PostWildseafisheries200ResponseIntermediateInnerIntensities.from_json(json) +# print the JSON string representation of the object +print(PostWildseafisheries200ResponseIntermediateInnerIntensities.to_json()) + +# convert the object into a dict +post_wildseafisheries200_response_intermediate_inner_intensities_dict = post_wildseafisheries200_response_intermediate_inner_intensities_instance.to_dict() +# create an instance of PostWildseafisheries200ResponseIntermediateInnerIntensities from a dict +post_wildseafisheries200_response_intermediate_inner_intensities_from_dict = PostWildseafisheries200ResponseIntermediateInnerIntensities.from_dict(post_wildseafisheries200_response_intermediate_inner_intensities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope1.md new file mode 100644 index 00000000..07958bea --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope1.md @@ -0,0 +1,38 @@ +# PostWildseafisheries200ResponseScope1 + +Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_wildseafisheries200_response_scope1 import PostWildseafisheries200ResponseScope1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildseafisheries200ResponseScope1 from a JSON string +post_wildseafisheries200_response_scope1_instance = PostWildseafisheries200ResponseScope1.from_json(json) +# print the JSON string representation of the object +print(PostWildseafisheries200ResponseScope1.to_json()) + +# convert the object into a dict +post_wildseafisheries200_response_scope1_dict = post_wildseafisheries200_response_scope1_instance.to_dict() +# create an instance of PostWildseafisheries200ResponseScope1 from a dict +post_wildseafisheries200_response_scope1_from_dict = PostWildseafisheries200ResponseScope1.from_dict(post_wildseafisheries200_response_scope1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope3.md new file mode 100644 index 00000000..b15c4f44 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope3.md @@ -0,0 +1,33 @@ +# PostWildseafisheries200ResponseScope3 + +Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**bait** | **float** | Emissions from purchased bait, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +## Example + +```python +from openapi_client.models.post_wildseafisheries200_response_scope3 import PostWildseafisheries200ResponseScope3 + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildseafisheries200ResponseScope3 from a JSON string +post_wildseafisheries200_response_scope3_instance = PostWildseafisheries200ResponseScope3.from_json(json) +# print the JSON string representation of the object +print(PostWildseafisheries200ResponseScope3.to_json()) + +# convert the object into a dict +post_wildseafisheries200_response_scope3_dict = post_wildseafisheries200_response_scope3_instance.to_dict() +# create an instance of PostWildseafisheries200ResponseScope3 from a dict +post_wildseafisheries200_response_scope3_from_dict = PostWildseafisheries200ResponseScope3.from_dict(post_wildseafisheries200_response_scope3_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequest.md b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequest.md new file mode 100644 index 00000000..aae1a168 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequest.md @@ -0,0 +1,30 @@ +# PostWildseafisheriesRequest + +Input data required for the `wildseafisheries` calculator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enterprises** | [**List[PostWildseafisheriesRequestEnterprisesInner]**](PostWildseafisheriesRequestEnterprisesInner.md) | | + +## Example + +```python +from openapi_client.models.post_wildseafisheries_request import PostWildseafisheriesRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildseafisheriesRequest from a JSON string +post_wildseafisheries_request_instance = PostWildseafisheriesRequest.from_json(json) +# print the JSON string representation of the object +print(PostWildseafisheriesRequest.to_json()) + +# convert the object into a dict +post_wildseafisheries_request_dict = post_wildseafisheries_request_instance.to_dict() +# create an instance of PostWildseafisheriesRequest from a dict +post_wildseafisheries_request_from_dict = PostWildseafisheriesRequest.from_dict(post_wildseafisheries_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInner.md b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInner.md new file mode 100644 index 00000000..7d043c56 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInner.md @@ -0,0 +1,43 @@ +# PostWildseafisheriesRequestEnterprisesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for this activity | [optional] +**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**electricity_source** | **str** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**total_whole_weight_caught** | **float** | Total whole weight caught in kg | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**refrigerants** | [**List[PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner]**](PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md) | | +**transports** | [**List[PostWildseafisheriesRequestEnterprisesInnerTransportsInner]**](PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md) | Transportation | +**flights** | [**List[PostWildseafisheriesRequestEnterprisesInnerFlightsInner]**](PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md) | CommercialFlight | +**bait** | [**List[PostWildseafisheriesRequestEnterprisesInnerBaitInner]**](PostWildseafisheriesRequestEnterprisesInnerBaitInner.md) | Bait | +**custombait** | [**List[PostWildseafisheriesRequestEnterprisesInnerCustombaitInner]**](PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md) | Custom bait | +**carbon_offset** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | + +## Example + +```python +from openapi_client.models.post_wildseafisheries_request_enterprises_inner import PostWildseafisheriesRequestEnterprisesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildseafisheriesRequestEnterprisesInner from a JSON string +post_wildseafisheries_request_enterprises_inner_instance = PostWildseafisheriesRequestEnterprisesInner.from_json(json) +# print the JSON string representation of the object +print(PostWildseafisheriesRequestEnterprisesInner.to_json()) + +# convert the object into a dict +post_wildseafisheries_request_enterprises_inner_dict = post_wildseafisheries_request_enterprises_inner_instance.to_dict() +# create an instance of PostWildseafisheriesRequestEnterprisesInner from a dict +post_wildseafisheries_request_enterprises_inner_from_dict = PostWildseafisheriesRequestEnterprisesInner.from_dict(post_wildseafisheries_request_enterprises_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md new file mode 100644 index 00000000..48129d0f --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md @@ -0,0 +1,32 @@ +# PostWildseafisheriesRequestEnterprisesInnerBaitInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Bait product type | +**purchased** | **float** | Purchased product in tonnes | +**additional_ingredient** | **float** | Additional ingredient fraction, from 0 to 1 | +**emissions_intensity** | **float** | Emissions intensity of product, in kg CO2e/kg | + +## Example + +```python +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_bait_inner import PostWildseafisheriesRequestEnterprisesInnerBaitInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildseafisheriesRequestEnterprisesInnerBaitInner from a JSON string +post_wildseafisheries_request_enterprises_inner_bait_inner_instance = PostWildseafisheriesRequestEnterprisesInnerBaitInner.from_json(json) +# print the JSON string representation of the object +print(PostWildseafisheriesRequestEnterprisesInnerBaitInner.to_json()) + +# convert the object into a dict +post_wildseafisheries_request_enterprises_inner_bait_inner_dict = post_wildseafisheries_request_enterprises_inner_bait_inner_instance.to_dict() +# create an instance of PostWildseafisheriesRequestEnterprisesInnerBaitInner from a dict +post_wildseafisheries_request_enterprises_inner_bait_inner_from_dict = PostWildseafisheriesRequestEnterprisesInnerBaitInner.from_dict(post_wildseafisheries_request_enterprises_inner_bait_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md new file mode 100644 index 00000000..d0958fec --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md @@ -0,0 +1,30 @@ +# PostWildseafisheriesRequestEnterprisesInnerCustombaitInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purchased** | **float** | Purchased product in tonnes | +**emissions_intensity** | **float** | Emissions intensity of product, in kg CO2e/kg | + +## Example + +```python +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_custombait_inner import PostWildseafisheriesRequestEnterprisesInnerCustombaitInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildseafisheriesRequestEnterprisesInnerCustombaitInner from a JSON string +post_wildseafisheries_request_enterprises_inner_custombait_inner_instance = PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.from_json(json) +# print the JSON string representation of the object +print(PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.to_json()) + +# convert the object into a dict +post_wildseafisheries_request_enterprises_inner_custombait_inner_dict = post_wildseafisheries_request_enterprises_inner_custombait_inner_instance.to_dict() +# create an instance of PostWildseafisheriesRequestEnterprisesInnerCustombaitInner from a dict +post_wildseafisheries_request_enterprises_inner_custombait_inner_from_dict = PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.from_dict(post_wildseafisheries_request_enterprises_inner_custombait_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md new file mode 100644 index 00000000..03687d51 --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md @@ -0,0 +1,30 @@ +# PostWildseafisheriesRequestEnterprisesInnerFlightsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commercial_flight_passengers** | **float** | Commercial flight passengers per year | +**total_flight_distance** | **float** | Total commercial flight distance in km | + +## Example + +```python +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_flights_inner import PostWildseafisheriesRequestEnterprisesInnerFlightsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildseafisheriesRequestEnterprisesInnerFlightsInner from a JSON string +post_wildseafisheries_request_enterprises_inner_flights_inner_instance = PostWildseafisheriesRequestEnterprisesInnerFlightsInner.from_json(json) +# print the JSON string representation of the object +print(PostWildseafisheriesRequestEnterprisesInnerFlightsInner.to_json()) + +# convert the object into a dict +post_wildseafisheries_request_enterprises_inner_flights_inner_dict = post_wildseafisheries_request_enterprises_inner_flights_inner_instance.to_dict() +# create an instance of PostWildseafisheriesRequestEnterprisesInnerFlightsInner from a dict +post_wildseafisheries_request_enterprises_inner_flights_inner_from_dict = PostWildseafisheriesRequestEnterprisesInnerFlightsInner.from_dict(post_wildseafisheries_request_enterprises_inner_flights_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md new file mode 100644 index 00000000..44cba23d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md @@ -0,0 +1,30 @@ +# PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**refrigerant** | **str** | Refrigerant type | +**annual_recharge** | **float** | Amount of refrigerant annually recharged, kg product/year | + +## Example + +```python +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_refrigerants_inner import PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner from a JSON string +post_wildseafisheries_request_enterprises_inner_refrigerants_inner_instance = PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.from_json(json) +# print the JSON string representation of the object +print(PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.to_json()) + +# convert the object into a dict +post_wildseafisheries_request_enterprises_inner_refrigerants_inner_dict = post_wildseafisheries_request_enterprises_inner_refrigerants_inner_instance.to_dict() +# create an instance of PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner from a dict +post_wildseafisheries_request_enterprises_inner_refrigerants_inner_from_dict = PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.from_dict(post_wildseafisheries_request_enterprises_inner_refrigerants_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md new file mode 100644 index 00000000..3064866d --- /dev/null +++ b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md @@ -0,0 +1,31 @@ +# PostWildseafisheriesRequestEnterprisesInnerTransportsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Transport type | +**fuel** | **str** | Fuel type | +**distance** | **float** | Distance in km | + +## Example + +```python +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_transports_inner import PostWildseafisheriesRequestEnterprisesInnerTransportsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PostWildseafisheriesRequestEnterprisesInnerTransportsInner from a JSON string +post_wildseafisheries_request_enterprises_inner_transports_inner_instance = PostWildseafisheriesRequestEnterprisesInnerTransportsInner.from_json(json) +# print the JSON string representation of the object +print(PostWildseafisheriesRequestEnterprisesInnerTransportsInner.to_json()) + +# convert the object into a dict +post_wildseafisheries_request_enterprises_inner_transports_inner_dict = post_wildseafisheries_request_enterprises_inner_transports_inner_instance.to_dict() +# create an instance of PostWildseafisheriesRequestEnterprisesInnerTransportsInner from a dict +post_wildseafisheries_request_enterprises_inner_transports_inner_from_dict = PostWildseafisheriesRequestEnterprisesInnerTransportsInner.from_dict(post_wildseafisheries_request_enterprises_inner_transports_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/python-api-client/api-client/git_push.sh b/examples/python-api-client/api-client/git_push.sh new file mode 100644 index 00000000..f53a75d4 --- /dev/null +++ b/examples/python-api-client/api-client/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/examples/python-api-client/api-client/openapi_client/__init__.py b/examples/python-api-client/api-client/openapi_client/__init__.py new file mode 100644 index 00000000..f2a5cbb1 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/__init__.py @@ -0,0 +1,630 @@ +# coding: utf-8 + +# flake8: noqa + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# Define package exports +__all__ = [ + "GAFApi", + "ApiResponse", + "ApiClient", + "Configuration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "PostAquaculture200Response", + "PostAquaculture200ResponseCarbonSequestration", + "PostAquaculture200ResponseIntensities", + "PostAquaculture200ResponseIntermediateInner", + "PostAquaculture200ResponseIntermediateInnerCarbonSequestration", + "PostAquaculture200ResponseNet", + "PostAquaculture200ResponsePurchasedOffsets", + "PostAquaculture200ResponseScope1", + "PostAquaculture200ResponseScope2", + "PostAquaculture200ResponseScope3", + "PostAquacultureRequest", + "PostAquacultureRequestEnterprisesInner", + "PostAquacultureRequestEnterprisesInnerBaitInner", + "PostAquacultureRequestEnterprisesInnerCustomBaitInner", + "PostAquacultureRequestEnterprisesInnerFluidWasteInner", + "PostAquacultureRequestEnterprisesInnerFuel", + "PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner", + "PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner", + "PostAquacultureRequestEnterprisesInnerInboundFreightInner", + "PostAquacultureRequestEnterprisesInnerRefrigerantsInner", + "PostAquacultureRequestEnterprisesInnerSolidWaste", + "PostBeef200Response", + "PostBeef200ResponseIntermediateInner", + "PostBeef200ResponseIntermediateInnerIntensities", + "PostBeef200ResponseNet", + "PostBeef200ResponseScope1", + "PostBeef200ResponseScope3", + "PostBeefRequest", + "PostBeefRequestBeefInner", + "PostBeefRequestBeefInnerClasses", + "PostBeefRequestBeefInnerClassesBullsGt1", + "PostBeefRequestBeefInnerClassesBullsGt1Autumn", + "PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner", + "PostBeefRequestBeefInnerClassesBullsGt1Traded", + "PostBeefRequestBeefInnerClassesCowsGt2", + "PostBeefRequestBeefInnerClassesCowsGt2Traded", + "PostBeefRequestBeefInnerClassesHeifers1To2", + "PostBeefRequestBeefInnerClassesHeifers1To2Traded", + "PostBeefRequestBeefInnerClassesHeifersGt2", + "PostBeefRequestBeefInnerClassesHeifersGt2Traded", + "PostBeefRequestBeefInnerClassesHeifersLt1", + "PostBeefRequestBeefInnerClassesHeifersLt1Traded", + "PostBeefRequestBeefInnerClassesSteers1To2", + "PostBeefRequestBeefInnerClassesSteers1To2Traded", + "PostBeefRequestBeefInnerClassesSteersGt2", + "PostBeefRequestBeefInnerClassesSteersGt2Traded", + "PostBeefRequestBeefInnerClassesSteersLt1", + "PostBeefRequestBeefInnerClassesSteersLt1Traded", + "PostBeefRequestBeefInnerCowsCalving", + "PostBeefRequestBeefInnerFertiliser", + "PostBeefRequestBeefInnerFertiliserOtherFertilisersInner", + "PostBeefRequestBeefInnerMineralSupplementation", + "PostBeefRequestBurningInner", + "PostBeefRequestBurningInnerBurning", + "PostBeefRequestVegetationInner", + "PostBeefRequestVegetationInnerVegetation", + "PostBuffalo200Response", + "PostBuffalo200ResponseIntensities", + "PostBuffalo200ResponseIntermediateInner", + "PostBuffalo200ResponseNet", + "PostBuffalo200ResponseScope1", + "PostBuffalo200ResponseScope3", + "PostBuffaloRequest", + "PostBuffaloRequestBuffalosInner", + "PostBuffaloRequestBuffalosInnerClasses", + "PostBuffaloRequestBuffalosInnerClassesBulls", + "PostBuffaloRequestBuffalosInnerClassesBullsAutumn", + "PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner", + "PostBuffaloRequestBuffalosInnerClassesCalfs", + "PostBuffaloRequestBuffalosInnerClassesCows", + "PostBuffaloRequestBuffalosInnerClassesSteers", + "PostBuffaloRequestBuffalosInnerClassesTradeBulls", + "PostBuffaloRequestBuffalosInnerClassesTradeCalfs", + "PostBuffaloRequestBuffalosInnerClassesTradeCows", + "PostBuffaloRequestBuffalosInnerClassesTradeSteers", + "PostBuffaloRequestBuffalosInnerCowsCalving", + "PostBuffaloRequestBuffalosInnerSeasonalCalving", + "PostBuffaloRequestVegetationInner", + "PostCotton200Response", + "PostCotton200ResponseIntermediateInner", + "PostCotton200ResponseIntermediateInnerIntensities", + "PostCotton200ResponseNet", + "PostCotton200ResponseScope1", + "PostCotton200ResponseScope3", + "PostCottonRequest", + "PostCottonRequestCropsInner", + "PostCottonRequestVegetationInner", + "PostDairy200Response", + "PostDairy200ResponseIntensities", + "PostDairy200ResponseIntermediateInner", + "PostDairy200ResponseNet", + "PostDairy200ResponseScope1", + "PostDairy200ResponseScope3", + "PostDairyRequest", + "PostDairyRequestDairyInner", + "PostDairyRequestDairyInnerAreas", + "PostDairyRequestDairyInnerClasses", + "PostDairyRequestDairyInnerClassesDairyBullsGt1", + "PostDairyRequestDairyInnerClassesDairyBullsLt1", + "PostDairyRequestDairyInnerClassesHeifersGt1", + "PostDairyRequestDairyInnerClassesHeifersLt1", + "PostDairyRequestDairyInnerClassesMilkingCows", + "PostDairyRequestDairyInnerClassesMilkingCowsAutumn", + "PostDairyRequestDairyInnerManureManagementMilkingCows", + "PostDairyRequestDairyInnerSeasonalFertiliser", + "PostDairyRequestDairyInnerSeasonalFertiliserAutumn", + "PostDairyRequestVegetationInner", + "PostDeer200Response", + "PostDeer200ResponseIntensities", + "PostDeer200ResponseIntermediateInner", + "PostDeer200ResponseNet", + "PostDeerRequest", + "PostDeerRequestDeersInner", + "PostDeerRequestDeersInnerClasses", + "PostDeerRequestDeersInnerClassesBreedingDoes", + "PostDeerRequestDeersInnerClassesBucks", + "PostDeerRequestDeersInnerClassesFawn", + "PostDeerRequestDeersInnerClassesOtherDoes", + "PostDeerRequestDeersInnerClassesTradeBucks", + "PostDeerRequestDeersInnerClassesTradeDoes", + "PostDeerRequestDeersInnerClassesTradeFawn", + "PostDeerRequestDeersInnerClassesTradeOtherDoes", + "PostDeerRequestDeersInnerDoesFawning", + "PostDeerRequestDeersInnerSeasonalFawning", + "PostDeerRequestVegetationInner", + "PostFeedlot200Response", + "PostFeedlot200ResponseIntermediateInner", + "PostFeedlot200ResponseIntermediateInnerIntensities", + "PostFeedlot200ResponseIntermediateInnerNet", + "PostFeedlot200ResponseScope1", + "PostFeedlot200ResponseScope3", + "PostFeedlotRequest", + "PostFeedlotRequestFeedlotsInner", + "PostFeedlotRequestFeedlotsInnerGroupsInner", + "PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner", + "PostFeedlotRequestFeedlotsInnerPurchases", + "PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner", + "PostFeedlotRequestFeedlotsInnerSales", + "PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner", + "PostFeedlotRequestVegetationInner", + "PostGoat200Response", + "PostGoat200ResponseIntensities", + "PostGoat200ResponseIntermediateInner", + "PostGoat200ResponseNet", + "PostGoatRequest", + "PostGoatRequestGoatsInner", + "PostGoatRequestGoatsInnerClasses", + "PostGoatRequestGoatsInnerClassesBreedingDoesNannies", + "PostGoatRequestGoatsInnerClassesBucksBilly", + "PostGoatRequestGoatsInnerClassesKids", + "PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies", + "PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales", + "PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies", + "PostGoatRequestGoatsInnerClassesTradeBucks", + "PostGoatRequestGoatsInnerClassesTradeDoes", + "PostGoatRequestGoatsInnerClassesTradeKids", + "PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies", + "PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales", + "PostGoatRequestGoatsInnerClassesTradeWethers", + "PostGoatRequestGoatsInnerClassesWethers", + "PostGoatRequestVegetationInner", + "PostGrains200Response", + "PostGrains200ResponseIntermediateInner", + "PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration", + "PostGrainsRequest", + "PostGrainsRequestCropsInner", + "PostHorticulture200Response", + "PostHorticulture200ResponseIntermediateInner", + "PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration", + "PostHorticulture200ResponseScope1", + "PostHorticultureRequest", + "PostHorticultureRequestCropsInner", + "PostHorticultureRequestCropsInnerRefrigerantsInner", + "PostPork200Response", + "PostPork200ResponseIntensities", + "PostPork200ResponseIntermediateInner", + "PostPork200ResponseNet", + "PostPork200ResponseScope1", + "PostPork200ResponseScope3", + "PostPorkRequest", + "PostPorkRequestPorkInner", + "PostPorkRequestPorkInnerClasses", + "PostPorkRequestPorkInnerClassesBoars", + "PostPorkRequestPorkInnerClassesGilts", + "PostPorkRequestPorkInnerClassesGrowers", + "PostPorkRequestPorkInnerClassesSlaughterPigs", + "PostPorkRequestPorkInnerClassesSows", + "PostPorkRequestPorkInnerClassesSowsManure", + "PostPorkRequestPorkInnerClassesSowsManureSpring", + "PostPorkRequestPorkInnerClassesSuckers", + "PostPorkRequestPorkInnerClassesWeaners", + "PostPorkRequestPorkInnerFeedProductsInner", + "PostPorkRequestPorkInnerFeedProductsInnerIngredients", + "PostPorkRequestVegetationInner", + "PostPoultry200Response", + "PostPoultry200ResponseIntensities", + "PostPoultry200ResponseIntermediateBroilersInner", + "PostPoultry200ResponseIntermediateBroilersInnerIntensities", + "PostPoultry200ResponseIntermediateLayersInner", + "PostPoultry200ResponseIntermediateLayersInnerIntensities", + "PostPoultry200ResponseNet", + "PostPoultry200ResponseScope1", + "PostPoultry200ResponseScope3", + "PostPoultryRequest", + "PostPoultryRequestBroilersInner", + "PostPoultryRequestBroilersInnerGroupsInner", + "PostPoultryRequestBroilersInnerGroupsInnerFeedInner", + "PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients", + "PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers", + "PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases", + "PostPoultryRequestBroilersInnerMeatChickenLayersPurchases", + "PostPoultryRequestBroilersInnerMeatOtherPurchases", + "PostPoultryRequestBroilersInnerSalesInner", + "PostPoultryRequestLayersInner", + "PostPoultryRequestLayersInnerLayers", + "PostPoultryRequestLayersInnerLayersEggSale", + "PostPoultryRequestLayersInnerLayersPurchases", + "PostPoultryRequestLayersInnerMeatChickenLayers", + "PostPoultryRequestLayersInnerMeatChickenLayersEggSale", + "PostPoultryRequestVegetationInner", + "PostProcessing200Response", + "PostProcessing200ResponseIntensitiesInner", + "PostProcessing200ResponseIntermediateInner", + "PostProcessing200ResponseNet", + "PostProcessing200ResponseScope1", + "PostProcessing200ResponseScope3", + "PostProcessingRequest", + "PostProcessingRequestProductsInner", + "PostProcessingRequestProductsInnerProduct", + "PostRice200Response", + "PostRice200ResponseIntensities", + "PostRice200ResponseIntermediateInner", + "PostRice200ResponseIntermediateInnerIntensities", + "PostRice200ResponseScope1", + "PostRiceRequest", + "PostRiceRequestCropsInner", + "PostSheep200Response", + "PostSheep200ResponseIntermediateInner", + "PostSheep200ResponseIntermediateInnerIntensities", + "PostSheep200ResponseNet", + "PostSheepRequest", + "PostSheepRequestSheepInner", + "PostSheepRequestSheepInnerClasses", + "PostSheepRequestSheepInnerClassesRams", + "PostSheepRequestSheepInnerClassesRamsAutumn", + "PostSheepRequestSheepInnerClassesTradeEwes", + "PostSheepRequestSheepInnerClassesTradeLambsAndHoggets", + "PostSheepRequestSheepInnerEwesLambing", + "PostSheepRequestSheepInnerSeasonalLambing", + "PostSheepRequestVegetationInner", + "PostSheepbeef200Response", + "PostSheepbeef200ResponseIntensities", + "PostSheepbeef200ResponseIntermediate", + "PostSheepbeef200ResponseIntermediateBeef", + "PostSheepbeef200ResponseIntermediateSheep", + "PostSheepbeef200ResponseNet", + "PostSheepbeefRequest", + "PostSheepbeefRequestVegetationInner", + "PostSugar200Response", + "PostSugar200ResponseIntermediateInner", + "PostSugar200ResponseIntermediateInnerIntensities", + "PostSugarRequest", + "PostSugarRequestCropsInner", + "PostVineyard200Response", + "PostVineyard200ResponseIntermediateInner", + "PostVineyard200ResponseIntermediateInnerIntensities", + "PostVineyard200ResponseNet", + "PostVineyard200ResponseScope1", + "PostVineyard200ResponseScope3", + "PostVineyardRequest", + "PostVineyardRequestVegetationInner", + "PostVineyardRequestVineyardsInner", + "PostWildcatchfishery200Response", + "PostWildcatchfishery200ResponseIntensities", + "PostWildcatchfishery200ResponseIntermediateInner", + "PostWildcatchfishery200ResponseScope1", + "PostWildcatchfisheryRequest", + "PostWildcatchfisheryRequestEnterprisesInner", + "PostWildcatchfisheryRequestEnterprisesInnerBaitInner", + "PostWildseafisheries200Response", + "PostWildseafisheries200ResponseIntermediateInner", + "PostWildseafisheries200ResponseIntermediateInnerIntensities", + "PostWildseafisheries200ResponseScope1", + "PostWildseafisheries200ResponseScope3", + "PostWildseafisheriesRequest", + "PostWildseafisheriesRequestEnterprisesInner", + "PostWildseafisheriesRequestEnterprisesInnerBaitInner", + "PostWildseafisheriesRequestEnterprisesInnerCustombaitInner", + "PostWildseafisheriesRequestEnterprisesInnerFlightsInner", + "PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner", + "PostWildseafisheriesRequestEnterprisesInnerTransportsInner", +] + +# import apis into sdk package +from openapi_client.api.gaf_api import GAFApi as GAFApi + +# import ApiClient +from openapi_client.api_response import ApiResponse as ApiResponse +from openapi_client.api_client import ApiClient as ApiClient +from openapi_client.configuration import Configuration as Configuration +from openapi_client.exceptions import OpenApiException as OpenApiException +from openapi_client.exceptions import ApiTypeError as ApiTypeError +from openapi_client.exceptions import ApiValueError as ApiValueError +from openapi_client.exceptions import ApiKeyError as ApiKeyError +from openapi_client.exceptions import ApiAttributeError as ApiAttributeError +from openapi_client.exceptions import ApiException as ApiException + +# import models into sdk package +from openapi_client.models.post_aquaculture200_response import PostAquaculture200Response as PostAquaculture200Response +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration as PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_intensities import PostAquaculture200ResponseIntensities as PostAquaculture200ResponseIntensities +from openapi_client.models.post_aquaculture200_response_intermediate_inner import PostAquaculture200ResponseIntermediateInner as PostAquaculture200ResponseIntermediateInner +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration as PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet as PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_purchased_offsets import PostAquaculture200ResponsePurchasedOffsets as PostAquaculture200ResponsePurchasedOffsets +from openapi_client.models.post_aquaculture200_response_scope1 import PostAquaculture200ResponseScope1 as PostAquaculture200ResponseScope1 +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 as PostAquaculture200ResponseScope2 +from openapi_client.models.post_aquaculture200_response_scope3 import PostAquaculture200ResponseScope3 as PostAquaculture200ResponseScope3 +from openapi_client.models.post_aquaculture_request import PostAquacultureRequest as PostAquacultureRequest +from openapi_client.models.post_aquaculture_request_enterprises_inner import PostAquacultureRequestEnterprisesInner as PostAquacultureRequestEnterprisesInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_bait_inner import PostAquacultureRequestEnterprisesInnerBaitInner as PostAquacultureRequestEnterprisesInnerBaitInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_custom_bait_inner import PostAquacultureRequestEnterprisesInnerCustomBaitInner as PostAquacultureRequestEnterprisesInnerCustomBaitInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_fluid_waste_inner import PostAquacultureRequestEnterprisesInnerFluidWasteInner as PostAquacultureRequestEnterprisesInnerFluidWasteInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel import PostAquacultureRequestEnterprisesInnerFuel as PostAquacultureRequestEnterprisesInnerFuel +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner import PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner as PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner import PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner as PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_inbound_freight_inner import PostAquacultureRequestEnterprisesInnerInboundFreightInner as PostAquacultureRequestEnterprisesInnerInboundFreightInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_refrigerants_inner import PostAquacultureRequestEnterprisesInnerRefrigerantsInner as PostAquacultureRequestEnterprisesInnerRefrigerantsInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_solid_waste import PostAquacultureRequestEnterprisesInnerSolidWaste as PostAquacultureRequestEnterprisesInnerSolidWaste +from openapi_client.models.post_beef200_response import PostBeef200Response as PostBeef200Response +from openapi_client.models.post_beef200_response_intermediate_inner import PostBeef200ResponseIntermediateInner as PostBeef200ResponseIntermediateInner +from openapi_client.models.post_beef200_response_intermediate_inner_intensities import PostBeef200ResponseIntermediateInnerIntensities as PostBeef200ResponseIntermediateInnerIntensities +from openapi_client.models.post_beef200_response_net import PostBeef200ResponseNet as PostBeef200ResponseNet +from openapi_client.models.post_beef200_response_scope1 import PostBeef200ResponseScope1 as PostBeef200ResponseScope1 +from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 as PostBeef200ResponseScope3 +from openapi_client.models.post_beef_request import PostBeefRequest as PostBeefRequest +from openapi_client.models.post_beef_request_beef_inner import PostBeefRequestBeefInner as PostBeefRequestBeefInner +from openapi_client.models.post_beef_request_beef_inner_classes import PostBeefRequestBeefInnerClasses as PostBeefRequestBeefInnerClasses +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1 import PostBeefRequestBeefInnerClassesBullsGt1 as PostBeefRequestBeefInnerClassesBullsGt1 +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn as PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner as PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_traded import PostBeefRequestBeefInnerClassesBullsGt1Traded as PostBeefRequestBeefInnerClassesBullsGt1Traded +from openapi_client.models.post_beef_request_beef_inner_classes_cows_gt2 import PostBeefRequestBeefInnerClassesCowsGt2 as PostBeefRequestBeefInnerClassesCowsGt2 +from openapi_client.models.post_beef_request_beef_inner_classes_cows_gt2_traded import PostBeefRequestBeefInnerClassesCowsGt2Traded as PostBeefRequestBeefInnerClassesCowsGt2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_heifers1_to2 import PostBeefRequestBeefInnerClassesHeifers1To2 as PostBeefRequestBeefInnerClassesHeifers1To2 +from openapi_client.models.post_beef_request_beef_inner_classes_heifers1_to2_traded import PostBeefRequestBeefInnerClassesHeifers1To2Traded as PostBeefRequestBeefInnerClassesHeifers1To2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_gt2 import PostBeefRequestBeefInnerClassesHeifersGt2 as PostBeefRequestBeefInnerClassesHeifersGt2 +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_gt2_traded import PostBeefRequestBeefInnerClassesHeifersGt2Traded as PostBeefRequestBeefInnerClassesHeifersGt2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_lt1 import PostBeefRequestBeefInnerClassesHeifersLt1 as PostBeefRequestBeefInnerClassesHeifersLt1 +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_lt1_traded import PostBeefRequestBeefInnerClassesHeifersLt1Traded as PostBeefRequestBeefInnerClassesHeifersLt1Traded +from openapi_client.models.post_beef_request_beef_inner_classes_steers1_to2 import PostBeefRequestBeefInnerClassesSteers1To2 as PostBeefRequestBeefInnerClassesSteers1To2 +from openapi_client.models.post_beef_request_beef_inner_classes_steers1_to2_traded import PostBeefRequestBeefInnerClassesSteers1To2Traded as PostBeefRequestBeefInnerClassesSteers1To2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_steers_gt2 import PostBeefRequestBeefInnerClassesSteersGt2 as PostBeefRequestBeefInnerClassesSteersGt2 +from openapi_client.models.post_beef_request_beef_inner_classes_steers_gt2_traded import PostBeefRequestBeefInnerClassesSteersGt2Traded as PostBeefRequestBeefInnerClassesSteersGt2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_steers_lt1 import PostBeefRequestBeefInnerClassesSteersLt1 as PostBeefRequestBeefInnerClassesSteersLt1 +from openapi_client.models.post_beef_request_beef_inner_classes_steers_lt1_traded import PostBeefRequestBeefInnerClassesSteersLt1Traded as PostBeefRequestBeefInnerClassesSteersLt1Traded +from openapi_client.models.post_beef_request_beef_inner_cows_calving import PostBeefRequestBeefInnerCowsCalving as PostBeefRequestBeefInnerCowsCalving +from openapi_client.models.post_beef_request_beef_inner_fertiliser import PostBeefRequestBeefInnerFertiliser as PostBeefRequestBeefInnerFertiliser +from openapi_client.models.post_beef_request_beef_inner_fertiliser_other_fertilisers_inner import PostBeefRequestBeefInnerFertiliserOtherFertilisersInner as PostBeefRequestBeefInnerFertiliserOtherFertilisersInner +from openapi_client.models.post_beef_request_beef_inner_mineral_supplementation import PostBeefRequestBeefInnerMineralSupplementation as PostBeefRequestBeefInnerMineralSupplementation +from openapi_client.models.post_beef_request_burning_inner import PostBeefRequestBurningInner as PostBeefRequestBurningInner +from openapi_client.models.post_beef_request_burning_inner_burning import PostBeefRequestBurningInnerBurning as PostBeefRequestBurningInnerBurning +from openapi_client.models.post_beef_request_vegetation_inner import PostBeefRequestVegetationInner as PostBeefRequestVegetationInner +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation as PostBeefRequestVegetationInnerVegetation +from openapi_client.models.post_buffalo200_response import PostBuffalo200Response as PostBuffalo200Response +from openapi_client.models.post_buffalo200_response_intensities import PostBuffalo200ResponseIntensities as PostBuffalo200ResponseIntensities +from openapi_client.models.post_buffalo200_response_intermediate_inner import PostBuffalo200ResponseIntermediateInner as PostBuffalo200ResponseIntermediateInner +from openapi_client.models.post_buffalo200_response_net import PostBuffalo200ResponseNet as PostBuffalo200ResponseNet +from openapi_client.models.post_buffalo200_response_scope1 import PostBuffalo200ResponseScope1 as PostBuffalo200ResponseScope1 +from openapi_client.models.post_buffalo200_response_scope3 import PostBuffalo200ResponseScope3 as PostBuffalo200ResponseScope3 +from openapi_client.models.post_buffalo_request import PostBuffaloRequest as PostBuffaloRequest +from openapi_client.models.post_buffalo_request_buffalos_inner import PostBuffaloRequestBuffalosInner as PostBuffaloRequestBuffalosInner +from openapi_client.models.post_buffalo_request_buffalos_inner_classes import PostBuffaloRequestBuffalosInnerClasses as PostBuffaloRequestBuffalosInnerClasses +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls import PostBuffaloRequestBuffalosInnerClassesBulls as PostBuffaloRequestBuffalosInnerClassesBulls +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn as PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner as PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_calfs import PostBuffaloRequestBuffalosInnerClassesCalfs as PostBuffaloRequestBuffalosInnerClassesCalfs +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_cows import PostBuffaloRequestBuffalosInnerClassesCows as PostBuffaloRequestBuffalosInnerClassesCows +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_steers import PostBuffaloRequestBuffalosInnerClassesSteers as PostBuffaloRequestBuffalosInnerClassesSteers +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_bulls import PostBuffaloRequestBuffalosInnerClassesTradeBulls as PostBuffaloRequestBuffalosInnerClassesTradeBulls +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_calfs import PostBuffaloRequestBuffalosInnerClassesTradeCalfs as PostBuffaloRequestBuffalosInnerClassesTradeCalfs +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_cows import PostBuffaloRequestBuffalosInnerClassesTradeCows as PostBuffaloRequestBuffalosInnerClassesTradeCows +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_steers import PostBuffaloRequestBuffalosInnerClassesTradeSteers as PostBuffaloRequestBuffalosInnerClassesTradeSteers +from openapi_client.models.post_buffalo_request_buffalos_inner_cows_calving import PostBuffaloRequestBuffalosInnerCowsCalving as PostBuffaloRequestBuffalosInnerCowsCalving +from openapi_client.models.post_buffalo_request_buffalos_inner_seasonal_calving import PostBuffaloRequestBuffalosInnerSeasonalCalving as PostBuffaloRequestBuffalosInnerSeasonalCalving +from openapi_client.models.post_buffalo_request_vegetation_inner import PostBuffaloRequestVegetationInner as PostBuffaloRequestVegetationInner +from openapi_client.models.post_cotton200_response import PostCotton200Response as PostCotton200Response +from openapi_client.models.post_cotton200_response_intermediate_inner import PostCotton200ResponseIntermediateInner as PostCotton200ResponseIntermediateInner +from openapi_client.models.post_cotton200_response_intermediate_inner_intensities import PostCotton200ResponseIntermediateInnerIntensities as PostCotton200ResponseIntermediateInnerIntensities +from openapi_client.models.post_cotton200_response_net import PostCotton200ResponseNet as PostCotton200ResponseNet +from openapi_client.models.post_cotton200_response_scope1 import PostCotton200ResponseScope1 as PostCotton200ResponseScope1 +from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 as PostCotton200ResponseScope3 +from openapi_client.models.post_cotton_request import PostCottonRequest as PostCottonRequest +from openapi_client.models.post_cotton_request_crops_inner import PostCottonRequestCropsInner as PostCottonRequestCropsInner +from openapi_client.models.post_cotton_request_vegetation_inner import PostCottonRequestVegetationInner as PostCottonRequestVegetationInner +from openapi_client.models.post_dairy200_response import PostDairy200Response as PostDairy200Response +from openapi_client.models.post_dairy200_response_intensities import PostDairy200ResponseIntensities as PostDairy200ResponseIntensities +from openapi_client.models.post_dairy200_response_intermediate_inner import PostDairy200ResponseIntermediateInner as PostDairy200ResponseIntermediateInner +from openapi_client.models.post_dairy200_response_net import PostDairy200ResponseNet as PostDairy200ResponseNet +from openapi_client.models.post_dairy200_response_scope1 import PostDairy200ResponseScope1 as PostDairy200ResponseScope1 +from openapi_client.models.post_dairy200_response_scope3 import PostDairy200ResponseScope3 as PostDairy200ResponseScope3 +from openapi_client.models.post_dairy_request import PostDairyRequest as PostDairyRequest +from openapi_client.models.post_dairy_request_dairy_inner import PostDairyRequestDairyInner as PostDairyRequestDairyInner +from openapi_client.models.post_dairy_request_dairy_inner_areas import PostDairyRequestDairyInnerAreas as PostDairyRequestDairyInnerAreas +from openapi_client.models.post_dairy_request_dairy_inner_classes import PostDairyRequestDairyInnerClasses as PostDairyRequestDairyInnerClasses +from openapi_client.models.post_dairy_request_dairy_inner_classes_dairy_bulls_gt1 import PostDairyRequestDairyInnerClassesDairyBullsGt1 as PostDairyRequestDairyInnerClassesDairyBullsGt1 +from openapi_client.models.post_dairy_request_dairy_inner_classes_dairy_bulls_lt1 import PostDairyRequestDairyInnerClassesDairyBullsLt1 as PostDairyRequestDairyInnerClassesDairyBullsLt1 +from openapi_client.models.post_dairy_request_dairy_inner_classes_heifers_gt1 import PostDairyRequestDairyInnerClassesHeifersGt1 as PostDairyRequestDairyInnerClassesHeifersGt1 +from openapi_client.models.post_dairy_request_dairy_inner_classes_heifers_lt1 import PostDairyRequestDairyInnerClassesHeifersLt1 as PostDairyRequestDairyInnerClassesHeifersLt1 +from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows import PostDairyRequestDairyInnerClassesMilkingCows as PostDairyRequestDairyInnerClassesMilkingCows +from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows_autumn import PostDairyRequestDairyInnerClassesMilkingCowsAutumn as PostDairyRequestDairyInnerClassesMilkingCowsAutumn +from openapi_client.models.post_dairy_request_dairy_inner_manure_management_milking_cows import PostDairyRequestDairyInnerManureManagementMilkingCows as PostDairyRequestDairyInnerManureManagementMilkingCows +from openapi_client.models.post_dairy_request_dairy_inner_seasonal_fertiliser import PostDairyRequestDairyInnerSeasonalFertiliser as PostDairyRequestDairyInnerSeasonalFertiliser +from openapi_client.models.post_dairy_request_dairy_inner_seasonal_fertiliser_autumn import PostDairyRequestDairyInnerSeasonalFertiliserAutumn as PostDairyRequestDairyInnerSeasonalFertiliserAutumn +from openapi_client.models.post_dairy_request_vegetation_inner import PostDairyRequestVegetationInner as PostDairyRequestVegetationInner +from openapi_client.models.post_deer200_response import PostDeer200Response as PostDeer200Response +from openapi_client.models.post_deer200_response_intensities import PostDeer200ResponseIntensities as PostDeer200ResponseIntensities +from openapi_client.models.post_deer200_response_intermediate_inner import PostDeer200ResponseIntermediateInner as PostDeer200ResponseIntermediateInner +from openapi_client.models.post_deer200_response_net import PostDeer200ResponseNet as PostDeer200ResponseNet +from openapi_client.models.post_deer_request import PostDeerRequest as PostDeerRequest +from openapi_client.models.post_deer_request_deers_inner import PostDeerRequestDeersInner as PostDeerRequestDeersInner +from openapi_client.models.post_deer_request_deers_inner_classes import PostDeerRequestDeersInnerClasses as PostDeerRequestDeersInnerClasses +from openapi_client.models.post_deer_request_deers_inner_classes_breeding_does import PostDeerRequestDeersInnerClassesBreedingDoes as PostDeerRequestDeersInnerClassesBreedingDoes +from openapi_client.models.post_deer_request_deers_inner_classes_bucks import PostDeerRequestDeersInnerClassesBucks as PostDeerRequestDeersInnerClassesBucks +from openapi_client.models.post_deer_request_deers_inner_classes_fawn import PostDeerRequestDeersInnerClassesFawn as PostDeerRequestDeersInnerClassesFawn +from openapi_client.models.post_deer_request_deers_inner_classes_other_does import PostDeerRequestDeersInnerClassesOtherDoes as PostDeerRequestDeersInnerClassesOtherDoes +from openapi_client.models.post_deer_request_deers_inner_classes_trade_bucks import PostDeerRequestDeersInnerClassesTradeBucks as PostDeerRequestDeersInnerClassesTradeBucks +from openapi_client.models.post_deer_request_deers_inner_classes_trade_does import PostDeerRequestDeersInnerClassesTradeDoes as PostDeerRequestDeersInnerClassesTradeDoes +from openapi_client.models.post_deer_request_deers_inner_classes_trade_fawn import PostDeerRequestDeersInnerClassesTradeFawn as PostDeerRequestDeersInnerClassesTradeFawn +from openapi_client.models.post_deer_request_deers_inner_classes_trade_other_does import PostDeerRequestDeersInnerClassesTradeOtherDoes as PostDeerRequestDeersInnerClassesTradeOtherDoes +from openapi_client.models.post_deer_request_deers_inner_does_fawning import PostDeerRequestDeersInnerDoesFawning as PostDeerRequestDeersInnerDoesFawning +from openapi_client.models.post_deer_request_deers_inner_seasonal_fawning import PostDeerRequestDeersInnerSeasonalFawning as PostDeerRequestDeersInnerSeasonalFawning +from openapi_client.models.post_deer_request_vegetation_inner import PostDeerRequestVegetationInner as PostDeerRequestVegetationInner +from openapi_client.models.post_feedlot200_response import PostFeedlot200Response as PostFeedlot200Response +from openapi_client.models.post_feedlot200_response_intermediate_inner import PostFeedlot200ResponseIntermediateInner as PostFeedlot200ResponseIntermediateInner +from openapi_client.models.post_feedlot200_response_intermediate_inner_intensities import PostFeedlot200ResponseIntermediateInnerIntensities as PostFeedlot200ResponseIntermediateInnerIntensities +from openapi_client.models.post_feedlot200_response_intermediate_inner_net import PostFeedlot200ResponseIntermediateInnerNet as PostFeedlot200ResponseIntermediateInnerNet +from openapi_client.models.post_feedlot200_response_scope1 import PostFeedlot200ResponseScope1 as PostFeedlot200ResponseScope1 +from openapi_client.models.post_feedlot200_response_scope3 import PostFeedlot200ResponseScope3 as PostFeedlot200ResponseScope3 +from openapi_client.models.post_feedlot_request import PostFeedlotRequest as PostFeedlotRequest +from openapi_client.models.post_feedlot_request_feedlots_inner import PostFeedlotRequestFeedlotsInner as PostFeedlotRequestFeedlotsInner +from openapi_client.models.post_feedlot_request_feedlots_inner_groups_inner import PostFeedlotRequestFeedlotsInnerGroupsInner as PostFeedlotRequestFeedlotsInnerGroupsInner +from openapi_client.models.post_feedlot_request_feedlots_inner_groups_inner_stays_inner import PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner as PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner +from openapi_client.models.post_feedlot_request_feedlots_inner_purchases import PostFeedlotRequestFeedlotsInnerPurchases as PostFeedlotRequestFeedlotsInnerPurchases +from openapi_client.models.post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner as PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner +from openapi_client.models.post_feedlot_request_feedlots_inner_sales import PostFeedlotRequestFeedlotsInnerSales as PostFeedlotRequestFeedlotsInnerSales +from openapi_client.models.post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner as PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner +from openapi_client.models.post_feedlot_request_vegetation_inner import PostFeedlotRequestVegetationInner as PostFeedlotRequestVegetationInner +from openapi_client.models.post_goat200_response import PostGoat200Response as PostGoat200Response +from openapi_client.models.post_goat200_response_intensities import PostGoat200ResponseIntensities as PostGoat200ResponseIntensities +from openapi_client.models.post_goat200_response_intermediate_inner import PostGoat200ResponseIntermediateInner as PostGoat200ResponseIntermediateInner +from openapi_client.models.post_goat200_response_net import PostGoat200ResponseNet as PostGoat200ResponseNet +from openapi_client.models.post_goat_request import PostGoatRequest as PostGoatRequest +from openapi_client.models.post_goat_request_goats_inner import PostGoatRequestGoatsInner as PostGoatRequestGoatsInner +from openapi_client.models.post_goat_request_goats_inner_classes import PostGoatRequestGoatsInnerClasses as PostGoatRequestGoatsInnerClasses +from openapi_client.models.post_goat_request_goats_inner_classes_breeding_does_nannies import PostGoatRequestGoatsInnerClassesBreedingDoesNannies as PostGoatRequestGoatsInnerClassesBreedingDoesNannies +from openapi_client.models.post_goat_request_goats_inner_classes_bucks_billy import PostGoatRequestGoatsInnerClassesBucksBilly as PostGoatRequestGoatsInnerClassesBucksBilly +from openapi_client.models.post_goat_request_goats_inner_classes_kids import PostGoatRequestGoatsInnerClassesKids as PostGoatRequestGoatsInnerClassesKids +from openapi_client.models.post_goat_request_goats_inner_classes_maiden_breeding_does_nannies import PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies as PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies +from openapi_client.models.post_goat_request_goats_inner_classes_other_does_culled_females import PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales as PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales +from openapi_client.models.post_goat_request_goats_inner_classes_trade_breeding_does_nannies import PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies as PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies +from openapi_client.models.post_goat_request_goats_inner_classes_trade_bucks import PostGoatRequestGoatsInnerClassesTradeBucks as PostGoatRequestGoatsInnerClassesTradeBucks +from openapi_client.models.post_goat_request_goats_inner_classes_trade_does import PostGoatRequestGoatsInnerClassesTradeDoes as PostGoatRequestGoatsInnerClassesTradeDoes +from openapi_client.models.post_goat_request_goats_inner_classes_trade_kids import PostGoatRequestGoatsInnerClassesTradeKids as PostGoatRequestGoatsInnerClassesTradeKids +from openapi_client.models.post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies import PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies as PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies +from openapi_client.models.post_goat_request_goats_inner_classes_trade_other_does_culled_females import PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales as PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales +from openapi_client.models.post_goat_request_goats_inner_classes_trade_wethers import PostGoatRequestGoatsInnerClassesTradeWethers as PostGoatRequestGoatsInnerClassesTradeWethers +from openapi_client.models.post_goat_request_goats_inner_classes_wethers import PostGoatRequestGoatsInnerClassesWethers as PostGoatRequestGoatsInnerClassesWethers +from openapi_client.models.post_goat_request_vegetation_inner import PostGoatRequestVegetationInner as PostGoatRequestVegetationInner +from openapi_client.models.post_grains200_response import PostGrains200Response as PostGrains200Response +from openapi_client.models.post_grains200_response_intermediate_inner import PostGrains200ResponseIntermediateInner as PostGrains200ResponseIntermediateInner +from openapi_client.models.post_grains200_response_intermediate_inner_intensities_with_sequestration import PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration as PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration +from openapi_client.models.post_grains_request import PostGrainsRequest as PostGrainsRequest +from openapi_client.models.post_grains_request_crops_inner import PostGrainsRequestCropsInner as PostGrainsRequestCropsInner +from openapi_client.models.post_horticulture200_response import PostHorticulture200Response as PostHorticulture200Response +from openapi_client.models.post_horticulture200_response_intermediate_inner import PostHorticulture200ResponseIntermediateInner as PostHorticulture200ResponseIntermediateInner +from openapi_client.models.post_horticulture200_response_intermediate_inner_intensities_with_sequestration import PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration as PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration +from openapi_client.models.post_horticulture200_response_scope1 import PostHorticulture200ResponseScope1 as PostHorticulture200ResponseScope1 +from openapi_client.models.post_horticulture_request import PostHorticultureRequest as PostHorticultureRequest +from openapi_client.models.post_horticulture_request_crops_inner import PostHorticultureRequestCropsInner as PostHorticultureRequestCropsInner +from openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner import PostHorticultureRequestCropsInnerRefrigerantsInner as PostHorticultureRequestCropsInnerRefrigerantsInner +from openapi_client.models.post_pork200_response import PostPork200Response as PostPork200Response +from openapi_client.models.post_pork200_response_intensities import PostPork200ResponseIntensities as PostPork200ResponseIntensities +from openapi_client.models.post_pork200_response_intermediate_inner import PostPork200ResponseIntermediateInner as PostPork200ResponseIntermediateInner +from openapi_client.models.post_pork200_response_net import PostPork200ResponseNet as PostPork200ResponseNet +from openapi_client.models.post_pork200_response_scope1 import PostPork200ResponseScope1 as PostPork200ResponseScope1 +from openapi_client.models.post_pork200_response_scope3 import PostPork200ResponseScope3 as PostPork200ResponseScope3 +from openapi_client.models.post_pork_request import PostPorkRequest as PostPorkRequest +from openapi_client.models.post_pork_request_pork_inner import PostPorkRequestPorkInner as PostPorkRequestPorkInner +from openapi_client.models.post_pork_request_pork_inner_classes import PostPorkRequestPorkInnerClasses as PostPorkRequestPorkInnerClasses +from openapi_client.models.post_pork_request_pork_inner_classes_boars import PostPorkRequestPorkInnerClassesBoars as PostPorkRequestPorkInnerClassesBoars +from openapi_client.models.post_pork_request_pork_inner_classes_gilts import PostPorkRequestPorkInnerClassesGilts as PostPorkRequestPorkInnerClassesGilts +from openapi_client.models.post_pork_request_pork_inner_classes_growers import PostPorkRequestPorkInnerClassesGrowers as PostPorkRequestPorkInnerClassesGrowers +from openapi_client.models.post_pork_request_pork_inner_classes_slaughter_pigs import PostPorkRequestPorkInnerClassesSlaughterPigs as PostPorkRequestPorkInnerClassesSlaughterPigs +from openapi_client.models.post_pork_request_pork_inner_classes_sows import PostPorkRequestPorkInnerClassesSows as PostPorkRequestPorkInnerClassesSows +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure import PostPorkRequestPorkInnerClassesSowsManure as PostPorkRequestPorkInnerClassesSowsManure +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure_spring import PostPorkRequestPorkInnerClassesSowsManureSpring as PostPorkRequestPorkInnerClassesSowsManureSpring +from openapi_client.models.post_pork_request_pork_inner_classes_suckers import PostPorkRequestPorkInnerClassesSuckers as PostPorkRequestPorkInnerClassesSuckers +from openapi_client.models.post_pork_request_pork_inner_classes_weaners import PostPorkRequestPorkInnerClassesWeaners as PostPorkRequestPorkInnerClassesWeaners +from openapi_client.models.post_pork_request_pork_inner_feed_products_inner import PostPorkRequestPorkInnerFeedProductsInner as PostPorkRequestPorkInnerFeedProductsInner +from openapi_client.models.post_pork_request_pork_inner_feed_products_inner_ingredients import PostPorkRequestPorkInnerFeedProductsInnerIngredients as PostPorkRequestPorkInnerFeedProductsInnerIngredients +from openapi_client.models.post_pork_request_vegetation_inner import PostPorkRequestVegetationInner as PostPorkRequestVegetationInner +from openapi_client.models.post_poultry200_response import PostPoultry200Response as PostPoultry200Response +from openapi_client.models.post_poultry200_response_intensities import PostPoultry200ResponseIntensities as PostPoultry200ResponseIntensities +from openapi_client.models.post_poultry200_response_intermediate_broilers_inner import PostPoultry200ResponseIntermediateBroilersInner as PostPoultry200ResponseIntermediateBroilersInner +from openapi_client.models.post_poultry200_response_intermediate_broilers_inner_intensities import PostPoultry200ResponseIntermediateBroilersInnerIntensities as PostPoultry200ResponseIntermediateBroilersInnerIntensities +from openapi_client.models.post_poultry200_response_intermediate_layers_inner import PostPoultry200ResponseIntermediateLayersInner as PostPoultry200ResponseIntermediateLayersInner +from openapi_client.models.post_poultry200_response_intermediate_layers_inner_intensities import PostPoultry200ResponseIntermediateLayersInnerIntensities as PostPoultry200ResponseIntermediateLayersInnerIntensities +from openapi_client.models.post_poultry200_response_net import PostPoultry200ResponseNet as PostPoultry200ResponseNet +from openapi_client.models.post_poultry200_response_scope1 import PostPoultry200ResponseScope1 as PostPoultry200ResponseScope1 +from openapi_client.models.post_poultry200_response_scope3 import PostPoultry200ResponseScope3 as PostPoultry200ResponseScope3 +from openapi_client.models.post_poultry_request import PostPoultryRequest as PostPoultryRequest +from openapi_client.models.post_poultry_request_broilers_inner import PostPoultryRequestBroilersInner as PostPoultryRequestBroilersInner +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner import PostPoultryRequestBroilersInnerGroupsInner as PostPoultryRequestBroilersInnerGroupsInner +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner import PostPoultryRequestBroilersInnerGroupsInnerFeedInner as PostPoultryRequestBroilersInnerGroupsInnerFeedInner +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients import PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients as PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers import PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers as PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers +from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_growers_purchases import PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases as PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases +from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_layers_purchases import PostPoultryRequestBroilersInnerMeatChickenLayersPurchases as PostPoultryRequestBroilersInnerMeatChickenLayersPurchases +from openapi_client.models.post_poultry_request_broilers_inner_meat_other_purchases import PostPoultryRequestBroilersInnerMeatOtherPurchases as PostPoultryRequestBroilersInnerMeatOtherPurchases +from openapi_client.models.post_poultry_request_broilers_inner_sales_inner import PostPoultryRequestBroilersInnerSalesInner as PostPoultryRequestBroilersInnerSalesInner +from openapi_client.models.post_poultry_request_layers_inner import PostPoultryRequestLayersInner as PostPoultryRequestLayersInner +from openapi_client.models.post_poultry_request_layers_inner_layers import PostPoultryRequestLayersInnerLayers as PostPoultryRequestLayersInnerLayers +from openapi_client.models.post_poultry_request_layers_inner_layers_egg_sale import PostPoultryRequestLayersInnerLayersEggSale as PostPoultryRequestLayersInnerLayersEggSale +from openapi_client.models.post_poultry_request_layers_inner_layers_purchases import PostPoultryRequestLayersInnerLayersPurchases as PostPoultryRequestLayersInnerLayersPurchases +from openapi_client.models.post_poultry_request_layers_inner_meat_chicken_layers import PostPoultryRequestLayersInnerMeatChickenLayers as PostPoultryRequestLayersInnerMeatChickenLayers +from openapi_client.models.post_poultry_request_layers_inner_meat_chicken_layers_egg_sale import PostPoultryRequestLayersInnerMeatChickenLayersEggSale as PostPoultryRequestLayersInnerMeatChickenLayersEggSale +from openapi_client.models.post_poultry_request_vegetation_inner import PostPoultryRequestVegetationInner as PostPoultryRequestVegetationInner +from openapi_client.models.post_processing200_response import PostProcessing200Response as PostProcessing200Response +from openapi_client.models.post_processing200_response_intensities_inner import PostProcessing200ResponseIntensitiesInner as PostProcessing200ResponseIntensitiesInner +from openapi_client.models.post_processing200_response_intermediate_inner import PostProcessing200ResponseIntermediateInner as PostProcessing200ResponseIntermediateInner +from openapi_client.models.post_processing200_response_net import PostProcessing200ResponseNet as PostProcessing200ResponseNet +from openapi_client.models.post_processing200_response_scope1 import PostProcessing200ResponseScope1 as PostProcessing200ResponseScope1 +from openapi_client.models.post_processing200_response_scope3 import PostProcessing200ResponseScope3 as PostProcessing200ResponseScope3 +from openapi_client.models.post_processing_request import PostProcessingRequest as PostProcessingRequest +from openapi_client.models.post_processing_request_products_inner import PostProcessingRequestProductsInner as PostProcessingRequestProductsInner +from openapi_client.models.post_processing_request_products_inner_product import PostProcessingRequestProductsInnerProduct as PostProcessingRequestProductsInnerProduct +from openapi_client.models.post_rice200_response import PostRice200Response as PostRice200Response +from openapi_client.models.post_rice200_response_intensities import PostRice200ResponseIntensities as PostRice200ResponseIntensities +from openapi_client.models.post_rice200_response_intermediate_inner import PostRice200ResponseIntermediateInner as PostRice200ResponseIntermediateInner +from openapi_client.models.post_rice200_response_intermediate_inner_intensities import PostRice200ResponseIntermediateInnerIntensities as PostRice200ResponseIntermediateInnerIntensities +from openapi_client.models.post_rice200_response_scope1 import PostRice200ResponseScope1 as PostRice200ResponseScope1 +from openapi_client.models.post_rice_request import PostRiceRequest as PostRiceRequest +from openapi_client.models.post_rice_request_crops_inner import PostRiceRequestCropsInner as PostRiceRequestCropsInner +from openapi_client.models.post_sheep200_response import PostSheep200Response as PostSheep200Response +from openapi_client.models.post_sheep200_response_intermediate_inner import PostSheep200ResponseIntermediateInner as PostSheep200ResponseIntermediateInner +from openapi_client.models.post_sheep200_response_intermediate_inner_intensities import PostSheep200ResponseIntermediateInnerIntensities as PostSheep200ResponseIntermediateInnerIntensities +from openapi_client.models.post_sheep200_response_net import PostSheep200ResponseNet as PostSheep200ResponseNet +from openapi_client.models.post_sheep_request import PostSheepRequest as PostSheepRequest +from openapi_client.models.post_sheep_request_sheep_inner import PostSheepRequestSheepInner as PostSheepRequestSheepInner +from openapi_client.models.post_sheep_request_sheep_inner_classes import PostSheepRequestSheepInnerClasses as PostSheepRequestSheepInnerClasses +from openapi_client.models.post_sheep_request_sheep_inner_classes_rams import PostSheepRequestSheepInnerClassesRams as PostSheepRequestSheepInnerClassesRams +from openapi_client.models.post_sheep_request_sheep_inner_classes_rams_autumn import PostSheepRequestSheepInnerClassesRamsAutumn as PostSheepRequestSheepInnerClassesRamsAutumn +from openapi_client.models.post_sheep_request_sheep_inner_classes_trade_ewes import PostSheepRequestSheepInnerClassesTradeEwes as PostSheepRequestSheepInnerClassesTradeEwes +from openapi_client.models.post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets import PostSheepRequestSheepInnerClassesTradeLambsAndHoggets as PostSheepRequestSheepInnerClassesTradeLambsAndHoggets +from openapi_client.models.post_sheep_request_sheep_inner_ewes_lambing import PostSheepRequestSheepInnerEwesLambing as PostSheepRequestSheepInnerEwesLambing +from openapi_client.models.post_sheep_request_sheep_inner_seasonal_lambing import PostSheepRequestSheepInnerSeasonalLambing as PostSheepRequestSheepInnerSeasonalLambing +from openapi_client.models.post_sheep_request_vegetation_inner import PostSheepRequestVegetationInner as PostSheepRequestVegetationInner +from openapi_client.models.post_sheepbeef200_response import PostSheepbeef200Response as PostSheepbeef200Response +from openapi_client.models.post_sheepbeef200_response_intensities import PostSheepbeef200ResponseIntensities as PostSheepbeef200ResponseIntensities +from openapi_client.models.post_sheepbeef200_response_intermediate import PostSheepbeef200ResponseIntermediate as PostSheepbeef200ResponseIntermediate +from openapi_client.models.post_sheepbeef200_response_intermediate_beef import PostSheepbeef200ResponseIntermediateBeef as PostSheepbeef200ResponseIntermediateBeef +from openapi_client.models.post_sheepbeef200_response_intermediate_sheep import PostSheepbeef200ResponseIntermediateSheep as PostSheepbeef200ResponseIntermediateSheep +from openapi_client.models.post_sheepbeef200_response_net import PostSheepbeef200ResponseNet as PostSheepbeef200ResponseNet +from openapi_client.models.post_sheepbeef_request import PostSheepbeefRequest as PostSheepbeefRequest +from openapi_client.models.post_sheepbeef_request_vegetation_inner import PostSheepbeefRequestVegetationInner as PostSheepbeefRequestVegetationInner +from openapi_client.models.post_sugar200_response import PostSugar200Response as PostSugar200Response +from openapi_client.models.post_sugar200_response_intermediate_inner import PostSugar200ResponseIntermediateInner as PostSugar200ResponseIntermediateInner +from openapi_client.models.post_sugar200_response_intermediate_inner_intensities import PostSugar200ResponseIntermediateInnerIntensities as PostSugar200ResponseIntermediateInnerIntensities +from openapi_client.models.post_sugar_request import PostSugarRequest as PostSugarRequest +from openapi_client.models.post_sugar_request_crops_inner import PostSugarRequestCropsInner as PostSugarRequestCropsInner +from openapi_client.models.post_vineyard200_response import PostVineyard200Response as PostVineyard200Response +from openapi_client.models.post_vineyard200_response_intermediate_inner import PostVineyard200ResponseIntermediateInner as PostVineyard200ResponseIntermediateInner +from openapi_client.models.post_vineyard200_response_intermediate_inner_intensities import PostVineyard200ResponseIntermediateInnerIntensities as PostVineyard200ResponseIntermediateInnerIntensities +from openapi_client.models.post_vineyard200_response_net import PostVineyard200ResponseNet as PostVineyard200ResponseNet +from openapi_client.models.post_vineyard200_response_scope1 import PostVineyard200ResponseScope1 as PostVineyard200ResponseScope1 +from openapi_client.models.post_vineyard200_response_scope3 import PostVineyard200ResponseScope3 as PostVineyard200ResponseScope3 +from openapi_client.models.post_vineyard_request import PostVineyardRequest as PostVineyardRequest +from openapi_client.models.post_vineyard_request_vegetation_inner import PostVineyardRequestVegetationInner as PostVineyardRequestVegetationInner +from openapi_client.models.post_vineyard_request_vineyards_inner import PostVineyardRequestVineyardsInner as PostVineyardRequestVineyardsInner +from openapi_client.models.post_wildcatchfishery200_response import PostWildcatchfishery200Response as PostWildcatchfishery200Response +from openapi_client.models.post_wildcatchfishery200_response_intensities import PostWildcatchfishery200ResponseIntensities as PostWildcatchfishery200ResponseIntensities +from openapi_client.models.post_wildcatchfishery200_response_intermediate_inner import PostWildcatchfishery200ResponseIntermediateInner as PostWildcatchfishery200ResponseIntermediateInner +from openapi_client.models.post_wildcatchfishery200_response_scope1 import PostWildcatchfishery200ResponseScope1 as PostWildcatchfishery200ResponseScope1 +from openapi_client.models.post_wildcatchfishery_request import PostWildcatchfisheryRequest as PostWildcatchfisheryRequest +from openapi_client.models.post_wildcatchfishery_request_enterprises_inner import PostWildcatchfisheryRequestEnterprisesInner as PostWildcatchfisheryRequestEnterprisesInner +from openapi_client.models.post_wildcatchfishery_request_enterprises_inner_bait_inner import PostWildcatchfisheryRequestEnterprisesInnerBaitInner as PostWildcatchfisheryRequestEnterprisesInnerBaitInner +from openapi_client.models.post_wildseafisheries200_response import PostWildseafisheries200Response as PostWildseafisheries200Response +from openapi_client.models.post_wildseafisheries200_response_intermediate_inner import PostWildseafisheries200ResponseIntermediateInner as PostWildseafisheries200ResponseIntermediateInner +from openapi_client.models.post_wildseafisheries200_response_intermediate_inner_intensities import PostWildseafisheries200ResponseIntermediateInnerIntensities as PostWildseafisheries200ResponseIntermediateInnerIntensities +from openapi_client.models.post_wildseafisheries200_response_scope1 import PostWildseafisheries200ResponseScope1 as PostWildseafisheries200ResponseScope1 +from openapi_client.models.post_wildseafisheries200_response_scope3 import PostWildseafisheries200ResponseScope3 as PostWildseafisheries200ResponseScope3 +from openapi_client.models.post_wildseafisheries_request import PostWildseafisheriesRequest as PostWildseafisheriesRequest +from openapi_client.models.post_wildseafisheries_request_enterprises_inner import PostWildseafisheriesRequestEnterprisesInner as PostWildseafisheriesRequestEnterprisesInner +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_bait_inner import PostWildseafisheriesRequestEnterprisesInnerBaitInner as PostWildseafisheriesRequestEnterprisesInnerBaitInner +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_custombait_inner import PostWildseafisheriesRequestEnterprisesInnerCustombaitInner as PostWildseafisheriesRequestEnterprisesInnerCustombaitInner +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_flights_inner import PostWildseafisheriesRequestEnterprisesInnerFlightsInner as PostWildseafisheriesRequestEnterprisesInnerFlightsInner +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_refrigerants_inner import PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner as PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_transports_inner import PostWildseafisheriesRequestEnterprisesInnerTransportsInner as PostWildseafisheriesRequestEnterprisesInnerTransportsInner diff --git a/examples/python-api-client/api-client/openapi_client/api/__init__.py b/examples/python-api-client/api-client/openapi_client/api/__init__.py new file mode 100644 index 00000000..8ea552ff --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/api/__init__.py @@ -0,0 +1,5 @@ +# flake8: noqa + +# import apis into api package +from openapi_client.api.gaf_api import GAFApi + diff --git a/examples/python-api-client/api-client/openapi_client/api/gaf_api.py b/examples/python-api-client/api-client/openapi_client/api/gaf_api.py new file mode 100644 index 00000000..37d5f8b3 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/api/gaf_api.py @@ -0,0 +1,5596 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from openapi_client.models.post_aquaculture200_response import PostAquaculture200Response +from openapi_client.models.post_aquaculture_request import PostAquacultureRequest +from openapi_client.models.post_beef200_response import PostBeef200Response +from openapi_client.models.post_beef_request import PostBeefRequest +from openapi_client.models.post_buffalo200_response import PostBuffalo200Response +from openapi_client.models.post_buffalo_request import PostBuffaloRequest +from openapi_client.models.post_cotton200_response import PostCotton200Response +from openapi_client.models.post_cotton_request import PostCottonRequest +from openapi_client.models.post_dairy200_response import PostDairy200Response +from openapi_client.models.post_dairy_request import PostDairyRequest +from openapi_client.models.post_deer200_response import PostDeer200Response +from openapi_client.models.post_deer_request import PostDeerRequest +from openapi_client.models.post_feedlot200_response import PostFeedlot200Response +from openapi_client.models.post_feedlot_request import PostFeedlotRequest +from openapi_client.models.post_goat200_response import PostGoat200Response +from openapi_client.models.post_goat_request import PostGoatRequest +from openapi_client.models.post_grains200_response import PostGrains200Response +from openapi_client.models.post_grains_request import PostGrainsRequest +from openapi_client.models.post_horticulture200_response import PostHorticulture200Response +from openapi_client.models.post_horticulture_request import PostHorticultureRequest +from openapi_client.models.post_pork200_response import PostPork200Response +from openapi_client.models.post_pork_request import PostPorkRequest +from openapi_client.models.post_poultry200_response import PostPoultry200Response +from openapi_client.models.post_poultry_request import PostPoultryRequest +from openapi_client.models.post_processing200_response import PostProcessing200Response +from openapi_client.models.post_processing_request import PostProcessingRequest +from openapi_client.models.post_rice200_response import PostRice200Response +from openapi_client.models.post_rice_request import PostRiceRequest +from openapi_client.models.post_sheep200_response import PostSheep200Response +from openapi_client.models.post_sheep_request import PostSheepRequest +from openapi_client.models.post_sheepbeef200_response import PostSheepbeef200Response +from openapi_client.models.post_sheepbeef_request import PostSheepbeefRequest +from openapi_client.models.post_sugar200_response import PostSugar200Response +from openapi_client.models.post_sugar_request import PostSugarRequest +from openapi_client.models.post_vineyard200_response import PostVineyard200Response +from openapi_client.models.post_vineyard_request import PostVineyardRequest +from openapi_client.models.post_wildcatchfishery200_response import PostWildcatchfishery200Response +from openapi_client.models.post_wildcatchfishery_request import PostWildcatchfisheryRequest +from openapi_client.models.post_wildseafisheries200_response import PostWildseafisheries200Response +from openapi_client.models.post_wildseafisheries_request import PostWildseafisheriesRequest + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class GAFApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def post_aquaculture( + self, + post_aquaculture_request: PostAquacultureRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostAquaculture200Response: + """Perform aquaculture calculation + + Retrieve a simple JSON response + + :param post_aquaculture_request: (required) + :type post_aquaculture_request: PostAquacultureRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_aquaculture_serialize( + post_aquaculture_request=post_aquaculture_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostAquaculture200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_aquaculture_with_http_info( + self, + post_aquaculture_request: PostAquacultureRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostAquaculture200Response]: + """Perform aquaculture calculation + + Retrieve a simple JSON response + + :param post_aquaculture_request: (required) + :type post_aquaculture_request: PostAquacultureRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_aquaculture_serialize( + post_aquaculture_request=post_aquaculture_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostAquaculture200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_aquaculture_without_preload_content( + self, + post_aquaculture_request: PostAquacultureRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform aquaculture calculation + + Retrieve a simple JSON response + + :param post_aquaculture_request: (required) + :type post_aquaculture_request: PostAquacultureRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_aquaculture_serialize( + post_aquaculture_request=post_aquaculture_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostAquaculture200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_aquaculture_serialize( + self, + post_aquaculture_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_aquaculture_request is not None: + _body_params = post_aquaculture_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/aquaculture', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_beef( + self, + post_beef_request: PostBeefRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostBeef200Response: + """Perform beef calculation + + Retrieve a simple JSON response + + :param post_beef_request: (required) + :type post_beef_request: PostBeefRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_beef_serialize( + post_beef_request=post_beef_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostBeef200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_beef_with_http_info( + self, + post_beef_request: PostBeefRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostBeef200Response]: + """Perform beef calculation + + Retrieve a simple JSON response + + :param post_beef_request: (required) + :type post_beef_request: PostBeefRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_beef_serialize( + post_beef_request=post_beef_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostBeef200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_beef_without_preload_content( + self, + post_beef_request: PostBeefRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform beef calculation + + Retrieve a simple JSON response + + :param post_beef_request: (required) + :type post_beef_request: PostBeefRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_beef_serialize( + post_beef_request=post_beef_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostBeef200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_beef_serialize( + self, + post_beef_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_beef_request is not None: + _body_params = post_beef_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/beef', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_buffalo( + self, + post_buffalo_request: PostBuffaloRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostBuffalo200Response: + """Perform buffalo calculation + + Retrieve a simple JSON response + + :param post_buffalo_request: (required) + :type post_buffalo_request: PostBuffaloRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_buffalo_serialize( + post_buffalo_request=post_buffalo_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostBuffalo200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_buffalo_with_http_info( + self, + post_buffalo_request: PostBuffaloRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostBuffalo200Response]: + """Perform buffalo calculation + + Retrieve a simple JSON response + + :param post_buffalo_request: (required) + :type post_buffalo_request: PostBuffaloRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_buffalo_serialize( + post_buffalo_request=post_buffalo_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostBuffalo200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_buffalo_without_preload_content( + self, + post_buffalo_request: PostBuffaloRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform buffalo calculation + + Retrieve a simple JSON response + + :param post_buffalo_request: (required) + :type post_buffalo_request: PostBuffaloRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_buffalo_serialize( + post_buffalo_request=post_buffalo_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostBuffalo200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_buffalo_serialize( + self, + post_buffalo_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_buffalo_request is not None: + _body_params = post_buffalo_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/buffalo', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_cotton( + self, + post_cotton_request: PostCottonRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostCotton200Response: + """Perform cotton calculation + + Retrieve a simple JSON response + + :param post_cotton_request: (required) + :type post_cotton_request: PostCottonRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_cotton_serialize( + post_cotton_request=post_cotton_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostCotton200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_cotton_with_http_info( + self, + post_cotton_request: PostCottonRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostCotton200Response]: + """Perform cotton calculation + + Retrieve a simple JSON response + + :param post_cotton_request: (required) + :type post_cotton_request: PostCottonRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_cotton_serialize( + post_cotton_request=post_cotton_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostCotton200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_cotton_without_preload_content( + self, + post_cotton_request: PostCottonRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform cotton calculation + + Retrieve a simple JSON response + + :param post_cotton_request: (required) + :type post_cotton_request: PostCottonRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_cotton_serialize( + post_cotton_request=post_cotton_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostCotton200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_cotton_serialize( + self, + post_cotton_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_cotton_request is not None: + _body_params = post_cotton_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/cotton', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_dairy( + self, + post_dairy_request: PostDairyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostDairy200Response: + """Perform dairy calculation + + Retrieve a simple JSON response + + :param post_dairy_request: (required) + :type post_dairy_request: PostDairyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_dairy_serialize( + post_dairy_request=post_dairy_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostDairy200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_dairy_with_http_info( + self, + post_dairy_request: PostDairyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostDairy200Response]: + """Perform dairy calculation + + Retrieve a simple JSON response + + :param post_dairy_request: (required) + :type post_dairy_request: PostDairyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_dairy_serialize( + post_dairy_request=post_dairy_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostDairy200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_dairy_without_preload_content( + self, + post_dairy_request: PostDairyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform dairy calculation + + Retrieve a simple JSON response + + :param post_dairy_request: (required) + :type post_dairy_request: PostDairyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_dairy_serialize( + post_dairy_request=post_dairy_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostDairy200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_dairy_serialize( + self, + post_dairy_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_dairy_request is not None: + _body_params = post_dairy_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/dairy', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_deer( + self, + post_deer_request: PostDeerRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostDeer200Response: + """Perform deer calculation + + Retrieve a simple JSON response + + :param post_deer_request: (required) + :type post_deer_request: PostDeerRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_deer_serialize( + post_deer_request=post_deer_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostDeer200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_deer_with_http_info( + self, + post_deer_request: PostDeerRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostDeer200Response]: + """Perform deer calculation + + Retrieve a simple JSON response + + :param post_deer_request: (required) + :type post_deer_request: PostDeerRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_deer_serialize( + post_deer_request=post_deer_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostDeer200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_deer_without_preload_content( + self, + post_deer_request: PostDeerRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform deer calculation + + Retrieve a simple JSON response + + :param post_deer_request: (required) + :type post_deer_request: PostDeerRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_deer_serialize( + post_deer_request=post_deer_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostDeer200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_deer_serialize( + self, + post_deer_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_deer_request is not None: + _body_params = post_deer_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/deer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_feedlot( + self, + post_feedlot_request: PostFeedlotRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostFeedlot200Response: + """Perform feedlot calculation + + Retrieve a simple JSON response + + :param post_feedlot_request: (required) + :type post_feedlot_request: PostFeedlotRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_feedlot_serialize( + post_feedlot_request=post_feedlot_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostFeedlot200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_feedlot_with_http_info( + self, + post_feedlot_request: PostFeedlotRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostFeedlot200Response]: + """Perform feedlot calculation + + Retrieve a simple JSON response + + :param post_feedlot_request: (required) + :type post_feedlot_request: PostFeedlotRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_feedlot_serialize( + post_feedlot_request=post_feedlot_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostFeedlot200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_feedlot_without_preload_content( + self, + post_feedlot_request: PostFeedlotRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform feedlot calculation + + Retrieve a simple JSON response + + :param post_feedlot_request: (required) + :type post_feedlot_request: PostFeedlotRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_feedlot_serialize( + post_feedlot_request=post_feedlot_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostFeedlot200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_feedlot_serialize( + self, + post_feedlot_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_feedlot_request is not None: + _body_params = post_feedlot_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/feedlot', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_goat( + self, + post_goat_request: PostGoatRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostGoat200Response: + """Perform goat calculation + + Retrieve a simple JSON response + + :param post_goat_request: (required) + :type post_goat_request: PostGoatRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_goat_serialize( + post_goat_request=post_goat_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostGoat200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_goat_with_http_info( + self, + post_goat_request: PostGoatRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostGoat200Response]: + """Perform goat calculation + + Retrieve a simple JSON response + + :param post_goat_request: (required) + :type post_goat_request: PostGoatRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_goat_serialize( + post_goat_request=post_goat_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostGoat200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_goat_without_preload_content( + self, + post_goat_request: PostGoatRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform goat calculation + + Retrieve a simple JSON response + + :param post_goat_request: (required) + :type post_goat_request: PostGoatRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_goat_serialize( + post_goat_request=post_goat_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostGoat200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_goat_serialize( + self, + post_goat_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_goat_request is not None: + _body_params = post_goat_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/goat', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_grains( + self, + post_grains_request: PostGrainsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostGrains200Response: + """Perform grains calculation + + Retrieve a simple JSON response + + :param post_grains_request: (required) + :type post_grains_request: PostGrainsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_grains_serialize( + post_grains_request=post_grains_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostGrains200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_grains_with_http_info( + self, + post_grains_request: PostGrainsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostGrains200Response]: + """Perform grains calculation + + Retrieve a simple JSON response + + :param post_grains_request: (required) + :type post_grains_request: PostGrainsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_grains_serialize( + post_grains_request=post_grains_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostGrains200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_grains_without_preload_content( + self, + post_grains_request: PostGrainsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform grains calculation + + Retrieve a simple JSON response + + :param post_grains_request: (required) + :type post_grains_request: PostGrainsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_grains_serialize( + post_grains_request=post_grains_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostGrains200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_grains_serialize( + self, + post_grains_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_grains_request is not None: + _body_params = post_grains_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/grains', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_horticulture( + self, + post_horticulture_request: PostHorticultureRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostHorticulture200Response: + """Perform horticulture calculation + + Retrieve a simple JSON response + + :param post_horticulture_request: (required) + :type post_horticulture_request: PostHorticultureRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_horticulture_serialize( + post_horticulture_request=post_horticulture_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostHorticulture200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_horticulture_with_http_info( + self, + post_horticulture_request: PostHorticultureRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostHorticulture200Response]: + """Perform horticulture calculation + + Retrieve a simple JSON response + + :param post_horticulture_request: (required) + :type post_horticulture_request: PostHorticultureRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_horticulture_serialize( + post_horticulture_request=post_horticulture_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostHorticulture200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_horticulture_without_preload_content( + self, + post_horticulture_request: PostHorticultureRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform horticulture calculation + + Retrieve a simple JSON response + + :param post_horticulture_request: (required) + :type post_horticulture_request: PostHorticultureRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_horticulture_serialize( + post_horticulture_request=post_horticulture_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostHorticulture200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_horticulture_serialize( + self, + post_horticulture_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_horticulture_request is not None: + _body_params = post_horticulture_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/horticulture', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_pork( + self, + post_pork_request: PostPorkRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostPork200Response: + """Perform pork calculation + + Retrieve a simple JSON response + + :param post_pork_request: (required) + :type post_pork_request: PostPorkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_pork_serialize( + post_pork_request=post_pork_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostPork200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_pork_with_http_info( + self, + post_pork_request: PostPorkRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostPork200Response]: + """Perform pork calculation + + Retrieve a simple JSON response + + :param post_pork_request: (required) + :type post_pork_request: PostPorkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_pork_serialize( + post_pork_request=post_pork_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostPork200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_pork_without_preload_content( + self, + post_pork_request: PostPorkRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform pork calculation + + Retrieve a simple JSON response + + :param post_pork_request: (required) + :type post_pork_request: PostPorkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_pork_serialize( + post_pork_request=post_pork_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostPork200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_pork_serialize( + self, + post_pork_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_pork_request is not None: + _body_params = post_pork_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/pork', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_poultry( + self, + post_poultry_request: PostPoultryRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostPoultry200Response: + """Perform poultry calculation + + Retrieve a simple JSON response + + :param post_poultry_request: (required) + :type post_poultry_request: PostPoultryRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_poultry_serialize( + post_poultry_request=post_poultry_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostPoultry200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_poultry_with_http_info( + self, + post_poultry_request: PostPoultryRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostPoultry200Response]: + """Perform poultry calculation + + Retrieve a simple JSON response + + :param post_poultry_request: (required) + :type post_poultry_request: PostPoultryRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_poultry_serialize( + post_poultry_request=post_poultry_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostPoultry200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_poultry_without_preload_content( + self, + post_poultry_request: PostPoultryRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform poultry calculation + + Retrieve a simple JSON response + + :param post_poultry_request: (required) + :type post_poultry_request: PostPoultryRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_poultry_serialize( + post_poultry_request=post_poultry_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostPoultry200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_poultry_serialize( + self, + post_poultry_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_poultry_request is not None: + _body_params = post_poultry_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/poultry', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_processing( + self, + post_processing_request: PostProcessingRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostProcessing200Response: + """Perform processing calculation + + Retrieve a simple JSON response + + :param post_processing_request: (required) + :type post_processing_request: PostProcessingRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_processing_serialize( + post_processing_request=post_processing_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostProcessing200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_processing_with_http_info( + self, + post_processing_request: PostProcessingRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostProcessing200Response]: + """Perform processing calculation + + Retrieve a simple JSON response + + :param post_processing_request: (required) + :type post_processing_request: PostProcessingRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_processing_serialize( + post_processing_request=post_processing_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostProcessing200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_processing_without_preload_content( + self, + post_processing_request: PostProcessingRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform processing calculation + + Retrieve a simple JSON response + + :param post_processing_request: (required) + :type post_processing_request: PostProcessingRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_processing_serialize( + post_processing_request=post_processing_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostProcessing200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_processing_serialize( + self, + post_processing_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_processing_request is not None: + _body_params = post_processing_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/processing', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_rice( + self, + post_rice_request: PostRiceRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostRice200Response: + """Perform rice calculation + + Retrieve a simple JSON response + + :param post_rice_request: (required) + :type post_rice_request: PostRiceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_rice_serialize( + post_rice_request=post_rice_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostRice200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_rice_with_http_info( + self, + post_rice_request: PostRiceRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostRice200Response]: + """Perform rice calculation + + Retrieve a simple JSON response + + :param post_rice_request: (required) + :type post_rice_request: PostRiceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_rice_serialize( + post_rice_request=post_rice_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostRice200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_rice_without_preload_content( + self, + post_rice_request: PostRiceRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform rice calculation + + Retrieve a simple JSON response + + :param post_rice_request: (required) + :type post_rice_request: PostRiceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_rice_serialize( + post_rice_request=post_rice_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostRice200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_rice_serialize( + self, + post_rice_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_rice_request is not None: + _body_params = post_rice_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/rice', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_sheep( + self, + post_sheep_request: PostSheepRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostSheep200Response: + """Perform sheep calculation + + Retrieve a simple JSON response + + :param post_sheep_request: (required) + :type post_sheep_request: PostSheepRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_sheep_serialize( + post_sheep_request=post_sheep_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostSheep200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_sheep_with_http_info( + self, + post_sheep_request: PostSheepRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostSheep200Response]: + """Perform sheep calculation + + Retrieve a simple JSON response + + :param post_sheep_request: (required) + :type post_sheep_request: PostSheepRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_sheep_serialize( + post_sheep_request=post_sheep_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostSheep200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_sheep_without_preload_content( + self, + post_sheep_request: PostSheepRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform sheep calculation + + Retrieve a simple JSON response + + :param post_sheep_request: (required) + :type post_sheep_request: PostSheepRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_sheep_serialize( + post_sheep_request=post_sheep_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostSheep200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_sheep_serialize( + self, + post_sheep_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_sheep_request is not None: + _body_params = post_sheep_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sheep', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_sheepbeef( + self, + post_sheepbeef_request: PostSheepbeefRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostSheepbeef200Response: + """Perform sheepbeef calculation + + Retrieve a simple JSON response + + :param post_sheepbeef_request: (required) + :type post_sheepbeef_request: PostSheepbeefRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_sheepbeef_serialize( + post_sheepbeef_request=post_sheepbeef_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostSheepbeef200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_sheepbeef_with_http_info( + self, + post_sheepbeef_request: PostSheepbeefRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostSheepbeef200Response]: + """Perform sheepbeef calculation + + Retrieve a simple JSON response + + :param post_sheepbeef_request: (required) + :type post_sheepbeef_request: PostSheepbeefRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_sheepbeef_serialize( + post_sheepbeef_request=post_sheepbeef_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostSheepbeef200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_sheepbeef_without_preload_content( + self, + post_sheepbeef_request: PostSheepbeefRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform sheepbeef calculation + + Retrieve a simple JSON response + + :param post_sheepbeef_request: (required) + :type post_sheepbeef_request: PostSheepbeefRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_sheepbeef_serialize( + post_sheepbeef_request=post_sheepbeef_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostSheepbeef200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_sheepbeef_serialize( + self, + post_sheepbeef_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_sheepbeef_request is not None: + _body_params = post_sheepbeef_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sheepbeef', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_sugar( + self, + post_sugar_request: PostSugarRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostSugar200Response: + """Perform sugar calculation + + Retrieve a simple JSON response + + :param post_sugar_request: (required) + :type post_sugar_request: PostSugarRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_sugar_serialize( + post_sugar_request=post_sugar_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostSugar200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_sugar_with_http_info( + self, + post_sugar_request: PostSugarRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostSugar200Response]: + """Perform sugar calculation + + Retrieve a simple JSON response + + :param post_sugar_request: (required) + :type post_sugar_request: PostSugarRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_sugar_serialize( + post_sugar_request=post_sugar_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostSugar200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_sugar_without_preload_content( + self, + post_sugar_request: PostSugarRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform sugar calculation + + Retrieve a simple JSON response + + :param post_sugar_request: (required) + :type post_sugar_request: PostSugarRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_sugar_serialize( + post_sugar_request=post_sugar_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostSugar200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_sugar_serialize( + self, + post_sugar_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_sugar_request is not None: + _body_params = post_sugar_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sugar', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_vineyard( + self, + post_vineyard_request: PostVineyardRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostVineyard200Response: + """Perform vineyard calculation + + Retrieve a simple JSON response + + :param post_vineyard_request: (required) + :type post_vineyard_request: PostVineyardRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_vineyard_serialize( + post_vineyard_request=post_vineyard_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostVineyard200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_vineyard_with_http_info( + self, + post_vineyard_request: PostVineyardRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostVineyard200Response]: + """Perform vineyard calculation + + Retrieve a simple JSON response + + :param post_vineyard_request: (required) + :type post_vineyard_request: PostVineyardRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_vineyard_serialize( + post_vineyard_request=post_vineyard_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostVineyard200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_vineyard_without_preload_content( + self, + post_vineyard_request: PostVineyardRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform vineyard calculation + + Retrieve a simple JSON response + + :param post_vineyard_request: (required) + :type post_vineyard_request: PostVineyardRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_vineyard_serialize( + post_vineyard_request=post_vineyard_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostVineyard200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_vineyard_serialize( + self, + post_vineyard_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_vineyard_request is not None: + _body_params = post_vineyard_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/vineyard', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_wildcatchfishery( + self, + post_wildcatchfishery_request: PostWildcatchfisheryRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostWildcatchfishery200Response: + """Perform wildcatchfishery calculation + + Retrieve a simple JSON response + + :param post_wildcatchfishery_request: (required) + :type post_wildcatchfishery_request: PostWildcatchfisheryRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_wildcatchfishery_serialize( + post_wildcatchfishery_request=post_wildcatchfishery_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostWildcatchfishery200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_wildcatchfishery_with_http_info( + self, + post_wildcatchfishery_request: PostWildcatchfisheryRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostWildcatchfishery200Response]: + """Perform wildcatchfishery calculation + + Retrieve a simple JSON response + + :param post_wildcatchfishery_request: (required) + :type post_wildcatchfishery_request: PostWildcatchfisheryRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_wildcatchfishery_serialize( + post_wildcatchfishery_request=post_wildcatchfishery_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostWildcatchfishery200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_wildcatchfishery_without_preload_content( + self, + post_wildcatchfishery_request: PostWildcatchfisheryRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform wildcatchfishery calculation + + Retrieve a simple JSON response + + :param post_wildcatchfishery_request: (required) + :type post_wildcatchfishery_request: PostWildcatchfisheryRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_wildcatchfishery_serialize( + post_wildcatchfishery_request=post_wildcatchfishery_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostWildcatchfishery200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_wildcatchfishery_serialize( + self, + post_wildcatchfishery_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_wildcatchfishery_request is not None: + _body_params = post_wildcatchfishery_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/wildcatchfishery', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_wildseafisheries( + self, + post_wildseafisheries_request: PostWildseafisheriesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PostWildseafisheries200Response: + """Perform wildseafisheries calculation + + Retrieve a simple JSON response + + :param post_wildseafisheries_request: (required) + :type post_wildseafisheries_request: PostWildseafisheriesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_wildseafisheries_serialize( + post_wildseafisheries_request=post_wildseafisheries_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostWildseafisheries200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_wildseafisheries_with_http_info( + self, + post_wildseafisheries_request: PostWildseafisheriesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PostWildseafisheries200Response]: + """Perform wildseafisheries calculation + + Retrieve a simple JSON response + + :param post_wildseafisheries_request: (required) + :type post_wildseafisheries_request: PostWildseafisheriesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_wildseafisheries_serialize( + post_wildseafisheries_request=post_wildseafisheries_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostWildseafisheries200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_wildseafisheries_without_preload_content( + self, + post_wildseafisheries_request: PostWildseafisheriesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Perform wildseafisheries calculation + + Retrieve a simple JSON response + + :param post_wildseafisheries_request: (required) + :type post_wildseafisheries_request: PostWildseafisheriesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_wildseafisheries_serialize( + post_wildseafisheries_request=post_wildseafisheries_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PostWildseafisheries200Response", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_wildseafisheries_serialize( + self, + post_wildseafisheries_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_wildseafisheries_request is not None: + _body_params = post_wildseafisheries_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/wildseafisheries', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/examples/python-api-client/api-client/openapi_client/api_client.py b/examples/python-api-client/api-client/openapi_client/api_client.py new file mode 100644 index 00000000..50a16097 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/api_client.py @@ -0,0 +1,802 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from openapi_client.configuration import Configuration +from openapi_client.api_response import ApiResponse, T as ApiResponseT +import openapi_client.models +from openapi_client import rest +from openapi_client.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None or self.configuration.ignore_operation_servers: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + elif isinstance(obj, decimal.Decimal): + return str(obj) + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + if isinstance(obj_dict, list): + # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() + return self.sanitize_for_serialization(obj_dict) + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. + + :return: deserialized object. + """ + + # fetch data from response object + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(openapi_client.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif klass == decimal.Decimal: + return decimal.Decimal(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, quote(str(value))) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/examples/python-api-client/api-client/openapi_client/api_response.py b/examples/python-api-client/api-client/openapi_client/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/examples/python-api-client/api-client/openapi_client/configuration.py b/examples/python-api-client/api-client/openapi_client/configuration.py new file mode 100644 index 00000000..c16049b5 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/configuration.py @@ -0,0 +1,577 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import http.client as httplib +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from typing_extensions import NotRequired, Self + +import urllib3 + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: Number of retries for API requests. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + :param cert_file: client certificate file + :param key_file: client key file + + """ + + _default: ClassVar[Optional[Self]] = None + + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[int] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + *, + debug: Optional[bool] = None, + cert_file: Optional[str]=None, + key_file: Optional[str]=None, + ) -> None: + """Constructor + """ + self._base_path = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("openapi_client") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + if debug is not None: + self.debug = debug + else: + self.__debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ + self.cert_file = cert_file + """client certificate file + """ + self.key_file = key_file + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = retries + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name: str, value: Any) -> None: + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default: Optional[Self]) -> None: + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls) -> Self: + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls) -> Self: + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = cls() + return cls._default + + @property + def logger_file(self) -> Optional[str]: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value: Optional[str]) -> None: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self) -> bool: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value: bool) -> None: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self) -> str: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value: str) -> None: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + return None + + def get_basic_auth_token(self) -> Optional[str]: + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self)-> AuthSettings: + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth: AuthSettings = {} + return auth + + def to_debug_report(self) -> str: + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 3.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self) -> List[HostSetting]: + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0", + 'description': "Production Server", + } + ] + + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self) -> str: + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value: str) -> None: + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/examples/python-api-client/api-client/openapi_client/exceptions.py b/examples/python-api-client/api-client/openapi_client/exceptions.py new file mode 100644 index 00000000..b26c0c4e --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/exceptions.py @@ -0,0 +1,217 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/examples/python-api-client/api-client/openapi_client/models/__init__.py b/examples/python-api-client/api-client/openapi_client/models/__init__.py new file mode 100644 index 00000000..5699ffce --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/__init__.py @@ -0,0 +1,308 @@ +# coding: utf-8 + +# flake8: noqa +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from openapi_client.models.post_aquaculture200_response import PostAquaculture200Response +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_intensities import PostAquaculture200ResponseIntensities +from openapi_client.models.post_aquaculture200_response_intermediate_inner import PostAquaculture200ResponseIntermediateInner +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_purchased_offsets import PostAquaculture200ResponsePurchasedOffsets +from openapi_client.models.post_aquaculture200_response_scope1 import PostAquaculture200ResponseScope1 +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_aquaculture200_response_scope3 import PostAquaculture200ResponseScope3 +from openapi_client.models.post_aquaculture_request import PostAquacultureRequest +from openapi_client.models.post_aquaculture_request_enterprises_inner import PostAquacultureRequestEnterprisesInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_bait_inner import PostAquacultureRequestEnterprisesInnerBaitInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_custom_bait_inner import PostAquacultureRequestEnterprisesInnerCustomBaitInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_fluid_waste_inner import PostAquacultureRequestEnterprisesInnerFluidWasteInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel import PostAquacultureRequestEnterprisesInnerFuel +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner import PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner import PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_inbound_freight_inner import PostAquacultureRequestEnterprisesInnerInboundFreightInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_refrigerants_inner import PostAquacultureRequestEnterprisesInnerRefrigerantsInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_solid_waste import PostAquacultureRequestEnterprisesInnerSolidWaste +from openapi_client.models.post_beef200_response import PostBeef200Response +from openapi_client.models.post_beef200_response_intermediate_inner import PostBeef200ResponseIntermediateInner +from openapi_client.models.post_beef200_response_intermediate_inner_intensities import PostBeef200ResponseIntermediateInnerIntensities +from openapi_client.models.post_beef200_response_net import PostBeef200ResponseNet +from openapi_client.models.post_beef200_response_scope1 import PostBeef200ResponseScope1 +from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 +from openapi_client.models.post_beef_request import PostBeefRequest +from openapi_client.models.post_beef_request_beef_inner import PostBeefRequestBeefInner +from openapi_client.models.post_beef_request_beef_inner_classes import PostBeefRequestBeefInnerClasses +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1 import PostBeefRequestBeefInnerClassesBullsGt1 +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_traded import PostBeefRequestBeefInnerClassesBullsGt1Traded +from openapi_client.models.post_beef_request_beef_inner_classes_cows_gt2 import PostBeefRequestBeefInnerClassesCowsGt2 +from openapi_client.models.post_beef_request_beef_inner_classes_cows_gt2_traded import PostBeefRequestBeefInnerClassesCowsGt2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_heifers1_to2 import PostBeefRequestBeefInnerClassesHeifers1To2 +from openapi_client.models.post_beef_request_beef_inner_classes_heifers1_to2_traded import PostBeefRequestBeefInnerClassesHeifers1To2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_gt2 import PostBeefRequestBeefInnerClassesHeifersGt2 +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_gt2_traded import PostBeefRequestBeefInnerClassesHeifersGt2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_lt1 import PostBeefRequestBeefInnerClassesHeifersLt1 +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_lt1_traded import PostBeefRequestBeefInnerClassesHeifersLt1Traded +from openapi_client.models.post_beef_request_beef_inner_classes_steers1_to2 import PostBeefRequestBeefInnerClassesSteers1To2 +from openapi_client.models.post_beef_request_beef_inner_classes_steers1_to2_traded import PostBeefRequestBeefInnerClassesSteers1To2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_steers_gt2 import PostBeefRequestBeefInnerClassesSteersGt2 +from openapi_client.models.post_beef_request_beef_inner_classes_steers_gt2_traded import PostBeefRequestBeefInnerClassesSteersGt2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_steers_lt1 import PostBeefRequestBeefInnerClassesSteersLt1 +from openapi_client.models.post_beef_request_beef_inner_classes_steers_lt1_traded import PostBeefRequestBeefInnerClassesSteersLt1Traded +from openapi_client.models.post_beef_request_beef_inner_cows_calving import PostBeefRequestBeefInnerCowsCalving +from openapi_client.models.post_beef_request_beef_inner_fertiliser import PostBeefRequestBeefInnerFertiliser +from openapi_client.models.post_beef_request_beef_inner_fertiliser_other_fertilisers_inner import PostBeefRequestBeefInnerFertiliserOtherFertilisersInner +from openapi_client.models.post_beef_request_beef_inner_mineral_supplementation import PostBeefRequestBeefInnerMineralSupplementation +from openapi_client.models.post_beef_request_burning_inner import PostBeefRequestBurningInner +from openapi_client.models.post_beef_request_burning_inner_burning import PostBeefRequestBurningInnerBurning +from openapi_client.models.post_beef_request_vegetation_inner import PostBeefRequestVegetationInner +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation +from openapi_client.models.post_buffalo200_response import PostBuffalo200Response +from openapi_client.models.post_buffalo200_response_intensities import PostBuffalo200ResponseIntensities +from openapi_client.models.post_buffalo200_response_intermediate_inner import PostBuffalo200ResponseIntermediateInner +from openapi_client.models.post_buffalo200_response_net import PostBuffalo200ResponseNet +from openapi_client.models.post_buffalo200_response_scope1 import PostBuffalo200ResponseScope1 +from openapi_client.models.post_buffalo200_response_scope3 import PostBuffalo200ResponseScope3 +from openapi_client.models.post_buffalo_request import PostBuffaloRequest +from openapi_client.models.post_buffalo_request_buffalos_inner import PostBuffaloRequestBuffalosInner +from openapi_client.models.post_buffalo_request_buffalos_inner_classes import PostBuffaloRequestBuffalosInnerClasses +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls import PostBuffaloRequestBuffalosInnerClassesBulls +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_calfs import PostBuffaloRequestBuffalosInnerClassesCalfs +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_cows import PostBuffaloRequestBuffalosInnerClassesCows +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_steers import PostBuffaloRequestBuffalosInnerClassesSteers +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_bulls import PostBuffaloRequestBuffalosInnerClassesTradeBulls +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_calfs import PostBuffaloRequestBuffalosInnerClassesTradeCalfs +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_cows import PostBuffaloRequestBuffalosInnerClassesTradeCows +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_steers import PostBuffaloRequestBuffalosInnerClassesTradeSteers +from openapi_client.models.post_buffalo_request_buffalos_inner_cows_calving import PostBuffaloRequestBuffalosInnerCowsCalving +from openapi_client.models.post_buffalo_request_buffalos_inner_seasonal_calving import PostBuffaloRequestBuffalosInnerSeasonalCalving +from openapi_client.models.post_buffalo_request_vegetation_inner import PostBuffaloRequestVegetationInner +from openapi_client.models.post_cotton200_response import PostCotton200Response +from openapi_client.models.post_cotton200_response_intermediate_inner import PostCotton200ResponseIntermediateInner +from openapi_client.models.post_cotton200_response_intermediate_inner_intensities import PostCotton200ResponseIntermediateInnerIntensities +from openapi_client.models.post_cotton200_response_net import PostCotton200ResponseNet +from openapi_client.models.post_cotton200_response_scope1 import PostCotton200ResponseScope1 +from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 +from openapi_client.models.post_cotton_request import PostCottonRequest +from openapi_client.models.post_cotton_request_crops_inner import PostCottonRequestCropsInner +from openapi_client.models.post_cotton_request_vegetation_inner import PostCottonRequestVegetationInner +from openapi_client.models.post_dairy200_response import PostDairy200Response +from openapi_client.models.post_dairy200_response_intensities import PostDairy200ResponseIntensities +from openapi_client.models.post_dairy200_response_intermediate_inner import PostDairy200ResponseIntermediateInner +from openapi_client.models.post_dairy200_response_net import PostDairy200ResponseNet +from openapi_client.models.post_dairy200_response_scope1 import PostDairy200ResponseScope1 +from openapi_client.models.post_dairy200_response_scope3 import PostDairy200ResponseScope3 +from openapi_client.models.post_dairy_request import PostDairyRequest +from openapi_client.models.post_dairy_request_dairy_inner import PostDairyRequestDairyInner +from openapi_client.models.post_dairy_request_dairy_inner_areas import PostDairyRequestDairyInnerAreas +from openapi_client.models.post_dairy_request_dairy_inner_classes import PostDairyRequestDairyInnerClasses +from openapi_client.models.post_dairy_request_dairy_inner_classes_dairy_bulls_gt1 import PostDairyRequestDairyInnerClassesDairyBullsGt1 +from openapi_client.models.post_dairy_request_dairy_inner_classes_dairy_bulls_lt1 import PostDairyRequestDairyInnerClassesDairyBullsLt1 +from openapi_client.models.post_dairy_request_dairy_inner_classes_heifers_gt1 import PostDairyRequestDairyInnerClassesHeifersGt1 +from openapi_client.models.post_dairy_request_dairy_inner_classes_heifers_lt1 import PostDairyRequestDairyInnerClassesHeifersLt1 +from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows import PostDairyRequestDairyInnerClassesMilkingCows +from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows_autumn import PostDairyRequestDairyInnerClassesMilkingCowsAutumn +from openapi_client.models.post_dairy_request_dairy_inner_manure_management_milking_cows import PostDairyRequestDairyInnerManureManagementMilkingCows +from openapi_client.models.post_dairy_request_dairy_inner_seasonal_fertiliser import PostDairyRequestDairyInnerSeasonalFertiliser +from openapi_client.models.post_dairy_request_dairy_inner_seasonal_fertiliser_autumn import PostDairyRequestDairyInnerSeasonalFertiliserAutumn +from openapi_client.models.post_dairy_request_vegetation_inner import PostDairyRequestVegetationInner +from openapi_client.models.post_deer200_response import PostDeer200Response +from openapi_client.models.post_deer200_response_intensities import PostDeer200ResponseIntensities +from openapi_client.models.post_deer200_response_intermediate_inner import PostDeer200ResponseIntermediateInner +from openapi_client.models.post_deer200_response_net import PostDeer200ResponseNet +from openapi_client.models.post_deer_request import PostDeerRequest +from openapi_client.models.post_deer_request_deers_inner import PostDeerRequestDeersInner +from openapi_client.models.post_deer_request_deers_inner_classes import PostDeerRequestDeersInnerClasses +from openapi_client.models.post_deer_request_deers_inner_classes_breeding_does import PostDeerRequestDeersInnerClassesBreedingDoes +from openapi_client.models.post_deer_request_deers_inner_classes_bucks import PostDeerRequestDeersInnerClassesBucks +from openapi_client.models.post_deer_request_deers_inner_classes_fawn import PostDeerRequestDeersInnerClassesFawn +from openapi_client.models.post_deer_request_deers_inner_classes_other_does import PostDeerRequestDeersInnerClassesOtherDoes +from openapi_client.models.post_deer_request_deers_inner_classes_trade_bucks import PostDeerRequestDeersInnerClassesTradeBucks +from openapi_client.models.post_deer_request_deers_inner_classes_trade_does import PostDeerRequestDeersInnerClassesTradeDoes +from openapi_client.models.post_deer_request_deers_inner_classes_trade_fawn import PostDeerRequestDeersInnerClassesTradeFawn +from openapi_client.models.post_deer_request_deers_inner_classes_trade_other_does import PostDeerRequestDeersInnerClassesTradeOtherDoes +from openapi_client.models.post_deer_request_deers_inner_does_fawning import PostDeerRequestDeersInnerDoesFawning +from openapi_client.models.post_deer_request_deers_inner_seasonal_fawning import PostDeerRequestDeersInnerSeasonalFawning +from openapi_client.models.post_deer_request_vegetation_inner import PostDeerRequestVegetationInner +from openapi_client.models.post_feedlot200_response import PostFeedlot200Response +from openapi_client.models.post_feedlot200_response_intermediate_inner import PostFeedlot200ResponseIntermediateInner +from openapi_client.models.post_feedlot200_response_intermediate_inner_intensities import PostFeedlot200ResponseIntermediateInnerIntensities +from openapi_client.models.post_feedlot200_response_intermediate_inner_net import PostFeedlot200ResponseIntermediateInnerNet +from openapi_client.models.post_feedlot200_response_scope1 import PostFeedlot200ResponseScope1 +from openapi_client.models.post_feedlot200_response_scope3 import PostFeedlot200ResponseScope3 +from openapi_client.models.post_feedlot_request import PostFeedlotRequest +from openapi_client.models.post_feedlot_request_feedlots_inner import PostFeedlotRequestFeedlotsInner +from openapi_client.models.post_feedlot_request_feedlots_inner_groups_inner import PostFeedlotRequestFeedlotsInnerGroupsInner +from openapi_client.models.post_feedlot_request_feedlots_inner_groups_inner_stays_inner import PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner +from openapi_client.models.post_feedlot_request_feedlots_inner_purchases import PostFeedlotRequestFeedlotsInnerPurchases +from openapi_client.models.post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner +from openapi_client.models.post_feedlot_request_feedlots_inner_sales import PostFeedlotRequestFeedlotsInnerSales +from openapi_client.models.post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner +from openapi_client.models.post_feedlot_request_vegetation_inner import PostFeedlotRequestVegetationInner +from openapi_client.models.post_goat200_response import PostGoat200Response +from openapi_client.models.post_goat200_response_intensities import PostGoat200ResponseIntensities +from openapi_client.models.post_goat200_response_intermediate_inner import PostGoat200ResponseIntermediateInner +from openapi_client.models.post_goat200_response_net import PostGoat200ResponseNet +from openapi_client.models.post_goat_request import PostGoatRequest +from openapi_client.models.post_goat_request_goats_inner import PostGoatRequestGoatsInner +from openapi_client.models.post_goat_request_goats_inner_classes import PostGoatRequestGoatsInnerClasses +from openapi_client.models.post_goat_request_goats_inner_classes_breeding_does_nannies import PostGoatRequestGoatsInnerClassesBreedingDoesNannies +from openapi_client.models.post_goat_request_goats_inner_classes_bucks_billy import PostGoatRequestGoatsInnerClassesBucksBilly +from openapi_client.models.post_goat_request_goats_inner_classes_kids import PostGoatRequestGoatsInnerClassesKids +from openapi_client.models.post_goat_request_goats_inner_classes_maiden_breeding_does_nannies import PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies +from openapi_client.models.post_goat_request_goats_inner_classes_other_does_culled_females import PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales +from openapi_client.models.post_goat_request_goats_inner_classes_trade_breeding_does_nannies import PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies +from openapi_client.models.post_goat_request_goats_inner_classes_trade_bucks import PostGoatRequestGoatsInnerClassesTradeBucks +from openapi_client.models.post_goat_request_goats_inner_classes_trade_does import PostGoatRequestGoatsInnerClassesTradeDoes +from openapi_client.models.post_goat_request_goats_inner_classes_trade_kids import PostGoatRequestGoatsInnerClassesTradeKids +from openapi_client.models.post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies import PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies +from openapi_client.models.post_goat_request_goats_inner_classes_trade_other_does_culled_females import PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales +from openapi_client.models.post_goat_request_goats_inner_classes_trade_wethers import PostGoatRequestGoatsInnerClassesTradeWethers +from openapi_client.models.post_goat_request_goats_inner_classes_wethers import PostGoatRequestGoatsInnerClassesWethers +from openapi_client.models.post_goat_request_vegetation_inner import PostGoatRequestVegetationInner +from openapi_client.models.post_grains200_response import PostGrains200Response +from openapi_client.models.post_grains200_response_intermediate_inner import PostGrains200ResponseIntermediateInner +from openapi_client.models.post_grains200_response_intermediate_inner_intensities_with_sequestration import PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration +from openapi_client.models.post_grains_request import PostGrainsRequest +from openapi_client.models.post_grains_request_crops_inner import PostGrainsRequestCropsInner +from openapi_client.models.post_horticulture200_response import PostHorticulture200Response +from openapi_client.models.post_horticulture200_response_intermediate_inner import PostHorticulture200ResponseIntermediateInner +from openapi_client.models.post_horticulture200_response_intermediate_inner_intensities_with_sequestration import PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration +from openapi_client.models.post_horticulture200_response_scope1 import PostHorticulture200ResponseScope1 +from openapi_client.models.post_horticulture_request import PostHorticultureRequest +from openapi_client.models.post_horticulture_request_crops_inner import PostHorticultureRequestCropsInner +from openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner import PostHorticultureRequestCropsInnerRefrigerantsInner +from openapi_client.models.post_pork200_response import PostPork200Response +from openapi_client.models.post_pork200_response_intensities import PostPork200ResponseIntensities +from openapi_client.models.post_pork200_response_intermediate_inner import PostPork200ResponseIntermediateInner +from openapi_client.models.post_pork200_response_net import PostPork200ResponseNet +from openapi_client.models.post_pork200_response_scope1 import PostPork200ResponseScope1 +from openapi_client.models.post_pork200_response_scope3 import PostPork200ResponseScope3 +from openapi_client.models.post_pork_request import PostPorkRequest +from openapi_client.models.post_pork_request_pork_inner import PostPorkRequestPorkInner +from openapi_client.models.post_pork_request_pork_inner_classes import PostPorkRequestPorkInnerClasses +from openapi_client.models.post_pork_request_pork_inner_classes_boars import PostPorkRequestPorkInnerClassesBoars +from openapi_client.models.post_pork_request_pork_inner_classes_gilts import PostPorkRequestPorkInnerClassesGilts +from openapi_client.models.post_pork_request_pork_inner_classes_growers import PostPorkRequestPorkInnerClassesGrowers +from openapi_client.models.post_pork_request_pork_inner_classes_slaughter_pigs import PostPorkRequestPorkInnerClassesSlaughterPigs +from openapi_client.models.post_pork_request_pork_inner_classes_sows import PostPorkRequestPorkInnerClassesSows +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure import PostPorkRequestPorkInnerClassesSowsManure +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure_spring import PostPorkRequestPorkInnerClassesSowsManureSpring +from openapi_client.models.post_pork_request_pork_inner_classes_suckers import PostPorkRequestPorkInnerClassesSuckers +from openapi_client.models.post_pork_request_pork_inner_classes_weaners import PostPorkRequestPorkInnerClassesWeaners +from openapi_client.models.post_pork_request_pork_inner_feed_products_inner import PostPorkRequestPorkInnerFeedProductsInner +from openapi_client.models.post_pork_request_pork_inner_feed_products_inner_ingredients import PostPorkRequestPorkInnerFeedProductsInnerIngredients +from openapi_client.models.post_pork_request_vegetation_inner import PostPorkRequestVegetationInner +from openapi_client.models.post_poultry200_response import PostPoultry200Response +from openapi_client.models.post_poultry200_response_intensities import PostPoultry200ResponseIntensities +from openapi_client.models.post_poultry200_response_intermediate_broilers_inner import PostPoultry200ResponseIntermediateBroilersInner +from openapi_client.models.post_poultry200_response_intermediate_broilers_inner_intensities import PostPoultry200ResponseIntermediateBroilersInnerIntensities +from openapi_client.models.post_poultry200_response_intermediate_layers_inner import PostPoultry200ResponseIntermediateLayersInner +from openapi_client.models.post_poultry200_response_intermediate_layers_inner_intensities import PostPoultry200ResponseIntermediateLayersInnerIntensities +from openapi_client.models.post_poultry200_response_net import PostPoultry200ResponseNet +from openapi_client.models.post_poultry200_response_scope1 import PostPoultry200ResponseScope1 +from openapi_client.models.post_poultry200_response_scope3 import PostPoultry200ResponseScope3 +from openapi_client.models.post_poultry_request import PostPoultryRequest +from openapi_client.models.post_poultry_request_broilers_inner import PostPoultryRequestBroilersInner +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner import PostPoultryRequestBroilersInnerGroupsInner +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner import PostPoultryRequestBroilersInnerGroupsInnerFeedInner +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients import PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers import PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers +from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_growers_purchases import PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases +from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_layers_purchases import PostPoultryRequestBroilersInnerMeatChickenLayersPurchases +from openapi_client.models.post_poultry_request_broilers_inner_meat_other_purchases import PostPoultryRequestBroilersInnerMeatOtherPurchases +from openapi_client.models.post_poultry_request_broilers_inner_sales_inner import PostPoultryRequestBroilersInnerSalesInner +from openapi_client.models.post_poultry_request_layers_inner import PostPoultryRequestLayersInner +from openapi_client.models.post_poultry_request_layers_inner_layers import PostPoultryRequestLayersInnerLayers +from openapi_client.models.post_poultry_request_layers_inner_layers_egg_sale import PostPoultryRequestLayersInnerLayersEggSale +from openapi_client.models.post_poultry_request_layers_inner_layers_purchases import PostPoultryRequestLayersInnerLayersPurchases +from openapi_client.models.post_poultry_request_layers_inner_meat_chicken_layers import PostPoultryRequestLayersInnerMeatChickenLayers +from openapi_client.models.post_poultry_request_layers_inner_meat_chicken_layers_egg_sale import PostPoultryRequestLayersInnerMeatChickenLayersEggSale +from openapi_client.models.post_poultry_request_vegetation_inner import PostPoultryRequestVegetationInner +from openapi_client.models.post_processing200_response import PostProcessing200Response +from openapi_client.models.post_processing200_response_intensities_inner import PostProcessing200ResponseIntensitiesInner +from openapi_client.models.post_processing200_response_intermediate_inner import PostProcessing200ResponseIntermediateInner +from openapi_client.models.post_processing200_response_net import PostProcessing200ResponseNet +from openapi_client.models.post_processing200_response_scope1 import PostProcessing200ResponseScope1 +from openapi_client.models.post_processing200_response_scope3 import PostProcessing200ResponseScope3 +from openapi_client.models.post_processing_request import PostProcessingRequest +from openapi_client.models.post_processing_request_products_inner import PostProcessingRequestProductsInner +from openapi_client.models.post_processing_request_products_inner_product import PostProcessingRequestProductsInnerProduct +from openapi_client.models.post_rice200_response import PostRice200Response +from openapi_client.models.post_rice200_response_intensities import PostRice200ResponseIntensities +from openapi_client.models.post_rice200_response_intermediate_inner import PostRice200ResponseIntermediateInner +from openapi_client.models.post_rice200_response_intermediate_inner_intensities import PostRice200ResponseIntermediateInnerIntensities +from openapi_client.models.post_rice200_response_scope1 import PostRice200ResponseScope1 +from openapi_client.models.post_rice_request import PostRiceRequest +from openapi_client.models.post_rice_request_crops_inner import PostRiceRequestCropsInner +from openapi_client.models.post_sheep200_response import PostSheep200Response +from openapi_client.models.post_sheep200_response_intermediate_inner import PostSheep200ResponseIntermediateInner +from openapi_client.models.post_sheep200_response_intermediate_inner_intensities import PostSheep200ResponseIntermediateInnerIntensities +from openapi_client.models.post_sheep200_response_net import PostSheep200ResponseNet +from openapi_client.models.post_sheep_request import PostSheepRequest +from openapi_client.models.post_sheep_request_sheep_inner import PostSheepRequestSheepInner +from openapi_client.models.post_sheep_request_sheep_inner_classes import PostSheepRequestSheepInnerClasses +from openapi_client.models.post_sheep_request_sheep_inner_classes_rams import PostSheepRequestSheepInnerClassesRams +from openapi_client.models.post_sheep_request_sheep_inner_classes_rams_autumn import PostSheepRequestSheepInnerClassesRamsAutumn +from openapi_client.models.post_sheep_request_sheep_inner_classes_trade_ewes import PostSheepRequestSheepInnerClassesTradeEwes +from openapi_client.models.post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets import PostSheepRequestSheepInnerClassesTradeLambsAndHoggets +from openapi_client.models.post_sheep_request_sheep_inner_ewes_lambing import PostSheepRequestSheepInnerEwesLambing +from openapi_client.models.post_sheep_request_sheep_inner_seasonal_lambing import PostSheepRequestSheepInnerSeasonalLambing +from openapi_client.models.post_sheep_request_vegetation_inner import PostSheepRequestVegetationInner +from openapi_client.models.post_sheepbeef200_response import PostSheepbeef200Response +from openapi_client.models.post_sheepbeef200_response_intensities import PostSheepbeef200ResponseIntensities +from openapi_client.models.post_sheepbeef200_response_intermediate import PostSheepbeef200ResponseIntermediate +from openapi_client.models.post_sheepbeef200_response_intermediate_beef import PostSheepbeef200ResponseIntermediateBeef +from openapi_client.models.post_sheepbeef200_response_intermediate_sheep import PostSheepbeef200ResponseIntermediateSheep +from openapi_client.models.post_sheepbeef200_response_net import PostSheepbeef200ResponseNet +from openapi_client.models.post_sheepbeef_request import PostSheepbeefRequest +from openapi_client.models.post_sheepbeef_request_vegetation_inner import PostSheepbeefRequestVegetationInner +from openapi_client.models.post_sugar200_response import PostSugar200Response +from openapi_client.models.post_sugar200_response_intermediate_inner import PostSugar200ResponseIntermediateInner +from openapi_client.models.post_sugar200_response_intermediate_inner_intensities import PostSugar200ResponseIntermediateInnerIntensities +from openapi_client.models.post_sugar_request import PostSugarRequest +from openapi_client.models.post_sugar_request_crops_inner import PostSugarRequestCropsInner +from openapi_client.models.post_vineyard200_response import PostVineyard200Response +from openapi_client.models.post_vineyard200_response_intermediate_inner import PostVineyard200ResponseIntermediateInner +from openapi_client.models.post_vineyard200_response_intermediate_inner_intensities import PostVineyard200ResponseIntermediateInnerIntensities +from openapi_client.models.post_vineyard200_response_net import PostVineyard200ResponseNet +from openapi_client.models.post_vineyard200_response_scope1 import PostVineyard200ResponseScope1 +from openapi_client.models.post_vineyard200_response_scope3 import PostVineyard200ResponseScope3 +from openapi_client.models.post_vineyard_request import PostVineyardRequest +from openapi_client.models.post_vineyard_request_vegetation_inner import PostVineyardRequestVegetationInner +from openapi_client.models.post_vineyard_request_vineyards_inner import PostVineyardRequestVineyardsInner +from openapi_client.models.post_wildcatchfishery200_response import PostWildcatchfishery200Response +from openapi_client.models.post_wildcatchfishery200_response_intensities import PostWildcatchfishery200ResponseIntensities +from openapi_client.models.post_wildcatchfishery200_response_intermediate_inner import PostWildcatchfishery200ResponseIntermediateInner +from openapi_client.models.post_wildcatchfishery200_response_scope1 import PostWildcatchfishery200ResponseScope1 +from openapi_client.models.post_wildcatchfishery_request import PostWildcatchfisheryRequest +from openapi_client.models.post_wildcatchfishery_request_enterprises_inner import PostWildcatchfisheryRequestEnterprisesInner +from openapi_client.models.post_wildcatchfishery_request_enterprises_inner_bait_inner import PostWildcatchfisheryRequestEnterprisesInnerBaitInner +from openapi_client.models.post_wildseafisheries200_response import PostWildseafisheries200Response +from openapi_client.models.post_wildseafisheries200_response_intermediate_inner import PostWildseafisheries200ResponseIntermediateInner +from openapi_client.models.post_wildseafisheries200_response_intermediate_inner_intensities import PostWildseafisheries200ResponseIntermediateInnerIntensities +from openapi_client.models.post_wildseafisheries200_response_scope1 import PostWildseafisheries200ResponseScope1 +from openapi_client.models.post_wildseafisheries200_response_scope3 import PostWildseafisheries200ResponseScope3 +from openapi_client.models.post_wildseafisheries_request import PostWildseafisheriesRequest +from openapi_client.models.post_wildseafisheries_request_enterprises_inner import PostWildseafisheriesRequestEnterprisesInner +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_bait_inner import PostWildseafisheriesRequestEnterprisesInnerBaitInner +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_custombait_inner import PostWildseafisheriesRequestEnterprisesInnerCustombaitInner +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_flights_inner import PostWildseafisheriesRequestEnterprisesInnerFlightsInner +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_refrigerants_inner import PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_transports_inner import PostWildseafisheriesRequestEnterprisesInnerTransportsInner diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response.py new file mode 100644 index 00000000..fa915273 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_intensities import PostAquaculture200ResponseIntensities +from openapi_client.models.post_aquaculture200_response_intermediate_inner import PostAquaculture200ResponseIntermediateInner +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_purchased_offsets import PostAquaculture200ResponsePurchasedOffsets +from openapi_client.models.post_aquaculture200_response_scope1 import PostAquaculture200ResponseScope1 +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_aquaculture200_response_scope3 import PostAquaculture200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostAquaculture200Response(BaseModel): + """ + Emissions calculation output for the `aquaculture` calculator + """ # noqa: E501 + scope1: PostAquaculture200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostAquaculture200ResponseScope3 + purchased_offsets: PostAquaculture200ResponsePurchasedOffsets = Field(alias="purchasedOffsets") + net: PostAquaculture200ResponseNet + intensities: PostAquaculture200ResponseIntensities + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + intermediate: List[PostAquaculture200ResponseIntermediateInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "purchasedOffsets", "net", "intensities", "carbonSequestration", "intermediate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquaculture200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of purchased_offsets + if self.purchased_offsets: + _dict['purchasedOffsets'] = self.purchased_offsets.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquaculture200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostAquaculture200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostAquaculture200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "purchasedOffsets": PostAquaculture200ResponsePurchasedOffsets.from_dict(obj["purchasedOffsets"]) if obj.get("purchasedOffsets") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostAquaculture200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intermediate": [PostAquaculture200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_carbon_sequestration.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_carbon_sequestration.py new file mode 100644 index 00000000..7d3cb9c5 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_carbon_sequestration.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquaculture200ResponseCarbonSequestration(BaseModel): + """ + Carbon sequestration, in tonnes-CO2e + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] = Field(description="Annual amount of carbon sequestered, in tonnes-CO2e") + intermediate: List[Union[StrictFloat, StrictInt]] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "intermediate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseCarbonSequestration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseCarbonSequestration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "intermediate": obj.get("intermediate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_intensities.py new file mode 100644 index 00000000..77d5ab29 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_intensities.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquaculture200ResponseIntensities(BaseModel): + """ + PostAquaculture200ResponseIntensities + """ # noqa: E501 + total_harvest_weight_kg: Union[StrictFloat, StrictInt] = Field(description="Total harvest weight in kg", alias="totalHarvestWeightKg") + aquaculture_excluding_carbon_offsets: Union[StrictFloat, StrictInt] = Field(description="Aquaculture emissions intensity excluding sequestration, in kg-CO2e/kg", alias="aquacultureExcludingCarbonOffsets") + aquaculture_including_carbon_offsets: Union[StrictFloat, StrictInt] = Field(description="Aquaculture emissions intensity including sequestration, in kg-CO2e/kg", alias="aquacultureIncludingCarbonOffsets") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["totalHarvestWeightKg", "aquacultureExcludingCarbonOffsets", "aquacultureIncludingCarbonOffsets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalHarvestWeightKg": obj.get("totalHarvestWeightKg"), + "aquacultureExcludingCarbonOffsets": obj.get("aquacultureExcludingCarbonOffsets"), + "aquacultureIncludingCarbonOffsets": obj.get("aquacultureIncludingCarbonOffsets") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_intermediate_inner.py new file mode 100644 index 00000000..1ded2b39 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_intermediate_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_intensities import PostAquaculture200ResponseIntensities +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope1 import PostAquaculture200ResponseScope1 +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_aquaculture200_response_scope3 import PostAquaculture200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostAquaculture200ResponseIntermediateInner(BaseModel): + """ + Intermediate emissions calculation output for the Aquaculture calculator + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostAquaculture200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostAquaculture200ResponseScope3 + intensities: PostAquaculture200ResponseIntensities + net: PostAquaculture200ResponseNet + carbon_sequestration: PostAquaculture200ResponseIntermediateInnerCarbonSequestration = Field(alias="carbonSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "intensities", "net", "carbonSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostAquaculture200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostAquaculture200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "intensities": PostAquaculture200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "carbonSequestration": PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_intermediate_inner_carbon_sequestration.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_intermediate_inner_carbon_sequestration.py new file mode 100644 index 00000000..b27c0e02 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_intermediate_inner_carbon_sequestration.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquaculture200ResponseIntermediateInnerCarbonSequestration(BaseModel): + """ + Carbon sequestration, in tonnes-CO2e + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] = Field(description="Annual amount of carbon sequestered, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseIntermediateInnerCarbonSequestration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseIntermediateInnerCarbonSequestration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_net.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_net.py new file mode 100644 index 00000000..49cce329 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_net.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquaculture200ResponseNet(BaseModel): + """ + Net emissions for the activity + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseNet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseNet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_purchased_offsets.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_purchased_offsets.py new file mode 100644 index 00000000..a11629d0 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_purchased_offsets.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquaculture200ResponsePurchasedOffsets(BaseModel): + """ + Purchased offsets, in tonnes-CO2e + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] = Field(description="Annual amount of carbon sequestered, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponsePurchasedOffsets from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponsePurchasedOffsets from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_scope1.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_scope1.py new file mode 100644 index 00000000..041291b1 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_scope1.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquaculture200ResponseScope1(BaseModel): + """ + Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fuel_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from fuel use, in tonnes-CO2e", alias="fuelCO2") + fuel_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from fuel use, in tonnes-CO2e", alias="fuelCH4") + fuel_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fuel use, in tonnes-CO2e", alias="fuelN2O") + hfcs_refrigerant_leakage: Union[StrictFloat, StrictInt] = Field(description="Emissions from refrigerant leakage, in tonnes-HFCs", alias="hfcsRefrigerantLeakage") + waste_water_co2: Union[StrictFloat, StrictInt] = Field(description="Emissions from wastewater, in tonnes-CO2e", alias="wasteWaterCO2") + composted_solid_waste_co2: Union[StrictFloat, StrictInt] = Field(description="Emissions from composted solid waste, in tonnes-CO2e", alias="compostedSolidWasteCO2") + total_co2: Union[StrictFloat, StrictInt] = Field(description="Total CO2 scope 1 emissions, in tonnes-CO2e", alias="totalCO2") + total_ch4: Union[StrictFloat, StrictInt] = Field(description="Total CH4 scope 1 emissions, in tonnes-CO2e", alias="totalCH4") + total_n2_o: Union[StrictFloat, StrictInt] = Field(description="Total N2O scope 1 emissions, in tonnes-CO2e", alias="totalN2O") + total_hfcs: Union[StrictFloat, StrictInt] = Field(description="Total HFCs scope 1 emissions, in tonnes-CO2e", alias="totalHFCs") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 1 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuelCO2", "fuelCH4", "fuelN2O", "hfcsRefrigerantLeakage", "wasteWaterCO2", "compostedSolidWasteCO2", "totalCO2", "totalCH4", "totalN2O", "totalHFCs", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseScope1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseScope1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuelCO2": obj.get("fuelCO2"), + "fuelCH4": obj.get("fuelCH4"), + "fuelN2O": obj.get("fuelN2O"), + "hfcsRefrigerantLeakage": obj.get("hfcsRefrigerantLeakage"), + "wasteWaterCO2": obj.get("wasteWaterCO2"), + "compostedSolidWasteCO2": obj.get("compostedSolidWasteCO2"), + "totalCO2": obj.get("totalCO2"), + "totalCH4": obj.get("totalCH4"), + "totalN2O": obj.get("totalN2O"), + "totalHFCs": obj.get("totalHFCs"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_scope2.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_scope2.py new file mode 100644 index 00000000..d127ec17 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_scope2.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquaculture200ResponseScope2(BaseModel): + """ + Scope 2 greenhouse gas emissions are the emissions released to the atmosphere from the indirect consumption of an energy commodity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + electricity: Union[StrictFloat, StrictInt] = Field(description="Emissions from electricity, in tonnes-CO2e") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 2 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["electricity", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseScope2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseScope2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "electricity": obj.get("electricity"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_scope3.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_scope3.py new file mode 100644 index 00000000..9c903954 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture200_response_scope3.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquaculture200ResponseScope3(BaseModel): + """ + Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + purchased_bait: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased bait, in tonnes-CO2e", alias="purchasedBait") + electricity: Union[StrictFloat, StrictInt] = Field(description="Emissions from electricity, in tonnes-CO2e") + fuel: Union[StrictFloat, StrictInt] = Field(description="Emissions from fuel, in tonnes-CO2e") + commercial_flights: Union[StrictFloat, StrictInt] = Field(description="Emissions from commercial flights, in tonnes-CO2e", alias="commercialFlights") + inbound_freight: Union[StrictFloat, StrictInt] = Field(description="Emissions from inbound freight, in tonnes-CO2e", alias="inboundFreight") + outbound_freight: Union[StrictFloat, StrictInt] = Field(description="Emissions from outbound freight, in tonnes-CO2e", alias="outboundFreight") + solid_waste_sent_offsite: Union[StrictFloat, StrictInt] = Field(description="Emissions from solid waste sent offsite, in tonnes-CO2e", alias="solidWasteSentOffsite") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 3 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["purchasedBait", "electricity", "fuel", "commercialFlights", "inboundFreight", "outboundFreight", "solidWasteSentOffsite", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseScope3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquaculture200ResponseScope3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "purchasedBait": obj.get("purchasedBait"), + "electricity": obj.get("electricity"), + "fuel": obj.get("fuel"), + "commercialFlights": obj.get("commercialFlights"), + "inboundFreight": obj.get("inboundFreight"), + "outboundFreight": obj.get("outboundFreight"), + "solidWasteSentOffsite": obj.get("solidWasteSentOffsite"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request.py new file mode 100644 index 00000000..0c42ea5e --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture_request_enterprises_inner import PostAquacultureRequestEnterprisesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostAquacultureRequest(BaseModel): + """ + Input data required for the `aquaculture` calculator + """ # noqa: E501 + enterprises: List[PostAquacultureRequestEnterprisesInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enterprises"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquacultureRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in enterprises (list) + _items = [] + if self.enterprises: + for _item_enterprises in self.enterprises: + if _item_enterprises: + _items.append(_item_enterprises.to_dict()) + _dict['enterprises'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquacultureRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enterprises": [PostAquacultureRequestEnterprisesInner.from_dict(_item) for _item in obj["enterprises"]] if obj.get("enterprises") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner.py new file mode 100644 index 00000000..a3905b31 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner.py @@ -0,0 +1,210 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_aquaculture_request_enterprises_inner_bait_inner import PostAquacultureRequestEnterprisesInnerBaitInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_custom_bait_inner import PostAquacultureRequestEnterprisesInnerCustomBaitInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_fluid_waste_inner import PostAquacultureRequestEnterprisesInnerFluidWasteInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel import PostAquacultureRequestEnterprisesInnerFuel +from openapi_client.models.post_aquaculture_request_enterprises_inner_inbound_freight_inner import PostAquacultureRequestEnterprisesInnerInboundFreightInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_refrigerants_inner import PostAquacultureRequestEnterprisesInnerRefrigerantsInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_solid_waste import PostAquacultureRequestEnterprisesInnerSolidWaste +from typing import Optional, Set +from typing_extensions import Self + +class PostAquacultureRequestEnterprisesInner(BaseModel): + """ + Input data required for a single aquaculture enterprise + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + production_system: StrictStr = Field(description="Production system of the aquaculture enterprise", alias="productionSystem") + total_harvest_kg: Union[StrictFloat, StrictInt] = Field(description="Total harvest in kg", alias="totalHarvestKg") + refrigerants: List[PostAquacultureRequestEnterprisesInnerRefrigerantsInner] = Field(description="Refrigerant type") + bait: List[PostAquacultureRequestEnterprisesInnerBaitInner] = Field(description="Bait purchases") + custom_bait: List[PostAquacultureRequestEnterprisesInnerCustomBaitInner] = Field(description="Custom bait purchases", alias="customBait") + inbound_freight: List[PostAquacultureRequestEnterprisesInnerInboundFreightInner] = Field(description="Services used to transport goods to the enterprise", alias="inboundFreight") + outbound_freight: List[PostAquacultureRequestEnterprisesInnerInboundFreightInner] = Field(description="Services used to transport goods from the enterprise", alias="outboundFreight") + total_commercial_flights_km: Union[StrictFloat, StrictInt] = Field(description="Total distance of commercial flights, in km (kilometers)", alias="totalCommercialFlightsKm") + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + electricity_source: StrictStr = Field(description="Source of electricity", alias="electricitySource") + fuel: PostAquacultureRequestEnterprisesInnerFuel + fluid_waste: List[PostAquacultureRequestEnterprisesInnerFluidWasteInner] = Field(description="Amount of fluid waste, in kL (kilolitres)", alias="fluidWaste") + solid_waste: PostAquacultureRequestEnterprisesInnerSolidWaste = Field(alias="solidWaste") + carbon_offsets: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0)", alias="carbonOffsets") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "productionSystem", "totalHarvestKg", "refrigerants", "bait", "customBait", "inboundFreight", "outboundFreight", "totalCommercialFlightsKm", "electricityRenewable", "electricityUse", "electricitySource", "fuel", "fluidWaste", "solidWaste", "carbonOffsets"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + @field_validator('production_system') + def production_system_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Abalone Farming', 'Mussel Farming', 'Offshore Caged Aquaculture', 'Onland Fish Farming', 'Onshore Hatchery', 'Other', 'Oyster Farming', 'Pearl Farming', 'Prawn Farming', 'Seaweed and Macroalgae Farming']): + raise ValueError("must be one of enum values ('Abalone Farming', 'Mussel Farming', 'Offshore Caged Aquaculture', 'Onland Fish Farming', 'Onshore Hatchery', 'Other', 'Oyster Farming', 'Pearl Farming', 'Prawn Farming', 'Seaweed and Macroalgae Farming')") + return value + + @field_validator('electricity_source') + def electricity_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['State Grid', 'Renewable']): + raise ValueError("must be one of enum values ('State Grid', 'Renewable')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in refrigerants (list) + _items = [] + if self.refrigerants: + for _item_refrigerants in self.refrigerants: + if _item_refrigerants: + _items.append(_item_refrigerants.to_dict()) + _dict['refrigerants'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in bait (list) + _items = [] + if self.bait: + for _item_bait in self.bait: + if _item_bait: + _items.append(_item_bait.to_dict()) + _dict['bait'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in custom_bait (list) + _items = [] + if self.custom_bait: + for _item_custom_bait in self.custom_bait: + if _item_custom_bait: + _items.append(_item_custom_bait.to_dict()) + _dict['customBait'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in inbound_freight (list) + _items = [] + if self.inbound_freight: + for _item_inbound_freight in self.inbound_freight: + if _item_inbound_freight: + _items.append(_item_inbound_freight.to_dict()) + _dict['inboundFreight'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in outbound_freight (list) + _items = [] + if self.outbound_freight: + for _item_outbound_freight in self.outbound_freight: + if _item_outbound_freight: + _items.append(_item_outbound_freight.to_dict()) + _dict['outboundFreight'] = _items + # override the default output from pydantic by calling `to_dict()` of fuel + if self.fuel: + _dict['fuel'] = self.fuel.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in fluid_waste (list) + _items = [] + if self.fluid_waste: + for _item_fluid_waste in self.fluid_waste: + if _item_fluid_waste: + _items.append(_item_fluid_waste.to_dict()) + _dict['fluidWaste'] = _items + # override the default output from pydantic by calling `to_dict()` of solid_waste + if self.solid_waste: + _dict['solidWaste'] = self.solid_waste.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "productionSystem": obj.get("productionSystem"), + "totalHarvestKg": obj.get("totalHarvestKg"), + "refrigerants": [PostAquacultureRequestEnterprisesInnerRefrigerantsInner.from_dict(_item) for _item in obj["refrigerants"]] if obj.get("refrigerants") is not None else None, + "bait": [PostAquacultureRequestEnterprisesInnerBaitInner.from_dict(_item) for _item in obj["bait"]] if obj.get("bait") is not None else None, + "customBait": [PostAquacultureRequestEnterprisesInnerCustomBaitInner.from_dict(_item) for _item in obj["customBait"]] if obj.get("customBait") is not None else None, + "inboundFreight": [PostAquacultureRequestEnterprisesInnerInboundFreightInner.from_dict(_item) for _item in obj["inboundFreight"]] if obj.get("inboundFreight") is not None else None, + "outboundFreight": [PostAquacultureRequestEnterprisesInnerInboundFreightInner.from_dict(_item) for _item in obj["outboundFreight"]] if obj.get("outboundFreight") is not None else None, + "totalCommercialFlightsKm": obj.get("totalCommercialFlightsKm"), + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "electricitySource": obj.get("electricitySource"), + "fuel": PostAquacultureRequestEnterprisesInnerFuel.from_dict(obj["fuel"]) if obj.get("fuel") is not None else None, + "fluidWaste": [PostAquacultureRequestEnterprisesInnerFluidWasteInner.from_dict(_item) for _item in obj["fluidWaste"]] if obj.get("fluidWaste") is not None else None, + "solidWaste": PostAquacultureRequestEnterprisesInnerSolidWaste.from_dict(obj["solidWaste"]) if obj.get("solidWaste") is not None else None, + "carbonOffsets": obj.get("carbonOffsets") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_bait_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_bait_inner.py new file mode 100644 index 00000000..c5b5aed0 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_bait_inner.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PostAquacultureRequestEnterprisesInnerBaitInner(BaseModel): + """ + PostAquacultureRequestEnterprisesInnerBaitInner + """ # noqa: E501 + type: StrictStr = Field(description="Bait product type") + purchased_tonnes: Union[StrictFloat, StrictInt] = Field(description="Purchased product in tonnes", alias="purchasedTonnes") + additional_ingredients: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Additional ingredient fraction, from 0 to 1", alias="additionalIngredients") + emissions_intensity: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of additional ingredients, in kg CO2e/kg bait (default 0)", alias="emissionsIntensity") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "purchasedTonnes", "additionalIngredients", "emissionsIntensity"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Whole Sardines', 'Low Animal Protein Formulated Feed', 'High Animal Protein Formulated Feed', 'Cereal Grain', 'Squid', 'Whole Fish']): + raise ValueError("must be one of enum values ('Whole Sardines', 'Low Animal Protein Formulated Feed', 'High Animal Protein Formulated Feed', 'Cereal Grain', 'Squid', 'Whole Fish')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerBaitInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerBaitInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "purchasedTonnes": obj.get("purchasedTonnes"), + "additionalIngredients": obj.get("additionalIngredients"), + "emissionsIntensity": obj.get("emissionsIntensity") if obj.get("emissionsIntensity") is not None else 0 + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_custom_bait_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_custom_bait_inner.py new file mode 100644 index 00000000..a60ec025 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_custom_bait_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquacultureRequestEnterprisesInnerCustomBaitInner(BaseModel): + """ + PostAquacultureRequestEnterprisesInnerCustomBaitInner + """ # noqa: E501 + purchased_tonnes: Union[StrictFloat, StrictInt] = Field(description="Purchased product in tonnes", alias="purchasedTonnes") + emissions_intensity: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of product, in kg CO2e/kg bait", alias="emissionsIntensity") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["purchasedTonnes", "emissionsIntensity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerCustomBaitInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerCustomBaitInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "purchasedTonnes": obj.get("purchasedTonnes"), + "emissionsIntensity": obj.get("emissionsIntensity") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fluid_waste_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fluid_waste_inner.py new file mode 100644 index 00000000..d6465128 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fluid_waste_inner.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquacultureRequestEnterprisesInnerFluidWasteInner(BaseModel): + """ + PostAquacultureRequestEnterprisesInnerFluidWasteInner + """ # noqa: E501 + fluid_waste_kl: Union[StrictFloat, StrictInt] = Field(description="Amount of fluid waste, in kL (kilolitres)", alias="fluidWasteKl") + fluid_waste_treatment_type: StrictStr = Field(description="Type of fluid waste treatment", alias="fluidWasteTreatmentType") + average_inlet_cod: Union[StrictFloat, StrictInt] = Field(description="Average inlet COD (mg per litre)", alias="averageInletCOD") + average_outlet_cod: Union[StrictFloat, StrictInt] = Field(description="Average outlet COD (mg per litre)", alias="averageOutletCOD") + flared_combusted_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of waste flared or combusted, between 0 and 1", alias="flaredCombustedFraction") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fluidWasteKl", "fluidWasteTreatmentType", "averageInletCOD", "averageOutletCOD", "flaredCombustedFraction"] + + @field_validator('fluid_waste_treatment_type') + def fluid_waste_treatment_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Managed Aerobic', 'Unmanaged Aerobic', 'Anaerobic Digester/Reactor', 'Shallow Anaerobic Lagoon <2m', 'Deep Anaerobic Lagoon >2m']): + raise ValueError("must be one of enum values ('Managed Aerobic', 'Unmanaged Aerobic', 'Anaerobic Digester/Reactor', 'Shallow Anaerobic Lagoon <2m', 'Deep Anaerobic Lagoon >2m')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerFluidWasteInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerFluidWasteInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fluidWasteKl": obj.get("fluidWasteKl"), + "fluidWasteTreatmentType": obj.get("fluidWasteTreatmentType"), + "averageInletCOD": obj.get("averageInletCOD"), + "averageOutletCOD": obj.get("averageOutletCOD"), + "flaredCombustedFraction": obj.get("flaredCombustedFraction") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fuel.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fuel.py new file mode 100644 index 00000000..ef650e9c --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fuel.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner import PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner import PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner +from typing import Optional, Set +from typing_extensions import Self + +class PostAquacultureRequestEnterprisesInnerFuel(BaseModel): + """ + Fuels used in this enterprise + """ # noqa: E501 + transport_fuel: List[PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner] = Field(description="A list of fuels used in transportation and vehicles", alias="transportFuel") + stationary_fuel: List[PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner] = Field(description="A list of fuels used in stationary applications", alias="stationaryFuel") + natural_gas: Union[StrictFloat, StrictInt] = Field(description="Amount of natural gas consumed in Mj (megajoules)", alias="naturalGas") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["transportFuel", "stationaryFuel", "naturalGas"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerFuel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in transport_fuel (list) + _items = [] + if self.transport_fuel: + for _item_transport_fuel in self.transport_fuel: + if _item_transport_fuel: + _items.append(_item_transport_fuel.to_dict()) + _dict['transportFuel'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in stationary_fuel (list) + _items = [] + if self.stationary_fuel: + for _item_stationary_fuel in self.stationary_fuel: + if _item_stationary_fuel: + _items.append(_item_stationary_fuel.to_dict()) + _dict['stationaryFuel'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerFuel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "transportFuel": [PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.from_dict(_item) for _item in obj["transportFuel"]] if obj.get("transportFuel") is not None else None, + "stationaryFuel": [PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.from_dict(_item) for _item in obj["stationaryFuel"]] if obj.get("stationaryFuel") is not None else None, + "naturalGas": obj.get("naturalGas") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py new file mode 100644 index 00000000..6a339e13 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner(BaseModel): + """ + PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner + """ # noqa: E501 + type: StrictStr = Field(description="Type of fuel") + amount_litres: Union[StrictFloat, StrictInt] = Field(description="Amount of fuel consumed (litres)", alias="amountLitres") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "amountLitres"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['petrol', 'diesel', 'lpg', 'ethanol', 'biodiesel', 'renewable diesel', 'other biofuels', 'lng']): + raise ValueError("must be one of enum values ('petrol', 'diesel', 'lpg', 'ethanol', 'biodiesel', 'renewable diesel', 'other biofuels', 'lng')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "amountLitres": obj.get("amountLitres") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py new file mode 100644 index 00000000..49dc1cec --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner(BaseModel): + """ + PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner + """ # noqa: E501 + type: StrictStr = Field(description="Type of fuel") + amount_litres: Union[StrictFloat, StrictInt] = Field(description="Amount of fuel consumed (litres)", alias="amountLitres") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "amountLitres"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['petrol', 'diesel', 'lpg', 'ethanol', 'biodiesel', 'renewable diesel', 'other biofuels', 'lng', 'fuel oil', 'avgas', 'jet a-1', 'jet b']): + raise ValueError("must be one of enum values ('petrol', 'diesel', 'lpg', 'ethanol', 'biodiesel', 'renewable diesel', 'other biofuels', 'lng', 'fuel oil', 'avgas', 'jet a-1', 'jet b')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "amountLitres": obj.get("amountLitres") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_inbound_freight_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_inbound_freight_inner.py new file mode 100644 index 00000000..bd4125c8 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_inbound_freight_inner.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquacultureRequestEnterprisesInnerInboundFreightInner(BaseModel): + """ + PostAquacultureRequestEnterprisesInnerInboundFreightInner + """ # noqa: E501 + type: StrictStr = Field(description="Type of freight used") + total_km_tonnes: Union[StrictFloat, StrictInt] = Field(description="Total distance of freight, in kilometre tonnes", alias="totalKmTonnes") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "totalKmTonnes"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Truck', 'Rail', 'Long haul flight', 'Medium haul flight', 'Small container ship', 'Large container ship']): + raise ValueError("must be one of enum values ('Truck', 'Rail', 'Long haul flight', 'Medium haul flight', 'Small container ship', 'Large container ship')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerInboundFreightInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerInboundFreightInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "totalKmTonnes": obj.get("totalKmTonnes") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_refrigerants_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_refrigerants_inner.py new file mode 100644 index 00000000..a27e25b2 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_refrigerants_inner.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquacultureRequestEnterprisesInnerRefrigerantsInner(BaseModel): + """ + PostAquacultureRequestEnterprisesInnerRefrigerantsInner + """ # noqa: E501 + refrigerant: StrictStr = Field(description="Refrigerant type") + charge_size: Union[StrictFloat, StrictInt] = Field(description="Amount of refrigerant contained in the appliance, in kg", alias="chargeSize") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["refrigerant", "chargeSize"] + + @field_validator('refrigerant') + def refrigerant_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['HFC-23', 'HFC-32', 'HFC-41', 'HFC-43-10mee', 'HFC-125', 'HFC-134', 'HFC-134a', 'HFC-143', 'HFC-143a', 'HFC-152a', 'HFC-227ea', 'HFC-236fa', 'HFC-245ca', 'HFC-245fa', 'HFC-365mfc', 'R438A', 'R448A', 'R-22', 'Ammonia (R-717)', 'R-11', 'R-12', 'R-13', 'R-23', 'R-32', 'R-113', 'R-114', 'R-115', 'R-116', 'R-123', 'R-124', 'R-125', 'R-134a', 'R-141b', 'R-142b', 'R-143a', 'R-152a', 'R-218', 'R-227ea', 'R-236fa', 'R-245ca', 'R-245fa', 'R-C318', 'R-401A', 'R-401B', 'R-401C', 'R-402A', 'R-402B', 'R-403A', 'R-403B', 'R-404A', 'R-405A', 'R-406A', 'R-407A', 'R-407B', 'R-407C', 'R-407D', 'R-407E', 'R-408A', 'R-409A', 'R-409B', 'R-410A', 'R-411A', 'R-411B', 'R-412A', 'R-413A', 'R-414A', 'R-414B', 'R-415A', 'R-415B', 'R-416A', 'R-417A', 'R-418A', 'R-419A', 'R-420A', 'R-421A', 'R-421B', 'R-422A', 'R-422B', 'R-422C', 'R-422D', 'R-423A', 'R-424A', 'R-425A', 'R-426A', 'R-427A', 'R-428A', 'R-500', 'R-502', 'R-503', 'R-507A', 'R-508A', 'R-508B', 'R-509A']): + raise ValueError("must be one of enum values ('HFC-23', 'HFC-32', 'HFC-41', 'HFC-43-10mee', 'HFC-125', 'HFC-134', 'HFC-134a', 'HFC-143', 'HFC-143a', 'HFC-152a', 'HFC-227ea', 'HFC-236fa', 'HFC-245ca', 'HFC-245fa', 'HFC-365mfc', 'R438A', 'R448A', 'R-22', 'Ammonia (R-717)', 'R-11', 'R-12', 'R-13', 'R-23', 'R-32', 'R-113', 'R-114', 'R-115', 'R-116', 'R-123', 'R-124', 'R-125', 'R-134a', 'R-141b', 'R-142b', 'R-143a', 'R-152a', 'R-218', 'R-227ea', 'R-236fa', 'R-245ca', 'R-245fa', 'R-C318', 'R-401A', 'R-401B', 'R-401C', 'R-402A', 'R-402B', 'R-403A', 'R-403B', 'R-404A', 'R-405A', 'R-406A', 'R-407A', 'R-407B', 'R-407C', 'R-407D', 'R-407E', 'R-408A', 'R-409A', 'R-409B', 'R-410A', 'R-411A', 'R-411B', 'R-412A', 'R-413A', 'R-414A', 'R-414B', 'R-415A', 'R-415B', 'R-416A', 'R-417A', 'R-418A', 'R-419A', 'R-420A', 'R-421A', 'R-421B', 'R-422A', 'R-422B', 'R-422C', 'R-422D', 'R-423A', 'R-424A', 'R-425A', 'R-426A', 'R-427A', 'R-428A', 'R-500', 'R-502', 'R-503', 'R-507A', 'R-508A', 'R-508B', 'R-509A')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerRefrigerantsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerRefrigerantsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "refrigerant": obj.get("refrigerant"), + "chargeSize": obj.get("chargeSize") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_solid_waste.py b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_solid_waste.py new file mode 100644 index 00000000..bb121c1c --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_aquaculture_request_enterprises_inner_solid_waste.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostAquacultureRequestEnterprisesInnerSolidWaste(BaseModel): + """ + Solid waste management + """ # noqa: E501 + sent_offsite_tonnes: Union[StrictFloat, StrictInt] = Field(description="Amount of solid waste sent offsite to landfill, in tonnes", alias="sentOffsiteTonnes") + onsite_composting_tonnes: Union[StrictFloat, StrictInt] = Field(description="Amount of solid waste composted on site, in tonnes", alias="onsiteCompostingTonnes") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sentOffsiteTonnes", "onsiteCompostingTonnes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerSolidWaste from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostAquacultureRequestEnterprisesInnerSolidWaste from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sentOffsiteTonnes": obj.get("sentOffsiteTonnes"), + "onsiteCompostingTonnes": obj.get("onsiteCompostingTonnes") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_beef200_response.py new file mode 100644 index 00000000..a58a1720 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef200_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_beef200_response_intermediate_inner import PostBeef200ResponseIntermediateInner +from openapi_client.models.post_beef200_response_intermediate_inner_intensities import PostBeef200ResponseIntermediateInnerIntensities +from openapi_client.models.post_beef200_response_net import PostBeef200ResponseNet +from openapi_client.models.post_beef200_response_scope1 import PostBeef200ResponseScope1 +from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostBeef200Response(BaseModel): + """ + Emissions calculation output for the `beef` calculator + """ # noqa: E501 + scope1: PostBeef200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostBeef200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + intermediate: List[PostBeef200ResponseIntermediateInner] + net: PostBeef200ResponseNet + intensities: PostBeef200ResponseIntermediateInnerIntensities + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "intermediate", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeef200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeef200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostBeef200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostBeef200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intermediate": [PostBeef200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None, + "net": PostBeef200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostBeef200ResponseIntermediateInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_intermediate_inner.py new file mode 100644 index 00000000..3a90619f --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_intermediate_inner.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_beef200_response_intermediate_inner_intensities import PostBeef200ResponseIntermediateInnerIntensities +from openapi_client.models.post_beef200_response_scope1 import PostBeef200ResponseScope1 +from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostBeef200ResponseIntermediateInner(BaseModel): + """ + Intermediate emissions calculation output for the Beef calculator + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostBeef200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostBeef200ResponseScope3 + carbon_sequestration: Union[StrictFloat, StrictInt] = Field(description="Carbon sequestration, in tonnes-CO2e", alias="carbonSequestration") + intensities: PostBeef200ResponseIntermediateInnerIntensities + net: PostAquaculture200ResponseNet + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "carbonSequestration", "intensities", "net"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeef200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeef200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostBeef200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostBeef200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": obj.get("carbonSequestration"), + "intensities": PostBeef200ResponseIntermediateInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..f84c2c55 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_intermediate_inner_intensities.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBeef200ResponseIntermediateInnerIntensities(BaseModel): + """ + PostBeef200ResponseIntermediateInnerIntensities + """ # noqa: E501 + liveweight_beef_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Amount of beef produced in kg liveweight", alias="liveweightBeefProducedKg") + beef_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Beef excluding sequestration, in kg-CO2e/kg liveweight", alias="beefExcludingSequestration") + beef_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Beef including sequestration, in kg-CO2e/kg liveweight", alias="beefIncludingSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["liveweightBeefProducedKg", "beefExcludingSequestration", "beefIncludingSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeef200ResponseIntermediateInnerIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeef200ResponseIntermediateInnerIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "liveweightBeefProducedKg": obj.get("liveweightBeefProducedKg"), + "beefExcludingSequestration": obj.get("beefExcludingSequestration"), + "beefIncludingSequestration": obj.get("beefIncludingSequestration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_net.py b/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_net.py new file mode 100644 index 00000000..d6321860 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_net.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBeef200ResponseNet(BaseModel): + """ + PostBeef200ResponseNet + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] = Field(description="Total net emissions of this activity, in tonnes-CO2e/year") + beef: Union[StrictFloat, StrictInt] = Field(description="Net emissions of beef, in tonnes-CO2e/year") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "beef"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeef200ResponseNet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeef200ResponseNet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "beef": obj.get("beef") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_scope1.py b/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_scope1.py new file mode 100644 index 00000000..36335ae3 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_scope1.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBeef200ResponseScope1(BaseModel): + """ + Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fuel_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from fuel use, in tonnes-CO2e", alias="fuelCO2") + fuel_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from fuel use, in tonnes-CO2e", alias="fuelCH4") + fuel_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fuel use, in tonnes-CO2e", alias="fuelN2O") + urea_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from urea, in tonnes-CO2e", alias="ureaCO2") + lime_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from lime, in tonnes-CO2e", alias="limeCO2") + fertiliser_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fertiliser, in tonnes-CO2e", alias="fertiliserN2O") + enteric_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from enteric fermentation, in tonnes-CO2e", alias="entericCH4") + manure_management_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from manure management, in tonnes-CO2e", alias="manureManagementCH4") + urine_and_dung_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from urine and dung, in tonnes-CO2e", alias="urineAndDungN2O") + atmospheric_deposition_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from atmospheric deposition, in tonnes-CO2e", alias="atmosphericDepositionN2O") + leaching_and_runoff_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from leeching and runoff, in tonnes-CO2e", alias="leachingAndRunoffN2O") + savannah_burning_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from field burning, in tonnes-CO2e", alias="savannahBurningN2O") + savannah_burning_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from field burning, in tonnes-CO2e", alias="savannahBurningCH4") + total_co2: Union[StrictFloat, StrictInt] = Field(description="Total CO2 scope 1 emissions, in tonnes-CO2e", alias="totalCO2") + total_ch4: Union[StrictFloat, StrictInt] = Field(description="Total CH4 scope 1 emissions, in tonnes-CO2e", alias="totalCH4") + total_n2_o: Union[StrictFloat, StrictInt] = Field(description="Total N2O scope 1 emissions, in tonnes-CO2e", alias="totalN2O") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 1 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuelCO2", "fuelCH4", "fuelN2O", "ureaCO2", "limeCO2", "fertiliserN2O", "entericCH4", "manureManagementCH4", "urineAndDungN2O", "atmosphericDepositionN2O", "leachingAndRunoffN2O", "savannahBurningN2O", "savannahBurningCH4", "totalCO2", "totalCH4", "totalN2O", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeef200ResponseScope1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeef200ResponseScope1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuelCO2": obj.get("fuelCO2"), + "fuelCH4": obj.get("fuelCH4"), + "fuelN2O": obj.get("fuelN2O"), + "ureaCO2": obj.get("ureaCO2"), + "limeCO2": obj.get("limeCO2"), + "fertiliserN2O": obj.get("fertiliserN2O"), + "entericCH4": obj.get("entericCH4"), + "manureManagementCH4": obj.get("manureManagementCH4"), + "urineAndDungN2O": obj.get("urineAndDungN2O"), + "atmosphericDepositionN2O": obj.get("atmosphericDepositionN2O"), + "leachingAndRunoffN2O": obj.get("leachingAndRunoffN2O"), + "savannahBurningN2O": obj.get("savannahBurningN2O"), + "savannahBurningCH4": obj.get("savannahBurningCH4"), + "totalCO2": obj.get("totalCO2"), + "totalCH4": obj.get("totalCH4"), + "totalN2O": obj.get("totalN2O"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_scope3.py b/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_scope3.py new file mode 100644 index 00000000..0587173d --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef200_response_scope3.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBeef200ResponseScope3(BaseModel): + """ + Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fertiliser: Union[StrictFloat, StrictInt] = Field(description="Emissions from fertiliser, in tonnes-CO2e") + purchased_mineral_supplementation: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased mineral supplementation, in tonnes-CO2e", alias="purchasedMineralSupplementation") + purchased_feed: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased feed, in tonnes-CO2e", alias="purchasedFeed") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Emissions from herbicide, in tonnes-CO2e") + electricity: Union[StrictFloat, StrictInt] = Field(description="Emissions from electricity, in tonnes-CO2e") + fuel: Union[StrictFloat, StrictInt] = Field(description="Emissions from fuel, in tonnes-CO2e") + lime: Union[StrictFloat, StrictInt] = Field(description="Emissions from lime, in tonnes-CO2e") + purchased_livestock: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased livestock, in tonnes-CO2e", alias="purchasedLivestock") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 3 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fertiliser", "purchasedMineralSupplementation", "purchasedFeed", "herbicide", "electricity", "fuel", "lime", "purchasedLivestock", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeef200ResponseScope3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeef200ResponseScope3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fertiliser": obj.get("fertiliser"), + "purchasedMineralSupplementation": obj.get("purchasedMineralSupplementation"), + "purchasedFeed": obj.get("purchasedFeed"), + "herbicide": obj.get("herbicide"), + "electricity": obj.get("electricity"), + "fuel": obj.get("fuel"), + "lime": obj.get("lime"), + "purchasedLivestock": obj.get("purchasedLivestock"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request.py new file mode 100644 index 00000000..be1a93e3 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_beef_request_beef_inner import PostBeefRequestBeefInner +from openapi_client.models.post_beef_request_burning_inner import PostBeefRequestBurningInner +from openapi_client.models.post_beef_request_vegetation_inner import PostBeefRequestVegetationInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequest(BaseModel): + """ + Input data required for the `beef` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + north_of_tropic_of_capricorn: StrictBool = Field(description="Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude", alias="northOfTropicOfCapricorn") + rainfall_above600: StrictBool = Field(description="Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm", alias="rainfallAbove600") + beef: List[PostBeefRequestBeefInner] + burning: List[PostBeefRequestBurningInner] + vegetation: List[PostBeefRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "northOfTropicOfCapricorn", "rainfallAbove600", "beef", "burning", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in beef (list) + _items = [] + if self.beef: + for _item_beef in self.beef: + if _item_beef: + _items.append(_item_beef.to_dict()) + _dict['beef'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in burning (list) + _items = [] + if self.burning: + for _item_burning in self.burning: + if _item_burning: + _items.append(_item_burning.to_dict()) + _dict['burning'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "northOfTropicOfCapricorn": obj.get("northOfTropicOfCapricorn"), + "rainfallAbove600": obj.get("rainfallAbove600"), + "beef": [PostBeefRequestBeefInner.from_dict(_item) for _item in obj["beef"]] if obj.get("beef") is not None else None, + "burning": [PostBeefRequestBurningInner.from_dict(_item) for _item in obj["burning"]] if obj.get("burning") is not None else None, + "vegetation": [PostBeefRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner.py new file mode 100644 index 00000000..72b66f7d --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_beef_request_beef_inner_classes import PostBeefRequestBeefInnerClasses +from openapi_client.models.post_beef_request_beef_inner_cows_calving import PostBeefRequestBeefInnerCowsCalving +from openapi_client.models.post_beef_request_beef_inner_fertiliser import PostBeefRequestBeefInnerFertiliser +from openapi_client.models.post_beef_request_beef_inner_mineral_supplementation import PostBeefRequestBeefInnerMineralSupplementation +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInner(BaseModel): + """ + PostBeefRequestBeefInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + classes: PostBeefRequestBeefInnerClasses + limestone: Union[StrictFloat, StrictInt] = Field(description="Lime applied in tonnes") + limestone_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of lime as limestone vs dolomite, between 0 and 1", alias="limestoneFraction") + fertiliser: PostBeefRequestBeefInnerFertiliser + diesel: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)") + petrol: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + mineral_supplementation: PostBeefRequestBeefInnerMineralSupplementation = Field(alias="mineralSupplementation") + electricity_source: StrictStr = Field(description="Source of electricity", alias="electricitySource") + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + grain_feed: Union[StrictFloat, StrictInt] = Field(description="Grain purchased for cattle feed in tonnes", alias="grainFeed") + hay_feed: Union[StrictFloat, StrictInt] = Field(description="Hay purchased for cattle feed in tonnes", alias="hayFeed") + cottonseed_feed: Union[StrictFloat, StrictInt] = Field(description="Cotton seed purchased for cattle feed in tonnes", alias="cottonseedFeed") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms)") + herbicide_other: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from other herbicides in kg (kilograms)", alias="herbicideOther") + cows_calving: PostBeefRequestBeefInnerCowsCalving = Field(alias="cowsCalving") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "classes", "limestone", "limestoneFraction", "fertiliser", "diesel", "petrol", "lpg", "mineralSupplementation", "electricitySource", "electricityRenewable", "electricityUse", "grainFeed", "hayFeed", "cottonseedFeed", "herbicide", "herbicideOther", "cowsCalving"] + + @field_validator('electricity_source') + def electricity_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['State Grid', 'Renewable']): + raise ValueError("must be one of enum values ('State Grid', 'Renewable')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of classes + if self.classes: + _dict['classes'] = self.classes.to_dict() + # override the default output from pydantic by calling `to_dict()` of fertiliser + if self.fertiliser: + _dict['fertiliser'] = self.fertiliser.to_dict() + # override the default output from pydantic by calling `to_dict()` of mineral_supplementation + if self.mineral_supplementation: + _dict['mineralSupplementation'] = self.mineral_supplementation.to_dict() + # override the default output from pydantic by calling `to_dict()` of cows_calving + if self.cows_calving: + _dict['cowsCalving'] = self.cows_calving.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "classes": PostBeefRequestBeefInnerClasses.from_dict(obj["classes"]) if obj.get("classes") is not None else None, + "limestone": obj.get("limestone"), + "limestoneFraction": obj.get("limestoneFraction"), + "fertiliser": PostBeefRequestBeefInnerFertiliser.from_dict(obj["fertiliser"]) if obj.get("fertiliser") is not None else None, + "diesel": obj.get("diesel"), + "petrol": obj.get("petrol"), + "lpg": obj.get("lpg"), + "mineralSupplementation": PostBeefRequestBeefInnerMineralSupplementation.from_dict(obj["mineralSupplementation"]) if obj.get("mineralSupplementation") is not None else None, + "electricitySource": obj.get("electricitySource"), + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "grainFeed": obj.get("grainFeed"), + "hayFeed": obj.get("hayFeed"), + "cottonseedFeed": obj.get("cottonseedFeed"), + "herbicide": obj.get("herbicide"), + "herbicideOther": obj.get("herbicideOther"), + "cowsCalving": PostBeefRequestBeefInnerCowsCalving.from_dict(obj["cowsCalving"]) if obj.get("cowsCalving") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes.py new file mode 100644 index 00000000..bb82d56a --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1 import PostBeefRequestBeefInnerClassesBullsGt1 +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_traded import PostBeefRequestBeefInnerClassesBullsGt1Traded +from openapi_client.models.post_beef_request_beef_inner_classes_cows_gt2 import PostBeefRequestBeefInnerClassesCowsGt2 +from openapi_client.models.post_beef_request_beef_inner_classes_cows_gt2_traded import PostBeefRequestBeefInnerClassesCowsGt2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_heifers1_to2 import PostBeefRequestBeefInnerClassesHeifers1To2 +from openapi_client.models.post_beef_request_beef_inner_classes_heifers1_to2_traded import PostBeefRequestBeefInnerClassesHeifers1To2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_gt2 import PostBeefRequestBeefInnerClassesHeifersGt2 +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_gt2_traded import PostBeefRequestBeefInnerClassesHeifersGt2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_lt1 import PostBeefRequestBeefInnerClassesHeifersLt1 +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_lt1_traded import PostBeefRequestBeefInnerClassesHeifersLt1Traded +from openapi_client.models.post_beef_request_beef_inner_classes_steers1_to2 import PostBeefRequestBeefInnerClassesSteers1To2 +from openapi_client.models.post_beef_request_beef_inner_classes_steers1_to2_traded import PostBeefRequestBeefInnerClassesSteers1To2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_steers_gt2 import PostBeefRequestBeefInnerClassesSteersGt2 +from openapi_client.models.post_beef_request_beef_inner_classes_steers_gt2_traded import PostBeefRequestBeefInnerClassesSteersGt2Traded +from openapi_client.models.post_beef_request_beef_inner_classes_steers_lt1 import PostBeefRequestBeefInnerClassesSteersLt1 +from openapi_client.models.post_beef_request_beef_inner_classes_steers_lt1_traded import PostBeefRequestBeefInnerClassesSteersLt1Traded +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClasses(BaseModel): + """ + Beef classes of different types and age ranges + """ # noqa: E501 + bulls_gt1: Optional[PostBeefRequestBeefInnerClassesBullsGt1] = Field(default=None, alias="bullsGt1") + bulls_gt1_traded: Optional[PostBeefRequestBeefInnerClassesBullsGt1Traded] = Field(default=None, alias="bullsGt1Traded") + steers_lt1: Optional[PostBeefRequestBeefInnerClassesSteersLt1] = Field(default=None, alias="steersLt1") + steers_lt1_traded: Optional[PostBeefRequestBeefInnerClassesSteersLt1Traded] = Field(default=None, alias="steersLt1Traded") + steers1_to2: Optional[PostBeefRequestBeefInnerClassesSteers1To2] = Field(default=None, alias="steers1To2") + steers1_to2_traded: Optional[PostBeefRequestBeefInnerClassesSteers1To2Traded] = Field(default=None, alias="steers1To2Traded") + steers_gt2: Optional[PostBeefRequestBeefInnerClassesSteersGt2] = Field(default=None, alias="steersGt2") + steers_gt2_traded: Optional[PostBeefRequestBeefInnerClassesSteersGt2Traded] = Field(default=None, alias="steersGt2Traded") + cows_gt2: Optional[PostBeefRequestBeefInnerClassesCowsGt2] = Field(default=None, alias="cowsGt2") + cows_gt2_traded: Optional[PostBeefRequestBeefInnerClassesCowsGt2Traded] = Field(default=None, alias="cowsGt2Traded") + heifers_lt1: Optional[PostBeefRequestBeefInnerClassesHeifersLt1] = Field(default=None, alias="heifersLt1") + heifers_lt1_traded: Optional[PostBeefRequestBeefInnerClassesHeifersLt1Traded] = Field(default=None, alias="heifersLt1Traded") + heifers1_to2: Optional[PostBeefRequestBeefInnerClassesHeifers1To2] = Field(default=None, alias="heifers1To2") + heifers1_to2_traded: Optional[PostBeefRequestBeefInnerClassesHeifers1To2Traded] = Field(default=None, alias="heifers1To2Traded") + heifers_gt2: Optional[PostBeefRequestBeefInnerClassesHeifersGt2] = Field(default=None, alias="heifersGt2") + heifers_gt2_traded: Optional[PostBeefRequestBeefInnerClassesHeifersGt2Traded] = Field(default=None, alias="heifersGt2Traded") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["bullsGt1", "bullsGt1Traded", "steersLt1", "steersLt1Traded", "steers1To2", "steers1To2Traded", "steersGt2", "steersGt2Traded", "cowsGt2", "cowsGt2Traded", "heifersLt1", "heifersLt1Traded", "heifers1To2", "heifers1To2Traded", "heifersGt2", "heifersGt2Traded"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClasses from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of bulls_gt1 + if self.bulls_gt1: + _dict['bullsGt1'] = self.bulls_gt1.to_dict() + # override the default output from pydantic by calling `to_dict()` of bulls_gt1_traded + if self.bulls_gt1_traded: + _dict['bullsGt1Traded'] = self.bulls_gt1_traded.to_dict() + # override the default output from pydantic by calling `to_dict()` of steers_lt1 + if self.steers_lt1: + _dict['steersLt1'] = self.steers_lt1.to_dict() + # override the default output from pydantic by calling `to_dict()` of steers_lt1_traded + if self.steers_lt1_traded: + _dict['steersLt1Traded'] = self.steers_lt1_traded.to_dict() + # override the default output from pydantic by calling `to_dict()` of steers1_to2 + if self.steers1_to2: + _dict['steers1To2'] = self.steers1_to2.to_dict() + # override the default output from pydantic by calling `to_dict()` of steers1_to2_traded + if self.steers1_to2_traded: + _dict['steers1To2Traded'] = self.steers1_to2_traded.to_dict() + # override the default output from pydantic by calling `to_dict()` of steers_gt2 + if self.steers_gt2: + _dict['steersGt2'] = self.steers_gt2.to_dict() + # override the default output from pydantic by calling `to_dict()` of steers_gt2_traded + if self.steers_gt2_traded: + _dict['steersGt2Traded'] = self.steers_gt2_traded.to_dict() + # override the default output from pydantic by calling `to_dict()` of cows_gt2 + if self.cows_gt2: + _dict['cowsGt2'] = self.cows_gt2.to_dict() + # override the default output from pydantic by calling `to_dict()` of cows_gt2_traded + if self.cows_gt2_traded: + _dict['cowsGt2Traded'] = self.cows_gt2_traded.to_dict() + # override the default output from pydantic by calling `to_dict()` of heifers_lt1 + if self.heifers_lt1: + _dict['heifersLt1'] = self.heifers_lt1.to_dict() + # override the default output from pydantic by calling `to_dict()` of heifers_lt1_traded + if self.heifers_lt1_traded: + _dict['heifersLt1Traded'] = self.heifers_lt1_traded.to_dict() + # override the default output from pydantic by calling `to_dict()` of heifers1_to2 + if self.heifers1_to2: + _dict['heifers1To2'] = self.heifers1_to2.to_dict() + # override the default output from pydantic by calling `to_dict()` of heifers1_to2_traded + if self.heifers1_to2_traded: + _dict['heifers1To2Traded'] = self.heifers1_to2_traded.to_dict() + # override the default output from pydantic by calling `to_dict()` of heifers_gt2 + if self.heifers_gt2: + _dict['heifersGt2'] = self.heifers_gt2.to_dict() + # override the default output from pydantic by calling `to_dict()` of heifers_gt2_traded + if self.heifers_gt2_traded: + _dict['heifersGt2Traded'] = self.heifers_gt2_traded.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClasses from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bullsGt1": PostBeefRequestBeefInnerClassesBullsGt1.from_dict(obj["bullsGt1"]) if obj.get("bullsGt1") is not None else None, + "bullsGt1Traded": PostBeefRequestBeefInnerClassesBullsGt1Traded.from_dict(obj["bullsGt1Traded"]) if obj.get("bullsGt1Traded") is not None else None, + "steersLt1": PostBeefRequestBeefInnerClassesSteersLt1.from_dict(obj["steersLt1"]) if obj.get("steersLt1") is not None else None, + "steersLt1Traded": PostBeefRequestBeefInnerClassesSteersLt1Traded.from_dict(obj["steersLt1Traded"]) if obj.get("steersLt1Traded") is not None else None, + "steers1To2": PostBeefRequestBeefInnerClassesSteers1To2.from_dict(obj["steers1To2"]) if obj.get("steers1To2") is not None else None, + "steers1To2Traded": PostBeefRequestBeefInnerClassesSteers1To2Traded.from_dict(obj["steers1To2Traded"]) if obj.get("steers1To2Traded") is not None else None, + "steersGt2": PostBeefRequestBeefInnerClassesSteersGt2.from_dict(obj["steersGt2"]) if obj.get("steersGt2") is not None else None, + "steersGt2Traded": PostBeefRequestBeefInnerClassesSteersGt2Traded.from_dict(obj["steersGt2Traded"]) if obj.get("steersGt2Traded") is not None else None, + "cowsGt2": PostBeefRequestBeefInnerClassesCowsGt2.from_dict(obj["cowsGt2"]) if obj.get("cowsGt2") is not None else None, + "cowsGt2Traded": PostBeefRequestBeefInnerClassesCowsGt2Traded.from_dict(obj["cowsGt2Traded"]) if obj.get("cowsGt2Traded") is not None else None, + "heifersLt1": PostBeefRequestBeefInnerClassesHeifersLt1.from_dict(obj["heifersLt1"]) if obj.get("heifersLt1") is not None else None, + "heifersLt1Traded": PostBeefRequestBeefInnerClassesHeifersLt1Traded.from_dict(obj["heifersLt1Traded"]) if obj.get("heifersLt1Traded") is not None else None, + "heifers1To2": PostBeefRequestBeefInnerClassesHeifers1To2.from_dict(obj["heifers1To2"]) if obj.get("heifers1To2") is not None else None, + "heifers1To2Traded": PostBeefRequestBeefInnerClassesHeifers1To2Traded.from_dict(obj["heifers1To2Traded"]) if obj.get("heifers1To2Traded") is not None else None, + "heifersGt2": PostBeefRequestBeefInnerClassesHeifersGt2.from_dict(obj["heifersGt2"]) if obj.get("heifersGt2") is not None else None, + "heifersGt2Traded": PostBeefRequestBeefInnerClassesHeifersGt2Traded.from_dict(obj["heifersGt2Traded"]) if obj.get("heifersGt2Traded") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1.py new file mode 100644 index 00000000..7421fe13 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesBullsGt1(BaseModel): + """ + Bulls whose age is greater than 1 year old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesBullsGt1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesBullsGt1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_autumn.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_autumn.py new file mode 100644 index 00000000..4bea4d0b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_autumn.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesBullsGt1Autumn(BaseModel): + """ + PostBeefRequestBeefInnerClassesBullsGt1Autumn + """ # noqa: E501 + head: Union[StrictFloat, StrictInt] = Field(description="Number of animals (head)") + liveweight: Union[StrictFloat, StrictInt] = Field(description="Average liveweight of animals in kg/head (kilogram per head)") + liveweight_gain: Union[StrictFloat, StrictInt] = Field(description="Average liveweight gain in kg/day (kilogram per day)", alias="liveweightGain") + crude_protein: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Crude protein percent, between 0 and 100", alias="crudeProtein") + dry_matter_digestibility: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Dry matter digestibility percent, between 0 and 100", alias="dryMatterDigestibility") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["head", "liveweight", "liveweightGain", "crudeProtein", "dryMatterDigestibility"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesBullsGt1Autumn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesBullsGt1Autumn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "head": obj.get("head"), + "liveweight": obj.get("liveweight"), + "liveweightGain": obj.get("liveweightGain"), + "crudeProtein": obj.get("crudeProtein"), + "dryMatterDigestibility": obj.get("dryMatterDigestibility") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py new file mode 100644 index 00000000..9d352ca4 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner(BaseModel): + """ + Beef purchase + """ # noqa: E501 + head: Union[StrictFloat, StrictInt] = Field(description="Number of animals purchased (head)") + purchase_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at purchase, in liveweight kg/head (kilogram per head)", alias="purchaseWeight") + purchase_source: StrictStr = Field(description="Source location of livestock purchase", alias="purchaseSource") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["head", "purchaseWeight", "purchaseSource"] + + @field_validator('purchase_source') + def purchase_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "head": obj.get("head"), + "purchaseWeight": obj.get("purchaseWeight"), + "purchaseSource": obj.get("purchaseSource") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_traded.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_traded.py new file mode 100644 index 00000000..c3e24504 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_bulls_gt1_traded.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesBullsGt1Traded(BaseModel): + """ + Traded bulls whose age is greater than 1 year old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesBullsGt1Traded from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesBullsGt1Traded from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_cows_gt2.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_cows_gt2.py new file mode 100644 index 00000000..5f7999f9 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_cows_gt2.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesCowsGt2(BaseModel): + """ + Cows whose age is greater than 2 years old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesCowsGt2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesCowsGt2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_cows_gt2_traded.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_cows_gt2_traded.py new file mode 100644 index 00000000..8a277b5d --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_cows_gt2_traded.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesCowsGt2Traded(BaseModel): + """ + Traded cows whose age is greater than 2 years old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesCowsGt2Traded from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesCowsGt2Traded from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers1_to2.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers1_to2.py new file mode 100644 index 00000000..c4d87b29 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers1_to2.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesHeifers1To2(BaseModel): + """ + Heifers whose age is between 1 and 2 years old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesHeifers1To2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesHeifers1To2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers1_to2_traded.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers1_to2_traded.py new file mode 100644 index 00000000..5e045c43 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers1_to2_traded.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesHeifers1To2Traded(BaseModel): + """ + Traded heifers whose age is between 1 and 2 years old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesHeifers1To2Traded from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesHeifers1To2Traded from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_gt2.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_gt2.py new file mode 100644 index 00000000..7dcc2e84 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_gt2.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesHeifersGt2(BaseModel): + """ + Heifers whose age is greater than 2 years old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesHeifersGt2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesHeifersGt2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_gt2_traded.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_gt2_traded.py new file mode 100644 index 00000000..c4a67b42 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_gt2_traded.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesHeifersGt2Traded(BaseModel): + """ + Traded heifers whose age is greater than 2 years old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesHeifersGt2Traded from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesHeifersGt2Traded from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_lt1.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_lt1.py new file mode 100644 index 00000000..658cd420 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_lt1.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesHeifersLt1(BaseModel): + """ + Heifers whose age is less than 1 year old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesHeifersLt1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesHeifersLt1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_lt1_traded.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_lt1_traded.py new file mode 100644 index 00000000..7a29fdb2 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_heifers_lt1_traded.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesHeifersLt1Traded(BaseModel): + """ + Traded heifers whose age is less than 1 year old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesHeifersLt1Traded from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesHeifersLt1Traded from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers1_to2.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers1_to2.py new file mode 100644 index 00000000..f82bf1b7 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers1_to2.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesSteers1To2(BaseModel): + """ + Steers whose age is between 1 and 2 years old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesSteers1To2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesSteers1To2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers1_to2_traded.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers1_to2_traded.py new file mode 100644 index 00000000..f9f7ec0b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers1_to2_traded.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesSteers1To2Traded(BaseModel): + """ + Traded steers whose age is between 1 and 2 years old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesSteers1To2Traded from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesSteers1To2Traded from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_gt2.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_gt2.py new file mode 100644 index 00000000..7defab1c --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_gt2.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesSteersGt2(BaseModel): + """ + Steers whose age is greater than 2 years old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesSteersGt2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesSteersGt2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_gt2_traded.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_gt2_traded.py new file mode 100644 index 00000000..ec361610 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_gt2_traded.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesSteersGt2Traded(BaseModel): + """ + Traded steers whose age is greater than 2 years old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesSteersGt2Traded from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesSteersGt2Traded from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_lt1.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_lt1.py new file mode 100644 index 00000000..43c2f2d7 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_lt1.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesSteersLt1(BaseModel): + """ + Steers whose age is less than 1 year old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesSteersLt1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesSteersLt1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_lt1_traded.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_lt1_traded.py new file mode 100644 index 00000000..26322210 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_classes_steers_lt1_traded.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerClassesSteersLt1Traded(BaseModel): + """ + Traded steers whose age is less than 1 year old + """ # noqa: E501 + autumn: PostBeefRequestBeefInnerClassesBullsGt1Autumn + winter: PostBeefRequestBeefInnerClassesBullsGt1Autumn + spring: PostBeefRequestBeefInnerClassesBullsGt1Autumn + summer: PostBeefRequestBeefInnerClassesBullsGt1Autumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead", alias="purchasedWeight") + source: Optional[StrictStr] = Field(default=None, description="Source location of livestock purchase. Deprecation note: Use `purchases` instead") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "source", "headSold", "saleWeight", "purchases"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT']): + raise ValueError("must be one of enum values ('Dairy origin', 'nth/sth/central QLD', 'nth/sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS', 'NT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesSteersLt1Traded from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerClassesSteersLt1Traded from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "source": obj.get("source"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_cows_calving.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_cows_calving.py new file mode 100644 index 00000000..ce27c0e5 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_cows_calving.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerCowsCalving(BaseModel): + """ + Fraction of cows calving in each season, between 0 and 1 + """ # noqa: E501 + spring: Union[StrictFloat, StrictInt] + summer: Union[StrictFloat, StrictInt] + autumn: Union[StrictFloat, StrictInt] + winter: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["spring", "summer", "autumn", "winter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerCowsCalving from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerCowsCalving from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "spring": obj.get("spring"), + "summer": obj.get("summer"), + "autumn": obj.get("autumn"), + "winter": obj.get("winter") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_fertiliser.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_fertiliser.py new file mode 100644 index 00000000..21a246e2 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_fertiliser.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_beef_inner_fertiliser_other_fertilisers_inner import PostBeefRequestBeefInnerFertiliserOtherFertilisersInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerFertiliser(BaseModel): + """ + Fertiliser used for different applications (such as dryland pasture) + """ # noqa: E501 + single_superphosphate: Union[StrictFloat, StrictInt] = Field(description="Single superphosphate usage in tonnes", alias="singleSuperphosphate") + other_type: Optional[StrictStr] = Field(default=None, description="Other N fertiliser type. Deprecation note: Use `otherFertilisers` instead", alias="otherType") + pasture_dryland: Union[StrictFloat, StrictInt] = Field(description="Urea fertiliser used for dryland pasture, in tonnes Urea", alias="pastureDryland") + pasture_irrigated: Union[StrictFloat, StrictInt] = Field(description="Urea fertiliser used for irrigated pasture, in tonnes Urea", alias="pastureIrrigated") + crops_dryland: Union[StrictFloat, StrictInt] = Field(description="Urea fertiliser used for dryland crops, in tonnes Urea", alias="cropsDryland") + crops_irrigated: Union[StrictFloat, StrictInt] = Field(description="Urea fertiliser used for irrigated crops, in tonnes Urea", alias="cropsIrrigated") + other_dryland: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Other N fertiliser used for dryland. Deprecation note: Use `otherFertilisers` instead", alias="otherDryland") + other_irrigated: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Other N fertiliser used for irrigated. Deprecation note: Use `otherFertilisers` instead", alias="otherIrrigated") + other_fertilisers: Optional[List[PostBeefRequestBeefInnerFertiliserOtherFertilisersInner]] = Field(default=None, description="Array of Other N fertiliser. Version note: If this field is set and has a length > 0, the `other` fields within this object are ignored, and this array is used instead", alias="otherFertilisers") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["singleSuperphosphate", "otherType", "pastureDryland", "pastureIrrigated", "cropsDryland", "cropsIrrigated", "otherDryland", "otherIrrigated", "otherFertilisers"] + + @field_validator('other_type') + def other_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Monoammonium phosphate (MAP)', 'Diammonium Phosphate (DAP)', 'Urea-Ammonium Nitrate (UAN)', 'Ammonium Nitrate (AN)', 'Calcium Ammonium Nitrate (CAN)', 'Triple Superphosphate (TSP)', 'Super Potash 1:1', 'Super Potash 2:1', 'Super Potash 3:1', 'Super Potash 4:1', 'Super Potash 5:1', 'Muriate of Potash', 'Sulphate of Potash', 'Sulphate of Ammonia']): + raise ValueError("must be one of enum values ('Monoammonium phosphate (MAP)', 'Diammonium Phosphate (DAP)', 'Urea-Ammonium Nitrate (UAN)', 'Ammonium Nitrate (AN)', 'Calcium Ammonium Nitrate (CAN)', 'Triple Superphosphate (TSP)', 'Super Potash 1:1', 'Super Potash 2:1', 'Super Potash 3:1', 'Super Potash 4:1', 'Super Potash 5:1', 'Muriate of Potash', 'Sulphate of Potash', 'Sulphate of Ammonia')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerFertiliser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in other_fertilisers (list) + _items = [] + if self.other_fertilisers: + for _item_other_fertilisers in self.other_fertilisers: + if _item_other_fertilisers: + _items.append(_item_other_fertilisers.to_dict()) + _dict['otherFertilisers'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerFertiliser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "singleSuperphosphate": obj.get("singleSuperphosphate"), + "otherType": obj.get("otherType"), + "pastureDryland": obj.get("pastureDryland"), + "pastureIrrigated": obj.get("pastureIrrigated"), + "cropsDryland": obj.get("cropsDryland"), + "cropsIrrigated": obj.get("cropsIrrigated"), + "otherDryland": obj.get("otherDryland"), + "otherIrrigated": obj.get("otherIrrigated"), + "otherFertilisers": [PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.from_dict(_item) for _item in obj["otherFertilisers"]] if obj.get("otherFertilisers") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py new file mode 100644 index 00000000..953d6fea --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerFertiliserOtherFertilisersInner(BaseModel): + """ + Other fertiliser, of a specific type, used for different applications (such as dryland pasture) + """ # noqa: E501 + other_type: StrictStr = Field(description="Other N fertiliser type", alias="otherType") + other_dryland: Union[StrictFloat, StrictInt] = Field(description="Other N fertiliser used for dryland. From v1.1.0, supply tonnes of product. For earlier versions, supply tonnes of N", alias="otherDryland") + other_irrigated: Union[StrictFloat, StrictInt] = Field(description="Other N fertiliser used for irrigated. From v1.1.0, supply tonnes of product. For earlier versions, supply tonnes of N", alias="otherIrrigated") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["otherType", "otherDryland", "otherIrrigated"] + + @field_validator('other_type') + def other_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Monoammonium phosphate (MAP)', 'Diammonium Phosphate (DAP)', 'Urea-Ammonium Nitrate (UAN)', 'Ammonium Nitrate (AN)', 'Calcium Ammonium Nitrate (CAN)', 'Triple Superphosphate (TSP)', 'Super Potash 1:1', 'Super Potash 2:1', 'Super Potash 3:1', 'Super Potash 4:1', 'Super Potash 5:1', 'Muriate of Potash', 'Sulphate of Potash', 'Sulphate of Ammonia']): + raise ValueError("must be one of enum values ('Monoammonium phosphate (MAP)', 'Diammonium Phosphate (DAP)', 'Urea-Ammonium Nitrate (UAN)', 'Ammonium Nitrate (AN)', 'Calcium Ammonium Nitrate (CAN)', 'Triple Superphosphate (TSP)', 'Super Potash 1:1', 'Super Potash 2:1', 'Super Potash 3:1', 'Super Potash 4:1', 'Super Potash 5:1', 'Muriate of Potash', 'Sulphate of Potash', 'Sulphate of Ammonia')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerFertiliserOtherFertilisersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerFertiliserOtherFertilisersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "otherType": obj.get("otherType"), + "otherDryland": obj.get("otherDryland"), + "otherIrrigated": obj.get("otherIrrigated") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_mineral_supplementation.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_mineral_supplementation.py new file mode 100644 index 00000000..9d87d84e --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_beef_inner_mineral_supplementation.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBeefInnerMineralSupplementation(BaseModel): + """ + Supplementation for livestock + """ # noqa: E501 + mineral_block: Union[StrictFloat, StrictInt] = Field(description="Mineral block product used, in tonnes", alias="mineralBlock") + mineral_block_urea: Union[StrictFloat, StrictInt] = Field(description="Fraction of urea content, between 0 and 1", alias="mineralBlockUrea") + weaner_block: Union[StrictFloat, StrictInt] = Field(description="Weaner block product used, in tonnes", alias="weanerBlock") + weaner_block_urea: Union[StrictFloat, StrictInt] = Field(description="Fraction of urea content, between 0 and 1", alias="weanerBlockUrea") + dry_season_mix: Union[StrictFloat, StrictInt] = Field(description="Dry season mix product used, in tonnes", alias="drySeasonMix") + dry_season_mix_urea: Union[StrictFloat, StrictInt] = Field(description="Fraction of urea content, between 0 and 1", alias="drySeasonMixUrea") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["mineralBlock", "mineralBlockUrea", "weanerBlock", "weanerBlockUrea", "drySeasonMix", "drySeasonMixUrea"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerMineralSupplementation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBeefInnerMineralSupplementation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mineralBlock": obj.get("mineralBlock") if obj.get("mineralBlock") is not None else 0, + "mineralBlockUrea": obj.get("mineralBlockUrea") if obj.get("mineralBlockUrea") is not None else 0, + "weanerBlock": obj.get("weanerBlock") if obj.get("weanerBlock") is not None else 0, + "weanerBlockUrea": obj.get("weanerBlockUrea") if obj.get("weanerBlockUrea") is not None else 0, + "drySeasonMix": obj.get("drySeasonMix") if obj.get("drySeasonMix") is not None else 0, + "drySeasonMixUrea": obj.get("drySeasonMixUrea") if obj.get("drySeasonMixUrea") is not None else 0 + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_burning_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_burning_inner.py new file mode 100644 index 00000000..58780dd1 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_burning_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_beef_request_burning_inner_burning import PostBeefRequestBurningInnerBurning +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBurningInner(BaseModel): + """ + Savannah burning along with allocations to beef + """ # noqa: E501 + burning: PostBeefRequestBurningInnerBurning + allocation_to_beef: List[Union[StrictFloat, StrictInt]] = Field(description="The proportion of the burning that is allocated to each beef", alias="allocationToBeef") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["burning", "allocationToBeef"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBurningInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of burning + if self.burning: + _dict['burning'] = self.burning.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBurningInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "burning": PostBeefRequestBurningInnerBurning.from_dict(obj["burning"]) if obj.get("burning") is not None else None, + "allocationToBeef": obj.get("allocationToBeef") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_burning_inner_burning.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_burning_inner_burning.py new file mode 100644 index 00000000..ac209e92 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_burning_inner_burning.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestBurningInnerBurning(BaseModel): + """ + Inputs required for any savannah burning activities that took place + """ # noqa: E501 + fuel: StrictStr = Field(description="The fuel class size that was burnt") + season: StrictStr = Field(description="The time relative to the fire season in which the burning took place") + patchiness: StrictStr = Field(description="The patchiness of the savannah/vegetation that was burnt") + rainfall_zone: StrictStr = Field(description="The rainfall zone in which the burning took place", alias="rainfallZone") + years_since_last_fire: Union[StrictFloat, StrictInt] = Field(description="Time since the last fire, in years", alias="yearsSinceLastFire") + fire_scar_area: Union[StrictFloat, StrictInt] = Field(description="The total area of the fire scar, in ha (hectares)", alias="fireScarArea") + vegetation: StrictStr = Field(description="The vegetation class that was burnt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuel", "season", "patchiness", "rainfallZone", "yearsSinceLastFire", "fireScarArea", "vegetation"] + + @field_validator('fuel') + def fuel_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['fine', 'coarse']): + raise ValueError("must be one of enum values ('fine', 'coarse')") + return value + + @field_validator('season') + def season_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['early dry season', 'late dry season']): + raise ValueError("must be one of enum values ('early dry season', 'late dry season')") + return value + + @field_validator('patchiness') + def patchiness_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['low', 'high']): + raise ValueError("must be one of enum values ('low', 'high')") + return value + + @field_validator('rainfall_zone') + def rainfall_zone_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['low', 'high']): + raise ValueError("must be one of enum values ('low', 'high')") + return value + + @field_validator('vegetation') + def vegetation_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Shrubland hummock', 'Woodland Hummock', 'Melaleuca woodland', 'Woodland Mixed', 'Open forest mixed', 'Shrubland (heath) with hummock grass', 'Woodland with hummock grass', 'Open woodland with mixed grass', 'Woodland with mixed grass', 'Woodland with tussock grass']): + raise ValueError("must be one of enum values ('Shrubland hummock', 'Woodland Hummock', 'Melaleuca woodland', 'Woodland Mixed', 'Open forest mixed', 'Shrubland (heath) with hummock grass', 'Woodland with hummock grass', 'Open woodland with mixed grass', 'Woodland with mixed grass', 'Woodland with tussock grass')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestBurningInnerBurning from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestBurningInnerBurning from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuel": obj.get("fuel") if obj.get("fuel") is not None else 'coarse', + "season": obj.get("season") if obj.get("season") is not None else 'early dry season', + "patchiness": obj.get("patchiness") if obj.get("patchiness") is not None else 'high', + "rainfallZone": obj.get("rainfallZone") if obj.get("rainfallZone") is not None else 'low', + "yearsSinceLastFire": obj.get("yearsSinceLastFire") if obj.get("yearsSinceLastFire") is not None else 0, + "fireScarArea": obj.get("fireScarArea") if obj.get("fireScarArea") is not None else 0, + "vegetation": obj.get("vegetation") if obj.get("vegetation") is not None else 'Melaleuca woodland' + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_vegetation_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_vegetation_inner.py new file mode 100644 index 00000000..fd1684f2 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_vegetation_inner.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestVegetationInner(BaseModel): + """ + Non-productive vegetation inputs along with allocations to beef + """ # noqa: E501 + vegetation: PostBeefRequestVegetationInnerVegetation + beef_proportion: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The proportion of the sequestration that is allocated to beef. Deprecation note: Please use `allocationToBeef` instead", alias="beefProportion") + allocation_to_beef: List[Union[StrictFloat, StrictInt]] = Field(description="The proportion of the sequestration that is allocated to each beef", alias="allocationToBeef") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vegetation", "beefProportion", "allocationToBeef"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestVegetationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of vegetation + if self.vegetation: + _dict['vegetation'] = self.vegetation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestVegetationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vegetation": PostBeefRequestVegetationInnerVegetation.from_dict(obj["vegetation"]) if obj.get("vegetation") is not None else None, + "beefProportion": obj.get("beefProportion"), + "allocationToBeef": obj.get("allocationToBeef") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_beef_request_vegetation_inner_vegetation.py b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_vegetation_inner_vegetation.py new file mode 100644 index 00000000..b4aa4f99 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_beef_request_vegetation_inner_vegetation.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBeefRequestVegetationInnerVegetation(BaseModel): + """ + Inputs required for non-productive vegetation in order to calculate carbon sequestration + """ # noqa: E501 + region: StrictStr = Field(description="The rainfall region that the vegetation is in") + tree_species: StrictStr = Field(description="The species of tree", alias="treeSpecies") + soil: StrictStr = Field(description="The soil type the tree is in") + area: Union[StrictFloat, StrictInt] = Field(description="The area of trees, in ha (hectares)") + age: Union[StrictFloat, StrictInt] = Field(description="The age of the trees, in years") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["region", "treeSpecies", "soil", "area", "age"] + + @field_validator('region') + def region_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['South West', 'Pilbara', 'Kimberley', 'Central West', 'South Coastal', 'Goldfields/Eucla', 'Gascoyne', 'Central Wheat Belt', 'Interior', 'North Coast', 'South Coast', 'Northern Tablelands', 'Southern Tablelands', 'Northern Wheat/Sheep', 'Southern Wheat/Sheep', 'Western', 'North East', 'East Coast', 'Central North/Midlands/South East', 'Central Plateau/Derwent Valley', 'West/South Coast', 'North West', 'South East', 'Murray', 'Mid-North/Flinders', 'Pastoral', 'West Coast/Eyre', 'Mallee', 'Wimmera', 'Northern Country', 'North East Vic', 'East Gippsland', 'West/South Gippsland', 'Central', 'South West Vic', 'Central Highlands/Northern', 'Central West/Flinders', 'Channel Country', 'Maranoa/Warrego', 'Darling Downs/Burnett', 'North West/Gulf', 'Darwin-Daly', 'Arnhem-Roper', 'Victoria River-TennantCreek', 'Alice Springs']): + raise ValueError("must be one of enum values ('South West', 'Pilbara', 'Kimberley', 'Central West', 'South Coastal', 'Goldfields/Eucla', 'Gascoyne', 'Central Wheat Belt', 'Interior', 'North Coast', 'South Coast', 'Northern Tablelands', 'Southern Tablelands', 'Northern Wheat/Sheep', 'Southern Wheat/Sheep', 'Western', 'North East', 'East Coast', 'Central North/Midlands/South East', 'Central Plateau/Derwent Valley', 'West/South Coast', 'North West', 'South East', 'Murray', 'Mid-North/Flinders', 'Pastoral', 'West Coast/Eyre', 'Mallee', 'Wimmera', 'Northern Country', 'North East Vic', 'East Gippsland', 'West/South Gippsland', 'Central', 'South West Vic', 'Central Highlands/Northern', 'Central West/Flinders', 'Channel Country', 'Maranoa/Warrego', 'Darling Downs/Burnett', 'North West/Gulf', 'Darwin-Daly', 'Arnhem-Roper', 'Victoria River-TennantCreek', 'Alice Springs')") + return value + + @field_validator('tree_species') + def tree_species_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Mixed species (Environmental Plantings)', 'No tree data available', 'Tasmanian Blue Gum', 'Spotted Gum', 'Sugar Gum', 'Hoop Pine', 'Sydney Blue Gum', 'Dunn\'s White Gum', 'Shining Gum', 'Pinus Radiata', 'Lemon-scented Gum', 'Maritime Pine', 'Flooded Gum', 'Red Ironbark', 'Radiata Pine (low input)', 'Mountain Ash', 'Western White Gum', 'Slash Pine', 'Radiata Pine (high input)', 'Pinus Radiata (low input)', 'Blackbutt', 'Loblolly Pine', 'Pinus Radiata (high input)', 'Pinus Hybrids']): + raise ValueError("must be one of enum values ('Mixed species (Environmental Plantings)', 'No tree data available', 'Tasmanian Blue Gum', 'Spotted Gum', 'Sugar Gum', 'Hoop Pine', 'Sydney Blue Gum', 'Dunn\'s White Gum', 'Shining Gum', 'Pinus Radiata', 'Lemon-scented Gum', 'Maritime Pine', 'Flooded Gum', 'Red Ironbark', 'Radiata Pine (low input)', 'Mountain Ash', 'Western White Gum', 'Slash Pine', 'Radiata Pine (high input)', 'Pinus Radiata (low input)', 'Blackbutt', 'Loblolly Pine', 'Pinus Radiata (high input)', 'Pinus Hybrids')") + return value + + @field_validator('soil') + def soil_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Loams & Clays', 'No Soil / Tree data available', 'Coloured Sands', 'Duplex', 'Clay', '\"Other Soils\"', 'Other Soils', 'Duplex Soils', 'Sandy Soils', 'Calcarosols', 'Grey Cracking Clays', 'Red Earths', 'Non-cracking Clays', 'Red Duplex', 'Cracking Clays', 'Clays', 'Clay Gidgee', 'Clay (Brigalo and Belah)', 'Kandosols', 'Sandy Duplexes', 'Clay & Red Loam', 'Loam', 'Structured Earths', 'Loamy Soils', 'Yellow Duplex', 'Gradational soils', 'Open Downs', 'Duplex Woodland', 'Earths', 'Tenosols']): + raise ValueError("must be one of enum values ('Loams & Clays', 'No Soil / Tree data available', 'Coloured Sands', 'Duplex', 'Clay', '\"Other Soils\"', 'Other Soils', 'Duplex Soils', 'Sandy Soils', 'Calcarosols', 'Grey Cracking Clays', 'Red Earths', 'Non-cracking Clays', 'Red Duplex', 'Cracking Clays', 'Clays', 'Clay Gidgee', 'Clay (Brigalo and Belah)', 'Kandosols', 'Sandy Duplexes', 'Clay & Red Loam', 'Loam', 'Structured Earths', 'Loamy Soils', 'Yellow Duplex', 'Gradational soils', 'Open Downs', 'Duplex Woodland', 'Earths', 'Tenosols')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBeefRequestVegetationInnerVegetation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBeefRequestVegetationInnerVegetation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "region": obj.get("region"), + "treeSpecies": obj.get("treeSpecies"), + "soil": obj.get("soil"), + "area": obj.get("area"), + "age": obj.get("age") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response.py new file mode 100644 index 00000000..48d819d3 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_buffalo200_response_intensities import PostBuffalo200ResponseIntensities +from openapi_client.models.post_buffalo200_response_intermediate_inner import PostBuffalo200ResponseIntermediateInner +from openapi_client.models.post_buffalo200_response_net import PostBuffalo200ResponseNet +from openapi_client.models.post_buffalo200_response_scope1 import PostBuffalo200ResponseScope1 +from openapi_client.models.post_buffalo200_response_scope3 import PostBuffalo200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffalo200Response(BaseModel): + """ + Emissions calculation output for the `Buffalo` calculator + """ # noqa: E501 + scope1: PostBuffalo200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostBuffalo200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + net: PostBuffalo200ResponseNet + intensities: PostBuffalo200ResponseIntensities + intermediate: List[PostBuffalo200ResponseIntermediateInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "net", "intensities", "intermediate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffalo200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffalo200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostBuffalo200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostBuffalo200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "net": PostBuffalo200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostBuffalo200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "intermediate": [PostBuffalo200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_intensities.py new file mode 100644 index 00000000..5cf6d98a --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_intensities.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffalo200ResponseIntensities(BaseModel): + """ + PostBuffalo200ResponseIntensities + """ # noqa: E501 + liveweight_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Amount of buffalo meat produced in kg liveweight", alias="liveweightProducedKg") + buffalo_meat_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Buffalo meat (breeding herd) excluding sequestration, in kg-CO2e/kg liveweight", alias="buffaloMeatExcludingSequestration") + buffalo_meat_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Buffalo meat (breeding herd) including sequestration, in kg-CO2e/kg liveweight", alias="buffaloMeatIncludingSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["liveweightProducedKg", "buffaloMeatExcludingSequestration", "buffaloMeatIncludingSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffalo200ResponseIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffalo200ResponseIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "liveweightProducedKg": obj.get("liveweightProducedKg"), + "buffaloMeatExcludingSequestration": obj.get("buffaloMeatExcludingSequestration"), + "buffaloMeatIncludingSequestration": obj.get("buffaloMeatIncludingSequestration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_intermediate_inner.py new file mode 100644 index 00000000..94e85262 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_intermediate_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_buffalo200_response_intensities import PostBuffalo200ResponseIntensities +from openapi_client.models.post_buffalo200_response_net import PostBuffalo200ResponseNet +from openapi_client.models.post_buffalo200_response_scope1 import PostBuffalo200ResponseScope1 +from openapi_client.models.post_buffalo200_response_scope3 import PostBuffalo200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffalo200ResponseIntermediateInner(BaseModel): + """ + Intermediate emissions calculation output for the Buffalo calculator + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostBuffalo200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostBuffalo200ResponseScope3 + net: PostBuffalo200ResponseNet + intensities: PostBuffalo200ResponseIntensities + carbon_sequestration: PostAquaculture200ResponseIntermediateInnerCarbonSequestration = Field(alias="carbonSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "net", "intensities", "carbonSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffalo200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffalo200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostBuffalo200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostBuffalo200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "net": PostBuffalo200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostBuffalo200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "carbonSequestration": PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_net.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_net.py new file mode 100644 index 00000000..f1264cb7 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_net.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffalo200ResponseNet(BaseModel): + """ + Net emissions for Buffalo + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffalo200ResponseNet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffalo200ResponseNet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_scope1.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_scope1.py new file mode 100644 index 00000000..42a6734b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_scope1.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffalo200ResponseScope1(BaseModel): + """ + Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fuel_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from fuel use, in tonnes-CO2e", alias="fuelCO2") + fuel_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from fuel use, in tonnes-CO2e", alias="fuelCH4") + fuel_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fuel use, in tonnes-CO2e", alias="fuelN2O") + urea_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from urea, in tonnes-CO2e", alias="ureaCO2") + lime_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from lime, in tonnes-CO2e", alias="limeCO2") + fertiliser_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fertiliser, in tonnes-CO2e", alias="fertiliserN2O") + enteric_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from enteric fermentation, in tonnes-CO2e", alias="entericCH4") + manure_management_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from manure management, in tonnes-CO2e", alias="manureManagementCH4") + urine_and_dung_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from urine and dung, in tonnes-CO2e", alias="urineAndDungN2O") + atmospheric_deposition_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from atmospheric deposition, in tonnes-CO2e", alias="atmosphericDepositionN2O") + leaching_and_runoff_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from leeching and runoff, in tonnes-CO2e", alias="leachingAndRunoffN2O") + total_co2: Union[StrictFloat, StrictInt] = Field(description="Total CO2 scope 1 emissions, in tonnes-CO2e", alias="totalCO2") + total_ch4: Union[StrictFloat, StrictInt] = Field(description="Total CH4 scope 1 emissions, in tonnes-CO2e", alias="totalCH4") + total_n2_o: Union[StrictFloat, StrictInt] = Field(description="Total N2O scope 1 emissions, in tonnes-CO2e", alias="totalN2O") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 1 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuelCO2", "fuelCH4", "fuelN2O", "ureaCO2", "limeCO2", "fertiliserN2O", "entericCH4", "manureManagementCH4", "urineAndDungN2O", "atmosphericDepositionN2O", "leachingAndRunoffN2O", "totalCO2", "totalCH4", "totalN2O", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffalo200ResponseScope1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffalo200ResponseScope1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuelCO2": obj.get("fuelCO2"), + "fuelCH4": obj.get("fuelCH4"), + "fuelN2O": obj.get("fuelN2O"), + "ureaCO2": obj.get("ureaCO2"), + "limeCO2": obj.get("limeCO2"), + "fertiliserN2O": obj.get("fertiliserN2O"), + "entericCH4": obj.get("entericCH4"), + "manureManagementCH4": obj.get("manureManagementCH4"), + "urineAndDungN2O": obj.get("urineAndDungN2O"), + "atmosphericDepositionN2O": obj.get("atmosphericDepositionN2O"), + "leachingAndRunoffN2O": obj.get("leachingAndRunoffN2O"), + "totalCO2": obj.get("totalCO2"), + "totalCH4": obj.get("totalCH4"), + "totalN2O": obj.get("totalN2O"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_scope3.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_scope3.py new file mode 100644 index 00000000..5e0941ef --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo200_response_scope3.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffalo200ResponseScope3(BaseModel): + """ + Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fertiliser: Union[StrictFloat, StrictInt] = Field(description="Emissions from fertiliser, in tonnes-CO2e") + purchased_feed: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased feed, in tonnes-CO2e", alias="purchasedFeed") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Emissions from herbicide, in tonnes-CO2e") + electricity: Union[StrictFloat, StrictInt] = Field(description="Emissions from electricity, in tonnes-CO2e") + fuel: Union[StrictFloat, StrictInt] = Field(description="Emissions from fuel, in tonnes-CO2e") + lime: Union[StrictFloat, StrictInt] = Field(description="Emissions from lime, in tonnes-CO2e") + purchased_livestock: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased livestock, in tonnes-CO2e", alias="purchasedLivestock") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 3 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fertiliser", "purchasedFeed", "herbicide", "electricity", "fuel", "lime", "purchasedLivestock", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffalo200ResponseScope3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffalo200ResponseScope3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fertiliser": obj.get("fertiliser"), + "purchasedFeed": obj.get("purchasedFeed"), + "herbicide": obj.get("herbicide"), + "electricity": obj.get("electricity"), + "fuel": obj.get("fuel"), + "lime": obj.get("lime"), + "purchasedLivestock": obj.get("purchasedLivestock"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request.py new file mode 100644 index 00000000..db6e6e15 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_buffalo_request_buffalos_inner import PostBuffaloRequestBuffalosInner +from openapi_client.models.post_buffalo_request_vegetation_inner import PostBuffaloRequestVegetationInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequest(BaseModel): + """ + Input data required for the `Buffalo` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + rainfall_above600: StrictBool = Field(description="Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm", alias="rainfallAbove600") + buffalos: List[PostBuffaloRequestBuffalosInner] + vegetation: List[PostBuffaloRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "rainfallAbove600", "buffalos", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in buffalos (list) + _items = [] + if self.buffalos: + for _item_buffalos in self.buffalos: + if _item_buffalos: + _items.append(_item_buffalos.to_dict()) + _dict['buffalos'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "rainfallAbove600": obj.get("rainfallAbove600"), + "buffalos": [PostBuffaloRequestBuffalosInner.from_dict(_item) for _item in obj["buffalos"]] if obj.get("buffalos") is not None else None, + "vegetation": [PostBuffaloRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner.py new file mode 100644 index 00000000..e0ecaf14 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_beef_request_beef_inner_fertiliser import PostBeefRequestBeefInnerFertiliser +from openapi_client.models.post_buffalo_request_buffalos_inner_classes import PostBuffaloRequestBuffalosInnerClasses +from openapi_client.models.post_buffalo_request_buffalos_inner_cows_calving import PostBuffaloRequestBuffalosInnerCowsCalving +from openapi_client.models.post_buffalo_request_buffalos_inner_seasonal_calving import PostBuffaloRequestBuffalosInnerSeasonalCalving +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestBuffalosInner(BaseModel): + """ + PostBuffaloRequestBuffalosInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + classes: PostBuffaloRequestBuffalosInnerClasses + limestone: Union[StrictFloat, StrictInt] = Field(description="Lime applied in tonnes") + limestone_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of lime as limestone vs dolomite, between 0 and 1", alias="limestoneFraction") + fertiliser: PostBeefRequestBeefInnerFertiliser + diesel: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)") + petrol: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + electricity_source: StrictStr = Field(description="Source of electricity", alias="electricitySource") + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + grain_feed: Union[StrictFloat, StrictInt] = Field(description="Grain purchased for cattle feed in tonnes", alias="grainFeed") + hay_feed: Union[StrictFloat, StrictInt] = Field(description="Hay purchased for cattle feed in tonnes", alias="hayFeed") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms)") + herbicide_other: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from other herbicides in kg (kilograms)", alias="herbicideOther") + cows_calving: PostBuffaloRequestBuffalosInnerCowsCalving = Field(alias="cowsCalving") + seasonal_calving: PostBuffaloRequestBuffalosInnerSeasonalCalving = Field(alias="seasonalCalving") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "classes", "limestone", "limestoneFraction", "fertiliser", "diesel", "petrol", "lpg", "electricitySource", "electricityRenewable", "electricityUse", "grainFeed", "hayFeed", "herbicide", "herbicideOther", "cowsCalving", "seasonalCalving"] + + @field_validator('electricity_source') + def electricity_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['State Grid', 'Renewable']): + raise ValueError("must be one of enum values ('State Grid', 'Renewable')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of classes + if self.classes: + _dict['classes'] = self.classes.to_dict() + # override the default output from pydantic by calling `to_dict()` of fertiliser + if self.fertiliser: + _dict['fertiliser'] = self.fertiliser.to_dict() + # override the default output from pydantic by calling `to_dict()` of cows_calving + if self.cows_calving: + _dict['cowsCalving'] = self.cows_calving.to_dict() + # override the default output from pydantic by calling `to_dict()` of seasonal_calving + if self.seasonal_calving: + _dict['seasonalCalving'] = self.seasonal_calving.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "classes": PostBuffaloRequestBuffalosInnerClasses.from_dict(obj["classes"]) if obj.get("classes") is not None else None, + "limestone": obj.get("limestone"), + "limestoneFraction": obj.get("limestoneFraction"), + "fertiliser": PostBeefRequestBeefInnerFertiliser.from_dict(obj["fertiliser"]) if obj.get("fertiliser") is not None else None, + "diesel": obj.get("diesel"), + "petrol": obj.get("petrol"), + "lpg": obj.get("lpg"), + "electricitySource": obj.get("electricitySource"), + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "grainFeed": obj.get("grainFeed"), + "hayFeed": obj.get("hayFeed"), + "herbicide": obj.get("herbicide"), + "herbicideOther": obj.get("herbicideOther"), + "cowsCalving": PostBuffaloRequestBuffalosInnerCowsCalving.from_dict(obj["cowsCalving"]) if obj.get("cowsCalving") is not None else None, + "seasonalCalving": PostBuffaloRequestBuffalosInnerSeasonalCalving.from_dict(obj["seasonalCalving"]) if obj.get("seasonalCalving") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes.py new file mode 100644 index 00000000..6d7b1598 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls import PostBuffaloRequestBuffalosInnerClassesBulls +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_calfs import PostBuffaloRequestBuffalosInnerClassesCalfs +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_cows import PostBuffaloRequestBuffalosInnerClassesCows +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_steers import PostBuffaloRequestBuffalosInnerClassesSteers +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_bulls import PostBuffaloRequestBuffalosInnerClassesTradeBulls +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_calfs import PostBuffaloRequestBuffalosInnerClassesTradeCalfs +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_cows import PostBuffaloRequestBuffalosInnerClassesTradeCows +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_steers import PostBuffaloRequestBuffalosInnerClassesTradeSteers +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestBuffalosInnerClasses(BaseModel): + """ + Buffalo classes of different types + """ # noqa: E501 + bulls: Optional[PostBuffaloRequestBuffalosInnerClassesBulls] = None + trade_bulls: Optional[PostBuffaloRequestBuffalosInnerClassesTradeBulls] = Field(default=None, alias="tradeBulls") + cows: Optional[PostBuffaloRequestBuffalosInnerClassesCows] = None + trade_cows: Optional[PostBuffaloRequestBuffalosInnerClassesTradeCows] = Field(default=None, alias="tradeCows") + steers: Optional[PostBuffaloRequestBuffalosInnerClassesSteers] = None + trade_steers: Optional[PostBuffaloRequestBuffalosInnerClassesTradeSteers] = Field(default=None, alias="tradeSteers") + calfs: Optional[PostBuffaloRequestBuffalosInnerClassesCalfs] = None + trade_calfs: Optional[PostBuffaloRequestBuffalosInnerClassesTradeCalfs] = Field(default=None, alias="tradeCalfs") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["bulls", "tradeBulls", "cows", "tradeCows", "steers", "tradeSteers", "calfs", "tradeCalfs"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClasses from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of bulls + if self.bulls: + _dict['bulls'] = self.bulls.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_bulls + if self.trade_bulls: + _dict['tradeBulls'] = self.trade_bulls.to_dict() + # override the default output from pydantic by calling `to_dict()` of cows + if self.cows: + _dict['cows'] = self.cows.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_cows + if self.trade_cows: + _dict['tradeCows'] = self.trade_cows.to_dict() + # override the default output from pydantic by calling `to_dict()` of steers + if self.steers: + _dict['steers'] = self.steers.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_steers + if self.trade_steers: + _dict['tradeSteers'] = self.trade_steers.to_dict() + # override the default output from pydantic by calling `to_dict()` of calfs + if self.calfs: + _dict['calfs'] = self.calfs.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_calfs + if self.trade_calfs: + _dict['tradeCalfs'] = self.trade_calfs.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClasses from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bulls": PostBuffaloRequestBuffalosInnerClassesBulls.from_dict(obj["bulls"]) if obj.get("bulls") is not None else None, + "tradeBulls": PostBuffaloRequestBuffalosInnerClassesTradeBulls.from_dict(obj["tradeBulls"]) if obj.get("tradeBulls") is not None else None, + "cows": PostBuffaloRequestBuffalosInnerClassesCows.from_dict(obj["cows"]) if obj.get("cows") is not None else None, + "tradeCows": PostBuffaloRequestBuffalosInnerClassesTradeCows.from_dict(obj["tradeCows"]) if obj.get("tradeCows") is not None else None, + "steers": PostBuffaloRequestBuffalosInnerClassesSteers.from_dict(obj["steers"]) if obj.get("steers") is not None else None, + "tradeSteers": PostBuffaloRequestBuffalosInnerClassesTradeSteers.from_dict(obj["tradeSteers"]) if obj.get("tradeSteers") is not None else None, + "calfs": PostBuffaloRequestBuffalosInnerClassesCalfs.from_dict(obj["calfs"]) if obj.get("calfs") is not None else None, + "tradeCalfs": PostBuffaloRequestBuffalosInnerClassesTradeCalfs.from_dict(obj["tradeCalfs"]) if obj.get("tradeCalfs") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls.py new file mode 100644 index 00000000..ee3decda --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestBuffalosInnerClassesBulls(BaseModel): + """ + Bulls + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesBulls from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesBulls from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls_autumn.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls_autumn.py new file mode 100644 index 00000000..f51779cb --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls_autumn.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestBuffalosInnerClassesBullsAutumn(BaseModel): + """ + PostBuffaloRequestBuffalosInnerClassesBullsAutumn + """ # noqa: E501 + head: Union[StrictFloat, StrictInt] = Field(description="Number of animals (head)") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["head"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesBullsAutumn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesBullsAutumn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "head": obj.get("head") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py new file mode 100644 index 00000000..004471a0 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner(BaseModel): + """ + PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner + """ # noqa: E501 + head: Union[StrictFloat, StrictInt] = Field(description="Number of animals purchased (head)") + purchase_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at purchase, in liveweight kg/head (kilogram per head)", alias="purchaseWeight") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["head", "purchaseWeight"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "head": obj.get("head"), + "purchaseWeight": obj.get("purchaseWeight") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_calfs.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_calfs.py new file mode 100644 index 00000000..48df6e63 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_calfs.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestBuffalosInnerClassesCalfs(BaseModel): + """ + Calfs + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesCalfs from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesCalfs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_cows.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_cows.py new file mode 100644 index 00000000..d6a7c252 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_cows.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestBuffalosInnerClassesCows(BaseModel): + """ + Cows + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesCows from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesCows from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_steers.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_steers.py new file mode 100644 index 00000000..735d9c76 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_steers.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestBuffalosInnerClassesSteers(BaseModel): + """ + Steers + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesSteers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesSteers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_bulls.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_bulls.py new file mode 100644 index 00000000..d7d66517 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_bulls.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestBuffalosInnerClassesTradeBulls(BaseModel): + """ + Trade bulls + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesTradeBulls from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesTradeBulls from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_calfs.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_calfs.py new file mode 100644 index 00000000..5bfea3ca --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_calfs.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestBuffalosInnerClassesTradeCalfs(BaseModel): + """ + Trade calfs + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesTradeCalfs from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesTradeCalfs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_cows.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_cows.py new file mode 100644 index 00000000..0133349c --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_cows.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestBuffalosInnerClassesTradeCows(BaseModel): + """ + Trade cows + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesTradeCows from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesTradeCows from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_steers.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_steers.py new file mode 100644 index 00000000..c59e9228 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_classes_trade_steers.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestBuffalosInnerClassesTradeSteers(BaseModel): + """ + Trade steers + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesTradeSteers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerClassesTradeSteers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_cows_calving.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_cows_calving.py new file mode 100644 index 00000000..bea5e22f --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_cows_calving.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestBuffalosInnerCowsCalving(BaseModel): + """ + Proportion of cows calving in each season, from 0 to 1 + """ # noqa: E501 + spring: Union[StrictFloat, StrictInt] + summer: Union[StrictFloat, StrictInt] + autumn: Union[StrictFloat, StrictInt] + winter: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["spring", "summer", "autumn", "winter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerCowsCalving from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerCowsCalving from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "spring": obj.get("spring"), + "summer": obj.get("summer"), + "autumn": obj.get("autumn"), + "winter": obj.get("winter") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_seasonal_calving.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_seasonal_calving.py new file mode 100644 index 00000000..2b9aa014 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_buffalos_inner_seasonal_calving.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestBuffalosInnerSeasonalCalving(BaseModel): + """ + Seasonal calving rates, from 0 to 1 + """ # noqa: E501 + spring: Union[StrictFloat, StrictInt] + summer: Union[StrictFloat, StrictInt] + autumn: Union[StrictFloat, StrictInt] + winter: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["spring", "summer", "autumn", "winter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerSeasonalCalving from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestBuffalosInnerSeasonalCalving from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "spring": obj.get("spring"), + "summer": obj.get("summer"), + "autumn": obj.get("autumn"), + "winter": obj.get("winter") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_vegetation_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_vegetation_inner.py new file mode 100644 index 00000000..1c0a213d --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_buffalo_request_vegetation_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation +from typing import Optional, Set +from typing_extensions import Self + +class PostBuffaloRequestVegetationInner(BaseModel): + """ + Non-productive vegetation inputs along with allocations to Buffalo + """ # noqa: E501 + vegetation: PostBeefRequestVegetationInnerVegetation + buffalo_proportion: List[Union[StrictFloat, StrictInt]] = Field(description="The proportion of the sequestration that is allocated to Buffalo", alias="buffaloProportion") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vegetation", "buffaloProportion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostBuffaloRequestVegetationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of vegetation + if self.vegetation: + _dict['vegetation'] = self.vegetation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostBuffaloRequestVegetationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vegetation": PostBeefRequestVegetationInnerVegetation.from_dict(obj["vegetation"]) if obj.get("vegetation") is not None else None, + "buffaloProportion": obj.get("buffaloProportion") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response.py new file mode 100644 index 00000000..b02d4803 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_cotton200_response_intermediate_inner import PostCotton200ResponseIntermediateInner +from openapi_client.models.post_cotton200_response_intermediate_inner_intensities import PostCotton200ResponseIntermediateInnerIntensities +from openapi_client.models.post_cotton200_response_net import PostCotton200ResponseNet +from openapi_client.models.post_cotton200_response_scope1 import PostCotton200ResponseScope1 +from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostCotton200Response(BaseModel): + """ + Emissions calculation output for the `cotton` calculator + """ # noqa: E501 + scope1: PostCotton200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostCotton200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + intermediate: List[PostCotton200ResponseIntermediateInner] + net: PostCotton200ResponseNet + intensities: List[PostCotton200ResponseIntermediateInnerIntensities] = Field(description="Emissions intensity for each crop (in order)") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "intermediate", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostCotton200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intensities (list) + _items = [] + if self.intensities: + for _item_intensities in self.intensities: + if _item_intensities: + _items.append(_item_intensities.to_dict()) + _dict['intensities'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostCotton200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostCotton200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostCotton200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intermediate": [PostCotton200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None, + "net": PostCotton200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": [PostCotton200ResponseIntermediateInnerIntensities.from_dict(_item) for _item in obj["intensities"]] if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_intermediate_inner.py new file mode 100644 index 00000000..9f8e4bc4 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_intermediate_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_cotton200_response_intermediate_inner_intensities import PostCotton200ResponseIntermediateInnerIntensities +from openapi_client.models.post_cotton200_response_scope1 import PostCotton200ResponseScope1 +from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostCotton200ResponseIntermediateInner(BaseModel): + """ + Intermediate emissions calculation output for the Cotton calculator + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostCotton200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostCotton200ResponseScope3 + intensities: PostCotton200ResponseIntermediateInnerIntensities + net: PostAquaculture200ResponseNet + carbon_sequestration: PostAquaculture200ResponseIntermediateInnerCarbonSequestration = Field(alias="carbonSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "intensities", "net", "carbonSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostCotton200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostCotton200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostCotton200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostCotton200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "intensities": PostCotton200ResponseIntermediateInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "carbonSequestration": PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..64f70f21 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_intermediate_inner_intensities.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostCotton200ResponseIntermediateInnerIntensities(BaseModel): + """ + Cotton intensities output + """ # noqa: E501 + cotton_yield_produced_tonnes: Union[StrictFloat, StrictInt] = Field(description="Cotton yield produced in tonnes", alias="cottonYieldProducedTonnes") + bales_produced: Union[StrictFloat, StrictInt] = Field(description="Number of bales produced", alias="balesProduced") + lint_produced_tonnes: Union[StrictFloat, StrictInt] = Field(description="Cotton lint produced in tonnes", alias="lintProducedTonnes") + seed_produced_tonnes: Union[StrictFloat, StrictInt] = Field(description="Cotton seed produced in tonnes", alias="seedProducedTonnes") + tonnes_crop_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity excluding sequestration, in t-CO2e/t crop", alias="tonnesCropExcludingSequestration") + tonnes_crop_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity including sequestration, in t-CO2e/t crop", alias="tonnesCropIncludingSequestration") + bales_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity excluding sequestration, in t-CO2e/bale", alias="balesExcludingSequestration") + bales_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity including sequestration, in t-CO2e/bale", alias="balesIncludingSequestration") + lint_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of lint including sequestration, in t-CO2e/kg", alias="lintIncludingSequestration") + lint_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of lint excluding sequestration, in t-CO2e/kg", alias="lintExcludingSequestration") + seed_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of seed including sequestration, in t-CO2e/kg", alias="seedIncludingSequestration") + seed_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of seed excluding sequestration, in t-CO2e/kg", alias="seedExcludingSequestration") + lint_economic_allocation: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of lint using economic allocation, in t-CO2e/kg", alias="lintEconomicAllocation") + seed_economic_allocation: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of seed using economic allocation, in t-CO2e/kg", alias="seedEconomicAllocation") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cottonYieldProducedTonnes", "balesProduced", "lintProducedTonnes", "seedProducedTonnes", "tonnesCropExcludingSequestration", "tonnesCropIncludingSequestration", "balesExcludingSequestration", "balesIncludingSequestration", "lintIncludingSequestration", "lintExcludingSequestration", "seedIncludingSequestration", "seedExcludingSequestration", "lintEconomicAllocation", "seedEconomicAllocation"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostCotton200ResponseIntermediateInnerIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostCotton200ResponseIntermediateInnerIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cottonYieldProducedTonnes": obj.get("cottonYieldProducedTonnes"), + "balesProduced": obj.get("balesProduced"), + "lintProducedTonnes": obj.get("lintProducedTonnes"), + "seedProducedTonnes": obj.get("seedProducedTonnes"), + "tonnesCropExcludingSequestration": obj.get("tonnesCropExcludingSequestration"), + "tonnesCropIncludingSequestration": obj.get("tonnesCropIncludingSequestration"), + "balesExcludingSequestration": obj.get("balesExcludingSequestration"), + "balesIncludingSequestration": obj.get("balesIncludingSequestration"), + "lintIncludingSequestration": obj.get("lintIncludingSequestration"), + "lintExcludingSequestration": obj.get("lintExcludingSequestration"), + "seedIncludingSequestration": obj.get("seedIncludingSequestration"), + "seedExcludingSequestration": obj.get("seedExcludingSequestration"), + "lintEconomicAllocation": obj.get("lintEconomicAllocation"), + "seedEconomicAllocation": obj.get("seedEconomicAllocation") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_net.py b/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_net.py new file mode 100644 index 00000000..99f7dca8 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_net.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostCotton200ResponseNet(BaseModel): + """ + Net emissions for each crop (in order) + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] + crops: List[Union[StrictFloat, StrictInt]] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "crops"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostCotton200ResponseNet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostCotton200ResponseNet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "crops": obj.get("crops") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_scope1.py b/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_scope1.py new file mode 100644 index 00000000..631ca2bf --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_scope1.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostCotton200ResponseScope1(BaseModel): + """ + Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fuel_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from fuel use, in tonnes-CO2e", alias="fuelCO2") + fuel_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from fuel use, in tonnes-CO2e", alias="fuelCH4") + fuel_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fuel use, in tonnes-CO2e", alias="fuelN2O") + urea_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from urea, in tonnes-CO2e", alias="ureaCO2") + lime_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from lime, in tonnes-CO2e", alias="limeCO2") + fertiliser_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fertiliser, in tonnes-CO2e", alias="fertiliserN2O") + atmospheric_deposition_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from atmospheric deposition, in tonnes-CO2e", alias="atmosphericDepositionN2O") + leaching_and_runoff_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from leeching and runoff, in tonnes-CO2e", alias="leachingAndRunoffN2O") + crop_residue_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from crop residue, in tonnes-CO2e", alias="cropResidueN2O") + field_burning_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from field burning, in tonnes-CO2e", alias="fieldBurningN2O") + field_burning_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from field burning, in tonnes-CO2e", alias="fieldBurningCH4") + total_co2: Union[StrictFloat, StrictInt] = Field(description="Total CO2 scope 1 emissions, in tonnes-CO2e", alias="totalCO2") + total_ch4: Union[StrictFloat, StrictInt] = Field(description="Total CH4 scope 1 emissions, in tonnes-CO2e", alias="totalCH4") + total_n2_o: Union[StrictFloat, StrictInt] = Field(description="Total N2O scope 1 emissions, in tonnes-CO2e", alias="totalN2O") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 1 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuelCO2", "fuelCH4", "fuelN2O", "ureaCO2", "limeCO2", "fertiliserN2O", "atmosphericDepositionN2O", "leachingAndRunoffN2O", "cropResidueN2O", "fieldBurningN2O", "fieldBurningCH4", "totalCO2", "totalCH4", "totalN2O", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostCotton200ResponseScope1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostCotton200ResponseScope1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuelCO2": obj.get("fuelCO2"), + "fuelCH4": obj.get("fuelCH4"), + "fuelN2O": obj.get("fuelN2O"), + "ureaCO2": obj.get("ureaCO2"), + "limeCO2": obj.get("limeCO2"), + "fertiliserN2O": obj.get("fertiliserN2O"), + "atmosphericDepositionN2O": obj.get("atmosphericDepositionN2O"), + "leachingAndRunoffN2O": obj.get("leachingAndRunoffN2O"), + "cropResidueN2O": obj.get("cropResidueN2O"), + "fieldBurningN2O": obj.get("fieldBurningN2O"), + "fieldBurningCH4": obj.get("fieldBurningCH4"), + "totalCO2": obj.get("totalCO2"), + "totalCH4": obj.get("totalCH4"), + "totalN2O": obj.get("totalN2O"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_scope3.py b/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_scope3.py new file mode 100644 index 00000000..5e0ca11b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_cotton200_response_scope3.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostCotton200ResponseScope3(BaseModel): + """ + Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fertiliser: Union[StrictFloat, StrictInt] = Field(description="Emissions from fertiliser, in tonnes-CO2e") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Emissions from herbicide, in tonnes-CO2e") + electricity: Union[StrictFloat, StrictInt] = Field(description="Emissions from electricity, in tonnes-CO2e") + fuel: Union[StrictFloat, StrictInt] = Field(description="Emissions from fuel, in tonnes-CO2e") + lime: Union[StrictFloat, StrictInt] = Field(description="Emissions from lime, in tonnes-CO2e") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 3 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fertiliser", "herbicide", "electricity", "fuel", "lime", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostCotton200ResponseScope3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostCotton200ResponseScope3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fertiliser": obj.get("fertiliser"), + "herbicide": obj.get("herbicide"), + "electricity": obj.get("electricity"), + "fuel": obj.get("fuel"), + "lime": obj.get("lime"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_cotton_request.py b/examples/python-api-client/api-client/openapi_client/models/post_cotton_request.py new file mode 100644 index 00000000..d3ddd1ce --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_cotton_request.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from openapi_client.models.post_cotton_request_crops_inner import PostCottonRequestCropsInner +from openapi_client.models.post_cotton_request_vegetation_inner import PostCottonRequestVegetationInner +from typing import Optional, Set +from typing_extensions import Self + +class PostCottonRequest(BaseModel): + """ + Input data required for the `cotton` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + crops: List[PostCottonRequestCropsInner] + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + vegetation: List[PostCottonRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "crops", "electricityRenewable", "electricityUse", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostCottonRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in crops (list) + _items = [] + if self.crops: + for _item_crops in self.crops: + if _item_crops: + _items.append(_item_crops.to_dict()) + _dict['crops'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostCottonRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "crops": [PostCottonRequestCropsInner.from_dict(_item) for _item in obj["crops"]] if obj.get("crops") is not None else None, + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "vegetation": [PostCottonRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_cotton_request_crops_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_cotton_request_crops_inner.py new file mode 100644 index 00000000..77d82e2d --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_cotton_request_crops_inner.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostCottonRequestCropsInner(BaseModel): + """ + PostCottonRequestCropsInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + average_cotton_yield: Union[StrictFloat, StrictInt] = Field(description="Average cotton yield, in t/ha (tonnes per hectare)", alias="averageCottonYield") + area_sown: Union[StrictFloat, StrictInt] = Field(description="Area sown, in ha (hectares)", alias="areaSown") + average_weight_per_bale_kg: Union[StrictFloat, StrictInt] = Field(description="Average weight of unprocessed cotton per bale, in kg", alias="averageWeightPerBaleKg") + cotton_lint_per_bale_kg: Union[StrictFloat, StrictInt] = Field(description="Average weight of cotton lint per bale, in kg", alias="cottonLintPerBaleKg") + cotton_seed_per_bale_kg: Union[StrictFloat, StrictInt] = Field(description="Average weight of cotton seed produced per bale, in kg", alias="cottonSeedPerBaleKg") + waste_per_bale_kg: Union[StrictFloat, StrictInt] = Field(description="Average weight of cotton waste produced per bale, in kg", alias="wastePerBaleKg") + urea_application: Union[StrictFloat, StrictInt] = Field(description="Urea application, in kg Urea/ha (kilograms of urea per hectare)", alias="ureaApplication") + other_fertiliser_type: Optional[StrictStr] = Field(default=None, description="Other N fertiliser type", alias="otherFertiliserType") + other_fertiliser_application: Union[StrictFloat, StrictInt] = Field(description="Other N fertiliser application, in kg/ha (kilograms per hectare)", alias="otherFertiliserApplication") + non_urea_nitrogen: Union[StrictFloat, StrictInt] = Field(description="Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare)", alias="nonUreaNitrogen") + urea_ammonium_nitrate: Union[StrictFloat, StrictInt] = Field(description="Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare)", alias="ureaAmmoniumNitrate") + phosphorus_application: Union[StrictFloat, StrictInt] = Field(description="Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare)", alias="phosphorusApplication") + potassium_application: Union[StrictFloat, StrictInt] = Field(description="Potassium application, in kg K/ha (kilograms of potassium per hectare)", alias="potassiumApplication") + sulfur_application: Union[StrictFloat, StrictInt] = Field(description="Sulfur application, in kg S/ha (kilograms of sulfur per hectare)", alias="sulfurApplication") + single_super_phosphate: Union[StrictFloat, StrictInt] = Field(description="Single superphosphate use, in kg/ha (kilograms per hectare)", alias="singleSuperPhosphate") + rainfall_above600: StrictBool = Field(description="Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm", alias="rainfallAbove600") + fraction_of_annual_crop_burnt: Union[StrictFloat, StrictInt] = Field(description="Fraction of annual production of crop that is burnt. If included, this should only ever be 0 for cotton", alias="fractionOfAnnualCropBurnt") + herbicide_use: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram)", alias="herbicideUse") + glyphosate_other_herbicide_use: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram)", alias="glyphosateOtherHerbicideUse") + electricity_allocation: Union[StrictFloat, StrictInt] = Field(description="Percentage of electricity use to allocate to this crop, from 0 to 1", alias="electricityAllocation") + limestone: Union[StrictFloat, StrictInt] = Field(description="Lime applied in tonnes") + limestone_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of lime as limestone vs dolomite, between 0 and 1", alias="limestoneFraction") + diesel_use: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)", alias="dieselUse") + petrol_use: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)", alias="petrolUse") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "averageCottonYield", "areaSown", "averageWeightPerBaleKg", "cottonLintPerBaleKg", "cottonSeedPerBaleKg", "wastePerBaleKg", "ureaApplication", "otherFertiliserType", "otherFertiliserApplication", "nonUreaNitrogen", "ureaAmmoniumNitrate", "phosphorusApplication", "potassiumApplication", "sulfurApplication", "singleSuperPhosphate", "rainfallAbove600", "fractionOfAnnualCropBurnt", "herbicideUse", "glyphosateOtherHerbicideUse", "electricityAllocation", "limestone", "limestoneFraction", "dieselUse", "petrolUse", "lpg"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + @field_validator('other_fertiliser_type') + def other_fertiliser_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Monoammonium phosphate (MAP)', 'Diammonium Phosphate (DAP)', 'Urea-Ammonium Nitrate (UAN)', 'Ammonium Nitrate (AN)', 'Calcium Ammonium Nitrate (CAN)', 'Triple Superphosphate (TSP)', 'Super Potash 1:1', 'Super Potash 2:1', 'Super Potash 3:1', 'Super Potash 4:1', 'Super Potash 5:1', 'Muriate of Potash', 'Sulphate of Potash', 'Sulphate of Ammonia']): + raise ValueError("must be one of enum values ('Monoammonium phosphate (MAP)', 'Diammonium Phosphate (DAP)', 'Urea-Ammonium Nitrate (UAN)', 'Ammonium Nitrate (AN)', 'Calcium Ammonium Nitrate (CAN)', 'Triple Superphosphate (TSP)', 'Super Potash 1:1', 'Super Potash 2:1', 'Super Potash 3:1', 'Super Potash 4:1', 'Super Potash 5:1', 'Muriate of Potash', 'Sulphate of Potash', 'Sulphate of Ammonia')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostCottonRequestCropsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostCottonRequestCropsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "averageCottonYield": obj.get("averageCottonYield"), + "areaSown": obj.get("areaSown"), + "averageWeightPerBaleKg": obj.get("averageWeightPerBaleKg"), + "cottonLintPerBaleKg": obj.get("cottonLintPerBaleKg"), + "cottonSeedPerBaleKg": obj.get("cottonSeedPerBaleKg"), + "wastePerBaleKg": obj.get("wastePerBaleKg"), + "ureaApplication": obj.get("ureaApplication"), + "otherFertiliserType": obj.get("otherFertiliserType"), + "otherFertiliserApplication": obj.get("otherFertiliserApplication"), + "nonUreaNitrogen": obj.get("nonUreaNitrogen") if obj.get("nonUreaNitrogen") is not None else 0, + "ureaAmmoniumNitrate": obj.get("ureaAmmoniumNitrate") if obj.get("ureaAmmoniumNitrate") is not None else 0, + "phosphorusApplication": obj.get("phosphorusApplication") if obj.get("phosphorusApplication") is not None else 0, + "potassiumApplication": obj.get("potassiumApplication") if obj.get("potassiumApplication") is not None else 0, + "sulfurApplication": obj.get("sulfurApplication") if obj.get("sulfurApplication") is not None else 0, + "singleSuperPhosphate": obj.get("singleSuperPhosphate"), + "rainfallAbove600": obj.get("rainfallAbove600"), + "fractionOfAnnualCropBurnt": obj.get("fractionOfAnnualCropBurnt") if obj.get("fractionOfAnnualCropBurnt") is not None else 0, + "herbicideUse": obj.get("herbicideUse"), + "glyphosateOtherHerbicideUse": obj.get("glyphosateOtherHerbicideUse"), + "electricityAllocation": obj.get("electricityAllocation"), + "limestone": obj.get("limestone"), + "limestoneFraction": obj.get("limestoneFraction"), + "dieselUse": obj.get("dieselUse"), + "petrolUse": obj.get("petrolUse"), + "lpg": obj.get("lpg") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_cotton_request_vegetation_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_cotton_request_vegetation_inner.py new file mode 100644 index 00000000..3f2008a2 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_cotton_request_vegetation_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation +from typing import Optional, Set +from typing_extensions import Self + +class PostCottonRequestVegetationInner(BaseModel): + """ + PostCottonRequestVegetationInner + """ # noqa: E501 + vegetation: PostBeefRequestVegetationInnerVegetation + allocation_to_crops: List[Union[StrictFloat, StrictInt]] = Field(alias="allocationToCrops") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vegetation", "allocationToCrops"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostCottonRequestVegetationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of vegetation + if self.vegetation: + _dict['vegetation'] = self.vegetation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostCottonRequestVegetationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vegetation": PostBeefRequestVegetationInnerVegetation.from_dict(obj["vegetation"]) if obj.get("vegetation") is not None else None, + "allocationToCrops": obj.get("allocationToCrops") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response.py new file mode 100644 index 00000000..e008f156 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_dairy200_response_intensities import PostDairy200ResponseIntensities +from openapi_client.models.post_dairy200_response_intermediate_inner import PostDairy200ResponseIntermediateInner +from openapi_client.models.post_dairy200_response_net import PostDairy200ResponseNet +from openapi_client.models.post_dairy200_response_scope1 import PostDairy200ResponseScope1 +from openapi_client.models.post_dairy200_response_scope3 import PostDairy200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostDairy200Response(BaseModel): + """ + Emissions calculation output for the `dairy` calculator + """ # noqa: E501 + scope1: PostDairy200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostDairy200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + net: PostDairy200ResponseNet + intensities: PostDairy200ResponseIntensities + intermediate: List[PostDairy200ResponseIntermediateInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "net", "intensities", "intermediate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairy200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairy200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostDairy200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostDairy200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "net": PostDairy200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostDairy200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "intermediate": [PostDairy200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_intensities.py new file mode 100644 index 00000000..1761a9c1 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_intensities.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostDairy200ResponseIntensities(BaseModel): + """ + PostDairy200ResponseIntensities + """ # noqa: E501 + milk_solids_produced_tonnes: Union[StrictFloat, StrictInt] = Field(description="Milk solids produced in tonnes", alias="milkSolidsProducedTonnes") + intensity: Union[StrictFloat, StrictInt] = Field(description="Dairy intensities including carbon sequestration, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["milkSolidsProducedTonnes", "intensity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairy200ResponseIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairy200ResponseIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "milkSolidsProducedTonnes": obj.get("milkSolidsProducedTonnes"), + "intensity": obj.get("intensity") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_intermediate_inner.py new file mode 100644 index 00000000..e4b939a1 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_intermediate_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_dairy200_response_intensities import PostDairy200ResponseIntensities +from openapi_client.models.post_dairy200_response_net import PostDairy200ResponseNet +from openapi_client.models.post_dairy200_response_scope1 import PostDairy200ResponseScope1 +from openapi_client.models.post_dairy200_response_scope3 import PostDairy200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostDairy200ResponseIntermediateInner(BaseModel): + """ + Intermediate emissions calculation output for the Dairy calculator + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostDairy200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostDairy200ResponseScope3 + net: PostDairy200ResponseNet + intensities: PostDairy200ResponseIntensities + carbon_sequestration: PostAquaculture200ResponseIntermediateInnerCarbonSequestration = Field(alias="carbonSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "net", "intensities", "carbonSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairy200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairy200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostDairy200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostDairy200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "net": PostDairy200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostDairy200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "carbonSequestration": PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_net.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_net.py new file mode 100644 index 00000000..d157ad1b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_net.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostDairy200ResponseNet(BaseModel): + """ + PostDairy200ResponseNet + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] = Field(description="Total net emissions of this activity, in tonnes-CO2e/year") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairy200ResponseNet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairy200ResponseNet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_scope1.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_scope1.py new file mode 100644 index 00000000..9defa0f8 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_scope1.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostDairy200ResponseScope1(BaseModel): + """ + Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fuel_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from fuel use, in tonnes-CO2e", alias="fuelCO2") + fuel_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from fuel use, in tonnes-CO2e", alias="fuelCH4") + fuel_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fuel use, in tonnes-CO2e", alias="fuelN2O") + urea_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from urea, in tonnes-CO2e", alias="ureaCO2") + lime_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from lime, in tonnes-CO2e", alias="limeCO2") + enteric_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from enteric fermentation, in tonnes-CO2e", alias="entericCH4") + manure_management_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from manure management, in tonnes-CO2e", alias="manureManagementCH4") + manure_management_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from manure management, in tonnes-CO2e", alias="manureManagementN2O") + animal_waste_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from animal waste, in tonnes-CO2e", alias="animalWasteN2O") + fertiliser_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fertiliser, in tonnes-CO2e", alias="fertiliserN2O") + urine_and_dung_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from urine and dung, in tonnes-CO2e", alias="urineAndDungN2O") + atmospheric_deposition_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from atmospheric deposition, in tonnes-CO2e", alias="atmosphericDepositionN2O") + leaching_and_runoff_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from leeching and runoff, in tonnes-CO2e", alias="leachingAndRunoffN2O") + transport_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from transport, in tonnes-CO2e", alias="transportN2O") + transport_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from transport, in tonnes-CO2e", alias="transportCH4") + transport_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from transport, in tonnes-CO2e", alias="transportCO2") + total_co2: Union[StrictFloat, StrictInt] = Field(description="Total CO2 scope 1 emissions, in tonnes-CO2e", alias="totalCO2") + total_ch4: Union[StrictFloat, StrictInt] = Field(description="Total CH4 scope 1 emissions, in tonnes-CO2e", alias="totalCH4") + total_n2_o: Union[StrictFloat, StrictInt] = Field(description="Total N2O scope 1 emissions, in tonnes-CO2e", alias="totalN2O") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 1 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuelCO2", "fuelCH4", "fuelN2O", "ureaCO2", "limeCO2", "entericCH4", "manureManagementCH4", "manureManagementN2O", "animalWasteN2O", "fertiliserN2O", "urineAndDungN2O", "atmosphericDepositionN2O", "leachingAndRunoffN2O", "transportN2O", "transportCH4", "transportCO2", "totalCO2", "totalCH4", "totalN2O", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairy200ResponseScope1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairy200ResponseScope1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuelCO2": obj.get("fuelCO2"), + "fuelCH4": obj.get("fuelCH4"), + "fuelN2O": obj.get("fuelN2O"), + "ureaCO2": obj.get("ureaCO2"), + "limeCO2": obj.get("limeCO2"), + "entericCH4": obj.get("entericCH4"), + "manureManagementCH4": obj.get("manureManagementCH4"), + "manureManagementN2O": obj.get("manureManagementN2O"), + "animalWasteN2O": obj.get("animalWasteN2O"), + "fertiliserN2O": obj.get("fertiliserN2O"), + "urineAndDungN2O": obj.get("urineAndDungN2O"), + "atmosphericDepositionN2O": obj.get("atmosphericDepositionN2O"), + "leachingAndRunoffN2O": obj.get("leachingAndRunoffN2O"), + "transportN2O": obj.get("transportN2O"), + "transportCH4": obj.get("transportCH4"), + "transportCO2": obj.get("transportCO2"), + "totalCO2": obj.get("totalCO2"), + "totalCH4": obj.get("totalCH4"), + "totalN2O": obj.get("totalN2O"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_scope3.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_scope3.py new file mode 100644 index 00000000..045ae7c0 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy200_response_scope3.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostDairy200ResponseScope3(BaseModel): + """ + Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fertiliser: Union[StrictFloat, StrictInt] = Field(description="Emissions from fertiliser, in tonnes-CO2e") + purchased_feed: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased feed, in tonnes-CO2e", alias="purchasedFeed") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Emissions from herbicide, in tonnes-CO2e") + electricity: Union[StrictFloat, StrictInt] = Field(description="Emissions from electricity, in tonnes-CO2e") + fuel: Union[StrictFloat, StrictInt] = Field(description="Emissions from fuel, in tonnes-CO2e") + lime: Union[StrictFloat, StrictInt] = Field(description="Emissions from lime, in tonnes-CO2e") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 3 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fertiliser", "purchasedFeed", "herbicide", "electricity", "fuel", "lime", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairy200ResponseScope3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairy200ResponseScope3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fertiliser": obj.get("fertiliser"), + "purchasedFeed": obj.get("purchasedFeed"), + "herbicide": obj.get("herbicide"), + "electricity": obj.get("electricity"), + "fuel": obj.get("fuel"), + "lime": obj.get("lime"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy_request.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request.py new file mode 100644 index 00000000..fe1e6740 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_dairy_request_dairy_inner import PostDairyRequestDairyInner +from openapi_client.models.post_dairy_request_vegetation_inner import PostDairyRequestVegetationInner +from typing import Optional, Set +from typing_extensions import Self + +class PostDairyRequest(BaseModel): + """ + Input data required for the `dairy` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + rainfall_above600: StrictBool = Field(description="Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm", alias="rainfallAbove600") + production_system: StrictStr = Field(description="Production system", alias="productionSystem") + dairy: List[PostDairyRequestDairyInner] + vegetation: List[PostDairyRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "rainfallAbove600", "productionSystem", "dairy", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + @field_validator('production_system') + def production_system_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Non-irrigated Crop', 'Irrigated Crop', 'Irrigated Pasture', 'Non-irrigated Pasture']): + raise ValueError("must be one of enum values ('Non-irrigated Crop', 'Irrigated Crop', 'Irrigated Pasture', 'Non-irrigated Pasture')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in dairy (list) + _items = [] + if self.dairy: + for _item_dairy in self.dairy: + if _item_dairy: + _items.append(_item_dairy.to_dict()) + _dict['dairy'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "rainfallAbove600": obj.get("rainfallAbove600"), + "productionSystem": obj.get("productionSystem"), + "dairy": [PostDairyRequestDairyInner.from_dict(_item) for _item in obj["dairy"]] if obj.get("dairy") is not None else None, + "vegetation": [PostDairyRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner.py new file mode 100644 index 00000000..a838fbbb --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_beef_request_beef_inner_fertiliser import PostBeefRequestBeefInnerFertiliser +from openapi_client.models.post_dairy_request_dairy_inner_areas import PostDairyRequestDairyInnerAreas +from openapi_client.models.post_dairy_request_dairy_inner_classes import PostDairyRequestDairyInnerClasses +from openapi_client.models.post_dairy_request_dairy_inner_manure_management_milking_cows import PostDairyRequestDairyInnerManureManagementMilkingCows +from openapi_client.models.post_dairy_request_dairy_inner_seasonal_fertiliser import PostDairyRequestDairyInnerSeasonalFertiliser +from typing import Optional, Set +from typing_extensions import Self + +class PostDairyRequestDairyInner(BaseModel): + """ + PostDairyRequestDairyInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + classes: PostDairyRequestDairyInnerClasses + limestone: Union[StrictFloat, StrictInt] = Field(description="Lime applied in tonnes") + limestone_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of lime as limestone vs dolomite, between 0 and 1", alias="limestoneFraction") + fertiliser: PostBeefRequestBeefInnerFertiliser + seasonal_fertiliser: PostDairyRequestDairyInnerSeasonalFertiliser = Field(alias="seasonalFertiliser") + areas: PostDairyRequestDairyInnerAreas + diesel: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)") + petrol: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + grain_feed: Union[StrictFloat, StrictInt] = Field(description="Grain purchased for cattle feed in tonnes", alias="grainFeed") + hay_feed: Union[StrictFloat, StrictInt] = Field(description="Hay purchased for cattle feed in tonnes", alias="hayFeed") + cottonseed_feed: Union[StrictFloat, StrictInt] = Field(description="Cotton seed purchased for cattle feed in tonnes", alias="cottonseedFeed") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms)") + herbicide_other: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from other herbicides in kg (kilograms)", alias="herbicideOther") + manure_management_milking_cows: PostDairyRequestDairyInnerManureManagementMilkingCows = Field(alias="manureManagementMilkingCows") + manure_management_other_dairy_cows: PostDairyRequestDairyInnerManureManagementMilkingCows = Field(alias="manureManagementOtherDairyCows") + emissions_allocation_to_red_meat_production: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Allocation as a fraction, from 0 to 1", alias="emissionsAllocationToRedMeatProduction") + truck_type: StrictStr = Field(description="Type of truck used for cattle transport", alias="truckType") + distance_cattle_transported: Union[StrictFloat, StrictInt] = Field(description="Distance cattle are transported between farms, in km (kilometres)", alias="distanceCattleTransported") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "classes", "limestone", "limestoneFraction", "fertiliser", "seasonalFertiliser", "areas", "diesel", "petrol", "lpg", "electricityRenewable", "electricityUse", "grainFeed", "hayFeed", "cottonseedFeed", "herbicide", "herbicideOther", "manureManagementMilkingCows", "manureManagementOtherDairyCows", "emissionsAllocationToRedMeatProduction", "truckType", "distanceCattleTransported"] + + @field_validator('truck_type') + def truck_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['4 Deck Trailer', '6 Deck Trailer', 'B-Double']): + raise ValueError("must be one of enum values ('4 Deck Trailer', '6 Deck Trailer', 'B-Double')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of classes + if self.classes: + _dict['classes'] = self.classes.to_dict() + # override the default output from pydantic by calling `to_dict()` of fertiliser + if self.fertiliser: + _dict['fertiliser'] = self.fertiliser.to_dict() + # override the default output from pydantic by calling `to_dict()` of seasonal_fertiliser + if self.seasonal_fertiliser: + _dict['seasonalFertiliser'] = self.seasonal_fertiliser.to_dict() + # override the default output from pydantic by calling `to_dict()` of areas + if self.areas: + _dict['areas'] = self.areas.to_dict() + # override the default output from pydantic by calling `to_dict()` of manure_management_milking_cows + if self.manure_management_milking_cows: + _dict['manureManagementMilkingCows'] = self.manure_management_milking_cows.to_dict() + # override the default output from pydantic by calling `to_dict()` of manure_management_other_dairy_cows + if self.manure_management_other_dairy_cows: + _dict['manureManagementOtherDairyCows'] = self.manure_management_other_dairy_cows.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "classes": PostDairyRequestDairyInnerClasses.from_dict(obj["classes"]) if obj.get("classes") is not None else None, + "limestone": obj.get("limestone"), + "limestoneFraction": obj.get("limestoneFraction"), + "fertiliser": PostBeefRequestBeefInnerFertiliser.from_dict(obj["fertiliser"]) if obj.get("fertiliser") is not None else None, + "seasonalFertiliser": PostDairyRequestDairyInnerSeasonalFertiliser.from_dict(obj["seasonalFertiliser"]) if obj.get("seasonalFertiliser") is not None else None, + "areas": PostDairyRequestDairyInnerAreas.from_dict(obj["areas"]) if obj.get("areas") is not None else None, + "diesel": obj.get("diesel"), + "petrol": obj.get("petrol"), + "lpg": obj.get("lpg"), + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "grainFeed": obj.get("grainFeed"), + "hayFeed": obj.get("hayFeed"), + "cottonseedFeed": obj.get("cottonseedFeed"), + "herbicide": obj.get("herbicide"), + "herbicideOther": obj.get("herbicideOther"), + "manureManagementMilkingCows": PostDairyRequestDairyInnerManureManagementMilkingCows.from_dict(obj["manureManagementMilkingCows"]) if obj.get("manureManagementMilkingCows") is not None else None, + "manureManagementOtherDairyCows": PostDairyRequestDairyInnerManureManagementMilkingCows.from_dict(obj["manureManagementOtherDairyCows"]) if obj.get("manureManagementOtherDairyCows") is not None else None, + "emissionsAllocationToRedMeatProduction": obj.get("emissionsAllocationToRedMeatProduction"), + "truckType": obj.get("truckType"), + "distanceCattleTransported": obj.get("distanceCattleTransported") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_areas.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_areas.py new file mode 100644 index 00000000..5a40491b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_areas.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostDairyRequestDairyInnerAreas(BaseModel): + """ + Areas in hectares (ha) + """ # noqa: E501 + cropped_dryland: Union[StrictFloat, StrictInt] = Field(alias="croppedDryland") + cropped_irrigated: Union[StrictFloat, StrictInt] = Field(alias="croppedIrrigated") + improved_pasture_dryland: Union[StrictFloat, StrictInt] = Field(alias="improvedPastureDryland") + improved_pasture_irrigated: Union[StrictFloat, StrictInt] = Field(alias="improvedPastureIrrigated") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["croppedDryland", "croppedIrrigated", "improvedPastureDryland", "improvedPastureIrrigated"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerAreas from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerAreas from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "croppedDryland": obj.get("croppedDryland") if obj.get("croppedDryland") is not None else 0, + "croppedIrrigated": obj.get("croppedIrrigated") if obj.get("croppedIrrigated") is not None else 0, + "improvedPastureDryland": obj.get("improvedPastureDryland") if obj.get("improvedPastureDryland") is not None else 0, + "improvedPastureIrrigated": obj.get("improvedPastureIrrigated") if obj.get("improvedPastureIrrigated") is not None else 0 + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes.py new file mode 100644 index 00000000..f0c688c2 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_dairy_request_dairy_inner_classes_dairy_bulls_gt1 import PostDairyRequestDairyInnerClassesDairyBullsGt1 +from openapi_client.models.post_dairy_request_dairy_inner_classes_dairy_bulls_lt1 import PostDairyRequestDairyInnerClassesDairyBullsLt1 +from openapi_client.models.post_dairy_request_dairy_inner_classes_heifers_gt1 import PostDairyRequestDairyInnerClassesHeifersGt1 +from openapi_client.models.post_dairy_request_dairy_inner_classes_heifers_lt1 import PostDairyRequestDairyInnerClassesHeifersLt1 +from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows import PostDairyRequestDairyInnerClassesMilkingCows +from typing import Optional, Set +from typing_extensions import Self + +class PostDairyRequestDairyInnerClasses(BaseModel): + """ + Dairy classes of different types and age ranges + """ # noqa: E501 + milking_cows: PostDairyRequestDairyInnerClassesMilkingCows = Field(alias="milkingCows") + heifers_lt1: PostDairyRequestDairyInnerClassesHeifersLt1 = Field(alias="heifersLt1") + heifers_gt1: PostDairyRequestDairyInnerClassesHeifersGt1 = Field(alias="heifersGt1") + dairy_bulls_lt1: PostDairyRequestDairyInnerClassesDairyBullsLt1 = Field(alias="dairyBullsLt1") + dairy_bulls_gt1: PostDairyRequestDairyInnerClassesDairyBullsGt1 = Field(alias="dairyBullsGt1") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["milkingCows", "heifersLt1", "heifersGt1", "dairyBullsLt1", "dairyBullsGt1"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerClasses from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of milking_cows + if self.milking_cows: + _dict['milkingCows'] = self.milking_cows.to_dict() + # override the default output from pydantic by calling `to_dict()` of heifers_lt1 + if self.heifers_lt1: + _dict['heifersLt1'] = self.heifers_lt1.to_dict() + # override the default output from pydantic by calling `to_dict()` of heifers_gt1 + if self.heifers_gt1: + _dict['heifersGt1'] = self.heifers_gt1.to_dict() + # override the default output from pydantic by calling `to_dict()` of dairy_bulls_lt1 + if self.dairy_bulls_lt1: + _dict['dairyBullsLt1'] = self.dairy_bulls_lt1.to_dict() + # override the default output from pydantic by calling `to_dict()` of dairy_bulls_gt1 + if self.dairy_bulls_gt1: + _dict['dairyBullsGt1'] = self.dairy_bulls_gt1.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerClasses from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "milkingCows": PostDairyRequestDairyInnerClassesMilkingCows.from_dict(obj["milkingCows"]) if obj.get("milkingCows") is not None else None, + "heifersLt1": PostDairyRequestDairyInnerClassesHeifersLt1.from_dict(obj["heifersLt1"]) if obj.get("heifersLt1") is not None else None, + "heifersGt1": PostDairyRequestDairyInnerClassesHeifersGt1.from_dict(obj["heifersGt1"]) if obj.get("heifersGt1") is not None else None, + "dairyBullsLt1": PostDairyRequestDairyInnerClassesDairyBullsLt1.from_dict(obj["dairyBullsLt1"]) if obj.get("dairyBullsLt1") is not None else None, + "dairyBullsGt1": PostDairyRequestDairyInnerClassesDairyBullsGt1.from_dict(obj["dairyBullsGt1"]) if obj.get("dairyBullsGt1") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py new file mode 100644 index 00000000..ef68e970 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows_autumn import PostDairyRequestDairyInnerClassesMilkingCowsAutumn +from typing import Optional, Set +from typing_extensions import Self + +class PostDairyRequestDairyInnerClassesDairyBullsGt1(BaseModel): + """ + Dairy bulls whose age is greater than 1 year old + """ # noqa: E501 + autumn: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + winter: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + spring: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + summer: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerClassesDairyBullsGt1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerClassesDairyBullsGt1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py new file mode 100644 index 00000000..77f71a07 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows_autumn import PostDairyRequestDairyInnerClassesMilkingCowsAutumn +from typing import Optional, Set +from typing_extensions import Self + +class PostDairyRequestDairyInnerClassesDairyBullsLt1(BaseModel): + """ + Dairy bulls whose age is less than 1 year old + """ # noqa: E501 + autumn: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + winter: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + spring: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + summer: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerClassesDairyBullsLt1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerClassesDairyBullsLt1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_heifers_gt1.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_heifers_gt1.py new file mode 100644 index 00000000..0682e879 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_heifers_gt1.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows_autumn import PostDairyRequestDairyInnerClassesMilkingCowsAutumn +from typing import Optional, Set +from typing_extensions import Self + +class PostDairyRequestDairyInnerClassesHeifersGt1(BaseModel): + """ + Heifers whose age is greater than 1 year old + """ # noqa: E501 + autumn: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + winter: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + spring: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + summer: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerClassesHeifersGt1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerClassesHeifersGt1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_heifers_lt1.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_heifers_lt1.py new file mode 100644 index 00000000..3b5fd051 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_heifers_lt1.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows_autumn import PostDairyRequestDairyInnerClassesMilkingCowsAutumn +from typing import Optional, Set +from typing_extensions import Self + +class PostDairyRequestDairyInnerClassesHeifersLt1(BaseModel): + """ + Heifers whose age is less than 1 year old + """ # noqa: E501 + autumn: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + winter: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + spring: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + summer: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerClassesHeifersLt1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerClassesHeifersLt1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_milking_cows.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_milking_cows.py new file mode 100644 index 00000000..ac8f13b7 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_milking_cows.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows_autumn import PostDairyRequestDairyInnerClassesMilkingCowsAutumn +from typing import Optional, Set +from typing_extensions import Self + +class PostDairyRequestDairyInnerClassesMilkingCows(BaseModel): + """ + Milking cows + """ # noqa: E501 + autumn: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + winter: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + spring: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + summer: PostDairyRequestDairyInnerClassesMilkingCowsAutumn + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerClassesMilkingCows from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerClassesMilkingCows from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_milking_cows_autumn.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_milking_cows_autumn.py new file mode 100644 index 00000000..bbf46cbf --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_classes_milking_cows_autumn.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostDairyRequestDairyInnerClassesMilkingCowsAutumn(BaseModel): + """ + PostDairyRequestDairyInnerClassesMilkingCowsAutumn + """ # noqa: E501 + head: Union[StrictFloat, StrictInt] = Field(description="Number of animals (head)") + liveweight: Union[StrictFloat, StrictInt] = Field(description="Average liveweight of animals in kg/head (kilogram per head)") + liveweight_gain: Union[StrictFloat, StrictInt] = Field(description="Average liveweight gain in kg/day (kilogram per day)", alias="liveweightGain") + crude_protein: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Crude protein percent, between 0 and 100. Note: If no value is provided, zero will be assumed. This will result in large, negative output values. This input will become mandatory in a future version.", alias="crudeProtein") + dry_matter_digestibility: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Dry matter digestibility percent, between 0 and 100. Note: If no value is provided, zero will be assumed. This will result in large, negative output values. This input will become mandatory in a future version.", alias="dryMatterDigestibility") + milk_production: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Milk produced in L/day/head (litres per day per head)", alias="milkProduction") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["head", "liveweight", "liveweightGain", "crudeProtein", "dryMatterDigestibility", "milkProduction"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerClassesMilkingCowsAutumn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerClassesMilkingCowsAutumn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "head": obj.get("head"), + "liveweight": obj.get("liveweight"), + "liveweightGain": obj.get("liveweightGain"), + "crudeProtein": obj.get("crudeProtein"), + "dryMatterDigestibility": obj.get("dryMatterDigestibility"), + "milkProduction": obj.get("milkProduction") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_manure_management_milking_cows.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_manure_management_milking_cows.py new file mode 100644 index 00000000..0c475e35 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_manure_management_milking_cows.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PostDairyRequestDairyInnerManureManagementMilkingCows(BaseModel): + """ + Manure management for each type, each value is a percentage of all excreta, from 0 to 100 + """ # noqa: E501 + pasture: Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]] + anaerobic_lagoon: Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(alias="anaerobicLagoon") + sump_and_dispersal: Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(alias="sumpAndDispersal") + drain_to_paddocks: Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(alias="drainToPaddocks") + soild_storage: Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(alias="soildStorage") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["pasture", "anaerobicLagoon", "sumpAndDispersal", "drainToPaddocks", "soildStorage"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerManureManagementMilkingCows from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerManureManagementMilkingCows from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pasture": obj.get("pasture"), + "anaerobicLagoon": obj.get("anaerobicLagoon"), + "sumpAndDispersal": obj.get("sumpAndDispersal"), + "drainToPaddocks": obj.get("drainToPaddocks"), + "soildStorage": obj.get("soildStorage") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_seasonal_fertiliser.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_seasonal_fertiliser.py new file mode 100644 index 00000000..2e106946 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_seasonal_fertiliser.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_dairy_request_dairy_inner_seasonal_fertiliser_autumn import PostDairyRequestDairyInnerSeasonalFertiliserAutumn +from typing import Optional, Set +from typing_extensions import Self + +class PostDairyRequestDairyInnerSeasonalFertiliser(BaseModel): + """ + Seasonal nitrogen fertiliser use + """ # noqa: E501 + autumn: PostDairyRequestDairyInnerSeasonalFertiliserAutumn + winter: PostDairyRequestDairyInnerSeasonalFertiliserAutumn + spring: PostDairyRequestDairyInnerSeasonalFertiliserAutumn + summer: PostDairyRequestDairyInnerSeasonalFertiliserAutumn + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerSeasonalFertiliser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerSeasonalFertiliser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostDairyRequestDairyInnerSeasonalFertiliserAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostDairyRequestDairyInnerSeasonalFertiliserAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostDairyRequestDairyInnerSeasonalFertiliserAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostDairyRequestDairyInnerSeasonalFertiliserAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py new file mode 100644 index 00000000..a94bee08 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostDairyRequestDairyInnerSeasonalFertiliserAutumn(BaseModel): + """ + Nitrogen fertiliser application, each value is in kg N/ha + """ # noqa: E501 + crops_irrigated: Union[StrictFloat, StrictInt] = Field(alias="cropsIrrigated") + crops_dryland: Union[StrictFloat, StrictInt] = Field(alias="cropsDryland") + pasture_irrigated: Union[StrictFloat, StrictInt] = Field(alias="pastureIrrigated") + pasture_dryland: Union[StrictFloat, StrictInt] = Field(alias="pastureDryland") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cropsIrrigated", "cropsDryland", "pastureIrrigated", "pastureDryland"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerSeasonalFertiliserAutumn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairyRequestDairyInnerSeasonalFertiliserAutumn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cropsIrrigated": obj.get("cropsIrrigated"), + "cropsDryland": obj.get("cropsDryland"), + "pastureIrrigated": obj.get("pastureIrrigated"), + "pastureDryland": obj.get("pastureDryland") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_vegetation_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_vegetation_inner.py new file mode 100644 index 00000000..03c5cf75 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_dairy_request_vegetation_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation +from typing import Optional, Set +from typing_extensions import Self + +class PostDairyRequestVegetationInner(BaseModel): + """ + Non-productive vegetation inputs along with allocations to dairy + """ # noqa: E501 + vegetation: PostBeefRequestVegetationInnerVegetation + dairy_proportion: List[Union[StrictFloat, StrictInt]] = Field(description="The proportion of the sequestration that is allocated to dairy", alias="dairyProportion") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vegetation", "dairyProportion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDairyRequestVegetationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of vegetation + if self.vegetation: + _dict['vegetation'] = self.vegetation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDairyRequestVegetationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vegetation": PostBeefRequestVegetationInnerVegetation.from_dict(obj["vegetation"]) if obj.get("vegetation") is not None else None, + "dairyProportion": obj.get("dairyProportion") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_deer200_response.py new file mode 100644 index 00000000..78fc9588 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer200_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_buffalo200_response_scope1 import PostBuffalo200ResponseScope1 +from openapi_client.models.post_buffalo200_response_scope3 import PostBuffalo200ResponseScope3 +from openapi_client.models.post_deer200_response_intensities import PostDeer200ResponseIntensities +from openapi_client.models.post_deer200_response_intermediate_inner import PostDeer200ResponseIntermediateInner +from openapi_client.models.post_deer200_response_net import PostDeer200ResponseNet +from typing import Optional, Set +from typing_extensions import Self + +class PostDeer200Response(BaseModel): + """ + Emissions calculation output for the `deer` calculator + """ # noqa: E501 + scope1: PostBuffalo200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostBuffalo200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + net: PostDeer200ResponseNet + intensities: PostDeer200ResponseIntensities + intermediate: List[PostDeer200ResponseIntermediateInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "net", "intensities", "intermediate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeer200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeer200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostBuffalo200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostBuffalo200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "net": PostDeer200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostDeer200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "intermediate": [PostDeer200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer200_response_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_deer200_response_intensities.py new file mode 100644 index 00000000..e0d6a752 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer200_response_intensities.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostDeer200ResponseIntensities(BaseModel): + """ + PostDeer200ResponseIntensities + """ # noqa: E501 + liveweight_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Deer meat produced in kg liveweight", alias="liveweightProducedKg") + deer_meat_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Deer meat (breeding herd) excluding sequestration, in kg-CO2e/kg liveweight", alias="deerMeatExcludingSequestration") + deer_meat_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Deer meat (breeding herd) including sequestration, in kg-CO2e/kg liveweight", alias="deerMeatIncludingSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["liveweightProducedKg", "deerMeatExcludingSequestration", "deerMeatIncludingSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeer200ResponseIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeer200ResponseIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "liveweightProducedKg": obj.get("liveweightProducedKg"), + "deerMeatExcludingSequestration": obj.get("deerMeatExcludingSequestration"), + "deerMeatIncludingSequestration": obj.get("deerMeatIncludingSequestration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_deer200_response_intermediate_inner.py new file mode 100644 index 00000000..6a870d33 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer200_response_intermediate_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_buffalo200_response_scope1 import PostBuffalo200ResponseScope1 +from openapi_client.models.post_buffalo200_response_scope3 import PostBuffalo200ResponseScope3 +from openapi_client.models.post_deer200_response_intensities import PostDeer200ResponseIntensities +from openapi_client.models.post_deer200_response_net import PostDeer200ResponseNet +from typing import Optional, Set +from typing_extensions import Self + +class PostDeer200ResponseIntermediateInner(BaseModel): + """ + Intermediate emissions calculation output for the Deer calculator + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostBuffalo200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostBuffalo200ResponseScope3 + net: PostDeer200ResponseNet + intensities: PostDeer200ResponseIntensities + carbon_sequestration: PostAquaculture200ResponseIntermediateInnerCarbonSequestration = Field(alias="carbonSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "net", "intensities", "carbonSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeer200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeer200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostBuffalo200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostBuffalo200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "net": PostDeer200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostDeer200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "carbonSequestration": PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer200_response_net.py b/examples/python-api-client/api-client/openapi_client/models/post_deer200_response_net.py new file mode 100644 index 00000000..79d63263 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer200_response_net.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostDeer200ResponseNet(BaseModel): + """ + Net emissions for deer + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeer200ResponseNet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeer200ResponseNet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer_request.py b/examples/python-api-client/api-client/openapi_client/models/post_deer_request.py new file mode 100644 index 00000000..6e7ca665 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer_request.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_deer_request_deers_inner import PostDeerRequestDeersInner +from openapi_client.models.post_deer_request_vegetation_inner import PostDeerRequestVegetationInner +from typing import Optional, Set +from typing_extensions import Self + +class PostDeerRequest(BaseModel): + """ + Input data required for the `deer` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + rainfall_above600: StrictBool = Field(description="Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm", alias="rainfallAbove600") + deers: List[PostDeerRequestDeersInner] + vegetation: List[PostDeerRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "rainfallAbove600", "deers", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeerRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in deers (list) + _items = [] + if self.deers: + for _item_deers in self.deers: + if _item_deers: + _items.append(_item_deers.to_dict()) + _dict['deers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeerRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "rainfallAbove600": obj.get("rainfallAbove600"), + "deers": [PostDeerRequestDeersInner.from_dict(_item) for _item in obj["deers"]] if obj.get("deers") is not None else None, + "vegetation": [PostDeerRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner.py new file mode 100644 index 00000000..2d8ab7ca --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_beef_request_beef_inner_fertiliser import PostBeefRequestBeefInnerFertiliser +from openapi_client.models.post_deer_request_deers_inner_classes import PostDeerRequestDeersInnerClasses +from openapi_client.models.post_deer_request_deers_inner_does_fawning import PostDeerRequestDeersInnerDoesFawning +from openapi_client.models.post_deer_request_deers_inner_seasonal_fawning import PostDeerRequestDeersInnerSeasonalFawning +from typing import Optional, Set +from typing_extensions import Self + +class PostDeerRequestDeersInner(BaseModel): + """ + PostDeerRequestDeersInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + classes: PostDeerRequestDeersInnerClasses + limestone: Union[StrictFloat, StrictInt] = Field(description="Lime applied in tonnes") + limestone_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of lime as limestone vs dolomite, between 0 and 1", alias="limestoneFraction") + fertiliser: PostBeefRequestBeefInnerFertiliser + diesel: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)") + petrol: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + electricity_source: StrictStr = Field(description="Source of electricity", alias="electricitySource") + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + grain_feed: Union[StrictFloat, StrictInt] = Field(description="Grain purchased for cattle feed in tonnes", alias="grainFeed") + hay_feed: Union[StrictFloat, StrictInt] = Field(description="Hay purchased for cattle feed in tonnes", alias="hayFeed") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms)") + herbicide_other: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from other herbicides in kg (kilograms)", alias="herbicideOther") + does_fawning: PostDeerRequestDeersInnerDoesFawning = Field(alias="doesFawning") + seasonal_fawning: PostDeerRequestDeersInnerSeasonalFawning = Field(alias="seasonalFawning") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "classes", "limestone", "limestoneFraction", "fertiliser", "diesel", "petrol", "lpg", "electricitySource", "electricityRenewable", "electricityUse", "grainFeed", "hayFeed", "herbicide", "herbicideOther", "doesFawning", "seasonalFawning"] + + @field_validator('electricity_source') + def electricity_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['State Grid', 'Renewable']): + raise ValueError("must be one of enum values ('State Grid', 'Renewable')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of classes + if self.classes: + _dict['classes'] = self.classes.to_dict() + # override the default output from pydantic by calling `to_dict()` of fertiliser + if self.fertiliser: + _dict['fertiliser'] = self.fertiliser.to_dict() + # override the default output from pydantic by calling `to_dict()` of does_fawning + if self.does_fawning: + _dict['doesFawning'] = self.does_fawning.to_dict() + # override the default output from pydantic by calling `to_dict()` of seasonal_fawning + if self.seasonal_fawning: + _dict['seasonalFawning'] = self.seasonal_fawning.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "classes": PostDeerRequestDeersInnerClasses.from_dict(obj["classes"]) if obj.get("classes") is not None else None, + "limestone": obj.get("limestone"), + "limestoneFraction": obj.get("limestoneFraction"), + "fertiliser": PostBeefRequestBeefInnerFertiliser.from_dict(obj["fertiliser"]) if obj.get("fertiliser") is not None else None, + "diesel": obj.get("diesel"), + "petrol": obj.get("petrol"), + "lpg": obj.get("lpg"), + "electricitySource": obj.get("electricitySource"), + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "grainFeed": obj.get("grainFeed"), + "hayFeed": obj.get("hayFeed"), + "herbicide": obj.get("herbicide"), + "herbicideOther": obj.get("herbicideOther"), + "doesFawning": PostDeerRequestDeersInnerDoesFawning.from_dict(obj["doesFawning"]) if obj.get("doesFawning") is not None else None, + "seasonalFawning": PostDeerRequestDeersInnerSeasonalFawning.from_dict(obj["seasonalFawning"]) if obj.get("seasonalFawning") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes.py b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes.py new file mode 100644 index 00000000..576c7c46 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from openapi_client.models.post_deer_request_deers_inner_classes_breeding_does import PostDeerRequestDeersInnerClassesBreedingDoes +from openapi_client.models.post_deer_request_deers_inner_classes_bucks import PostDeerRequestDeersInnerClassesBucks +from openapi_client.models.post_deer_request_deers_inner_classes_fawn import PostDeerRequestDeersInnerClassesFawn +from openapi_client.models.post_deer_request_deers_inner_classes_other_does import PostDeerRequestDeersInnerClassesOtherDoes +from openapi_client.models.post_deer_request_deers_inner_classes_trade_bucks import PostDeerRequestDeersInnerClassesTradeBucks +from openapi_client.models.post_deer_request_deers_inner_classes_trade_does import PostDeerRequestDeersInnerClassesTradeDoes +from openapi_client.models.post_deer_request_deers_inner_classes_trade_fawn import PostDeerRequestDeersInnerClassesTradeFawn +from openapi_client.models.post_deer_request_deers_inner_classes_trade_other_does import PostDeerRequestDeersInnerClassesTradeOtherDoes +from typing import Optional, Set +from typing_extensions import Self + +class PostDeerRequestDeersInnerClasses(BaseModel): + """ + Deer classes of different types + """ # noqa: E501 + bucks: Optional[PostDeerRequestDeersInnerClassesBucks] = None + trade_bucks: Optional[PostDeerRequestDeersInnerClassesTradeBucks] = Field(default=None, alias="tradeBucks") + breeding_does: Optional[PostDeerRequestDeersInnerClassesBreedingDoes] = Field(default=None, alias="breedingDoes") + trade_does: Optional[PostDeerRequestDeersInnerClassesTradeDoes] = Field(default=None, alias="tradeDoes") + other_does: Optional[PostDeerRequestDeersInnerClassesOtherDoes] = Field(default=None, alias="otherDoes") + trade_other_does: Optional[PostDeerRequestDeersInnerClassesTradeOtherDoes] = Field(default=None, alias="tradeOtherDoes") + fawn: Optional[PostDeerRequestDeersInnerClassesFawn] = None + trade_fawn: Optional[PostDeerRequestDeersInnerClassesTradeFawn] = Field(default=None, alias="tradeFawn") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["bucks", "tradeBucks", "breedingDoes", "tradeDoes", "otherDoes", "tradeOtherDoes", "fawn", "tradeFawn"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClasses from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of bucks + if self.bucks: + _dict['bucks'] = self.bucks.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_bucks + if self.trade_bucks: + _dict['tradeBucks'] = self.trade_bucks.to_dict() + # override the default output from pydantic by calling `to_dict()` of breeding_does + if self.breeding_does: + _dict['breedingDoes'] = self.breeding_does.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_does + if self.trade_does: + _dict['tradeDoes'] = self.trade_does.to_dict() + # override the default output from pydantic by calling `to_dict()` of other_does + if self.other_does: + _dict['otherDoes'] = self.other_does.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_other_does + if self.trade_other_does: + _dict['tradeOtherDoes'] = self.trade_other_does.to_dict() + # override the default output from pydantic by calling `to_dict()` of fawn + if self.fawn: + _dict['fawn'] = self.fawn.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_fawn + if self.trade_fawn: + _dict['tradeFawn'] = self.trade_fawn.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClasses from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bucks": PostDeerRequestDeersInnerClassesBucks.from_dict(obj["bucks"]) if obj.get("bucks") is not None else None, + "tradeBucks": PostDeerRequestDeersInnerClassesTradeBucks.from_dict(obj["tradeBucks"]) if obj.get("tradeBucks") is not None else None, + "breedingDoes": PostDeerRequestDeersInnerClassesBreedingDoes.from_dict(obj["breedingDoes"]) if obj.get("breedingDoes") is not None else None, + "tradeDoes": PostDeerRequestDeersInnerClassesTradeDoes.from_dict(obj["tradeDoes"]) if obj.get("tradeDoes") is not None else None, + "otherDoes": PostDeerRequestDeersInnerClassesOtherDoes.from_dict(obj["otherDoes"]) if obj.get("otherDoes") is not None else None, + "tradeOtherDoes": PostDeerRequestDeersInnerClassesTradeOtherDoes.from_dict(obj["tradeOtherDoes"]) if obj.get("tradeOtherDoes") is not None else None, + "fawn": PostDeerRequestDeersInnerClassesFawn.from_dict(obj["fawn"]) if obj.get("fawn") is not None else None, + "tradeFawn": PostDeerRequestDeersInnerClassesTradeFawn.from_dict(obj["tradeFawn"]) if obj.get("tradeFawn") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_breeding_does.py b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_breeding_does.py new file mode 100644 index 00000000..be24e6ea --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_breeding_does.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostDeerRequestDeersInnerClassesBreedingDoes(BaseModel): + """ + Breeding does + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesBreedingDoes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesBreedingDoes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_bucks.py b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_bucks.py new file mode 100644 index 00000000..f27a1d2c --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_bucks.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostDeerRequestDeersInnerClassesBucks(BaseModel): + """ + Bucks + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesBucks from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesBucks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_fawn.py b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_fawn.py new file mode 100644 index 00000000..39abbde4 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_fawn.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostDeerRequestDeersInnerClassesFawn(BaseModel): + """ + Fawns + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesFawn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesFawn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_other_does.py b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_other_does.py new file mode 100644 index 00000000..bfbe1246 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_other_does.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostDeerRequestDeersInnerClassesOtherDoes(BaseModel): + """ + Other does + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesOtherDoes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesOtherDoes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_bucks.py b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_bucks.py new file mode 100644 index 00000000..384c629c --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_bucks.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostDeerRequestDeersInnerClassesTradeBucks(BaseModel): + """ + Trade bucks + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesTradeBucks from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesTradeBucks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_does.py b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_does.py new file mode 100644 index 00000000..daa1ae59 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_does.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostDeerRequestDeersInnerClassesTradeDoes(BaseModel): + """ + Trade does + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesTradeDoes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesTradeDoes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_fawn.py b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_fawn.py new file mode 100644 index 00000000..94e22964 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_fawn.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostDeerRequestDeersInnerClassesTradeFawn(BaseModel): + """ + Trade fawns + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesTradeFawn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesTradeFawn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_other_does.py b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_other_does.py new file mode 100644 index 00000000..254e5ff1 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_classes_trade_other_does.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostDeerRequestDeersInnerClassesTradeOtherDoes(BaseModel): + """ + Trade other does + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesTradeOtherDoes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerClassesTradeOtherDoes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_does_fawning.py b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_does_fawning.py new file mode 100644 index 00000000..09002da6 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_does_fawning.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostDeerRequestDeersInnerDoesFawning(BaseModel): + """ + Proportion of does fawning in each season, from 0 to 1 + """ # noqa: E501 + spring: Union[StrictFloat, StrictInt] + summer: Union[StrictFloat, StrictInt] + autumn: Union[StrictFloat, StrictInt] + winter: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["spring", "summer", "autumn", "winter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerDoesFawning from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerDoesFawning from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "spring": obj.get("spring"), + "summer": obj.get("summer"), + "autumn": obj.get("autumn"), + "winter": obj.get("winter") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_seasonal_fawning.py b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_seasonal_fawning.py new file mode 100644 index 00000000..6a621a9b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_deers_inner_seasonal_fawning.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostDeerRequestDeersInnerSeasonalFawning(BaseModel): + """ + Seasonal fawning rates, from 0 to 1 + """ # noqa: E501 + spring: Union[StrictFloat, StrictInt] + summer: Union[StrictFloat, StrictInt] + autumn: Union[StrictFloat, StrictInt] + winter: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["spring", "summer", "autumn", "winter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerSeasonalFawning from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeerRequestDeersInnerSeasonalFawning from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "spring": obj.get("spring"), + "summer": obj.get("summer"), + "autumn": obj.get("autumn"), + "winter": obj.get("winter") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_deer_request_vegetation_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_vegetation_inner.py new file mode 100644 index 00000000..918cd6d9 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_deer_request_vegetation_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation +from typing import Optional, Set +from typing_extensions import Self + +class PostDeerRequestVegetationInner(BaseModel): + """ + Non-productive vegetation inputs along with allocations to deer + """ # noqa: E501 + vegetation: PostBeefRequestVegetationInnerVegetation + deer_proportion: List[Union[StrictFloat, StrictInt]] = Field(description="The proportion of the sequestration that is allocated to deer", alias="deerProportion") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vegetation", "deerProportion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostDeerRequestVegetationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of vegetation + if self.vegetation: + _dict['vegetation'] = self.vegetation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostDeerRequestVegetationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vegetation": PostBeefRequestVegetationInnerVegetation.from_dict(obj["vegetation"]) if obj.get("vegetation") is not None else None, + "deerProportion": obj.get("deerProportion") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response.py new file mode 100644 index 00000000..fb5ddb38 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_feedlot200_response_intermediate_inner import PostFeedlot200ResponseIntermediateInner +from openapi_client.models.post_feedlot200_response_intermediate_inner_intensities import PostFeedlot200ResponseIntermediateInnerIntensities +from openapi_client.models.post_feedlot200_response_intermediate_inner_net import PostFeedlot200ResponseIntermediateInnerNet +from openapi_client.models.post_feedlot200_response_scope1 import PostFeedlot200ResponseScope1 +from openapi_client.models.post_feedlot200_response_scope3 import PostFeedlot200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlot200Response(BaseModel): + """ + Emissions calculation output for the `feedlot` calculator + """ # noqa: E501 + scope1: PostFeedlot200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostFeedlot200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + intermediate: List[PostFeedlot200ResponseIntermediateInner] + net: PostFeedlot200ResponseIntermediateInnerNet + intensities: PostFeedlot200ResponseIntermediateInnerIntensities + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "intermediate", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlot200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlot200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostFeedlot200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostFeedlot200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intermediate": [PostFeedlot200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None, + "net": PostFeedlot200ResponseIntermediateInnerNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostFeedlot200ResponseIntermediateInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_intermediate_inner.py new file mode 100644 index 00000000..6ac643d4 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_intermediate_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_feedlot200_response_intermediate_inner_intensities import PostFeedlot200ResponseIntermediateInnerIntensities +from openapi_client.models.post_feedlot200_response_intermediate_inner_net import PostFeedlot200ResponseIntermediateInnerNet +from openapi_client.models.post_feedlot200_response_scope1 import PostFeedlot200ResponseScope1 +from openapi_client.models.post_feedlot200_response_scope3 import PostFeedlot200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlot200ResponseIntermediateInner(BaseModel): + """ + PostFeedlot200ResponseIntermediateInner + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostFeedlot200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostFeedlot200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseIntermediateInnerCarbonSequestration = Field(alias="carbonSequestration") + net: PostFeedlot200ResponseIntermediateInnerNet + intensities: PostFeedlot200ResponseIntermediateInnerIntensities + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "carbonSequestration", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlot200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlot200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostFeedlot200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostFeedlot200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "net": PostFeedlot200ResponseIntermediateInnerNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostFeedlot200ResponseIntermediateInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..f8eec11a --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_intermediate_inner_intensities.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlot200ResponseIntermediateInnerIntensities(BaseModel): + """ + PostFeedlot200ResponseIntermediateInnerIntensities + """ # noqa: E501 + liveweight_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Amount of meat produced in kg liveweight", alias="liveweightProducedKg") + beef_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Beef including carbon sequestration, in kg-CO2e/kg liveweight", alias="beefIncludingSequestration") + beef_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Beef excluding carbon sequestration, in kg-CO2e/kg liveweight", alias="beefExcludingSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["liveweightProducedKg", "beefIncludingSequestration", "beefExcludingSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlot200ResponseIntermediateInnerIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlot200ResponseIntermediateInnerIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "liveweightProducedKg": obj.get("liveweightProducedKg"), + "beefIncludingSequestration": obj.get("beefIncludingSequestration"), + "beefExcludingSequestration": obj.get("beefExcludingSequestration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_intermediate_inner_net.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_intermediate_inner_net.py new file mode 100644 index 00000000..fb2724f8 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_intermediate_inner_net.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlot200ResponseIntermediateInnerNet(BaseModel): + """ + Net emissions for feedlot + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlot200ResponseIntermediateInnerNet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlot200ResponseIntermediateInnerNet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_scope1.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_scope1.py new file mode 100644 index 00000000..c94b7b24 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_scope1.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlot200ResponseScope1(BaseModel): + """ + Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fuel_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from fuel use, in tonnes-CO2e", alias="fuelCO2") + fuel_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from fuel use, in tonnes-CO2e", alias="fuelCH4") + fuel_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fuel use, in tonnes-CO2e", alias="fuelN2O") + transport_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from transport, in tonnes-CO2e", alias="transportCO2") + transport_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from transport, in tonnes-CO2e", alias="transportCH4") + transport_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from transport, in tonnes-CO2e", alias="transportN2O") + urea_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from urea, in tonnes-CO2e", alias="ureaCO2") + lime_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from lime, in tonnes-CO2e", alias="limeCO2") + atmospheric_deposition_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from atmospheric deposition, in tonnes-CO2e", alias="atmosphericDepositionN2O") + manure_direct_n2_o: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from manure management (direct), in tonnes-CO2e", alias="manureDirectN2O") + manure_indirect_n2_o: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from manure management (indirect), in tonnes-CO2e", alias="manureIndirectN2O") + manure_management_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from manure management, in tonnes-CO2e", alias="manureManagementCH4") + manure_applied_to_soil_n2_o: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from manure applied to soil, in tonnes-CO2e", alias="manureAppliedToSoilN2O") + enteric_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from enteric fermentation, in tonnes-CO2e", alias="entericCH4") + total_co2: Union[StrictFloat, StrictInt] = Field(description="Total CO2 scope 1 emissions, in tonnes-CO2e", alias="totalCO2") + total_ch4: Union[StrictFloat, StrictInt] = Field(description="Total CH4 scope 1 emissions, in tonnes-CO2e", alias="totalCH4") + total_n2_o: Union[StrictFloat, StrictInt] = Field(description="Total N2O scope 1 emissions, in tonnes-CO2e", alias="totalN2O") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 1 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuelCO2", "fuelCH4", "fuelN2O", "transportCO2", "transportCH4", "transportN2O", "ureaCO2", "limeCO2", "atmosphericDepositionN2O", "manureDirectN2O", "manureIndirectN2O", "manureManagementCH4", "manureAppliedToSoilN2O", "entericCH4", "totalCO2", "totalCH4", "totalN2O", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlot200ResponseScope1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlot200ResponseScope1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuelCO2": obj.get("fuelCO2"), + "fuelCH4": obj.get("fuelCH4"), + "fuelN2O": obj.get("fuelN2O"), + "transportCO2": obj.get("transportCO2"), + "transportCH4": obj.get("transportCH4"), + "transportN2O": obj.get("transportN2O"), + "ureaCO2": obj.get("ureaCO2"), + "limeCO2": obj.get("limeCO2"), + "atmosphericDepositionN2O": obj.get("atmosphericDepositionN2O"), + "manureDirectN2O": obj.get("manureDirectN2O"), + "manureIndirectN2O": obj.get("manureIndirectN2O"), + "manureManagementCH4": obj.get("manureManagementCH4"), + "manureAppliedToSoilN2O": obj.get("manureAppliedToSoilN2O"), + "entericCH4": obj.get("entericCH4"), + "totalCO2": obj.get("totalCO2"), + "totalCH4": obj.get("totalCH4"), + "totalN2O": obj.get("totalN2O"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_scope3.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_scope3.py new file mode 100644 index 00000000..56c44797 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot200_response_scope3.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlot200ResponseScope3(BaseModel): + """ + Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fertiliser: Union[StrictFloat, StrictInt] = Field(description="Emissions from fertiliser, in tonnes-CO2e") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Emissions from herbicide, in tonnes-CO2e") + electricity: Union[StrictFloat, StrictInt] = Field(description="Emissions from electricity, in tonnes-CO2e") + fuel: Union[StrictFloat, StrictInt] = Field(description="Emissions from fuel, in tonnes-CO2e") + lime: Union[StrictFloat, StrictInt] = Field(description="Emissions from lime, in tonnes-CO2e") + feed: Union[StrictFloat, StrictInt] = Field(description="Emissions from feed, in tonnes-CO2e") + purchase_livestock: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased livestock, in tonnes-CO2e", alias="purchaseLivestock") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 3 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fertiliser", "herbicide", "electricity", "fuel", "lime", "feed", "purchaseLivestock", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlot200ResponseScope3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlot200ResponseScope3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fertiliser": obj.get("fertiliser"), + "herbicide": obj.get("herbicide"), + "electricity": obj.get("electricity"), + "fuel": obj.get("fuel"), + "lime": obj.get("lime"), + "feed": obj.get("feed"), + "purchaseLivestock": obj.get("purchaseLivestock"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request.py new file mode 100644 index 00000000..48d803c0 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_feedlot_request_feedlots_inner import PostFeedlotRequestFeedlotsInner +from openapi_client.models.post_feedlot_request_vegetation_inner import PostFeedlotRequestVegetationInner +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlotRequest(BaseModel): + """ + Input data required for the `feedlot` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + feedlots: List[PostFeedlotRequestFeedlotsInner] + vegetation: List[PostFeedlotRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "feedlots", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlotRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in feedlots (list) + _items = [] + if self.feedlots: + for _item_feedlots in self.feedlots: + if _item_feedlots: + _items.append(_item_feedlots.to_dict()) + _dict['feedlots'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlotRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "feedlots": [PostFeedlotRequestFeedlotsInner.from_dict(_item) for _item in obj["feedlots"]] if obj.get("feedlots") is not None else None, + "vegetation": [PostFeedlotRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner.py new file mode 100644 index 00000000..82aa5423 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_beef_request_beef_inner_fertiliser import PostBeefRequestBeefInnerFertiliser +from openapi_client.models.post_feedlot_request_feedlots_inner_groups_inner import PostFeedlotRequestFeedlotsInnerGroupsInner +from openapi_client.models.post_feedlot_request_feedlots_inner_purchases import PostFeedlotRequestFeedlotsInnerPurchases +from openapi_client.models.post_feedlot_request_feedlots_inner_sales import PostFeedlotRequestFeedlotsInnerSales +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlotRequestFeedlotsInner(BaseModel): + """ + All fields needed to describe the activity of a single feedlot enterprise + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the feedlot enterprise") + system: StrictStr = Field(description="Type of feedlot/production system") + groups: List[PostFeedlotRequestFeedlotsInnerGroupsInner] + fertiliser: PostBeefRequestBeefInnerFertiliser + purchases: PostFeedlotRequestFeedlotsInnerPurchases + sales: PostFeedlotRequestFeedlotsInnerSales + diesel: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)") + petrol: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + electricity_source: StrictStr = Field(description="Source of electricity", alias="electricitySource") + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + grain_feed: Union[StrictFloat, StrictInt] = Field(description="Grain purchased for cattle feed in tonnes", alias="grainFeed") + hay_feed: Union[StrictFloat, StrictInt] = Field(description="Hay purchased for cattle feed in tonnes", alias="hayFeed") + cottonseed_feed: Union[StrictFloat, StrictInt] = Field(description="Cotton seed purchased for cattle feed in tonnes", alias="cottonseedFeed") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms)") + herbicide_other: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from other herbicides in kg (kilograms)", alias="herbicideOther") + distance_cattle_transported: Union[StrictFloat, StrictInt] = Field(description="Distance cattle are transported to farm, in km (kilometres)", alias="distanceCattleTransported") + truck_type: StrictStr = Field(description="Type of truck used for cattle transport", alias="truckType") + limestone: Union[StrictFloat, StrictInt] = Field(description="Lime applied in tonnes") + limestone_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of lime as limestone vs dolomite, between 0 and 1", alias="limestoneFraction") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "system", "groups", "fertiliser", "purchases", "sales", "diesel", "petrol", "lpg", "electricitySource", "electricityRenewable", "electricityUse", "grainFeed", "hayFeed", "cottonseedFeed", "herbicide", "herbicideOther", "distanceCattleTransported", "truckType", "limestone", "limestoneFraction"] + + @field_validator('system') + def system_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Drylot', 'Solid Storage', 'Composting', 'Uncovered anaerobic lagoon']): + raise ValueError("must be one of enum values ('Drylot', 'Solid Storage', 'Composting', 'Uncovered anaerobic lagoon')") + return value + + @field_validator('electricity_source') + def electricity_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['State Grid', 'Renewable']): + raise ValueError("must be one of enum values ('State Grid', 'Renewable')") + return value + + @field_validator('truck_type') + def truck_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['4 Deck Trailer', '6 Deck Trailer', 'B-Double']): + raise ValueError("must be one of enum values ('4 Deck Trailer', '6 Deck Trailer', 'B-Double')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlotRequestFeedlotsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in groups (list) + _items = [] + if self.groups: + for _item_groups in self.groups: + if _item_groups: + _items.append(_item_groups.to_dict()) + _dict['groups'] = _items + # override the default output from pydantic by calling `to_dict()` of fertiliser + if self.fertiliser: + _dict['fertiliser'] = self.fertiliser.to_dict() + # override the default output from pydantic by calling `to_dict()` of purchases + if self.purchases: + _dict['purchases'] = self.purchases.to_dict() + # override the default output from pydantic by calling `to_dict()` of sales + if self.sales: + _dict['sales'] = self.sales.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlotRequestFeedlotsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "system": obj.get("system"), + "groups": [PostFeedlotRequestFeedlotsInnerGroupsInner.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None, + "fertiliser": PostBeefRequestBeefInnerFertiliser.from_dict(obj["fertiliser"]) if obj.get("fertiliser") is not None else None, + "purchases": PostFeedlotRequestFeedlotsInnerPurchases.from_dict(obj["purchases"]) if obj.get("purchases") is not None else None, + "sales": PostFeedlotRequestFeedlotsInnerSales.from_dict(obj["sales"]) if obj.get("sales") is not None else None, + "diesel": obj.get("diesel"), + "petrol": obj.get("petrol"), + "lpg": obj.get("lpg"), + "electricitySource": obj.get("electricitySource"), + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "grainFeed": obj.get("grainFeed"), + "hayFeed": obj.get("hayFeed"), + "cottonseedFeed": obj.get("cottonseedFeed"), + "herbicide": obj.get("herbicide"), + "herbicideOther": obj.get("herbicideOther"), + "distanceCattleTransported": obj.get("distanceCattleTransported"), + "truckType": obj.get("truckType"), + "limestone": obj.get("limestone"), + "limestoneFraction": obj.get("limestoneFraction") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_groups_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_groups_inner.py new file mode 100644 index 00000000..64121073 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_groups_inner.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_feedlot_request_feedlots_inner_groups_inner_stays_inner import PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlotRequestFeedlotsInnerGroupsInner(BaseModel): + """ + PostFeedlotRequestFeedlotsInnerGroupsInner + """ # noqa: E501 + stays: List[PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["stays"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlotRequestFeedlotsInnerGroupsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in stays (list) + _items = [] + if self.stays: + for _item_stays in self.stays: + if _item_stays: + _items.append(_item_stays.to_dict()) + _dict['stays'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlotRequestFeedlotsInnerGroupsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "stays": [PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.from_dict(_item) for _item in obj["stays"]] if obj.get("stays") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py new file mode 100644 index 00000000..e080e97b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner(BaseModel): + """ + A class of cattle with a specific feedlot stay duration + """ # noqa: E501 + livestock: Union[StrictFloat, StrictInt] = Field(description="Number of animals (head)") + stay_average_duration: Union[StrictFloat, StrictInt] = Field(description="Average stay length in feedlot, in days", alias="stayAverageDuration") + liveweight: Union[StrictFloat, StrictInt] = Field(description="Average liveweight of animals in kg/head (kilogram per head)") + dry_matter_digestibility: Union[StrictFloat, StrictInt] = Field(description="Percent dry matter digestibility of the feed eaten, from 0 to 100", alias="dryMatterDigestibility") + crude_protein: Union[StrictFloat, StrictInt] = Field(description="Percent crude protein of the whole diet, from 0 to 100", alias="crudeProtein") + nitrogen_retention: Union[StrictFloat, StrictInt] = Field(description="Percent nitrogen retention of intake, from 0 to 100", alias="nitrogenRetention") + daily_intake: Union[StrictFloat, StrictInt] = Field(description="Daily intake of dry matter in kilograms per head per day", alias="dailyIntake") + ndf: Union[StrictFloat, StrictInt] = Field(description="Percent Neutral detergent fibre (NDF) of intake, from 0 to 100") + ether_extract: Union[StrictFloat, StrictInt] = Field(description="Percent ether extract of intake, from 0 to 100", alias="etherExtract") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["livestock", "stayAverageDuration", "liveweight", "dryMatterDigestibility", "crudeProtein", "nitrogenRetention", "dailyIntake", "ndf", "etherExtract"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "livestock": obj.get("livestock"), + "stayAverageDuration": obj.get("stayAverageDuration"), + "liveweight": obj.get("liveweight"), + "dryMatterDigestibility": obj.get("dryMatterDigestibility"), + "crudeProtein": obj.get("crudeProtein"), + "nitrogenRetention": obj.get("nitrogenRetention"), + "dailyIntake": obj.get("dailyIntake"), + "ndf": obj.get("ndf"), + "etherExtract": obj.get("etherExtract") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_purchases.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_purchases.py new file mode 100644 index 00000000..6deac44f --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_purchases.py @@ -0,0 +1,244 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from openapi_client.models.post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlotRequestFeedlotsInnerPurchases(BaseModel): + """ + Note: passing a single `FeedlotPurchase` for each class is now deprecated, please pass an array (`FeedlotPurchases[]`) instead + """ # noqa: E501 + bulls_gt1: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for bulls whose age is greater than 1 year old", alias="bullsGt1") + bulls_gt1_traded: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for traded bulls whose age is greater than 1 year old", alias="bullsGt1Traded") + steers_lt1: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for Steers whose age is less than 1 year old", alias="steersLt1") + steers_lt1_traded: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for traded Steers whose age is less than 1 year old", alias="steersLt1Traded") + steers1_to2: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for Steers whose age is between 1 and 2 years old", alias="steers1To2") + steers1_to2_traded: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for traded Steers whose age is between 1 and 2 years old", alias="steers1To2Traded") + steers_gt2: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for Steers whose age is greater than 2 years old", alias="steersGt2") + steers_gt2_traded: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for traded Steers whose age is greater than 2 years old", alias="steersGt2Traded") + cows_gt2: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for Cows whose age is greater than 2 years old", alias="cowsGt2") + cows_gt2_traded: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for traded Cows whose age is greater than 2 years old", alias="cowsGt2Traded") + heifers_lt1: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for Heifers whose age is less than 1 year old", alias="heifersLt1") + heifers_lt1_traded: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for traded Heifers whose age is less than 1 year old", alias="heifersLt1Traded") + heifers1_to2: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for Heifers whose age is between 1 and 2 years old", alias="heifers1To2") + heifers1_to2_traded: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for traded Heifers whose age is between 1 and 2 years old", alias="heifers1To2Traded") + heifers_gt2: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for Heifers whose age is greater than 2 years old", alias="heifersGt2") + heifers_gt2_traded: Optional[List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]] = Field(default=None, description="Livestock purchases for traded Heifers whose age is greater than 2 years old", alias="heifersGt2Traded") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["bullsGt1", "bullsGt1Traded", "steersLt1", "steersLt1Traded", "steers1To2", "steers1To2Traded", "steersGt2", "steersGt2Traded", "cowsGt2", "cowsGt2Traded", "heifersLt1", "heifersLt1Traded", "heifers1To2", "heifers1To2Traded", "heifersGt2", "heifersGt2Traded"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlotRequestFeedlotsInnerPurchases from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in bulls_gt1 (list) + _items = [] + if self.bulls_gt1: + for _item_bulls_gt1 in self.bulls_gt1: + if _item_bulls_gt1: + _items.append(_item_bulls_gt1.to_dict()) + _dict['bullsGt1'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in bulls_gt1_traded (list) + _items = [] + if self.bulls_gt1_traded: + for _item_bulls_gt1_traded in self.bulls_gt1_traded: + if _item_bulls_gt1_traded: + _items.append(_item_bulls_gt1_traded.to_dict()) + _dict['bullsGt1Traded'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in steers_lt1 (list) + _items = [] + if self.steers_lt1: + for _item_steers_lt1 in self.steers_lt1: + if _item_steers_lt1: + _items.append(_item_steers_lt1.to_dict()) + _dict['steersLt1'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in steers_lt1_traded (list) + _items = [] + if self.steers_lt1_traded: + for _item_steers_lt1_traded in self.steers_lt1_traded: + if _item_steers_lt1_traded: + _items.append(_item_steers_lt1_traded.to_dict()) + _dict['steersLt1Traded'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in steers1_to2 (list) + _items = [] + if self.steers1_to2: + for _item_steers1_to2 in self.steers1_to2: + if _item_steers1_to2: + _items.append(_item_steers1_to2.to_dict()) + _dict['steers1To2'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in steers1_to2_traded (list) + _items = [] + if self.steers1_to2_traded: + for _item_steers1_to2_traded in self.steers1_to2_traded: + if _item_steers1_to2_traded: + _items.append(_item_steers1_to2_traded.to_dict()) + _dict['steers1To2Traded'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in steers_gt2 (list) + _items = [] + if self.steers_gt2: + for _item_steers_gt2 in self.steers_gt2: + if _item_steers_gt2: + _items.append(_item_steers_gt2.to_dict()) + _dict['steersGt2'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in steers_gt2_traded (list) + _items = [] + if self.steers_gt2_traded: + for _item_steers_gt2_traded in self.steers_gt2_traded: + if _item_steers_gt2_traded: + _items.append(_item_steers_gt2_traded.to_dict()) + _dict['steersGt2Traded'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in cows_gt2 (list) + _items = [] + if self.cows_gt2: + for _item_cows_gt2 in self.cows_gt2: + if _item_cows_gt2: + _items.append(_item_cows_gt2.to_dict()) + _dict['cowsGt2'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in cows_gt2_traded (list) + _items = [] + if self.cows_gt2_traded: + for _item_cows_gt2_traded in self.cows_gt2_traded: + if _item_cows_gt2_traded: + _items.append(_item_cows_gt2_traded.to_dict()) + _dict['cowsGt2Traded'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in heifers_lt1 (list) + _items = [] + if self.heifers_lt1: + for _item_heifers_lt1 in self.heifers_lt1: + if _item_heifers_lt1: + _items.append(_item_heifers_lt1.to_dict()) + _dict['heifersLt1'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in heifers_lt1_traded (list) + _items = [] + if self.heifers_lt1_traded: + for _item_heifers_lt1_traded in self.heifers_lt1_traded: + if _item_heifers_lt1_traded: + _items.append(_item_heifers_lt1_traded.to_dict()) + _dict['heifersLt1Traded'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in heifers1_to2 (list) + _items = [] + if self.heifers1_to2: + for _item_heifers1_to2 in self.heifers1_to2: + if _item_heifers1_to2: + _items.append(_item_heifers1_to2.to_dict()) + _dict['heifers1To2'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in heifers1_to2_traded (list) + _items = [] + if self.heifers1_to2_traded: + for _item_heifers1_to2_traded in self.heifers1_to2_traded: + if _item_heifers1_to2_traded: + _items.append(_item_heifers1_to2_traded.to_dict()) + _dict['heifers1To2Traded'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in heifers_gt2 (list) + _items = [] + if self.heifers_gt2: + for _item_heifers_gt2 in self.heifers_gt2: + if _item_heifers_gt2: + _items.append(_item_heifers_gt2.to_dict()) + _dict['heifersGt2'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in heifers_gt2_traded (list) + _items = [] + if self.heifers_gt2_traded: + for _item_heifers_gt2_traded in self.heifers_gt2_traded: + if _item_heifers_gt2_traded: + _items.append(_item_heifers_gt2_traded.to_dict()) + _dict['heifersGt2Traded'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlotRequestFeedlotsInnerPurchases from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bullsGt1": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["bullsGt1"]] if obj.get("bullsGt1") is not None else None, + "bullsGt1Traded": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["bullsGt1Traded"]] if obj.get("bullsGt1Traded") is not None else None, + "steersLt1": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["steersLt1"]] if obj.get("steersLt1") is not None else None, + "steersLt1Traded": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["steersLt1Traded"]] if obj.get("steersLt1Traded") is not None else None, + "steers1To2": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["steers1To2"]] if obj.get("steers1To2") is not None else None, + "steers1To2Traded": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["steers1To2Traded"]] if obj.get("steers1To2Traded") is not None else None, + "steersGt2": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["steersGt2"]] if obj.get("steersGt2") is not None else None, + "steersGt2Traded": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["steersGt2Traded"]] if obj.get("steersGt2Traded") is not None else None, + "cowsGt2": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["cowsGt2"]] if obj.get("cowsGt2") is not None else None, + "cowsGt2Traded": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["cowsGt2Traded"]] if obj.get("cowsGt2Traded") is not None else None, + "heifersLt1": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["heifersLt1"]] if obj.get("heifersLt1") is not None else None, + "heifersLt1Traded": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["heifersLt1Traded"]] if obj.get("heifersLt1Traded") is not None else None, + "heifers1To2": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["heifers1To2"]] if obj.get("heifers1To2") is not None else None, + "heifers1To2Traded": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["heifers1To2Traded"]] if obj.get("heifers1To2Traded") is not None else None, + "heifersGt2": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["heifersGt2"]] if obj.get("heifersGt2") is not None else None, + "heifersGt2Traded": [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(_item) for _item in obj["heifersGt2Traded"]] if obj.get("heifersGt2Traded") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py new file mode 100644 index 00000000..a9a5af82 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner(BaseModel): + """ + PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner + """ # noqa: E501 + head: Union[StrictFloat, StrictInt] = Field(description="Number of animals purchased (head)") + purchase_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at purchase, in liveweight kg/head (kilogram per head)", alias="purchaseWeight") + purchase_source: StrictStr = Field(description="Source location of trading cattle purchases", alias="purchaseSource") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["head", "purchaseWeight", "purchaseSource"] + + @field_validator('purchase_source') + def purchase_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['NT', 'nth QLD', 'sth/central QLD', 'nth NSW', 'sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS']): + raise ValueError("must be one of enum values ('NT', 'nth QLD', 'sth/central QLD', 'nth NSW', 'sth NSW/VIC/sth SA', 'NSW/SA pastoral zone', 'sw WA', 'WA pastoral', 'TAS')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "head": obj.get("head"), + "purchaseWeight": obj.get("purchaseWeight"), + "purchaseSource": obj.get("purchaseSource") if obj.get("purchaseSource") is not None else 'sth NSW/VIC/sth SA' + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_sales.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_sales.py new file mode 100644 index 00000000..17886fd7 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_sales.py @@ -0,0 +1,244 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlotRequestFeedlotsInnerSales(BaseModel): + """ + Note: passing a single `FeedlotSale` for each class is now deprecated, please pass an array (`FeedlotSales[]`) instead + """ # noqa: E501 + bulls_gt1: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for bulls whose age is greater than 1 year old", alias="bullsGt1") + bulls_gt1_traded: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for traded bulls whose age is greater than 1 year old", alias="bullsGt1Traded") + steers_lt1: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for Steers whose age is less than 1 year old", alias="steersLt1") + steers_lt1_traded: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for traded Steers whose age is less than 1 year old", alias="steersLt1Traded") + steers1_to2: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for Steers whose age is between 1 and 2 years old", alias="steers1To2") + steers1_to2_traded: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for traded Steers whose age is between 1 and 2 years old", alias="steers1To2Traded") + steers_gt2: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for Steers whose age is greater than 2 years old", alias="steersGt2") + steers_gt2_traded: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for traded Steers whose age is greater than 2 years old", alias="steersGt2Traded") + cows_gt2: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for Cows whose age is greater than 2 years old", alias="cowsGt2") + cows_gt2_traded: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for traded Cows whose age is greater than 2 years old", alias="cowsGt2Traded") + heifers_lt1: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for Heifers whose age is less than 1 year old", alias="heifersLt1") + heifers_lt1_traded: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for traded Heifers whose age is less than 1 year old", alias="heifersLt1Traded") + heifers1_to2: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for Heifers whose age is between 1 and 2 years old", alias="heifers1To2") + heifers1_to2_traded: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for traded Heifers whose age is between 1 and 2 years old", alias="heifers1To2Traded") + heifers_gt2: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for Heifers whose age is greater than 2 years old", alias="heifersGt2") + heifers_gt2_traded: List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner] = Field(description="Livestock sales for traded Heifers whose age is greater than 2 years old", alias="heifersGt2Traded") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["bullsGt1", "bullsGt1Traded", "steersLt1", "steersLt1Traded", "steers1To2", "steers1To2Traded", "steersGt2", "steersGt2Traded", "cowsGt2", "cowsGt2Traded", "heifersLt1", "heifersLt1Traded", "heifers1To2", "heifers1To2Traded", "heifersGt2", "heifersGt2Traded"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlotRequestFeedlotsInnerSales from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in bulls_gt1 (list) + _items = [] + if self.bulls_gt1: + for _item_bulls_gt1 in self.bulls_gt1: + if _item_bulls_gt1: + _items.append(_item_bulls_gt1.to_dict()) + _dict['bullsGt1'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in bulls_gt1_traded (list) + _items = [] + if self.bulls_gt1_traded: + for _item_bulls_gt1_traded in self.bulls_gt1_traded: + if _item_bulls_gt1_traded: + _items.append(_item_bulls_gt1_traded.to_dict()) + _dict['bullsGt1Traded'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in steers_lt1 (list) + _items = [] + if self.steers_lt1: + for _item_steers_lt1 in self.steers_lt1: + if _item_steers_lt1: + _items.append(_item_steers_lt1.to_dict()) + _dict['steersLt1'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in steers_lt1_traded (list) + _items = [] + if self.steers_lt1_traded: + for _item_steers_lt1_traded in self.steers_lt1_traded: + if _item_steers_lt1_traded: + _items.append(_item_steers_lt1_traded.to_dict()) + _dict['steersLt1Traded'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in steers1_to2 (list) + _items = [] + if self.steers1_to2: + for _item_steers1_to2 in self.steers1_to2: + if _item_steers1_to2: + _items.append(_item_steers1_to2.to_dict()) + _dict['steers1To2'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in steers1_to2_traded (list) + _items = [] + if self.steers1_to2_traded: + for _item_steers1_to2_traded in self.steers1_to2_traded: + if _item_steers1_to2_traded: + _items.append(_item_steers1_to2_traded.to_dict()) + _dict['steers1To2Traded'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in steers_gt2 (list) + _items = [] + if self.steers_gt2: + for _item_steers_gt2 in self.steers_gt2: + if _item_steers_gt2: + _items.append(_item_steers_gt2.to_dict()) + _dict['steersGt2'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in steers_gt2_traded (list) + _items = [] + if self.steers_gt2_traded: + for _item_steers_gt2_traded in self.steers_gt2_traded: + if _item_steers_gt2_traded: + _items.append(_item_steers_gt2_traded.to_dict()) + _dict['steersGt2Traded'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in cows_gt2 (list) + _items = [] + if self.cows_gt2: + for _item_cows_gt2 in self.cows_gt2: + if _item_cows_gt2: + _items.append(_item_cows_gt2.to_dict()) + _dict['cowsGt2'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in cows_gt2_traded (list) + _items = [] + if self.cows_gt2_traded: + for _item_cows_gt2_traded in self.cows_gt2_traded: + if _item_cows_gt2_traded: + _items.append(_item_cows_gt2_traded.to_dict()) + _dict['cowsGt2Traded'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in heifers_lt1 (list) + _items = [] + if self.heifers_lt1: + for _item_heifers_lt1 in self.heifers_lt1: + if _item_heifers_lt1: + _items.append(_item_heifers_lt1.to_dict()) + _dict['heifersLt1'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in heifers_lt1_traded (list) + _items = [] + if self.heifers_lt1_traded: + for _item_heifers_lt1_traded in self.heifers_lt1_traded: + if _item_heifers_lt1_traded: + _items.append(_item_heifers_lt1_traded.to_dict()) + _dict['heifersLt1Traded'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in heifers1_to2 (list) + _items = [] + if self.heifers1_to2: + for _item_heifers1_to2 in self.heifers1_to2: + if _item_heifers1_to2: + _items.append(_item_heifers1_to2.to_dict()) + _dict['heifers1To2'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in heifers1_to2_traded (list) + _items = [] + if self.heifers1_to2_traded: + for _item_heifers1_to2_traded in self.heifers1_to2_traded: + if _item_heifers1_to2_traded: + _items.append(_item_heifers1_to2_traded.to_dict()) + _dict['heifers1To2Traded'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in heifers_gt2 (list) + _items = [] + if self.heifers_gt2: + for _item_heifers_gt2 in self.heifers_gt2: + if _item_heifers_gt2: + _items.append(_item_heifers_gt2.to_dict()) + _dict['heifersGt2'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in heifers_gt2_traded (list) + _items = [] + if self.heifers_gt2_traded: + for _item_heifers_gt2_traded in self.heifers_gt2_traded: + if _item_heifers_gt2_traded: + _items.append(_item_heifers_gt2_traded.to_dict()) + _dict['heifersGt2Traded'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlotRequestFeedlotsInnerSales from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bullsGt1": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["bullsGt1"]] if obj.get("bullsGt1") is not None else None, + "bullsGt1Traded": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["bullsGt1Traded"]] if obj.get("bullsGt1Traded") is not None else None, + "steersLt1": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["steersLt1"]] if obj.get("steersLt1") is not None else None, + "steersLt1Traded": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["steersLt1Traded"]] if obj.get("steersLt1Traded") is not None else None, + "steers1To2": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["steers1To2"]] if obj.get("steers1To2") is not None else None, + "steers1To2Traded": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["steers1To2Traded"]] if obj.get("steers1To2Traded") is not None else None, + "steersGt2": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["steersGt2"]] if obj.get("steersGt2") is not None else None, + "steersGt2Traded": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["steersGt2Traded"]] if obj.get("steersGt2Traded") is not None else None, + "cowsGt2": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["cowsGt2"]] if obj.get("cowsGt2") is not None else None, + "cowsGt2Traded": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["cowsGt2Traded"]] if obj.get("cowsGt2Traded") is not None else None, + "heifersLt1": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["heifersLt1"]] if obj.get("heifersLt1") is not None else None, + "heifersLt1Traded": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["heifersLt1Traded"]] if obj.get("heifersLt1Traded") is not None else None, + "heifers1To2": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["heifers1To2"]] if obj.get("heifers1To2") is not None else None, + "heifers1To2Traded": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["heifers1To2Traded"]] if obj.get("heifers1To2Traded") is not None else None, + "heifersGt2": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["heifersGt2"]] if obj.get("heifersGt2") is not None else None, + "heifersGt2Traded": [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(_item) for _item in obj["heifersGt2Traded"]] if obj.get("heifersGt2Traded") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py new file mode 100644 index 00000000..ee1438c4 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner(BaseModel): + """ + PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner + """ # noqa: E501 + head: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["head", "saleWeight"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "head": obj.get("head"), + "saleWeight": obj.get("saleWeight") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_vegetation_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_vegetation_inner.py new file mode 100644 index 00000000..d17cb658 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_feedlot_request_vegetation_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation +from typing import Optional, Set +from typing_extensions import Self + +class PostFeedlotRequestVegetationInner(BaseModel): + """ + PostFeedlotRequestVegetationInner + """ # noqa: E501 + vegetation: PostBeefRequestVegetationInnerVegetation + feedlot_proportion: List[Union[StrictFloat, StrictInt]] = Field(alias="feedlotProportion") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vegetation", "feedlotProportion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFeedlotRequestVegetationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of vegetation + if self.vegetation: + _dict['vegetation'] = self.vegetation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostFeedlotRequestVegetationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vegetation": PostBeefRequestVegetationInnerVegetation.from_dict(obj["vegetation"]) if obj.get("vegetation") is not None else None, + "feedlotProportion": obj.get("feedlotProportion") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_goat200_response.py new file mode 100644 index 00000000..d332c27e --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat200_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 +from openapi_client.models.post_buffalo200_response_scope1 import PostBuffalo200ResponseScope1 +from openapi_client.models.post_goat200_response_intensities import PostGoat200ResponseIntensities +from openapi_client.models.post_goat200_response_intermediate_inner import PostGoat200ResponseIntermediateInner +from openapi_client.models.post_goat200_response_net import PostGoat200ResponseNet +from typing import Optional, Set +from typing_extensions import Self + +class PostGoat200Response(BaseModel): + """ + Emissions calculation output for the `goat` calculator + """ # noqa: E501 + scope1: PostBuffalo200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostBeef200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + net: PostGoat200ResponseNet + intensities: PostGoat200ResponseIntensities + intermediate: List[PostGoat200ResponseIntermediateInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "net", "intensities", "intermediate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoat200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoat200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostBuffalo200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostBeef200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "net": PostGoat200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostGoat200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "intermediate": [PostGoat200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat200_response_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_goat200_response_intensities.py new file mode 100644 index 00000000..0bd59999 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat200_response_intensities.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostGoat200ResponseIntensities(BaseModel): + """ + PostGoat200ResponseIntensities + """ # noqa: E501 + amount_meat_produced: Union[StrictFloat, StrictInt] = Field(description="Amount of goat meat produced in kg liveweight", alias="amountMeatProduced") + amount_wool_produced: Union[StrictFloat, StrictInt] = Field(description="Amount of wool produced in kg greasy", alias="amountWoolProduced") + goat_meat_breeding_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Goat meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight", alias="goatMeatBreedingIncludingSequestration") + goat_meat_breeding_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Goat meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight", alias="goatMeatBreedingExcludingSequestration") + wool_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Wool production including carbon sequestration, in kg-CO2e/kg greasy", alias="woolIncludingSequestration") + wool_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Wool production excluding carbon sequestration, in kg-CO2e/kg greasy", alias="woolExcludingSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["amountMeatProduced", "amountWoolProduced", "goatMeatBreedingIncludingSequestration", "goatMeatBreedingExcludingSequestration", "woolIncludingSequestration", "woolExcludingSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoat200ResponseIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoat200ResponseIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amountMeatProduced": obj.get("amountMeatProduced"), + "amountWoolProduced": obj.get("amountWoolProduced"), + "goatMeatBreedingIncludingSequestration": obj.get("goatMeatBreedingIncludingSequestration"), + "goatMeatBreedingExcludingSequestration": obj.get("goatMeatBreedingExcludingSequestration"), + "woolIncludingSequestration": obj.get("woolIncludingSequestration"), + "woolExcludingSequestration": obj.get("woolExcludingSequestration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_goat200_response_intermediate_inner.py new file mode 100644 index 00000000..f7c20c9b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat200_response_intermediate_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 +from openapi_client.models.post_buffalo200_response_scope1 import PostBuffalo200ResponseScope1 +from openapi_client.models.post_goat200_response_intensities import PostGoat200ResponseIntensities +from openapi_client.models.post_goat200_response_net import PostGoat200ResponseNet +from typing import Optional, Set +from typing_extensions import Self + +class PostGoat200ResponseIntermediateInner(BaseModel): + """ + Intermediate emissions calculation output for the Goat calculator + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostBuffalo200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostBeef200ResponseScope3 + net: PostGoat200ResponseNet + intensities: PostGoat200ResponseIntensities + carbon_sequestration: PostAquaculture200ResponseIntermediateInnerCarbonSequestration = Field(alias="carbonSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "net", "intensities", "carbonSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoat200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoat200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostBuffalo200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostBeef200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "net": PostGoat200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostGoat200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "carbonSequestration": PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat200_response_net.py b/examples/python-api-client/api-client/openapi_client/models/post_goat200_response_net.py new file mode 100644 index 00000000..af2eeb64 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat200_response_net.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostGoat200ResponseNet(BaseModel): + """ + Net emissions for goat + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoat200ResponseNet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoat200ResponseNet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request.py new file mode 100644 index 00000000..ee61a08a --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_goat_request_goats_inner import PostGoatRequestGoatsInner +from openapi_client.models.post_goat_request_vegetation_inner import PostGoatRequestVegetationInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequest(BaseModel): + """ + Input data required for the `goat` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + rainfall_above600: StrictBool = Field(description="Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm", alias="rainfallAbove600") + goats: List[PostGoatRequestGoatsInner] + vegetation: List[PostGoatRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "rainfallAbove600", "goats", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in goats (list) + _items = [] + if self.goats: + for _item_goats in self.goats: + if _item_goats: + _items.append(_item_goats.to_dict()) + _dict['goats'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "rainfallAbove600": obj.get("rainfallAbove600"), + "goats": [PostGoatRequestGoatsInner.from_dict(_item) for _item in obj["goats"]] if obj.get("goats") is not None else None, + "vegetation": [PostGoatRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner.py new file mode 100644 index 00000000..d3499107 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_beef_request_beef_inner_fertiliser import PostBeefRequestBeefInnerFertiliser +from openapi_client.models.post_beef_request_beef_inner_mineral_supplementation import PostBeefRequestBeefInnerMineralSupplementation +from openapi_client.models.post_goat_request_goats_inner_classes import PostGoatRequestGoatsInnerClasses +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInner(BaseModel): + """ + PostGoatRequestGoatsInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + classes: PostGoatRequestGoatsInnerClasses + limestone: Union[StrictFloat, StrictInt] = Field(description="Lime applied in tonnes") + limestone_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of lime as limestone vs dolomite, between 0 and 1", alias="limestoneFraction") + fertiliser: PostBeefRequestBeefInnerFertiliser + diesel: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)") + petrol: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + mineral_supplementation: PostBeefRequestBeefInnerMineralSupplementation = Field(alias="mineralSupplementation") + electricity_source: StrictStr = Field(description="Source of electricity", alias="electricitySource") + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + grain_feed: Union[StrictFloat, StrictInt] = Field(description="Grain purchased for cattle feed in tonnes", alias="grainFeed") + hay_feed: Union[StrictFloat, StrictInt] = Field(description="Hay purchased for cattle feed in tonnes", alias="hayFeed") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms)") + herbicide_other: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from other herbicides in kg (kilograms)", alias="herbicideOther") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "classes", "limestone", "limestoneFraction", "fertiliser", "diesel", "petrol", "lpg", "mineralSupplementation", "electricitySource", "electricityRenewable", "electricityUse", "grainFeed", "hayFeed", "herbicide", "herbicideOther"] + + @field_validator('electricity_source') + def electricity_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['State Grid', 'Renewable']): + raise ValueError("must be one of enum values ('State Grid', 'Renewable')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of classes + if self.classes: + _dict['classes'] = self.classes.to_dict() + # override the default output from pydantic by calling `to_dict()` of fertiliser + if self.fertiliser: + _dict['fertiliser'] = self.fertiliser.to_dict() + # override the default output from pydantic by calling `to_dict()` of mineral_supplementation + if self.mineral_supplementation: + _dict['mineralSupplementation'] = self.mineral_supplementation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "classes": PostGoatRequestGoatsInnerClasses.from_dict(obj["classes"]) if obj.get("classes") is not None else None, + "limestone": obj.get("limestone"), + "limestoneFraction": obj.get("limestoneFraction"), + "fertiliser": PostBeefRequestBeefInnerFertiliser.from_dict(obj["fertiliser"]) if obj.get("fertiliser") is not None else None, + "diesel": obj.get("diesel"), + "petrol": obj.get("petrol"), + "lpg": obj.get("lpg"), + "mineralSupplementation": PostBeefRequestBeefInnerMineralSupplementation.from_dict(obj["mineralSupplementation"]) if obj.get("mineralSupplementation") is not None else None, + "electricitySource": obj.get("electricitySource"), + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "grainFeed": obj.get("grainFeed"), + "hayFeed": obj.get("hayFeed"), + "herbicide": obj.get("herbicide"), + "herbicideOther": obj.get("herbicideOther") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes.py new file mode 100644 index 00000000..162cb773 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from openapi_client.models.post_goat_request_goats_inner_classes_breeding_does_nannies import PostGoatRequestGoatsInnerClassesBreedingDoesNannies +from openapi_client.models.post_goat_request_goats_inner_classes_bucks_billy import PostGoatRequestGoatsInnerClassesBucksBilly +from openapi_client.models.post_goat_request_goats_inner_classes_kids import PostGoatRequestGoatsInnerClassesKids +from openapi_client.models.post_goat_request_goats_inner_classes_maiden_breeding_does_nannies import PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies +from openapi_client.models.post_goat_request_goats_inner_classes_other_does_culled_females import PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales +from openapi_client.models.post_goat_request_goats_inner_classes_trade_breeding_does_nannies import PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies +from openapi_client.models.post_goat_request_goats_inner_classes_trade_bucks import PostGoatRequestGoatsInnerClassesTradeBucks +from openapi_client.models.post_goat_request_goats_inner_classes_trade_does import PostGoatRequestGoatsInnerClassesTradeDoes +from openapi_client.models.post_goat_request_goats_inner_classes_trade_kids import PostGoatRequestGoatsInnerClassesTradeKids +from openapi_client.models.post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies import PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies +from openapi_client.models.post_goat_request_goats_inner_classes_trade_other_does_culled_females import PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales +from openapi_client.models.post_goat_request_goats_inner_classes_trade_wethers import PostGoatRequestGoatsInnerClassesTradeWethers +from openapi_client.models.post_goat_request_goats_inner_classes_wethers import PostGoatRequestGoatsInnerClassesWethers +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInnerClasses(BaseModel): + """ + Goat classes of different types + """ # noqa: E501 + bucks_billy: Optional[PostGoatRequestGoatsInnerClassesBucksBilly] = Field(default=None, alias="bucksBilly") + trade_bucks: Optional[PostGoatRequestGoatsInnerClassesTradeBucks] = Field(default=None, alias="tradeBucks") + wethers: Optional[PostGoatRequestGoatsInnerClassesWethers] = None + trade_wethers: Optional[PostGoatRequestGoatsInnerClassesTradeWethers] = Field(default=None, alias="tradeWethers") + maiden_breeding_does_nannies: Optional[PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies] = Field(default=None, alias="maidenBreedingDoesNannies") + trade_maiden_breeding_does_nannies: Optional[PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies] = Field(default=None, alias="tradeMaidenBreedingDoesNannies") + breeding_does_nannies: Optional[PostGoatRequestGoatsInnerClassesBreedingDoesNannies] = Field(default=None, alias="breedingDoesNannies") + trade_breeding_does_nannies: Optional[PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies] = Field(default=None, alias="tradeBreedingDoesNannies") + other_does_culled_females: Optional[PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales] = Field(default=None, alias="otherDoesCulledFemales") + trade_other_does_culled_females: Optional[PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales] = Field(default=None, alias="tradeOtherDoesCulledFemales") + kids: Optional[PostGoatRequestGoatsInnerClassesKids] = None + trade_kids: Optional[PostGoatRequestGoatsInnerClassesTradeKids] = Field(default=None, alias="tradeKids") + trade_does: Optional[PostGoatRequestGoatsInnerClassesTradeDoes] = Field(default=None, alias="tradeDoes") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["bucksBilly", "tradeBucks", "wethers", "tradeWethers", "maidenBreedingDoesNannies", "tradeMaidenBreedingDoesNannies", "breedingDoesNannies", "tradeBreedingDoesNannies", "otherDoesCulledFemales", "tradeOtherDoesCulledFemales", "kids", "tradeKids", "tradeDoes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClasses from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of bucks_billy + if self.bucks_billy: + _dict['bucksBilly'] = self.bucks_billy.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_bucks + if self.trade_bucks: + _dict['tradeBucks'] = self.trade_bucks.to_dict() + # override the default output from pydantic by calling `to_dict()` of wethers + if self.wethers: + _dict['wethers'] = self.wethers.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_wethers + if self.trade_wethers: + _dict['tradeWethers'] = self.trade_wethers.to_dict() + # override the default output from pydantic by calling `to_dict()` of maiden_breeding_does_nannies + if self.maiden_breeding_does_nannies: + _dict['maidenBreedingDoesNannies'] = self.maiden_breeding_does_nannies.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_maiden_breeding_does_nannies + if self.trade_maiden_breeding_does_nannies: + _dict['tradeMaidenBreedingDoesNannies'] = self.trade_maiden_breeding_does_nannies.to_dict() + # override the default output from pydantic by calling `to_dict()` of breeding_does_nannies + if self.breeding_does_nannies: + _dict['breedingDoesNannies'] = self.breeding_does_nannies.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_breeding_does_nannies + if self.trade_breeding_does_nannies: + _dict['tradeBreedingDoesNannies'] = self.trade_breeding_does_nannies.to_dict() + # override the default output from pydantic by calling `to_dict()` of other_does_culled_females + if self.other_does_culled_females: + _dict['otherDoesCulledFemales'] = self.other_does_culled_females.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_other_does_culled_females + if self.trade_other_does_culled_females: + _dict['tradeOtherDoesCulledFemales'] = self.trade_other_does_culled_females.to_dict() + # override the default output from pydantic by calling `to_dict()` of kids + if self.kids: + _dict['kids'] = self.kids.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_kids + if self.trade_kids: + _dict['tradeKids'] = self.trade_kids.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_does + if self.trade_does: + _dict['tradeDoes'] = self.trade_does.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClasses from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bucksBilly": PostGoatRequestGoatsInnerClassesBucksBilly.from_dict(obj["bucksBilly"]) if obj.get("bucksBilly") is not None else None, + "tradeBucks": PostGoatRequestGoatsInnerClassesTradeBucks.from_dict(obj["tradeBucks"]) if obj.get("tradeBucks") is not None else None, + "wethers": PostGoatRequestGoatsInnerClassesWethers.from_dict(obj["wethers"]) if obj.get("wethers") is not None else None, + "tradeWethers": PostGoatRequestGoatsInnerClassesTradeWethers.from_dict(obj["tradeWethers"]) if obj.get("tradeWethers") is not None else None, + "maidenBreedingDoesNannies": PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.from_dict(obj["maidenBreedingDoesNannies"]) if obj.get("maidenBreedingDoesNannies") is not None else None, + "tradeMaidenBreedingDoesNannies": PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.from_dict(obj["tradeMaidenBreedingDoesNannies"]) if obj.get("tradeMaidenBreedingDoesNannies") is not None else None, + "breedingDoesNannies": PostGoatRequestGoatsInnerClassesBreedingDoesNannies.from_dict(obj["breedingDoesNannies"]) if obj.get("breedingDoesNannies") is not None else None, + "tradeBreedingDoesNannies": PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.from_dict(obj["tradeBreedingDoesNannies"]) if obj.get("tradeBreedingDoesNannies") is not None else None, + "otherDoesCulledFemales": PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.from_dict(obj["otherDoesCulledFemales"]) if obj.get("otherDoesCulledFemales") is not None else None, + "tradeOtherDoesCulledFemales": PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.from_dict(obj["tradeOtherDoesCulledFemales"]) if obj.get("tradeOtherDoesCulledFemales") is not None else None, + "kids": PostGoatRequestGoatsInnerClassesKids.from_dict(obj["kids"]) if obj.get("kids") is not None else None, + "tradeKids": PostGoatRequestGoatsInnerClassesTradeKids.from_dict(obj["tradeKids"]) if obj.get("tradeKids") is not None else None, + "tradeDoes": PostGoatRequestGoatsInnerClassesTradeDoes.from_dict(obj["tradeDoes"]) if obj.get("tradeDoes") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_breeding_does_nannies.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_breeding_does_nannies.py new file mode 100644 index 00000000..13dc0bed --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_breeding_does_nannies.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInnerClassesBreedingDoesNannies(BaseModel): + """ + breeding does/nannies + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of goat shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "headShorn", "woolShorn", "cleanWoolYield", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesBreedingDoesNannies from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesBreedingDoesNannies from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_bucks_billy.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_bucks_billy.py new file mode 100644 index 00000000..69ddd5ed --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_bucks_billy.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInnerClassesBucksBilly(BaseModel): + """ + Bucks / Billy + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of goat shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "headShorn", "woolShorn", "cleanWoolYield", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesBucksBilly from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesBucksBilly from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_kids.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_kids.py new file mode 100644 index 00000000..ecfc3724 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_kids.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInnerClassesKids(BaseModel): + """ + kids + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of goat shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "headShorn", "woolShorn", "cleanWoolYield", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesKids from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesKids from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py new file mode 100644 index 00000000..5daf9ba6 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies(BaseModel): + """ + maiden breeding does/nannies + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of goat shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "headShorn", "woolShorn", "cleanWoolYield", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_other_does_culled_females.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_other_does_culled_females.py new file mode 100644 index 00000000..25836557 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_other_does_culled_females.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales(BaseModel): + """ + other does/culled females + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of goat shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "headShorn", "woolShorn", "cleanWoolYield", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py new file mode 100644 index 00000000..43972309 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies(BaseModel): + """ + trade breeding does/nannies + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of goat shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "headShorn", "woolShorn", "cleanWoolYield", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_bucks.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_bucks.py new file mode 100644 index 00000000..9e3b2867 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_bucks.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInnerClassesTradeBucks(BaseModel): + """ + Trade Bucks / Billy + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of goat shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "headShorn", "woolShorn", "cleanWoolYield", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesTradeBucks from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesTradeBucks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_does.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_does.py new file mode 100644 index 00000000..436ddf2e --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_does.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInnerClassesTradeDoes(BaseModel): + """ + Trade does. Deprecation note: More specific trade doe classes now available + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of goat shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "headShorn", "woolShorn", "cleanWoolYield", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesTradeDoes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesTradeDoes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_kids.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_kids.py new file mode 100644 index 00000000..e79deb02 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_kids.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInnerClassesTradeKids(BaseModel): + """ + trade kids + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of goat shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "headShorn", "woolShorn", "cleanWoolYield", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesTradeKids from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesTradeKids from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py new file mode 100644 index 00000000..5e5bf41b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies(BaseModel): + """ + trade maiden breeding does/nannies + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of goat shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "headShorn", "woolShorn", "cleanWoolYield", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_other_does_culled_females.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_other_does_culled_females.py new file mode 100644 index 00000000..c9199be7 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_other_does_culled_females.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales(BaseModel): + """ + trade other does/culled females + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of goat shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "headShorn", "woolShorn", "cleanWoolYield", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_wethers.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_wethers.py new file mode 100644 index 00000000..098d67d2 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_trade_wethers.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInnerClassesTradeWethers(BaseModel): + """ + trade wethers + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of goat shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "headShorn", "woolShorn", "cleanWoolYield", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesTradeWethers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesTradeWethers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_wethers.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_wethers.py new file mode 100644 index 00000000..e70704fa --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_goats_inner_classes_wethers.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestGoatsInnerClassesWethers(BaseModel): + """ + wethers + """ # noqa: E501 + autumn: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + winter: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + spring: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + summer: PostBuffaloRequestBuffalosInnerClassesBullsAutumn + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of goat shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "headShorn", "woolShorn", "cleanWoolYield", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesWethers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestGoatsInnerClassesWethers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_goat_request_vegetation_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_vegetation_inner.py new file mode 100644 index 00000000..5b0f010f --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_goat_request_vegetation_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation +from typing import Optional, Set +from typing_extensions import Self + +class PostGoatRequestVegetationInner(BaseModel): + """ + Non-productive vegetation inputs along with allocations to goat + """ # noqa: E501 + vegetation: PostBeefRequestVegetationInnerVegetation + goat_proportion: List[Union[StrictFloat, StrictInt]] = Field(description="The proportion of the sequestration that is allocated to goat", alias="goatProportion") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vegetation", "goatProportion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGoatRequestVegetationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of vegetation + if self.vegetation: + _dict['vegetation'] = self.vegetation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGoatRequestVegetationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vegetation": PostBeefRequestVegetationInnerVegetation.from_dict(obj["vegetation"]) if obj.get("vegetation") is not None else None, + "goatProportion": obj.get("goatProportion") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_grains200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_grains200_response.py new file mode 100644 index 00000000..3ebd3e10 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_grains200_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_cotton200_response_net import PostCotton200ResponseNet +from openapi_client.models.post_cotton200_response_scope1 import PostCotton200ResponseScope1 +from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 +from openapi_client.models.post_grains200_response_intermediate_inner import PostGrains200ResponseIntermediateInner +from openapi_client.models.post_grains200_response_intermediate_inner_intensities_with_sequestration import PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration +from typing import Optional, Set +from typing_extensions import Self + +class PostGrains200Response(BaseModel): + """ + Emissions calculation output for the `grains` calculator + """ # noqa: E501 + scope1: PostCotton200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostCotton200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + intermediate: List[PostGrains200ResponseIntermediateInner] + net: PostCotton200ResponseNet + intensities_with_sequestration: List[PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration] = Field(description="Emissions intensity for each crop (in order), in t-CO2e/t crop", alias="intensitiesWithSequestration") + intensities: List[Union[StrictFloat, StrictInt]] = Field(description="Emissions intensity for each crop (in order), in t-CO2e/t crop") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "intermediate", "net", "intensitiesWithSequestration", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGrains200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intensities_with_sequestration (list) + _items = [] + if self.intensities_with_sequestration: + for _item_intensities_with_sequestration in self.intensities_with_sequestration: + if _item_intensities_with_sequestration: + _items.append(_item_intensities_with_sequestration.to_dict()) + _dict['intensitiesWithSequestration'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGrains200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostCotton200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostCotton200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intermediate": [PostGrains200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None, + "net": PostCotton200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensitiesWithSequestration": [PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.from_dict(_item) for _item in obj["intensitiesWithSequestration"]] if obj.get("intensitiesWithSequestration") is not None else None, + "intensities": obj.get("intensities") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_grains200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_grains200_response_intermediate_inner.py new file mode 100644 index 00000000..5cf0b312 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_grains200_response_intermediate_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_cotton200_response_scope1 import PostCotton200ResponseScope1 +from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 +from openapi_client.models.post_grains200_response_intermediate_inner_intensities_with_sequestration import PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration +from typing import Optional, Set +from typing_extensions import Self + +class PostGrains200ResponseIntermediateInner(BaseModel): + """ + Intermediate emissions calculation output for the Grains calculator + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostCotton200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostCotton200ResponseScope3 + intensities_with_sequestration: PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration = Field(alias="intensitiesWithSequestration") + net: PostAquaculture200ResponseNet + carbon_sequestration: PostAquaculture200ResponseIntermediateInnerCarbonSequestration = Field(alias="carbonSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "intensitiesWithSequestration", "net", "carbonSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGrains200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities_with_sequestration + if self.intensities_with_sequestration: + _dict['intensitiesWithSequestration'] = self.intensities_with_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGrains200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostCotton200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostCotton200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "intensitiesWithSequestration": PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.from_dict(obj["intensitiesWithSequestration"]) if obj.get("intensitiesWithSequestration") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "carbonSequestration": PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_grains200_response_intermediate_inner_intensities_with_sequestration.py b/examples/python-api-client/api-client/openapi_client/models/post_grains200_response_intermediate_inner_intensities_with_sequestration.py new file mode 100644 index 00000000..c270378a --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_grains200_response_intermediate_inner_intensities_with_sequestration.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration(BaseModel): + """ + PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration + """ # noqa: E501 + grain_produced_tonnes: Union[StrictFloat, StrictInt] = Field(description="Grain produced in tonnes", alias="grainProducedTonnes") + grains_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Grains excluding sequestration, in t-CO2e/t grain", alias="grainsExcludingSequestration") + grains_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Grains including sequestration, in t-CO2e/t grain", alias="grainsIncludingSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["grainProducedTonnes", "grainsExcludingSequestration", "grainsIncludingSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "grainProducedTonnes": obj.get("grainProducedTonnes"), + "grainsExcludingSequestration": obj.get("grainsExcludingSequestration"), + "grainsIncludingSequestration": obj.get("grainsIncludingSequestration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_grains_request.py b/examples/python-api-client/api-client/openapi_client/models/post_grains_request.py new file mode 100644 index 00000000..07b7d7e7 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_grains_request.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from openapi_client.models.post_cotton_request_vegetation_inner import PostCottonRequestVegetationInner +from openapi_client.models.post_grains_request_crops_inner import PostGrainsRequestCropsInner +from typing import Optional, Set +from typing_extensions import Self + +class PostGrainsRequest(BaseModel): + """ + Input data required for the `grains` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + crops: List[PostGrainsRequestCropsInner] + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + vegetation: List[PostCottonRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "crops", "electricityRenewable", "electricityUse", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGrainsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in crops (list) + _items = [] + if self.crops: + for _item_crops in self.crops: + if _item_crops: + _items.append(_item_crops.to_dict()) + _dict['crops'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGrainsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "crops": [PostGrainsRequestCropsInner.from_dict(_item) for _item in obj["crops"]] if obj.get("crops") is not None else None, + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "vegetation": [PostCottonRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_grains_request_crops_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_grains_request_crops_inner.py new file mode 100644 index 00000000..89374903 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_grains_request_crops_inner.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostGrainsRequestCropsInner(BaseModel): + """ + PostGrainsRequestCropsInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + type: StrictStr = Field(description="Crop type. Note that the following crop types are now deprecated, the relevant full calculator should be used instead: 'Cotton', 'Rice', 'Sugar Cane'") + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + production_system: StrictStr = Field(description="Production system of this crop. Note that the following production systems are now deprecated, the relevant full calculator should be used instead: 'Cotton', 'Rice', 'Sugar cane'", alias="productionSystem") + average_grain_yield: Union[StrictFloat, StrictInt] = Field(description="Average grain yield, in t/ha (tonnes per hectare)", alias="averageGrainYield") + area_sown: Union[StrictFloat, StrictInt] = Field(description="Area sown, in ha (hectares)", alias="areaSown") + non_urea_nitrogen: Union[StrictFloat, StrictInt] = Field(description="Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare)", alias="nonUreaNitrogen") + urea_application: Union[StrictFloat, StrictInt] = Field(description="Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare)", alias="ureaApplication") + urea_ammonium_nitrate: Union[StrictFloat, StrictInt] = Field(description="Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare)", alias="ureaAmmoniumNitrate") + phosphorus_application: Union[StrictFloat, StrictInt] = Field(description="Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare)", alias="phosphorusApplication") + potassium_application: Union[StrictFloat, StrictInt] = Field(description="Potassium application, in kg K/ha (kilograms of potassium per hectare)", alias="potassiumApplication") + sulfur_application: Union[StrictFloat, StrictInt] = Field(description="Sulfur application, in kg S/ha (kilograms of sulfur per hectare)", alias="sulfurApplication") + rainfall_above600: StrictBool = Field(description="Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm", alias="rainfallAbove600") + fraction_of_annual_crop_burnt: Union[StrictFloat, StrictInt] = Field(description="Fraction of annual production of crop that is burnt, from 0 to 1", alias="fractionOfAnnualCropBurnt") + herbicide_use: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram)", alias="herbicideUse") + glyphosate_other_herbicide_use: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram)", alias="glyphosateOtherHerbicideUse") + electricity_allocation: Union[StrictFloat, StrictInt] = Field(description="Percentage of electricity use to allocate to this crop, from 0 to 1", alias="electricityAllocation") + limestone: Union[StrictFloat, StrictInt] = Field(description="Lime applied in tonnes") + limestone_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of lime as limestone vs dolomite, between 0 and 1", alias="limestoneFraction") + diesel_use: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)", alias="dieselUse") + petrol_use: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)", alias="petrolUse") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "state", "productionSystem", "averageGrainYield", "areaSown", "nonUreaNitrogen", "ureaApplication", "ureaAmmoniumNitrate", "phosphorusApplication", "potassiumApplication", "sulfurApplication", "rainfallAbove600", "fractionOfAnnualCropBurnt", "herbicideUse", "glyphosateOtherHerbicideUse", "electricityAllocation", "limestone", "limestoneFraction", "dieselUse", "petrolUse", "lpg"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Wheat', 'Barley', 'Maize', 'Oats', 'Rice', 'Sorghum', 'Triticale', 'Other Cereals', 'Pulses', 'Tuber and Roots', 'Peanuts', 'Sugar Cane', 'Cotton', 'Hops', 'Oilseeds', 'Forage Crops', 'Lucerne', 'Other legume', 'Annual grass', 'Grass clover mixture', 'Perennial pasture']): + raise ValueError("must be one of enum values ('Wheat', 'Barley', 'Maize', 'Oats', 'Rice', 'Sorghum', 'Triticale', 'Other Cereals', 'Pulses', 'Tuber and Roots', 'Peanuts', 'Sugar Cane', 'Cotton', 'Hops', 'Oilseeds', 'Forage Crops', 'Lucerne', 'Other legume', 'Annual grass', 'Grass clover mixture', 'Perennial pasture')") + return value + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + @field_validator('production_system') + def production_system_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Non-irrigated crop', 'Irrigated crop', 'Sugar cane', 'Cotton', 'Horticulture']): + raise ValueError("must be one of enum values ('Non-irrigated crop', 'Irrigated crop', 'Sugar cane', 'Cotton', 'Horticulture')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostGrainsRequestCropsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostGrainsRequestCropsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "state": obj.get("state"), + "productionSystem": obj.get("productionSystem"), + "averageGrainYield": obj.get("averageGrainYield"), + "areaSown": obj.get("areaSown"), + "nonUreaNitrogen": obj.get("nonUreaNitrogen"), + "ureaApplication": obj.get("ureaApplication"), + "ureaAmmoniumNitrate": obj.get("ureaAmmoniumNitrate"), + "phosphorusApplication": obj.get("phosphorusApplication"), + "potassiumApplication": obj.get("potassiumApplication"), + "sulfurApplication": obj.get("sulfurApplication"), + "rainfallAbove600": obj.get("rainfallAbove600"), + "fractionOfAnnualCropBurnt": obj.get("fractionOfAnnualCropBurnt"), + "herbicideUse": obj.get("herbicideUse"), + "glyphosateOtherHerbicideUse": obj.get("glyphosateOtherHerbicideUse"), + "electricityAllocation": obj.get("electricityAllocation"), + "limestone": obj.get("limestone"), + "limestoneFraction": obj.get("limestoneFraction"), + "dieselUse": obj.get("dieselUse"), + "petrolUse": obj.get("petrolUse"), + "lpg": obj.get("lpg") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response.py new file mode 100644 index 00000000..693d8836 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_cotton200_response_net import PostCotton200ResponseNet +from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 +from openapi_client.models.post_horticulture200_response_intermediate_inner import PostHorticulture200ResponseIntermediateInner +from openapi_client.models.post_horticulture200_response_intermediate_inner_intensities_with_sequestration import PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration +from openapi_client.models.post_horticulture200_response_scope1 import PostHorticulture200ResponseScope1 +from typing import Optional, Set +from typing_extensions import Self + +class PostHorticulture200Response(BaseModel): + """ + Emissions calculation output for the `horticulture` calculator + """ # noqa: E501 + scope1: PostHorticulture200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostCotton200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + intermediate: List[PostHorticulture200ResponseIntermediateInner] + net: PostCotton200ResponseNet + intensities: List[PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration] = Field(description="Emissions intensity for each crop (in order)") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "intermediate", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostHorticulture200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intensities (list) + _items = [] + if self.intensities: + for _item_intensities in self.intensities: + if _item_intensities: + _items.append(_item_intensities.to_dict()) + _dict['intensities'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostHorticulture200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostHorticulture200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostCotton200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intermediate": [PostHorticulture200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None, + "net": PostCotton200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": [PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.from_dict(_item) for _item in obj["intensities"]] if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response_intermediate_inner.py new file mode 100644 index 00000000..2f4751e0 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response_intermediate_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 +from openapi_client.models.post_horticulture200_response_intermediate_inner_intensities_with_sequestration import PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration +from openapi_client.models.post_horticulture200_response_scope1 import PostHorticulture200ResponseScope1 +from typing import Optional, Set +from typing_extensions import Self + +class PostHorticulture200ResponseIntermediateInner(BaseModel): + """ + Intermediate emissions calculation output for the Horticulture calculator + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostHorticulture200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostCotton200ResponseScope3 + intensities_with_sequestration: PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration = Field(alias="intensitiesWithSequestration") + net: PostAquaculture200ResponseNet + carbon_sequestration: PostAquaculture200ResponseIntermediateInnerCarbonSequestration = Field(alias="carbonSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "intensitiesWithSequestration", "net", "carbonSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostHorticulture200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities_with_sequestration + if self.intensities_with_sequestration: + _dict['intensitiesWithSequestration'] = self.intensities_with_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostHorticulture200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostHorticulture200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostCotton200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "intensitiesWithSequestration": PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.from_dict(obj["intensitiesWithSequestration"]) if obj.get("intensitiesWithSequestration") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "carbonSequestration": PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py b/examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py new file mode 100644 index 00000000..9deb88d7 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration(BaseModel): + """ + Horticulture intensities output + """ # noqa: E501 + crop_produced_tonnes: Union[StrictFloat, StrictInt] = Field(description="Horticultural crop produced in tonnes", alias="cropProducedTonnes") + tonnes_crop_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity excluding sequestration, in t-CO2e/t crop", alias="tonnesCropExcludingSequestration") + tonnes_crop_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity including sequestration, in t-CO2e/t crop", alias="tonnesCropIncludingSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cropProducedTonnes", "tonnesCropExcludingSequestration", "tonnesCropIncludingSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cropProducedTonnes": obj.get("cropProducedTonnes"), + "tonnesCropExcludingSequestration": obj.get("tonnesCropExcludingSequestration"), + "tonnesCropIncludingSequestration": obj.get("tonnesCropIncludingSequestration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response_scope1.py b/examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response_scope1.py new file mode 100644 index 00000000..8a7ad567 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_horticulture200_response_scope1.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostHorticulture200ResponseScope1(BaseModel): + """ + Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fuel_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from fuel use, in tonnes-CO2e", alias="fuelCO2") + fuel_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from fuel use, in tonnes-CO2e", alias="fuelCH4") + fuel_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fuel use, in tonnes-CO2e", alias="fuelN2O") + urea_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from urea, in tonnes-CO2e", alias="ureaCO2") + lime_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from lime, in tonnes-CO2e", alias="limeCO2") + fertiliser_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fertiliser, in tonnes-CO2e", alias="fertiliserN2O") + atmospheric_deposition_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from atmospheric deposition, in tonnes-CO2e", alias="atmosphericDepositionN2O") + leaching_and_runoff_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from leeching and runoff, in tonnes-CO2e", alias="leachingAndRunoffN2O") + crop_residue_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from crop residue, in tonnes-CO2e", alias="cropResidueN2O") + field_burning_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from field burning, in tonnes-CO2e", alias="fieldBurningN2O") + field_burning_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from field burning, in tonnes-CO2e", alias="fieldBurningCH4") + hfcs_refrigerant_leakage: Union[StrictFloat, StrictInt] = Field(description="Emissions from refrigerant leakage, in tonnes-HFCs", alias="hfcsRefrigerantLeakage") + total_co2: Union[StrictFloat, StrictInt] = Field(description="Total CO2 scope 1 emissions, in tonnes-CO2e", alias="totalCO2") + total_ch4: Union[StrictFloat, StrictInt] = Field(description="Total CH4 scope 1 emissions, in tonnes-CO2e", alias="totalCH4") + total_n2_o: Union[StrictFloat, StrictInt] = Field(description="Total N2O scope 1 emissions, in tonnes-CO2e", alias="totalN2O") + total_hfcs: Union[StrictFloat, StrictInt] = Field(description="Total HFCs scope 1 emissions, in tonnes-CO2e", alias="totalHFCs") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 1 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuelCO2", "fuelCH4", "fuelN2O", "ureaCO2", "limeCO2", "fertiliserN2O", "atmosphericDepositionN2O", "leachingAndRunoffN2O", "cropResidueN2O", "fieldBurningN2O", "fieldBurningCH4", "hfcsRefrigerantLeakage", "totalCO2", "totalCH4", "totalN2O", "totalHFCs", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostHorticulture200ResponseScope1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostHorticulture200ResponseScope1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuelCO2": obj.get("fuelCO2"), + "fuelCH4": obj.get("fuelCH4"), + "fuelN2O": obj.get("fuelN2O"), + "ureaCO2": obj.get("ureaCO2"), + "limeCO2": obj.get("limeCO2"), + "fertiliserN2O": obj.get("fertiliserN2O"), + "atmosphericDepositionN2O": obj.get("atmosphericDepositionN2O"), + "leachingAndRunoffN2O": obj.get("leachingAndRunoffN2O"), + "cropResidueN2O": obj.get("cropResidueN2O"), + "fieldBurningN2O": obj.get("fieldBurningN2O"), + "fieldBurningCH4": obj.get("fieldBurningCH4"), + "hfcsRefrigerantLeakage": obj.get("hfcsRefrigerantLeakage"), + "totalCO2": obj.get("totalCO2"), + "totalCH4": obj.get("totalCH4"), + "totalN2O": obj.get("totalN2O"), + "totalHFCs": obj.get("totalHFCs"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_horticulture_request.py b/examples/python-api-client/api-client/openapi_client/models/post_horticulture_request.py new file mode 100644 index 00000000..f14d5d5f --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_horticulture_request.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from openapi_client.models.post_cotton_request_vegetation_inner import PostCottonRequestVegetationInner +from openapi_client.models.post_horticulture_request_crops_inner import PostHorticultureRequestCropsInner +from typing import Optional, Set +from typing_extensions import Self + +class PostHorticultureRequest(BaseModel): + """ + Input data required for the `horticulture` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + crops: List[PostHorticultureRequestCropsInner] + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + vegetation: List[PostCottonRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "crops", "electricityRenewable", "electricityUse", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostHorticultureRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in crops (list) + _items = [] + if self.crops: + for _item_crops in self.crops: + if _item_crops: + _items.append(_item_crops.to_dict()) + _dict['crops'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostHorticultureRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "crops": [PostHorticultureRequestCropsInner.from_dict(_item) for _item in obj["crops"]] if obj.get("crops") is not None else None, + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "vegetation": [PostCottonRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_horticulture_request_crops_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_horticulture_request_crops_inner.py new file mode 100644 index 00000000..a4e4ae37 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_horticulture_request_crops_inner.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner import PostHorticultureRequestCropsInnerRefrigerantsInner +from typing import Optional, Set +from typing_extensions import Self + +class PostHorticultureRequestCropsInner(BaseModel): + """ + PostHorticultureRequestCropsInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + type: StrictStr = Field(description="Crop type") + average_yield: Union[StrictFloat, StrictInt] = Field(description="Average crop yield, in t/ha (tonnes per hectare)", alias="averageYield") + area_sown: Union[StrictFloat, StrictInt] = Field(description="Area sown, in ha (hectares)", alias="areaSown") + urea_application: Union[StrictFloat, StrictInt] = Field(description="Urea application, in kg Urea/ha (kilograms of urea per hectare)", alias="ureaApplication") + non_urea_nitrogen: Union[StrictFloat, StrictInt] = Field(description="Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare)", alias="nonUreaNitrogen") + urea_ammonium_nitrate: Union[StrictFloat, StrictInt] = Field(description="Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare)", alias="ureaAmmoniumNitrate") + phosphorus_application: Union[StrictFloat, StrictInt] = Field(description="Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare)", alias="phosphorusApplication") + potassium_application: Union[StrictFloat, StrictInt] = Field(description="Potassium application, in kg K/ha (kilograms of potassium per hectare)", alias="potassiumApplication") + sulfur_application: Union[StrictFloat, StrictInt] = Field(description="Sulfur application, in kg S/ha (kilograms of sulfur per hectare)", alias="sulfurApplication") + rainfall_above600: StrictBool = Field(description="Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm", alias="rainfallAbove600") + urease_inhibitor_used: Optional[StrictBool] = Field(default=None, description="Urease inhibitor used. Deprecation note: No longer used (since v1.1.0)", alias="ureaseInhibitorUsed") + nitrification_inhibitor_used: Optional[StrictBool] = Field(default=None, description="Nitrification inhibitor used. Deprecation note: No longer used (since v1.1.0)", alias="nitrificationInhibitorUsed") + fraction_of_annual_crop_burnt: Union[StrictFloat, StrictInt] = Field(description="Fraction of annual production of crop that is burnt, from 0 to 1", alias="fractionOfAnnualCropBurnt") + herbicide_use: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram)", alias="herbicideUse") + glyphosate_other_herbicide_use: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram)", alias="glyphosateOtherHerbicideUse") + electricity_allocation: Union[StrictFloat, StrictInt] = Field(description="Percentage of electricity use to allocate to this crop, from 0 to 1", alias="electricityAllocation") + limestone: Union[StrictFloat, StrictInt] = Field(description="Lime applied in tonnes") + limestone_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of lime as limestone vs dolomite, between 0 and 1", alias="limestoneFraction") + diesel_use: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)", alias="dieselUse") + petrol_use: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)", alias="petrolUse") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + refrigerants: List[PostHorticultureRequestCropsInnerRefrigerantsInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "averageYield", "areaSown", "ureaApplication", "nonUreaNitrogen", "ureaAmmoniumNitrate", "phosphorusApplication", "potassiumApplication", "sulfurApplication", "rainfallAbove600", "ureaseInhibitorUsed", "nitrificationInhibitorUsed", "fractionOfAnnualCropBurnt", "herbicideUse", "glyphosateOtherHerbicideUse", "electricityAllocation", "limestone", "limestoneFraction", "dieselUse", "petrolUse", "lpg", "refrigerants"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Pulses', 'Tuber and Roots', 'Peanuts', 'Hops', 'Perennial Hort', 'Annual Hort']): + raise ValueError("must be one of enum values ('Pulses', 'Tuber and Roots', 'Peanuts', 'Hops', 'Perennial Hort', 'Annual Hort')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostHorticultureRequestCropsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in refrigerants (list) + _items = [] + if self.refrigerants: + for _item_refrigerants in self.refrigerants: + if _item_refrigerants: + _items.append(_item_refrigerants.to_dict()) + _dict['refrigerants'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostHorticultureRequestCropsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "averageYield": obj.get("averageYield"), + "areaSown": obj.get("areaSown"), + "ureaApplication": obj.get("ureaApplication"), + "nonUreaNitrogen": obj.get("nonUreaNitrogen"), + "ureaAmmoniumNitrate": obj.get("ureaAmmoniumNitrate"), + "phosphorusApplication": obj.get("phosphorusApplication"), + "potassiumApplication": obj.get("potassiumApplication"), + "sulfurApplication": obj.get("sulfurApplication"), + "rainfallAbove600": obj.get("rainfallAbove600"), + "ureaseInhibitorUsed": obj.get("ureaseInhibitorUsed"), + "nitrificationInhibitorUsed": obj.get("nitrificationInhibitorUsed"), + "fractionOfAnnualCropBurnt": obj.get("fractionOfAnnualCropBurnt"), + "herbicideUse": obj.get("herbicideUse"), + "glyphosateOtherHerbicideUse": obj.get("glyphosateOtherHerbicideUse"), + "electricityAllocation": obj.get("electricityAllocation"), + "limestone": obj.get("limestone"), + "limestoneFraction": obj.get("limestoneFraction"), + "dieselUse": obj.get("dieselUse"), + "petrolUse": obj.get("petrolUse"), + "lpg": obj.get("lpg"), + "refrigerants": [PostHorticultureRequestCropsInnerRefrigerantsInner.from_dict(_item) for _item in obj["refrigerants"]] if obj.get("refrigerants") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_horticulture_request_crops_inner_refrigerants_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_horticulture_request_crops_inner_refrigerants_inner.py new file mode 100644 index 00000000..3f738e5a --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_horticulture_request_crops_inner_refrigerants_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostHorticultureRequestCropsInnerRefrigerantsInner(BaseModel): + """ + PostHorticultureRequestCropsInnerRefrigerantsInner + """ # noqa: E501 + refrigerant: StrictStr = Field(description="Refrigerant type") + charge_size: Union[StrictFloat, StrictInt] = Field(description="Amount of refrigerant contained in the appliance, in kg", alias="chargeSize") + __properties: ClassVar[List[str]] = ["refrigerant", "chargeSize"] + + @field_validator('refrigerant') + def refrigerant_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['HFC-23', 'HFC-32', 'HFC-41', 'HFC-43-10mee', 'HFC-125', 'HFC-134', 'HFC-134a', 'HFC-143', 'HFC-143a', 'HFC-152a', 'HFC-227ea', 'HFC-236fa', 'HFC-245ca', 'HFC-245fa', 'HFC-365mfc', 'R438A', 'R448A', 'R-22', 'Ammonia (R-717)', 'R-11', 'R-12', 'R-13', 'R-23', 'R-32', 'R-113', 'R-114', 'R-115', 'R-116', 'R-123', 'R-124', 'R-125', 'R-134a', 'R-141b', 'R-142b', 'R-143a', 'R-152a', 'R-218', 'R-227ea', 'R-236fa', 'R-245ca', 'R-245fa', 'R-C318', 'R-401A', 'R-401B', 'R-401C', 'R-402A', 'R-402B', 'R-403A', 'R-403B', 'R-404A', 'R-405A', 'R-406A', 'R-407A', 'R-407B', 'R-407C', 'R-407D', 'R-407E', 'R-408A', 'R-409A', 'R-409B', 'R-410A', 'R-411A', 'R-411B', 'R-412A', 'R-413A', 'R-414A', 'R-414B', 'R-415A', 'R-415B', 'R-416A', 'R-417A', 'R-418A', 'R-419A', 'R-420A', 'R-421A', 'R-421B', 'R-422A', 'R-422B', 'R-422C', 'R-422D', 'R-423A', 'R-424A', 'R-425A', 'R-426A', 'R-427A', 'R-428A', 'R-500', 'R-502', 'R-503', 'R-507A', 'R-508A', 'R-508B', 'R-509A']): + raise ValueError("must be one of enum values ('HFC-23', 'HFC-32', 'HFC-41', 'HFC-43-10mee', 'HFC-125', 'HFC-134', 'HFC-134a', 'HFC-143', 'HFC-143a', 'HFC-152a', 'HFC-227ea', 'HFC-236fa', 'HFC-245ca', 'HFC-245fa', 'HFC-365mfc', 'R438A', 'R448A', 'R-22', 'Ammonia (R-717)', 'R-11', 'R-12', 'R-13', 'R-23', 'R-32', 'R-113', 'R-114', 'R-115', 'R-116', 'R-123', 'R-124', 'R-125', 'R-134a', 'R-141b', 'R-142b', 'R-143a', 'R-152a', 'R-218', 'R-227ea', 'R-236fa', 'R-245ca', 'R-245fa', 'R-C318', 'R-401A', 'R-401B', 'R-401C', 'R-402A', 'R-402B', 'R-403A', 'R-403B', 'R-404A', 'R-405A', 'R-406A', 'R-407A', 'R-407B', 'R-407C', 'R-407D', 'R-407E', 'R-408A', 'R-409A', 'R-409B', 'R-410A', 'R-411A', 'R-411B', 'R-412A', 'R-413A', 'R-414A', 'R-414B', 'R-415A', 'R-415B', 'R-416A', 'R-417A', 'R-418A', 'R-419A', 'R-420A', 'R-421A', 'R-421B', 'R-422A', 'R-422B', 'R-422C', 'R-422D', 'R-423A', 'R-424A', 'R-425A', 'R-426A', 'R-427A', 'R-428A', 'R-500', 'R-502', 'R-503', 'R-507A', 'R-508A', 'R-508B', 'R-509A')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostHorticultureRequestCropsInnerRefrigerantsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostHorticultureRequestCropsInnerRefrigerantsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "refrigerant": obj.get("refrigerant"), + "chargeSize": obj.get("chargeSize") + }) + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_pork200_response.py new file mode 100644 index 00000000..ee202849 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork200_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_pork200_response_intensities import PostPork200ResponseIntensities +from openapi_client.models.post_pork200_response_intermediate_inner import PostPork200ResponseIntermediateInner +from openapi_client.models.post_pork200_response_net import PostPork200ResponseNet +from openapi_client.models.post_pork200_response_scope1 import PostPork200ResponseScope1 +from openapi_client.models.post_pork200_response_scope3 import PostPork200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostPork200Response(BaseModel): + """ + Emissions calculation output for the `pork` calculator + """ # noqa: E501 + scope1: PostPork200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostPork200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + net: PostPork200ResponseNet + intensities: PostPork200ResponseIntensities + intermediate: List[PostPork200ResponseIntermediateInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "net", "intensities", "intermediate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPork200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPork200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostPork200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostPork200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "net": PostPork200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostPork200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "intermediate": [PostPork200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_intensities.py new file mode 100644 index 00000000..d4683539 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_intensities.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPork200ResponseIntensities(BaseModel): + """ + PostPork200ResponseIntensities + """ # noqa: E501 + pork_meat_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Pork meat including carbon sequestration, in kg-CO2e/kg liveweight", alias="porkMeatIncludingSequestration") + pork_meat_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Pork meat excluding carbon sequestration, in kg-CO2e/kg liveweight", alias="porkMeatExcludingSequestration") + liveweight_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Pork meat produced in kg liveweight", alias="liveweightProducedKg") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["porkMeatIncludingSequestration", "porkMeatExcludingSequestration", "liveweightProducedKg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPork200ResponseIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPork200ResponseIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "porkMeatIncludingSequestration": obj.get("porkMeatIncludingSequestration"), + "porkMeatExcludingSequestration": obj.get("porkMeatExcludingSequestration"), + "liveweightProducedKg": obj.get("liveweightProducedKg") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_intermediate_inner.py new file mode 100644 index 00000000..64c5e863 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_intermediate_inner.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_pork200_response_intensities import PostPork200ResponseIntensities +from openapi_client.models.post_pork200_response_net import PostPork200ResponseNet +from openapi_client.models.post_pork200_response_scope1 import PostPork200ResponseScope1 +from openapi_client.models.post_pork200_response_scope3 import PostPork200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostPork200ResponseIntermediateInner(BaseModel): + """ + PostPork200ResponseIntermediateInner + """ # noqa: E501 + id: StrictStr + scope1: PostPork200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostPork200ResponseScope3 + carbon_sequestration: Union[StrictFloat, StrictInt] = Field(description="Carbon sequestration, in tonnes-CO2e", alias="carbonSequestration") + net: PostPork200ResponseNet + intensities: PostPork200ResponseIntensities + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "carbonSequestration", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPork200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPork200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostPork200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostPork200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": obj.get("carbonSequestration"), + "net": PostPork200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostPork200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_net.py b/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_net.py new file mode 100644 index 00000000..da3c51fb --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_net.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPork200ResponseNet(BaseModel): + """ + Net emissions for pork + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPork200ResponseNet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPork200ResponseNet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_scope1.py b/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_scope1.py new file mode 100644 index 00000000..4ff03406 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_scope1.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPork200ResponseScope1(BaseModel): + """ + Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fuel_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from fuel use, in tonnes-CO2e", alias="fuelCO2") + fuel_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from fuel use, in tonnes-CO2e", alias="fuelCH4") + fuel_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fuel use, in tonnes-CO2e", alias="fuelN2O") + urea_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from urea, in tonnes-CO2e", alias="ureaCO2") + lime_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from lime, in tonnes-CO2e", alias="limeCO2") + fertiliser_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fertiliser, in tonnes-CO2e", alias="fertiliserN2O") + enteric_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from enteric fermentation, in tonnes-CO2e", alias="entericCH4") + manure_management_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from manure management, in tonnes-CO2e", alias="manureManagementCH4") + manure_management_direct_n2_o: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from manure management (direct), in tonnes-CO2e", alias="manureManagementDirectN2O") + atmospheric_deposition_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from atmospheric deposition, in tonnes-CO2e", alias="atmosphericDepositionN2O") + atmospheric_deposition_indirect_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from atmospheric deposition indirect, in tonnes-CO2e", alias="atmosphericDepositionIndirectN2O") + leaching_and_runoff_soil_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from leeching and runoff, in tonnes-CO2e", alias="leachingAndRunoffSoilN2O") + leaching_and_runoff_mmsn2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from leeching and runoff, in tonnes-CO2e", alias="leachingAndRunoffMMSN2O") + total_co2: Union[StrictFloat, StrictInt] = Field(description="Total CO2 scope 1 emissions, in tonnes-CO2e", alias="totalCO2") + total_ch4: Union[StrictFloat, StrictInt] = Field(description="Total CH4 scope 1 emissions, in tonnes-CO2e", alias="totalCH4") + total_n2_o: Union[StrictFloat, StrictInt] = Field(description="Total N2O scope 1 emissions, in tonnes-CO2e", alias="totalN2O") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 1 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuelCO2", "fuelCH4", "fuelN2O", "ureaCO2", "limeCO2", "fertiliserN2O", "entericCH4", "manureManagementCH4", "manureManagementDirectN2O", "atmosphericDepositionN2O", "atmosphericDepositionIndirectN2O", "leachingAndRunoffSoilN2O", "leachingAndRunoffMMSN2O", "totalCO2", "totalCH4", "totalN2O", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPork200ResponseScope1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPork200ResponseScope1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuelCO2": obj.get("fuelCO2"), + "fuelCH4": obj.get("fuelCH4"), + "fuelN2O": obj.get("fuelN2O"), + "ureaCO2": obj.get("ureaCO2"), + "limeCO2": obj.get("limeCO2"), + "fertiliserN2O": obj.get("fertiliserN2O"), + "entericCH4": obj.get("entericCH4"), + "manureManagementCH4": obj.get("manureManagementCH4"), + "manureManagementDirectN2O": obj.get("manureManagementDirectN2O"), + "atmosphericDepositionN2O": obj.get("atmosphericDepositionN2O"), + "atmosphericDepositionIndirectN2O": obj.get("atmosphericDepositionIndirectN2O"), + "leachingAndRunoffSoilN2O": obj.get("leachingAndRunoffSoilN2O"), + "leachingAndRunoffMMSN2O": obj.get("leachingAndRunoffMMSN2O"), + "totalCO2": obj.get("totalCO2"), + "totalCH4": obj.get("totalCH4"), + "totalN2O": obj.get("totalN2O"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_scope3.py b/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_scope3.py new file mode 100644 index 00000000..7f1bde37 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork200_response_scope3.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPork200ResponseScope3(BaseModel): + """ + Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fertiliser: Union[StrictFloat, StrictInt] = Field(description="Emissions from fertiliser, in tonnes-CO2e") + purchased_feed: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased feed, in tonnes-CO2e", alias="purchasedFeed") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Emissions from herbicide, in tonnes-CO2e") + electricity: Union[StrictFloat, StrictInt] = Field(description="Emissions from electricity, in tonnes-CO2e") + fuel: Union[StrictFloat, StrictInt] = Field(description="Emissions from fuel, in tonnes-CO2e") + lime: Union[StrictFloat, StrictInt] = Field(description="Emissions from lime, in tonnes-CO2e") + purchased_livestock: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased pigs, in tonnes-CO2e", alias="purchasedLivestock") + bedding: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased bedding, in tonnes-CO2e") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 3 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fertiliser", "purchasedFeed", "herbicide", "electricity", "fuel", "lime", "purchasedLivestock", "bedding", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPork200ResponseScope3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPork200ResponseScope3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fertiliser": obj.get("fertiliser"), + "purchasedFeed": obj.get("purchasedFeed"), + "herbicide": obj.get("herbicide"), + "electricity": obj.get("electricity"), + "fuel": obj.get("fuel"), + "lime": obj.get("lime"), + "purchasedLivestock": obj.get("purchasedLivestock"), + "bedding": obj.get("bedding"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request.py new file mode 100644 index 00000000..5cecf37c --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_pork_request_pork_inner import PostPorkRequestPorkInner +from openapi_client.models.post_pork_request_vegetation_inner import PostPorkRequestVegetationInner +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequest(BaseModel): + """ + Input data required for the `pork` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + north_of_tropic_of_capricorn: StrictBool = Field(description="Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude. Deprecation note: This field is deprecated", alias="northOfTropicOfCapricorn") + rainfall_above600: StrictBool = Field(description="Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm", alias="rainfallAbove600") + pork: List[PostPorkRequestPorkInner] + vegetation: List[PostPorkRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "northOfTropicOfCapricorn", "rainfallAbove600", "pork", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in pork (list) + _items = [] + if self.pork: + for _item_pork in self.pork: + if _item_pork: + _items.append(_item_pork.to_dict()) + _dict['pork'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "northOfTropicOfCapricorn": obj.get("northOfTropicOfCapricorn"), + "rainfallAbove600": obj.get("rainfallAbove600"), + "pork": [PostPorkRequestPorkInner.from_dict(_item) for _item in obj["pork"]] if obj.get("pork") is not None else None, + "vegetation": [PostPorkRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner.py new file mode 100644 index 00000000..602deb10 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_beef_request_beef_inner_fertiliser import PostBeefRequestBeefInnerFertiliser +from openapi_client.models.post_pork_request_pork_inner_classes import PostPorkRequestPorkInnerClasses +from openapi_client.models.post_pork_request_pork_inner_feed_products_inner import PostPorkRequestPorkInnerFeedProductsInner +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequestPorkInner(BaseModel): + """ + PostPorkRequestPorkInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + classes: PostPorkRequestPorkInnerClasses + limestone: Union[StrictFloat, StrictInt] = Field(description="Lime applied in tonnes") + limestone_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of lime as limestone vs dolomite, between 0 and 1", alias="limestoneFraction") + fertiliser: PostBeefRequestBeefInnerFertiliser + diesel: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)") + petrol: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + electricity_source: StrictStr = Field(description="Source of electricity", alias="electricitySource") + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms)") + herbicide_other: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from other herbicides in kg (kilograms)", alias="herbicideOther") + bedding_hay_barley_straw: Union[StrictFloat, StrictInt] = Field(description="Hay, barley, straw, etc. purchased for pig bedding, in tonnes", alias="beddingHayBarleyStraw") + feed_products: List[PostPorkRequestPorkInnerFeedProductsInner] = Field(alias="feedProducts") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "classes", "limestone", "limestoneFraction", "fertiliser", "diesel", "petrol", "lpg", "electricitySource", "electricityRenewable", "electricityUse", "herbicide", "herbicideOther", "beddingHayBarleyStraw", "feedProducts"] + + @field_validator('electricity_source') + def electricity_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['State Grid', 'Renewable']): + raise ValueError("must be one of enum values ('State Grid', 'Renewable')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of classes + if self.classes: + _dict['classes'] = self.classes.to_dict() + # override the default output from pydantic by calling `to_dict()` of fertiliser + if self.fertiliser: + _dict['fertiliser'] = self.fertiliser.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in feed_products (list) + _items = [] + if self.feed_products: + for _item_feed_products in self.feed_products: + if _item_feed_products: + _items.append(_item_feed_products.to_dict()) + _dict['feedProducts'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "classes": PostPorkRequestPorkInnerClasses.from_dict(obj["classes"]) if obj.get("classes") is not None else None, + "limestone": obj.get("limestone"), + "limestoneFraction": obj.get("limestoneFraction"), + "fertiliser": PostBeefRequestBeefInnerFertiliser.from_dict(obj["fertiliser"]) if obj.get("fertiliser") is not None else None, + "diesel": obj.get("diesel"), + "petrol": obj.get("petrol"), + "lpg": obj.get("lpg"), + "electricitySource": obj.get("electricitySource"), + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "herbicide": obj.get("herbicide"), + "herbicideOther": obj.get("herbicideOther"), + "beddingHayBarleyStraw": obj.get("beddingHayBarleyStraw"), + "feedProducts": [PostPorkRequestPorkInnerFeedProductsInner.from_dict(_item) for _item in obj["feedProducts"]] if obj.get("feedProducts") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes.py new file mode 100644 index 00000000..a2458fe1 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from openapi_client.models.post_pork_request_pork_inner_classes_boars import PostPorkRequestPorkInnerClassesBoars +from openapi_client.models.post_pork_request_pork_inner_classes_gilts import PostPorkRequestPorkInnerClassesGilts +from openapi_client.models.post_pork_request_pork_inner_classes_growers import PostPorkRequestPorkInnerClassesGrowers +from openapi_client.models.post_pork_request_pork_inner_classes_slaughter_pigs import PostPorkRequestPorkInnerClassesSlaughterPigs +from openapi_client.models.post_pork_request_pork_inner_classes_sows import PostPorkRequestPorkInnerClassesSows +from openapi_client.models.post_pork_request_pork_inner_classes_suckers import PostPorkRequestPorkInnerClassesSuckers +from openapi_client.models.post_pork_request_pork_inner_classes_weaners import PostPorkRequestPorkInnerClassesWeaners +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequestPorkInnerClasses(BaseModel): + """ + Pork classes of different types + """ # noqa: E501 + sows: Optional[PostPorkRequestPorkInnerClassesSows] = None + boars: Optional[PostPorkRequestPorkInnerClassesBoars] = None + gilts: Optional[PostPorkRequestPorkInnerClassesGilts] = None + suckers: Optional[PostPorkRequestPorkInnerClassesSuckers] = None + weaners: Optional[PostPorkRequestPorkInnerClassesWeaners] = None + growers: Optional[PostPorkRequestPorkInnerClassesGrowers] = None + slaughter_pigs: Optional[PostPorkRequestPorkInnerClassesSlaughterPigs] = Field(default=None, alias="slaughterPigs") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sows", "boars", "gilts", "suckers", "weaners", "growers", "slaughterPigs"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClasses from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of sows + if self.sows: + _dict['sows'] = self.sows.to_dict() + # override the default output from pydantic by calling `to_dict()` of boars + if self.boars: + _dict['boars'] = self.boars.to_dict() + # override the default output from pydantic by calling `to_dict()` of gilts + if self.gilts: + _dict['gilts'] = self.gilts.to_dict() + # override the default output from pydantic by calling `to_dict()` of suckers + if self.suckers: + _dict['suckers'] = self.suckers.to_dict() + # override the default output from pydantic by calling `to_dict()` of weaners + if self.weaners: + _dict['weaners'] = self.weaners.to_dict() + # override the default output from pydantic by calling `to_dict()` of growers + if self.growers: + _dict['growers'] = self.growers.to_dict() + # override the default output from pydantic by calling `to_dict()` of slaughter_pigs + if self.slaughter_pigs: + _dict['slaughterPigs'] = self.slaughter_pigs.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClasses from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sows": PostPorkRequestPorkInnerClassesSows.from_dict(obj["sows"]) if obj.get("sows") is not None else None, + "boars": PostPorkRequestPorkInnerClassesBoars.from_dict(obj["boars"]) if obj.get("boars") is not None else None, + "gilts": PostPorkRequestPorkInnerClassesGilts.from_dict(obj["gilts"]) if obj.get("gilts") is not None else None, + "suckers": PostPorkRequestPorkInnerClassesSuckers.from_dict(obj["suckers"]) if obj.get("suckers") is not None else None, + "weaners": PostPorkRequestPorkInnerClassesWeaners.from_dict(obj["weaners"]) if obj.get("weaners") is not None else None, + "growers": PostPorkRequestPorkInnerClassesGrowers.from_dict(obj["growers"]) if obj.get("growers") is not None else None, + "slaughterPigs": PostPorkRequestPorkInnerClassesSlaughterPigs.from_dict(obj["slaughterPigs"]) if obj.get("slaughterPigs") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_boars.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_boars.py new file mode 100644 index 00000000..4dedd50e --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_boars.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure import PostPorkRequestPorkInnerClassesSowsManure +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequestPorkInnerClassesBoars(BaseModel): + """ + Boars + """ # noqa: E501 + autumn: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in autumn") + winter: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in winter") + spring: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in spring") + summer: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in summer") + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + manure: PostPorkRequestPorkInnerClassesSowsManure + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "purchases", "manure"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesBoars from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # override the default output from pydantic by calling `to_dict()` of manure + if self.manure: + _dict['manure'] = self.manure.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesBoars from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": obj.get("autumn"), + "winter": obj.get("winter"), + "spring": obj.get("spring"), + "summer": obj.get("summer"), + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None, + "manure": PostPorkRequestPorkInnerClassesSowsManure.from_dict(obj["manure"]) if obj.get("manure") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_gilts.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_gilts.py new file mode 100644 index 00000000..446abd5b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_gilts.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure import PostPorkRequestPorkInnerClassesSowsManure +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequestPorkInnerClassesGilts(BaseModel): + """ + Gilts + """ # noqa: E501 + autumn: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in autumn") + winter: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in winter") + spring: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in spring") + summer: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in summer") + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + manure: PostPorkRequestPorkInnerClassesSowsManure + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "purchases", "manure"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesGilts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # override the default output from pydantic by calling `to_dict()` of manure + if self.manure: + _dict['manure'] = self.manure.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesGilts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": obj.get("autumn"), + "winter": obj.get("winter"), + "spring": obj.get("spring"), + "summer": obj.get("summer"), + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None, + "manure": PostPorkRequestPorkInnerClassesSowsManure.from_dict(obj["manure"]) if obj.get("manure") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_growers.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_growers.py new file mode 100644 index 00000000..d5f93708 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_growers.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure import PostPorkRequestPorkInnerClassesSowsManure +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequestPorkInnerClassesGrowers(BaseModel): + """ + Growers + """ # noqa: E501 + autumn: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in autumn") + winter: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in winter") + spring: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in spring") + summer: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in summer") + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + manure: PostPorkRequestPorkInnerClassesSowsManure + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "purchases", "manure"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesGrowers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # override the default output from pydantic by calling `to_dict()` of manure + if self.manure: + _dict['manure'] = self.manure.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesGrowers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": obj.get("autumn"), + "winter": obj.get("winter"), + "spring": obj.get("spring"), + "summer": obj.get("summer"), + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None, + "manure": PostPorkRequestPorkInnerClassesSowsManure.from_dict(obj["manure"]) if obj.get("manure") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_slaughter_pigs.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_slaughter_pigs.py new file mode 100644 index 00000000..ba6c67c3 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_slaughter_pigs.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure import PostPorkRequestPorkInnerClassesSowsManure +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequestPorkInnerClassesSlaughterPigs(BaseModel): + """ + Slaughter Pigs + """ # noqa: E501 + autumn: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in autumn") + winter: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in winter") + spring: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in spring") + summer: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in summer") + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + manure: PostPorkRequestPorkInnerClassesSowsManure + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "purchases", "manure"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesSlaughterPigs from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # override the default output from pydantic by calling `to_dict()` of manure + if self.manure: + _dict['manure'] = self.manure.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesSlaughterPigs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": obj.get("autumn"), + "winter": obj.get("winter"), + "spring": obj.get("spring"), + "summer": obj.get("summer"), + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None, + "manure": PostPorkRequestPorkInnerClassesSowsManure.from_dict(obj["manure"]) if obj.get("manure") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_sows.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_sows.py new file mode 100644 index 00000000..af573412 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_sows.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure import PostPorkRequestPorkInnerClassesSowsManure +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequestPorkInnerClassesSows(BaseModel): + """ + Sows + """ # noqa: E501 + autumn: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in autumn") + winter: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in winter") + spring: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in spring") + summer: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in summer") + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + manure: PostPorkRequestPorkInnerClassesSowsManure + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "purchases", "manure"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesSows from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # override the default output from pydantic by calling `to_dict()` of manure + if self.manure: + _dict['manure'] = self.manure.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesSows from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": obj.get("autumn"), + "winter": obj.get("winter"), + "spring": obj.get("spring"), + "summer": obj.get("summer"), + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None, + "manure": PostPorkRequestPorkInnerClassesSowsManure.from_dict(obj["manure"]) if obj.get("manure") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_sows_manure.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_sows_manure.py new file mode 100644 index 00000000..e12e1e20 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_sows_manure.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure_spring import PostPorkRequestPorkInnerClassesSowsManureSpring +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequestPorkInnerClassesSowsManure(BaseModel): + """ + PostPorkRequestPorkInnerClassesSowsManure + """ # noqa: E501 + spring: PostPorkRequestPorkInnerClassesSowsManureSpring + summer: PostPorkRequestPorkInnerClassesSowsManureSpring + autumn: PostPorkRequestPorkInnerClassesSowsManureSpring + winter: PostPorkRequestPorkInnerClassesSowsManureSpring + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["spring", "summer", "autumn", "winter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesSowsManure from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesSowsManure from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "spring": PostPorkRequestPorkInnerClassesSowsManureSpring.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostPorkRequestPorkInnerClassesSowsManureSpring.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "autumn": PostPorkRequestPorkInnerClassesSowsManureSpring.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostPorkRequestPorkInnerClassesSowsManureSpring.from_dict(obj["winter"]) if obj.get("winter") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_sows_manure_spring.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_sows_manure_spring.py new file mode 100644 index 00000000..14ae5a04 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_sows_manure_spring.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequestPorkInnerClassesSowsManureSpring(BaseModel): + """ + PostPorkRequestPorkInnerClassesSowsManureSpring + """ # noqa: E501 + outdoor_systems: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount of volatile solids sent to outoor systems in t (tonnes)", alias="outdoorSystems") + covered_anaerobic_pond: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount of volatile solids sent to covered anaerobic pond in t (tonnes)", alias="coveredAnaerobicPond") + uncovered_anaerobic_pond: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount of volatile solids sent to uncovered anaerobic pond in t (tonnes)", alias="uncoveredAnaerobicPond") + deep_litter: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount of volatile solids sent to deep litter in t (tonnes)", alias="deepLitter") + undefined_system: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount of volatile solids where manure management system is not known or defined, in t (tonnes)", alias="undefinedSystem") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["outdoorSystems", "coveredAnaerobicPond", "uncoveredAnaerobicPond", "deepLitter", "undefinedSystem"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesSowsManureSpring from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesSowsManureSpring from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "outdoorSystems": obj.get("outdoorSystems"), + "coveredAnaerobicPond": obj.get("coveredAnaerobicPond"), + "uncoveredAnaerobicPond": obj.get("uncoveredAnaerobicPond"), + "deepLitter": obj.get("deepLitter"), + "undefinedSystem": obj.get("undefinedSystem") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_suckers.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_suckers.py new file mode 100644 index 00000000..0b0a37ca --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_suckers.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure import PostPorkRequestPorkInnerClassesSowsManure +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequestPorkInnerClassesSuckers(BaseModel): + """ + Suckers + """ # noqa: E501 + autumn: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in autumn") + winter: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in winter") + spring: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in spring") + summer: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in summer") + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + manure: PostPorkRequestPorkInnerClassesSowsManure + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "purchases", "manure"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesSuckers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # override the default output from pydantic by calling `to_dict()` of manure + if self.manure: + _dict['manure'] = self.manure.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesSuckers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": obj.get("autumn"), + "winter": obj.get("winter"), + "spring": obj.get("spring"), + "summer": obj.get("summer"), + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None, + "manure": PostPorkRequestPorkInnerClassesSowsManure.from_dict(obj["manure"]) if obj.get("manure") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_weaners.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_weaners.py new file mode 100644 index 00000000..58977d0a --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_classes_weaners.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure import PostPorkRequestPorkInnerClassesSowsManure +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequestPorkInnerClassesWeaners(BaseModel): + """ + Weaners + """ # noqa: E501 + autumn: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in autumn") + winter: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in winter") + spring: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in spring") + summer: Union[StrictFloat, StrictInt] = Field(description="Pig numbers in summer") + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + manure: PostPorkRequestPorkInnerClassesSowsManure + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "purchases", "manure"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesWeaners from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # override the default output from pydantic by calling `to_dict()` of manure + if self.manure: + _dict['manure'] = self.manure.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerClassesWeaners from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": obj.get("autumn"), + "winter": obj.get("winter"), + "spring": obj.get("spring"), + "summer": obj.get("summer"), + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None, + "manure": PostPorkRequestPorkInnerClassesSowsManure.from_dict(obj["manure"]) if obj.get("manure") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_feed_products_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_feed_products_inner.py new file mode 100644 index 00000000..01268972 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_feed_products_inner.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from openapi_client.models.post_pork_request_pork_inner_feed_products_inner_ingredients import PostPorkRequestPorkInnerFeedProductsInnerIngredients +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequestPorkInnerFeedProductsInner(BaseModel): + """ + Pig feed product + """ # noqa: E501 + feed_purchased: Union[StrictFloat, StrictInt] = Field(description="Pig feed purchased, in tonnes", alias="feedPurchased") + additional_ingredients: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Fraction of additional ingredient in feed mix, from 0 to 1", alias="additionalIngredients") + emissions_intensity: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of feed product in GHG (kg CO2-e/kg input)", alias="emissionsIntensity") + ingredients: PostPorkRequestPorkInnerFeedProductsInnerIngredients + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["feedPurchased", "additionalIngredients", "emissionsIntensity", "ingredients"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerFeedProductsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ingredients + if self.ingredients: + _dict['ingredients'] = self.ingredients.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerFeedProductsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "feedPurchased": obj.get("feedPurchased"), + "additionalIngredients": obj.get("additionalIngredients"), + "emissionsIntensity": obj.get("emissionsIntensity"), + "ingredients": PostPorkRequestPorkInnerFeedProductsInnerIngredients.from_dict(obj["ingredients"]) if obj.get("ingredients") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_feed_products_inner_ingredients.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_feed_products_inner_ingredients.py new file mode 100644 index 00000000..cf6c9a50 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_pork_inner_feed_products_inner_ingredients.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequestPorkInnerFeedProductsInnerIngredients(BaseModel): + """ + Feed product ingredients, each ingredient is a fraction from 0 to 1 + """ # noqa: E501 + wheat: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = None + barley: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = None + whey_powder: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, alias="wheyPowder") + canola_meal: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, alias="canolaMeal") + soybean_meal: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, alias="soybeanMeal") + meat_meal: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, alias="meatMeal") + blood_meal: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, alias="bloodMeal") + fishmeal: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = None + tallow: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = None + wheat_bran: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, alias="wheatBran") + beet_pulp: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, alias="beetPulp") + mill_mix: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, alias="millMix") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["wheat", "barley", "wheyPowder", "canolaMeal", "soybeanMeal", "meatMeal", "bloodMeal", "fishmeal", "tallow", "wheatBran", "beetPulp", "millMix"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerFeedProductsInnerIngredients from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequestPorkInnerFeedProductsInnerIngredients from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "wheat": obj.get("wheat"), + "barley": obj.get("barley"), + "wheyPowder": obj.get("wheyPowder"), + "canolaMeal": obj.get("canolaMeal"), + "soybeanMeal": obj.get("soybeanMeal"), + "meatMeal": obj.get("meatMeal"), + "bloodMeal": obj.get("bloodMeal"), + "fishmeal": obj.get("fishmeal"), + "tallow": obj.get("tallow"), + "wheatBran": obj.get("wheatBran"), + "beetPulp": obj.get("beetPulp"), + "millMix": obj.get("millMix") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_pork_request_vegetation_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_vegetation_inner.py new file mode 100644 index 00000000..e64891a3 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_pork_request_vegetation_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation +from typing import Optional, Set +from typing_extensions import Self + +class PostPorkRequestVegetationInner(BaseModel): + """ + Non-productive vegetation inputs allocated to a particular activity type + """ # noqa: E501 + vegetation: PostBeefRequestVegetationInnerVegetation + allocated_proportion: List[Union[StrictFloat, StrictInt]] = Field(description="The proportion of the sequestration that is allocated to the activity", alias="allocatedProportion") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vegetation", "allocatedProportion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPorkRequestVegetationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of vegetation + if self.vegetation: + _dict['vegetation'] = self.vegetation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPorkRequestVegetationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vegetation": PostBeefRequestVegetationInnerVegetation.from_dict(obj["vegetation"]) if obj.get("vegetation") is not None else None, + "allocatedProportion": obj.get("allocatedProportion") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response.py new file mode 100644 index 00000000..e5befe4f --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_poultry200_response_intensities import PostPoultry200ResponseIntensities +from openapi_client.models.post_poultry200_response_intermediate_broilers_inner import PostPoultry200ResponseIntermediateBroilersInner +from openapi_client.models.post_poultry200_response_intermediate_layers_inner import PostPoultry200ResponseIntermediateLayersInner +from openapi_client.models.post_poultry200_response_net import PostPoultry200ResponseNet +from openapi_client.models.post_poultry200_response_scope1 import PostPoultry200ResponseScope1 +from openapi_client.models.post_poultry200_response_scope3 import PostPoultry200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultry200Response(BaseModel): + """ + Emissions calculation output for the `poultry` calculator + """ # noqa: E501 + scope1: PostPoultry200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostPoultry200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + intermediate_broilers: List[PostPoultry200ResponseIntermediateBroilersInner] = Field(alias="intermediateBroilers") + intermediate_layers: List[PostPoultry200ResponseIntermediateLayersInner] = Field(alias="intermediateLayers") + net: PostPoultry200ResponseNet + intensities: PostPoultry200ResponseIntensities + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "intermediateBroilers", "intermediateLayers", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultry200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate_broilers (list) + _items = [] + if self.intermediate_broilers: + for _item_intermediate_broilers in self.intermediate_broilers: + if _item_intermediate_broilers: + _items.append(_item_intermediate_broilers.to_dict()) + _dict['intermediateBroilers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in intermediate_layers (list) + _items = [] + if self.intermediate_layers: + for _item_intermediate_layers in self.intermediate_layers: + if _item_intermediate_layers: + _items.append(_item_intermediate_layers.to_dict()) + _dict['intermediateLayers'] = _items + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultry200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostPoultry200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostPoultry200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intermediateBroilers": [PostPoultry200ResponseIntermediateBroilersInner.from_dict(_item) for _item in obj["intermediateBroilers"]] if obj.get("intermediateBroilers") is not None else None, + "intermediateLayers": [PostPoultry200ResponseIntermediateLayersInner.from_dict(_item) for _item in obj["intermediateLayers"]] if obj.get("intermediateLayers") is not None else None, + "net": PostPoultry200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostPoultry200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intensities.py new file mode 100644 index 00000000..1e8a76ea --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intensities.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultry200ResponseIntensities(BaseModel): + """ + PostPoultry200ResponseIntensities + """ # noqa: E501 + poultry_meat_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Poultry meat including carbon sequestration, in kg-CO2e/kg liveweight", alias="poultryMeatIncludingSequestration") + poultry_meat_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Poultry meat excluding carbon sequestration, in kg-CO2e/kg liveweight", alias="poultryMeatExcludingSequestration") + poultry_eggs_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Poultry eggs including carbon sequestration, in kg-CO2e/kg liveweight", alias="poultryEggsIncludingSequestration") + poultry_eggs_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Poultry eggs excluding carbon sequestration, in kg-CO2e/kg liveweight", alias="poultryEggsExcludingSequestration") + meat_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Poultry meat produced in kg", alias="meatProducedKg") + eggs_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Amount of eggs produced, in kg", alias="eggsProducedKg") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["poultryMeatIncludingSequestration", "poultryMeatExcludingSequestration", "poultryEggsIncludingSequestration", "poultryEggsExcludingSequestration", "meatProducedKg", "eggsProducedKg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "poultryMeatIncludingSequestration": obj.get("poultryMeatIncludingSequestration"), + "poultryMeatExcludingSequestration": obj.get("poultryMeatExcludingSequestration"), + "poultryEggsIncludingSequestration": obj.get("poultryEggsIncludingSequestration"), + "poultryEggsExcludingSequestration": obj.get("poultryEggsExcludingSequestration"), + "meatProducedKg": obj.get("meatProducedKg"), + "eggsProducedKg": obj.get("eggsProducedKg") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_broilers_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_broilers_inner.py new file mode 100644 index 00000000..4f859417 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_broilers_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_poultry200_response_intermediate_broilers_inner_intensities import PostPoultry200ResponseIntermediateBroilersInnerIntensities +from openapi_client.models.post_poultry200_response_scope1 import PostPoultry200ResponseScope1 +from openapi_client.models.post_poultry200_response_scope3 import PostPoultry200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultry200ResponseIntermediateBroilersInner(BaseModel): + """ + PostPoultry200ResponseIntermediateBroilersInner + """ # noqa: E501 + id: StrictStr + scope1: PostPoultry200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostPoultry200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseIntermediateInnerCarbonSequestration = Field(alias="carbonSequestration") + intensities: PostPoultry200ResponseIntermediateBroilersInnerIntensities + net: PostAquaculture200ResponseNet + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "carbonSequestration", "intensities", "net"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseIntermediateBroilersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseIntermediateBroilersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostPoultry200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostPoultry200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intensities": PostPoultry200ResponseIntermediateBroilersInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_broilers_inner_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_broilers_inner_intensities.py new file mode 100644 index 00000000..d42e541b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_broilers_inner_intensities.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultry200ResponseIntermediateBroilersInnerIntensities(BaseModel): + """ + PostPoultry200ResponseIntermediateBroilersInnerIntensities + """ # noqa: E501 + poultry_meat_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Poultry meat including carbon sequestration, in kg-CO2e/kg liveweight", alias="poultryMeatIncludingSequestration") + poultry_meat_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Poultry meat excluding carbon sequestration, in kg-CO2e/kg liveweight", alias="poultryMeatExcludingSequestration") + meat_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Poultry meat produced in kg liveweight", alias="meatProducedKg") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["poultryMeatIncludingSequestration", "poultryMeatExcludingSequestration", "meatProducedKg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseIntermediateBroilersInnerIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseIntermediateBroilersInnerIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "poultryMeatIncludingSequestration": obj.get("poultryMeatIncludingSequestration"), + "poultryMeatExcludingSequestration": obj.get("poultryMeatExcludingSequestration"), + "meatProducedKg": obj.get("meatProducedKg") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_layers_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_layers_inner.py new file mode 100644 index 00000000..59884c9d --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_layers_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_poultry200_response_intermediate_layers_inner_intensities import PostPoultry200ResponseIntermediateLayersInnerIntensities +from openapi_client.models.post_poultry200_response_scope1 import PostPoultry200ResponseScope1 +from openapi_client.models.post_poultry200_response_scope3 import PostPoultry200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultry200ResponseIntermediateLayersInner(BaseModel): + """ + PostPoultry200ResponseIntermediateLayersInner + """ # noqa: E501 + id: StrictStr + scope1: PostPoultry200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostPoultry200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseIntermediateInnerCarbonSequestration = Field(alias="carbonSequestration") + intensities: PostPoultry200ResponseIntermediateLayersInnerIntensities + net: PostAquaculture200ResponseNet + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "carbonSequestration", "intensities", "net"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseIntermediateLayersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseIntermediateLayersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostPoultry200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostPoultry200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intensities": PostPoultry200ResponseIntermediateLayersInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_layers_inner_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_layers_inner_intensities.py new file mode 100644 index 00000000..5efaac15 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_intermediate_layers_inner_intensities.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultry200ResponseIntermediateLayersInnerIntensities(BaseModel): + """ + PostPoultry200ResponseIntermediateLayersInnerIntensities + """ # noqa: E501 + poultry_eggs_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Poultry eggs including carbon sequestration, in kg-CO2e/kg eggs", alias="poultryEggsIncludingSequestration") + poultry_eggs_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Poultry eggs excluding carbon sequestration, in kg-CO2e/kg eggs", alias="poultryEggsExcludingSequestration") + eggs_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Poultry eggs produced in kg", alias="eggsProducedKg") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["poultryEggsIncludingSequestration", "poultryEggsExcludingSequestration", "eggsProducedKg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseIntermediateLayersInnerIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseIntermediateLayersInnerIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "poultryEggsIncludingSequestration": obj.get("poultryEggsIncludingSequestration"), + "poultryEggsExcludingSequestration": obj.get("poultryEggsExcludingSequestration"), + "eggsProducedKg": obj.get("eggsProducedKg") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_net.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_net.py new file mode 100644 index 00000000..6a77506d --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_net.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultry200ResponseNet(BaseModel): + """ + PostPoultry200ResponseNet + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] = Field(description="Total net emissions of this activity, in tonnes-CO2e/year") + broilers: Union[StrictFloat, StrictInt] = Field(description="Net emissions of broilers, in tonnes-CO2e/year") + layers: Union[StrictFloat, StrictInt] = Field(description="Net emissions of layers, in tonnes-CO2e/year") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "broilers", "layers"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseNet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseNet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "broilers": obj.get("broilers"), + "layers": obj.get("layers") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_scope1.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_scope1.py new file mode 100644 index 00000000..05ecba1c --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_scope1.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultry200ResponseScope1(BaseModel): + """ + Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fuel_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from fuel use, in tonnes-CO2e", alias="fuelCO2") + fuel_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from fuel use, in tonnes-CO2e", alias="fuelCH4") + fuel_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fuel use, in tonnes-CO2e", alias="fuelN2O") + manure_management_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from manure management, in tonnes-CO2e", alias="manureManagementCH4") + manure_management_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from manure management, in tonnes-CO2e", alias="manureManagementN2O") + atmospheric_deposition_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from atmospheric deposition, in tonnes-CO2e", alias="atmosphericDepositionN2O") + leaching_and_runoff_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from leeching and runoff, in tonnes-CO2e", alias="leachingAndRunoffN2O") + total_co2: Union[StrictFloat, StrictInt] = Field(description="Total CO2 scope 1 emissions, in tonnes-CO2e", alias="totalCO2") + total_ch4: Union[StrictFloat, StrictInt] = Field(description="Total CH4 scope 1 emissions, in tonnes-CO2e", alias="totalCH4") + total_n2_o: Union[StrictFloat, StrictInt] = Field(description="Total N2O scope 1 emissions, in tonnes-CO2e", alias="totalN2O") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 1 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuelCO2", "fuelCH4", "fuelN2O", "manureManagementCH4", "manureManagementN2O", "atmosphericDepositionN2O", "leachingAndRunoffN2O", "totalCO2", "totalCH4", "totalN2O", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseScope1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseScope1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuelCO2": obj.get("fuelCO2"), + "fuelCH4": obj.get("fuelCH4"), + "fuelN2O": obj.get("fuelN2O"), + "manureManagementCH4": obj.get("manureManagementCH4"), + "manureManagementN2O": obj.get("manureManagementN2O"), + "atmosphericDepositionN2O": obj.get("atmosphericDepositionN2O"), + "leachingAndRunoffN2O": obj.get("leachingAndRunoffN2O"), + "totalCO2": obj.get("totalCO2"), + "totalCH4": obj.get("totalCH4"), + "totalN2O": obj.get("totalN2O"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_scope3.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_scope3.py new file mode 100644 index 00000000..53353892 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry200_response_scope3.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultry200ResponseScope3(BaseModel): + """ + Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + purchased_feed: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased feed, in tonnes-CO2e", alias="purchasedFeed") + purchased_hay: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased hay, in tonnes-CO2e", alias="purchasedHay") + purchased_livestock: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased livestock, in tonnes-CO2e", alias="purchasedLivestock") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Emissions from herbicide, in tonnes-CO2e") + electricity: Union[StrictFloat, StrictInt] = Field(description="Emissions from electricity, in tonnes-CO2e") + fuel: Union[StrictFloat, StrictInt] = Field(description="Emissions from fuel, in tonnes-CO2e") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 3 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["purchasedFeed", "purchasedHay", "purchasedLivestock", "herbicide", "electricity", "fuel", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseScope3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultry200ResponseScope3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "purchasedFeed": obj.get("purchasedFeed"), + "purchasedHay": obj.get("purchasedHay"), + "purchasedLivestock": obj.get("purchasedLivestock"), + "herbicide": obj.get("herbicide"), + "electricity": obj.get("electricity"), + "fuel": obj.get("fuel"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request.py new file mode 100644 index 00000000..2ed0bc4d --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_poultry_request_broilers_inner import PostPoultryRequestBroilersInner +from openapi_client.models.post_poultry_request_layers_inner import PostPoultryRequestLayersInner +from openapi_client.models.post_poultry_request_vegetation_inner import PostPoultryRequestVegetationInner +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequest(BaseModel): + """ + Input data required for the `poultry` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + north_of_tropic_of_capricorn: StrictBool = Field(description="Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude", alias="northOfTropicOfCapricorn") + rainfall_above600: StrictBool = Field(description="Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm", alias="rainfallAbove600") + broilers: List[PostPoultryRequestBroilersInner] + layers: List[PostPoultryRequestLayersInner] + vegetation: List[PostPoultryRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "northOfTropicOfCapricorn", "rainfallAbove600", "broilers", "layers", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in broilers (list) + _items = [] + if self.broilers: + for _item_broilers in self.broilers: + if _item_broilers: + _items.append(_item_broilers.to_dict()) + _dict['broilers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in layers (list) + _items = [] + if self.layers: + for _item_layers in self.layers: + if _item_layers: + _items.append(_item_layers.to_dict()) + _dict['layers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "northOfTropicOfCapricorn": obj.get("northOfTropicOfCapricorn"), + "rainfallAbove600": obj.get("rainfallAbove600"), + "broilers": [PostPoultryRequestBroilersInner.from_dict(_item) for _item in obj["broilers"]] if obj.get("broilers") is not None else None, + "layers": [PostPoultryRequestLayersInner.from_dict(_item) for _item in obj["layers"]] if obj.get("layers") is not None else None, + "vegetation": [PostPoultryRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner.py new file mode 100644 index 00000000..8ddf7c5f --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner import PostPoultryRequestBroilersInnerGroupsInner +from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_growers_purchases import PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases +from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_layers_purchases import PostPoultryRequestBroilersInnerMeatChickenLayersPurchases +from openapi_client.models.post_poultry_request_broilers_inner_meat_other_purchases import PostPoultryRequestBroilersInnerMeatOtherPurchases +from openapi_client.models.post_poultry_request_broilers_inner_sales_inner import PostPoultryRequestBroilersInnerSalesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestBroilersInner(BaseModel): + """ + PostPoultryRequestBroilersInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + groups: List[PostPoultryRequestBroilersInnerGroupsInner] + diesel: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)") + petrol: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + electricity_source: StrictStr = Field(description="Source of electricity", alias="electricitySource") + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + hay: Union[StrictFloat, StrictInt] = Field(description="Hay purchased in tonnes") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms)") + herbicide_other: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from other herbicides in kg (kilograms)", alias="herbicideOther") + manure_waste_allocation: Union[StrictFloat, StrictInt] = Field(description="Fraction allocation of manure waste, from 0 to 1. Note: only for pasture range, paddock and free range systems", alias="manureWasteAllocation") + waste_handled_drylot_or_storage: Union[StrictFloat, StrictInt] = Field(description="Fraction of waste handled through dryland and solid storage, from 0 to 1", alias="wasteHandledDrylotOrStorage") + litter_recycled: Union[StrictFloat, StrictInt] = Field(description="Fraction of litter recycled, from 0 to 1", alias="litterRecycled") + litter_recycle_frequency: Union[StrictFloat, StrictInt] = Field(description="Number of litter cycles per year", alias="litterRecycleFrequency") + purchased_free_range: Union[StrictFloat, StrictInt] = Field(description="Fraction of chickens purchased that are free range. Note: fraction of chickens purchased that are conventional is `1 - purchasedFreeRange`", alias="purchasedFreeRange") + meat_chicken_growers_purchases: PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases = Field(alias="meatChickenGrowersPurchases") + meat_chicken_layers_purchases: PostPoultryRequestBroilersInnerMeatChickenLayersPurchases = Field(alias="meatChickenLayersPurchases") + meat_other_purchases: PostPoultryRequestBroilersInnerMeatOtherPurchases = Field(alias="meatOtherPurchases") + sales: List[PostPoultryRequestBroilersInnerSalesInner] = Field(description="Broiler sales") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "groups", "diesel", "petrol", "lpg", "electricitySource", "electricityRenewable", "electricityUse", "hay", "herbicide", "herbicideOther", "manureWasteAllocation", "wasteHandledDrylotOrStorage", "litterRecycled", "litterRecycleFrequency", "purchasedFreeRange", "meatChickenGrowersPurchases", "meatChickenLayersPurchases", "meatOtherPurchases", "sales"] + + @field_validator('electricity_source') + def electricity_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['State Grid', 'Renewable']): + raise ValueError("must be one of enum values ('State Grid', 'Renewable')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in groups (list) + _items = [] + if self.groups: + for _item_groups in self.groups: + if _item_groups: + _items.append(_item_groups.to_dict()) + _dict['groups'] = _items + # override the default output from pydantic by calling `to_dict()` of meat_chicken_growers_purchases + if self.meat_chicken_growers_purchases: + _dict['meatChickenGrowersPurchases'] = self.meat_chicken_growers_purchases.to_dict() + # override the default output from pydantic by calling `to_dict()` of meat_chicken_layers_purchases + if self.meat_chicken_layers_purchases: + _dict['meatChickenLayersPurchases'] = self.meat_chicken_layers_purchases.to_dict() + # override the default output from pydantic by calling `to_dict()` of meat_other_purchases + if self.meat_other_purchases: + _dict['meatOtherPurchases'] = self.meat_other_purchases.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in sales (list) + _items = [] + if self.sales: + for _item_sales in self.sales: + if _item_sales: + _items.append(_item_sales.to_dict()) + _dict['sales'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "groups": [PostPoultryRequestBroilersInnerGroupsInner.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None, + "diesel": obj.get("diesel"), + "petrol": obj.get("petrol"), + "lpg": obj.get("lpg"), + "electricitySource": obj.get("electricitySource"), + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "hay": obj.get("hay"), + "herbicide": obj.get("herbicide"), + "herbicideOther": obj.get("herbicideOther"), + "manureWasteAllocation": obj.get("manureWasteAllocation"), + "wasteHandledDrylotOrStorage": obj.get("wasteHandledDrylotOrStorage"), + "litterRecycled": obj.get("litterRecycled"), + "litterRecycleFrequency": obj.get("litterRecycleFrequency"), + "purchasedFreeRange": obj.get("purchasedFreeRange"), + "meatChickenGrowersPurchases": PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.from_dict(obj["meatChickenGrowersPurchases"]) if obj.get("meatChickenGrowersPurchases") is not None else None, + "meatChickenLayersPurchases": PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.from_dict(obj["meatChickenLayersPurchases"]) if obj.get("meatChickenLayersPurchases") is not None else None, + "meatOtherPurchases": PostPoultryRequestBroilersInnerMeatOtherPurchases.from_dict(obj["meatOtherPurchases"]) if obj.get("meatOtherPurchases") is not None else None, + "sales": [PostPoultryRequestBroilersInnerSalesInner.from_dict(_item) for _item in obj["sales"]] if obj.get("sales") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner.py new file mode 100644 index 00000000..d3e9193f --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner import PostPoultryRequestBroilersInnerGroupsInnerFeedInner +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers import PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestBroilersInnerGroupsInner(BaseModel): + """ + Poultry broiler group + """ # noqa: E501 + meat_chicken_growers: PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers = Field(alias="meatChickenGrowers") + meat_chicken_layers: PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers = Field(alias="meatChickenLayers") + meat_other: PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers = Field(alias="meatOther") + feed: List[PostPoultryRequestBroilersInnerGroupsInnerFeedInner] + custom_feed_purchased: Union[StrictFloat, StrictInt] = Field(description="Custom feed purchased, in tonnes", alias="customFeedPurchased") + custom_feed_emission_intensity: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of custom feed in GHG (kg CO2-e/kg input)", alias="customFeedEmissionIntensity") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["meatChickenGrowers", "meatChickenLayers", "meatOther", "feed", "customFeedPurchased", "customFeedEmissionIntensity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerGroupsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of meat_chicken_growers + if self.meat_chicken_growers: + _dict['meatChickenGrowers'] = self.meat_chicken_growers.to_dict() + # override the default output from pydantic by calling `to_dict()` of meat_chicken_layers + if self.meat_chicken_layers: + _dict['meatChickenLayers'] = self.meat_chicken_layers.to_dict() + # override the default output from pydantic by calling `to_dict()` of meat_other + if self.meat_other: + _dict['meatOther'] = self.meat_other.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in feed (list) + _items = [] + if self.feed: + for _item_feed in self.feed: + if _item_feed: + _items.append(_item_feed.to_dict()) + _dict['feed'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerGroupsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "meatChickenGrowers": PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.from_dict(obj["meatChickenGrowers"]) if obj.get("meatChickenGrowers") is not None else None, + "meatChickenLayers": PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.from_dict(obj["meatChickenLayers"]) if obj.get("meatChickenLayers") is not None else None, + "meatOther": PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.from_dict(obj["meatOther"]) if obj.get("meatOther") is not None else None, + "feed": [PostPoultryRequestBroilersInnerGroupsInnerFeedInner.from_dict(_item) for _item in obj["feed"]] if obj.get("feed") is not None else None, + "customFeedPurchased": obj.get("customFeedPurchased"), + "customFeedEmissionIntensity": obj.get("customFeedEmissionIntensity") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner_feed_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner_feed_inner.py new file mode 100644 index 00000000..ff135425 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner_feed_inner.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients import PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestBroilersInnerGroupsInnerFeedInner(BaseModel): + """ + Poultry feed + """ # noqa: E501 + ingredients: PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients + feed_purchased: Union[StrictFloat, StrictInt] = Field(description="Feed purchased, in tonnes", alias="feedPurchased") + additional_ingredient: Union[StrictFloat, StrictInt] = Field(description="Fraction of additional ingredients in feed mix, from 0 to 1", alias="additionalIngredient") + emission_intensity: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of feed product in GHG (kg CO2-e/kg input)", alias="emissionIntensity") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ingredients", "feedPurchased", "additionalIngredient", "emissionIntensity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerGroupsInnerFeedInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ingredients + if self.ingredients: + _dict['ingredients'] = self.ingredients.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerGroupsInnerFeedInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ingredients": PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.from_dict(obj["ingredients"]) if obj.get("ingredients") is not None else None, + "feedPurchased": obj.get("feedPurchased"), + "additionalIngredient": obj.get("additionalIngredient"), + "emissionIntensity": obj.get("emissionIntensity") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py new file mode 100644 index 00000000..7ff2a292 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients(BaseModel): + """ + Poultry broiler feed ingredients as fractions, each from 0 to 1 + """ # noqa: E501 + wheat: Optional[Union[StrictFloat, StrictInt]] = None + barley: Optional[Union[StrictFloat, StrictInt]] = None + sorghum: Optional[Union[StrictFloat, StrictInt]] = None + soybean: Optional[Union[StrictFloat, StrictInt]] = None + millrun: Optional[Union[StrictFloat, StrictInt]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["wheat", "barley", "sorghum", "soybean", "millrun"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "wheat": obj.get("wheat"), + "barley": obj.get("barley"), + "sorghum": obj.get("sorghum"), + "soybean": obj.get("soybean"), + "millrun": obj.get("millrun") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py new file mode 100644 index 00000000..c8f71605 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers(BaseModel): + """ + Broiler class with seasonal data + """ # noqa: E501 + birds: Union[StrictFloat, StrictInt] = Field(description="Total number of birds/head") + average_stay_length50: Union[StrictFloat, StrictInt] = Field(description="Average length of stay until 50% of the flock is depleted, in days", alias="averageStayLength50") + liveweight50: Union[StrictFloat, StrictInt] = Field(description="Average liveweight during the 50% depletion period, in kg") + average_stay_length100: Union[StrictFloat, StrictInt] = Field(description="Average length of stay until 100% of the flock is depleted, in days", alias="averageStayLength100") + liveweight100: Union[StrictFloat, StrictInt] = Field(description="Average liveweight during the 100% depletion period, in kg") + dry_matter_intake: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Dry matter intake, in kg/head/day", alias="dryMatterIntake") + dry_matter_digestibility: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Dry matter digestibility fraction, from 0 to 1", alias="dryMatterDigestibility") + crude_protein: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Crude protein fraction, from 0 to 1", alias="crudeProtein") + manure_ash: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Manure ash fraction, from 0 to 1", alias="manureAsh") + nitrogen_retention_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Nitrogen retention rate fraction, from 0 to 1", alias="nitrogenRetentionRate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["birds", "averageStayLength50", "liveweight50", "averageStayLength100", "liveweight100", "dryMatterIntake", "dryMatterDigestibility", "crudeProtein", "manureAsh", "nitrogenRetentionRate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "birds": obj.get("birds"), + "averageStayLength50": obj.get("averageStayLength50"), + "liveweight50": obj.get("liveweight50"), + "averageStayLength100": obj.get("averageStayLength100"), + "liveweight100": obj.get("liveweight100"), + "dryMatterIntake": obj.get("dryMatterIntake"), + "dryMatterDigestibility": obj.get("dryMatterDigestibility"), + "crudeProtein": obj.get("crudeProtein"), + "manureAsh": obj.get("manureAsh"), + "nitrogenRetentionRate": obj.get("nitrogenRetentionRate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py new file mode 100644 index 00000000..c0b74365 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases(BaseModel): + """ + Livestock purchases of meat chicken growers + """ # noqa: E501 + head: Union[StrictFloat, StrictInt] = Field(description="Number of animals purchased (head)") + purchase_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at purchase, in liveweight kg/head (kilogram per head)", alias="purchaseWeight") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["head", "purchaseWeight"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "head": obj.get("head"), + "purchaseWeight": obj.get("purchaseWeight") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py new file mode 100644 index 00000000..7eb1e655 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestBroilersInnerMeatChickenLayersPurchases(BaseModel): + """ + Livestock purchases of meat chicken layers + """ # noqa: E501 + head: Union[StrictFloat, StrictInt] = Field(description="Number of animals purchased (head)") + purchase_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at purchase, in liveweight kg/head (kilogram per head)", alias="purchaseWeight") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["head", "purchaseWeight"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerMeatChickenLayersPurchases from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerMeatChickenLayersPurchases from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "head": obj.get("head"), + "purchaseWeight": obj.get("purchaseWeight") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_meat_other_purchases.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_meat_other_purchases.py new file mode 100644 index 00000000..63e605a9 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_meat_other_purchases.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestBroilersInnerMeatOtherPurchases(BaseModel): + """ + Livestock purchases of meat other + """ # noqa: E501 + head: Union[StrictFloat, StrictInt] = Field(description="Number of animals purchased (head)") + purchase_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at purchase, in liveweight kg/head (kilogram per head)", alias="purchaseWeight") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["head", "purchaseWeight"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerMeatOtherPurchases from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerMeatOtherPurchases from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "head": obj.get("head"), + "purchaseWeight": obj.get("purchaseWeight") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_sales_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_sales_inner.py new file mode 100644 index 00000000..6a757194 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_broilers_inner_sales_inner.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestBroilersInnerSalesInner(BaseModel): + """ + Poultry broiler sales + """ # noqa: E501 + meat_chicken_growers_sales: PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner = Field(alias="meatChickenGrowersSales") + meat_chicken_layers: PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner = Field(alias="meatChickenLayers") + meat_other: PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner = Field(alias="meatOther") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["meatChickenGrowersSales", "meatChickenLayers", "meatOther"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerSalesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of meat_chicken_growers_sales + if self.meat_chicken_growers_sales: + _dict['meatChickenGrowersSales'] = self.meat_chicken_growers_sales.to_dict() + # override the default output from pydantic by calling `to_dict()` of meat_chicken_layers + if self.meat_chicken_layers: + _dict['meatChickenLayers'] = self.meat_chicken_layers.to_dict() + # override the default output from pydantic by calling `to_dict()` of meat_other + if self.meat_other: + _dict['meatOther'] = self.meat_other.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestBroilersInnerSalesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "meatChickenGrowersSales": PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(obj["meatChickenGrowersSales"]) if obj.get("meatChickenGrowersSales") is not None else None, + "meatChickenLayers": PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(obj["meatChickenLayers"]) if obj.get("meatChickenLayers") is not None else None, + "meatOther": PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(obj["meatOther"]) if obj.get("meatOther") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner.py new file mode 100644 index 00000000..c0d15b5d --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner.py @@ -0,0 +1,187 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner import PostPoultryRequestBroilersInnerGroupsInnerFeedInner +from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_layers_purchases import PostPoultryRequestBroilersInnerMeatChickenLayersPurchases +from openapi_client.models.post_poultry_request_layers_inner_layers import PostPoultryRequestLayersInnerLayers +from openapi_client.models.post_poultry_request_layers_inner_layers_egg_sale import PostPoultryRequestLayersInnerLayersEggSale +from openapi_client.models.post_poultry_request_layers_inner_layers_purchases import PostPoultryRequestLayersInnerLayersPurchases +from openapi_client.models.post_poultry_request_layers_inner_meat_chicken_layers import PostPoultryRequestLayersInnerMeatChickenLayers +from openapi_client.models.post_poultry_request_layers_inner_meat_chicken_layers_egg_sale import PostPoultryRequestLayersInnerMeatChickenLayersEggSale +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestLayersInner(BaseModel): + """ + PostPoultryRequestLayersInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + layers: PostPoultryRequestLayersInnerLayers + meat_chicken_layers: PostPoultryRequestLayersInnerMeatChickenLayers = Field(alias="meatChickenLayers") + feed: List[PostPoultryRequestBroilersInnerGroupsInnerFeedInner] + purchased_free_range: Union[StrictFloat, StrictInt] = Field(description="Fraction of chickens purchased that are free range. Note: fraction of chickens purchased that are conventional is `1 - purchasedFreeRange`", alias="purchasedFreeRange") + diesel: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)") + petrol: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + electricity_source: StrictStr = Field(description="Source of electricity", alias="electricitySource") + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + hay: Union[StrictFloat, StrictInt] = Field(description="Hay purchased in tonnes") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms)") + herbicide_other: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from other herbicides in kg (kilograms)", alias="herbicideOther") + manure_waste_allocation: Union[StrictFloat, StrictInt] = Field(description="Fraction allocation of manure waste, from 0 to 1. Note: only for pasture range, paddock and free range systems", alias="manureWasteAllocation") + waste_handled_drylot_or_storage: Union[StrictFloat, StrictInt] = Field(description="Fraction of waste handled through dryland and solid storage, from 0 to 1", alias="wasteHandledDrylotOrStorage") + litter_recycled: Union[StrictFloat, StrictInt] = Field(description="Fraction of litter recycled, from 0 to 1", alias="litterRecycled") + litter_recycle_frequency: Union[StrictFloat, StrictInt] = Field(description="Number of litter cycles per year", alias="litterRecycleFrequency") + meat_chicken_layers_purchases: PostPoultryRequestBroilersInnerMeatChickenLayersPurchases = Field(alias="meatChickenLayersPurchases") + layers_purchases: PostPoultryRequestLayersInnerLayersPurchases = Field(alias="layersPurchases") + custom_feed_purchased: Union[StrictFloat, StrictInt] = Field(description="Custom feed purchased, in tonnes", alias="customFeedPurchased") + custom_feed_emission_intensity: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of custom feed in GHG (kg CO2-e/kg input)", alias="customFeedEmissionIntensity") + meat_chicken_layers_egg_sale: PostPoultryRequestLayersInnerMeatChickenLayersEggSale = Field(alias="meatChickenLayersEggSale") + layers_egg_sale: PostPoultryRequestLayersInnerLayersEggSale = Field(alias="layersEggSale") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "layers", "meatChickenLayers", "feed", "purchasedFreeRange", "diesel", "petrol", "lpg", "electricitySource", "electricityRenewable", "electricityUse", "hay", "herbicide", "herbicideOther", "manureWasteAllocation", "wasteHandledDrylotOrStorage", "litterRecycled", "litterRecycleFrequency", "meatChickenLayersPurchases", "layersPurchases", "customFeedPurchased", "customFeedEmissionIntensity", "meatChickenLayersEggSale", "layersEggSale"] + + @field_validator('electricity_source') + def electricity_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['State Grid', 'Renewable']): + raise ValueError("must be one of enum values ('State Grid', 'Renewable')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestLayersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of layers + if self.layers: + _dict['layers'] = self.layers.to_dict() + # override the default output from pydantic by calling `to_dict()` of meat_chicken_layers + if self.meat_chicken_layers: + _dict['meatChickenLayers'] = self.meat_chicken_layers.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in feed (list) + _items = [] + if self.feed: + for _item_feed in self.feed: + if _item_feed: + _items.append(_item_feed.to_dict()) + _dict['feed'] = _items + # override the default output from pydantic by calling `to_dict()` of meat_chicken_layers_purchases + if self.meat_chicken_layers_purchases: + _dict['meatChickenLayersPurchases'] = self.meat_chicken_layers_purchases.to_dict() + # override the default output from pydantic by calling `to_dict()` of layers_purchases + if self.layers_purchases: + _dict['layersPurchases'] = self.layers_purchases.to_dict() + # override the default output from pydantic by calling `to_dict()` of meat_chicken_layers_egg_sale + if self.meat_chicken_layers_egg_sale: + _dict['meatChickenLayersEggSale'] = self.meat_chicken_layers_egg_sale.to_dict() + # override the default output from pydantic by calling `to_dict()` of layers_egg_sale + if self.layers_egg_sale: + _dict['layersEggSale'] = self.layers_egg_sale.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestLayersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "layers": PostPoultryRequestLayersInnerLayers.from_dict(obj["layers"]) if obj.get("layers") is not None else None, + "meatChickenLayers": PostPoultryRequestLayersInnerMeatChickenLayers.from_dict(obj["meatChickenLayers"]) if obj.get("meatChickenLayers") is not None else None, + "feed": [PostPoultryRequestBroilersInnerGroupsInnerFeedInner.from_dict(_item) for _item in obj["feed"]] if obj.get("feed") is not None else None, + "purchasedFreeRange": obj.get("purchasedFreeRange"), + "diesel": obj.get("diesel"), + "petrol": obj.get("petrol"), + "lpg": obj.get("lpg"), + "electricitySource": obj.get("electricitySource"), + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "hay": obj.get("hay"), + "herbicide": obj.get("herbicide"), + "herbicideOther": obj.get("herbicideOther"), + "manureWasteAllocation": obj.get("manureWasteAllocation"), + "wasteHandledDrylotOrStorage": obj.get("wasteHandledDrylotOrStorage"), + "litterRecycled": obj.get("litterRecycled"), + "litterRecycleFrequency": obj.get("litterRecycleFrequency"), + "meatChickenLayersPurchases": PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.from_dict(obj["meatChickenLayersPurchases"]) if obj.get("meatChickenLayersPurchases") is not None else None, + "layersPurchases": PostPoultryRequestLayersInnerLayersPurchases.from_dict(obj["layersPurchases"]) if obj.get("layersPurchases") is not None else None, + "customFeedPurchased": obj.get("customFeedPurchased"), + "customFeedEmissionIntensity": obj.get("customFeedEmissionIntensity"), + "meatChickenLayersEggSale": PostPoultryRequestLayersInnerMeatChickenLayersEggSale.from_dict(obj["meatChickenLayersEggSale"]) if obj.get("meatChickenLayersEggSale") is not None else None, + "layersEggSale": PostPoultryRequestLayersInnerLayersEggSale.from_dict(obj["layersEggSale"]) if obj.get("layersEggSale") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_layers.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_layers.py new file mode 100644 index 00000000..4a0ccea6 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_layers.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestLayersInnerLayers(BaseModel): + """ + Layers + """ # noqa: E501 + autumn: Union[StrictFloat, StrictInt] = Field(description="Flock numbers in autumn") + winter: Union[StrictFloat, StrictInt] = Field(description="Flock numbers in winter") + spring: Union[StrictFloat, StrictInt] = Field(description="Flock numbers in spring") + summer: Union[StrictFloat, StrictInt] = Field(description="Flock numbers in summer") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestLayersInnerLayers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestLayersInnerLayers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": obj.get("autumn"), + "winter": obj.get("winter"), + "spring": obj.get("spring"), + "summer": obj.get("summer") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_layers_egg_sale.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_layers_egg_sale.py new file mode 100644 index 00000000..bd4665b5 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_layers_egg_sale.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestLayersInnerLayersEggSale(BaseModel): + """ + Layers egg sales + """ # noqa: E501 + eggs_produced: Union[StrictFloat, StrictInt] = Field(description="Number of eggs produced in a year per bird", alias="eggsProduced") + average_weight: Union[StrictFloat, StrictInt] = Field(description="Average egg weight in grams", alias="averageWeight") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["eggsProduced", "averageWeight"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestLayersInnerLayersEggSale from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestLayersInnerLayersEggSale from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "eggsProduced": obj.get("eggsProduced"), + "averageWeight": obj.get("averageWeight") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_layers_purchases.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_layers_purchases.py new file mode 100644 index 00000000..6f60ed5f --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_layers_purchases.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestLayersInnerLayersPurchases(BaseModel): + """ + Livestock purchases of layers + """ # noqa: E501 + head: Union[StrictFloat, StrictInt] = Field(description="Number of animals purchased (head)") + purchase_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at purchase, in liveweight kg/head (kilogram per head)", alias="purchaseWeight") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["head", "purchaseWeight"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestLayersInnerLayersPurchases from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestLayersInnerLayersPurchases from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "head": obj.get("head"), + "purchaseWeight": obj.get("purchaseWeight") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_meat_chicken_layers.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_meat_chicken_layers.py new file mode 100644 index 00000000..dfe39f30 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_meat_chicken_layers.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestLayersInnerMeatChickenLayers(BaseModel): + """ + Meat chicken layers + """ # noqa: E501 + autumn: Union[StrictFloat, StrictInt] = Field(description="Flock numbers in autumn") + winter: Union[StrictFloat, StrictInt] = Field(description="Flock numbers in winter") + spring: Union[StrictFloat, StrictInt] = Field(description="Flock numbers in spring") + summer: Union[StrictFloat, StrictInt] = Field(description="Flock numbers in summer") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestLayersInnerMeatChickenLayers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestLayersInnerMeatChickenLayers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": obj.get("autumn"), + "winter": obj.get("winter"), + "spring": obj.get("spring"), + "summer": obj.get("summer") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py new file mode 100644 index 00000000..af234462 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestLayersInnerMeatChickenLayersEggSale(BaseModel): + """ + Meat chicken layers egg sales + """ # noqa: E501 + eggs_produced: Union[StrictFloat, StrictInt] = Field(description="Number of eggs produced in a year per bird", alias="eggsProduced") + average_weight: Union[StrictFloat, StrictInt] = Field(description="Average egg weight in grams", alias="averageWeight") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["eggsProduced", "averageWeight"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestLayersInnerMeatChickenLayersEggSale from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestLayersInnerMeatChickenLayersEggSale from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "eggsProduced": obj.get("eggsProduced"), + "averageWeight": obj.get("averageWeight") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_vegetation_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_vegetation_inner.py new file mode 100644 index 00000000..11ac6eb2 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_poultry_request_vegetation_inner.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation +from typing import Optional, Set +from typing_extensions import Self + +class PostPoultryRequestVegetationInner(BaseModel): + """ + Non-productive vegetation inputs along with allocations to broilers and layers + """ # noqa: E501 + vegetation: PostBeefRequestVegetationInnerVegetation + broilers_proportion: List[Union[StrictFloat, StrictInt]] = Field(description="The proportion of the sequestration that is allocated to broilers", alias="broilersProportion") + layers_proportion: List[Union[StrictFloat, StrictInt]] = Field(description="The proportion of the sequestration that is allocated to layers", alias="layersProportion") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vegetation", "broilersProportion", "layersProportion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostPoultryRequestVegetationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of vegetation + if self.vegetation: + _dict['vegetation'] = self.vegetation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostPoultryRequestVegetationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vegetation": PostBeefRequestVegetationInnerVegetation.from_dict(obj["vegetation"]) if obj.get("vegetation") is not None else None, + "broilersProportion": obj.get("broilersProportion"), + "layersProportion": obj.get("layersProportion") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_processing200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_processing200_response.py new file mode 100644 index 00000000..a0c6fb7c --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_processing200_response.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_purchased_offsets import PostAquaculture200ResponsePurchasedOffsets +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_processing200_response_intensities_inner import PostProcessing200ResponseIntensitiesInner +from openapi_client.models.post_processing200_response_intermediate_inner import PostProcessing200ResponseIntermediateInner +from openapi_client.models.post_processing200_response_net import PostProcessing200ResponseNet +from openapi_client.models.post_processing200_response_scope1 import PostProcessing200ResponseScope1 +from openapi_client.models.post_processing200_response_scope3 import PostProcessing200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostProcessing200Response(BaseModel): + """ + Emissions calculation output for the `processing` calculator + """ # noqa: E501 + scope1: PostProcessing200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostProcessing200ResponseScope3 + purchased_offsets: PostAquaculture200ResponsePurchasedOffsets = Field(alias="purchasedOffsets") + net: PostProcessing200ResponseNet + intensities: List[PostProcessing200ResponseIntensitiesInner] + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + intermediate: List[PostProcessing200ResponseIntermediateInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "purchasedOffsets", "net", "intensities", "carbonSequestration", "intermediate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostProcessing200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of purchased_offsets + if self.purchased_offsets: + _dict['purchasedOffsets'] = self.purchased_offsets.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intensities (list) + _items = [] + if self.intensities: + for _item_intensities in self.intensities: + if _item_intensities: + _items.append(_item_intensities.to_dict()) + _dict['intensities'] = _items + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostProcessing200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostProcessing200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostProcessing200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "purchasedOffsets": PostAquaculture200ResponsePurchasedOffsets.from_dict(obj["purchasedOffsets"]) if obj.get("purchasedOffsets") is not None else None, + "net": PostProcessing200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": [PostProcessing200ResponseIntensitiesInner.from_dict(_item) for _item in obj["intensities"]] if obj.get("intensities") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intermediate": [PostProcessing200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_intensities_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_intensities_inner.py new file mode 100644 index 00000000..08feec1c --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_intensities_inner.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostProcessing200ResponseIntensitiesInner(BaseModel): + """ + PostProcessing200ResponseIntensitiesInner + """ # noqa: E501 + units_produced: Union[StrictFloat, StrictInt] = Field(description="Number of processed product units produced", alias="unitsProduced") + unit_of_product: StrictStr = Field(description="Unit type of the product being produced (used by \"unitsProduced\")", alias="unitOfProduct") + processing_excluding_carbon_offsets: Union[StrictFloat, StrictInt] = Field(description="Processing emissions intensity excluding carbon offsets, in kg-CO2e/number of units produced", alias="processingExcludingCarbonOffsets") + processing_including_carbon_offsets: Union[StrictFloat, StrictInt] = Field(description="Processing emissions intensity including carbon offsets, in kg-CO2e/number of units produced", alias="processingIncludingCarbonOffsets") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["unitsProduced", "unitOfProduct", "processingExcludingCarbonOffsets", "processingIncludingCarbonOffsets"] + + @field_validator('unit_of_product') + def unit_of_product_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['litre', 'tonne', 'unit', 'bottle', 'dozen']): + raise ValueError("must be one of enum values ('litre', 'tonne', 'unit', 'bottle', 'dozen')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostProcessing200ResponseIntensitiesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostProcessing200ResponseIntensitiesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "unitsProduced": obj.get("unitsProduced"), + "unitOfProduct": obj.get("unitOfProduct"), + "processingExcludingCarbonOffsets": obj.get("processingExcludingCarbonOffsets"), + "processingIncludingCarbonOffsets": obj.get("processingIncludingCarbonOffsets") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_intermediate_inner.py new file mode 100644 index 00000000..adb82421 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_intermediate_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_processing200_response_intensities_inner import PostProcessing200ResponseIntensitiesInner +from openapi_client.models.post_processing200_response_scope1 import PostProcessing200ResponseScope1 +from openapi_client.models.post_processing200_response_scope3 import PostProcessing200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostProcessing200ResponseIntermediateInner(BaseModel): + """ + PostProcessing200ResponseIntermediateInner + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostProcessing200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostProcessing200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseIntermediateInnerCarbonSequestration = Field(alias="carbonSequestration") + intensities: PostProcessing200ResponseIntensitiesInner + net: PostAquaculture200ResponseNet + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "carbonSequestration", "intensities", "net"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostProcessing200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostProcessing200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostProcessing200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostProcessing200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intensities": PostProcessing200ResponseIntensitiesInner.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_net.py b/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_net.py new file mode 100644 index 00000000..7e310022 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_net.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostProcessing200ResponseNet(BaseModel): + """ + Net emissions for the processing activity + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostProcessing200ResponseNet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostProcessing200ResponseNet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_scope1.py b/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_scope1.py new file mode 100644 index 00000000..0ef546a4 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_scope1.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostProcessing200ResponseScope1(BaseModel): + """ + Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fuel_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from fuel use, in tonnes-CO2e", alias="fuelCO2") + fuel_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from fuel use, in tonnes-CO2e", alias="fuelCH4") + fuel_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fuel use, in tonnes-CO2e", alias="fuelN2O") + hfcs_refrigerant_leakage: Union[StrictFloat, StrictInt] = Field(description="Emissions from refrigerant leakage, in tonnes-HFCs", alias="hfcsRefrigerantLeakage") + purchased_co2: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased CO2, in tonnes-CO2e", alias="purchasedCO2") + wastewater_co2: Union[StrictFloat, StrictInt] = Field(description="Emissions from wastewater, in tonnes-CO2e", alias="wastewaterCO2") + composted_solid_waste_co2: Union[StrictFloat, StrictInt] = Field(description="Emissions from composted solid waste, in tonnes-CO2e", alias="compostedSolidWasteCO2") + total_co2: Union[StrictFloat, StrictInt] = Field(description="Total CO2 scope 1 emissions, in tonnes-CO2e", alias="totalCO2") + total_ch4: Union[StrictFloat, StrictInt] = Field(description="Total CH4 scope 1 emissions, in tonnes-CO2e", alias="totalCH4") + total_n2_o: Union[StrictFloat, StrictInt] = Field(description="Total N2O scope 1 emissions, in tonnes-CO2e", alias="totalN2O") + total_hfcs: Union[StrictFloat, StrictInt] = Field(description="Total HFCs scope 1 emissions, in tonnes-CO2e", alias="totalHFCs") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 1 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuelCO2", "fuelCH4", "fuelN2O", "hfcsRefrigerantLeakage", "purchasedCO2", "wastewaterCO2", "compostedSolidWasteCO2", "totalCO2", "totalCH4", "totalN2O", "totalHFCs", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostProcessing200ResponseScope1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostProcessing200ResponseScope1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuelCO2": obj.get("fuelCO2"), + "fuelCH4": obj.get("fuelCH4"), + "fuelN2O": obj.get("fuelN2O"), + "hfcsRefrigerantLeakage": obj.get("hfcsRefrigerantLeakage"), + "purchasedCO2": obj.get("purchasedCO2"), + "wastewaterCO2": obj.get("wastewaterCO2"), + "compostedSolidWasteCO2": obj.get("compostedSolidWasteCO2"), + "totalCO2": obj.get("totalCO2"), + "totalCH4": obj.get("totalCH4"), + "totalN2O": obj.get("totalN2O"), + "totalHFCs": obj.get("totalHFCs"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_scope3.py b/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_scope3.py new file mode 100644 index 00000000..f0545d60 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_processing200_response_scope3.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostProcessing200ResponseScope3(BaseModel): + """ + Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + electricity: Union[StrictFloat, StrictInt] = Field(description="Emissions from electricity, in tonnes-CO2e") + fuel: Union[StrictFloat, StrictInt] = Field(description="Emissions from fuel, in tonnes-CO2e") + solid_waste_sent_offsite: Union[StrictFloat, StrictInt] = Field(description="Emissions from solid waste sent offsite, in tonnes-CO2e", alias="solidWasteSentOffsite") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 3 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["electricity", "fuel", "solidWasteSentOffsite", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostProcessing200ResponseScope3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostProcessing200ResponseScope3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "electricity": obj.get("electricity"), + "fuel": obj.get("fuel"), + "solidWasteSentOffsite": obj.get("solidWasteSentOffsite"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_processing_request.py b/examples/python-api-client/api-client/openapi_client/models/post_processing_request.py new file mode 100644 index 00000000..2ce62c82 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_processing_request.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_processing_request_products_inner import PostProcessingRequestProductsInner +from typing import Optional, Set +from typing_extensions import Self + +class PostProcessingRequest(BaseModel): + """ + Input data required for the `processing` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + products: List[PostProcessingRequestProductsInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "products"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostProcessingRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in products (list) + _items = [] + if self.products: + for _item_products in self.products: + if _item_products: + _items.append(_item_products.to_dict()) + _dict['products'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostProcessingRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "products": [PostProcessingRequestProductsInner.from_dict(_item) for _item in obj["products"]] if obj.get("products") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_processing_request_products_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_processing_request_products_inner.py new file mode 100644 index 00000000..5cce5572 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_processing_request_products_inner.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_aquaculture_request_enterprises_inner_fluid_waste_inner import PostAquacultureRequestEnterprisesInnerFluidWasteInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel import PostAquacultureRequestEnterprisesInnerFuel +from openapi_client.models.post_aquaculture_request_enterprises_inner_solid_waste import PostAquacultureRequestEnterprisesInnerSolidWaste +from openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner import PostHorticultureRequestCropsInnerRefrigerantsInner +from openapi_client.models.post_processing_request_products_inner_product import PostProcessingRequestProductsInnerProduct +from typing import Optional, Set +from typing_extensions import Self + +class PostProcessingRequestProductsInner(BaseModel): + """ + Input data required for processing a specific product + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + product: PostProcessingRequestProductsInnerProduct + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + electricity_source: StrictStr = Field(description="Source of electricity", alias="electricitySource") + fuel: PostAquacultureRequestEnterprisesInnerFuel + refrigerants: List[PostHorticultureRequestCropsInnerRefrigerantsInner] = Field(description="Refrigerant type") + fluid_waste: List[PostAquacultureRequestEnterprisesInnerFluidWasteInner] = Field(description="Amount of fluid waste, in kL (kilolitres)", alias="fluidWaste") + solid_waste: PostAquacultureRequestEnterprisesInnerSolidWaste = Field(alias="solidWaste") + purchased_co2: Union[StrictFloat, StrictInt] = Field(description="Quantity of CO2 purchased, in kg CO2", alias="purchasedCO2") + carbon_offsets: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0)", alias="carbonOffsets") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "product", "electricityRenewable", "electricityUse", "electricitySource", "fuel", "refrigerants", "fluidWaste", "solidWaste", "purchasedCO2", "carbonOffsets"] + + @field_validator('electricity_source') + def electricity_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['State Grid', 'Renewable']): + raise ValueError("must be one of enum values ('State Grid', 'Renewable')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostProcessingRequestProductsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of product + if self.product: + _dict['product'] = self.product.to_dict() + # override the default output from pydantic by calling `to_dict()` of fuel + if self.fuel: + _dict['fuel'] = self.fuel.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in refrigerants (list) + _items = [] + if self.refrigerants: + for _item_refrigerants in self.refrigerants: + if _item_refrigerants: + _items.append(_item_refrigerants.to_dict()) + _dict['refrigerants'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in fluid_waste (list) + _items = [] + if self.fluid_waste: + for _item_fluid_waste in self.fluid_waste: + if _item_fluid_waste: + _items.append(_item_fluid_waste.to_dict()) + _dict['fluidWaste'] = _items + # override the default output from pydantic by calling `to_dict()` of solid_waste + if self.solid_waste: + _dict['solidWaste'] = self.solid_waste.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostProcessingRequestProductsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "product": PostProcessingRequestProductsInnerProduct.from_dict(obj["product"]) if obj.get("product") is not None else None, + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "electricitySource": obj.get("electricitySource"), + "fuel": PostAquacultureRequestEnterprisesInnerFuel.from_dict(obj["fuel"]) if obj.get("fuel") is not None else None, + "refrigerants": [PostHorticultureRequestCropsInnerRefrigerantsInner.from_dict(_item) for _item in obj["refrigerants"]] if obj.get("refrigerants") is not None else None, + "fluidWaste": [PostAquacultureRequestEnterprisesInnerFluidWasteInner.from_dict(_item) for _item in obj["fluidWaste"]] if obj.get("fluidWaste") is not None else None, + "solidWaste": PostAquacultureRequestEnterprisesInnerSolidWaste.from_dict(obj["solidWaste"]) if obj.get("solidWaste") is not None else None, + "purchasedCO2": obj.get("purchasedCO2"), + "carbonOffsets": obj.get("carbonOffsets") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_processing_request_products_inner_product.py b/examples/python-api-client/api-client/openapi_client/models/post_processing_request_products_inner_product.py new file mode 100644 index 00000000..9d2751d2 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_processing_request_products_inner_product.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostProcessingRequestProductsInnerProduct(BaseModel): + """ + Product being processed + """ # noqa: E501 + unit: StrictStr + amount_made_per_year: Union[StrictFloat, StrictInt] = Field(alias="amountMadePerYear") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["unit", "amountMadePerYear"] + + @field_validator('unit') + def unit_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['litre', 'tonne', 'unit', 'bottle', 'dozen']): + raise ValueError("must be one of enum values ('litre', 'tonne', 'unit', 'bottle', 'dozen')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostProcessingRequestProductsInnerProduct from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostProcessingRequestProductsInnerProduct from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "unit": obj.get("unit"), + "amountMadePerYear": obj.get("amountMadePerYear") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_rice200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_rice200_response.py new file mode 100644 index 00000000..2a58c055 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_rice200_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_cotton200_response_net import PostCotton200ResponseNet +from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 +from openapi_client.models.post_rice200_response_intensities import PostRice200ResponseIntensities +from openapi_client.models.post_rice200_response_intermediate_inner import PostRice200ResponseIntermediateInner +from openapi_client.models.post_rice200_response_scope1 import PostRice200ResponseScope1 +from typing import Optional, Set +from typing_extensions import Self + +class PostRice200Response(BaseModel): + """ + Emissions calculation output for the `rice` calculator + """ # noqa: E501 + scope1: PostRice200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostCotton200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + intermediate: List[PostRice200ResponseIntermediateInner] + net: PostCotton200ResponseNet + intensities: PostRice200ResponseIntensities + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "intermediate", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostRice200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostRice200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostRice200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostCotton200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intermediate": [PostRice200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None, + "net": PostCotton200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostRice200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_rice200_response_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_rice200_response_intensities.py new file mode 100644 index 00000000..cd419e6b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_rice200_response_intensities.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostRice200ResponseIntensities(BaseModel): + """ + Emissions intensities for the crop + """ # noqa: E501 + rice_produced_tonnes: Union[StrictFloat, StrictInt] = Field(description="Rice produced in tonnes", alias="riceProducedTonnes") + rice_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Rice excluding sequestration, in t-CO2e/t rice", alias="riceExcludingSequestration") + rice_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Rice including sequestration, in t-CO2e/t rice", alias="riceIncludingSequestration") + intensity: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of rice production. Deprecation note: Use `riceIncludingSequestration` instead") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["riceProducedTonnes", "riceExcludingSequestration", "riceIncludingSequestration", "intensity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostRice200ResponseIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostRice200ResponseIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "riceProducedTonnes": obj.get("riceProducedTonnes"), + "riceExcludingSequestration": obj.get("riceExcludingSequestration"), + "riceIncludingSequestration": obj.get("riceIncludingSequestration"), + "intensity": obj.get("intensity") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_rice200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_rice200_response_intermediate_inner.py new file mode 100644 index 00000000..a66603df --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_rice200_response_intermediate_inner.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 +from openapi_client.models.post_rice200_response_intermediate_inner_intensities import PostRice200ResponseIntermediateInnerIntensities +from openapi_client.models.post_rice200_response_scope1 import PostRice200ResponseScope1 +from typing import Optional, Set +from typing_extensions import Self + +class PostRice200ResponseIntermediateInner(BaseModel): + """ + Intermediate emissions calculation output for the Rice calculator + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostRice200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostCotton200ResponseScope3 + carbon_sequestration: Union[StrictFloat, StrictInt] = Field(description="Carbon sequestration, in tonnes-CO2e", alias="carbonSequestration") + intensities: PostRice200ResponseIntermediateInnerIntensities + net: PostAquaculture200ResponseNet + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "carbonSequestration", "intensities", "net"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostRice200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostRice200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostRice200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostCotton200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": obj.get("carbonSequestration"), + "intensities": PostRice200ResponseIntermediateInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_rice200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_rice200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..4ea7f094 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_rice200_response_intermediate_inner_intensities.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostRice200ResponseIntermediateInnerIntensities(BaseModel): + """ + PostRice200ResponseIntermediateInnerIntensities + """ # noqa: E501 + rice_produced_tonnes: Union[StrictFloat, StrictInt] = Field(description="Rice produced in tonnes", alias="riceProducedTonnes") + rice_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Rice excluding sequestration, in t-CO2e/t rice", alias="riceExcludingSequestration") + rice_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Rice including sequestration, in t-CO2e/t rice", alias="riceIncludingSequestration") + intensity: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of rice production. Deprecation note: Use `riceIncludingSequestration` instead") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["riceProducedTonnes", "riceExcludingSequestration", "riceIncludingSequestration", "intensity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostRice200ResponseIntermediateInnerIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostRice200ResponseIntermediateInnerIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "riceProducedTonnes": obj.get("riceProducedTonnes"), + "riceExcludingSequestration": obj.get("riceExcludingSequestration"), + "riceIncludingSequestration": obj.get("riceIncludingSequestration"), + "intensity": obj.get("intensity") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_rice200_response_scope1.py b/examples/python-api-client/api-client/openapi_client/models/post_rice200_response_scope1.py new file mode 100644 index 00000000..63d5e2e4 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_rice200_response_scope1.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostRice200ResponseScope1(BaseModel): + """ + Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fuel_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from fuel use, in tonnes-CO2e", alias="fuelCO2") + lime_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from lime, in tonnes-CO2e", alias="limeCO2") + urea_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from urea, in tonnes-CO2e", alias="ureaCO2") + field_burning_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from field burning, in tonnes-CO2e", alias="fieldBurningCH4") + rice_cultivation_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from rice cultivation, in tonnes-CO2e", alias="riceCultivationCH4") + fuel_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from fuel use, in tonnes-CO2e", alias="fuelCH4") + fertiliser_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fertiliser, in tonnes-CO2e", alias="fertiliserN2O") + atmospheric_deposition_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from atmospheric deposition, in tonnes-CO2e", alias="atmosphericDepositionN2O") + field_burning_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from field burning, in tonnes-CO2e", alias="fieldBurningN2O") + crop_residue_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from crop residue, in tonnes-CO2e", alias="cropResidueN2O") + leaching_and_runoff_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from leeching and runoff, in tonnes-CO2e", alias="leachingAndRunoffN2O") + fuel_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fuel use, in tonnes-CO2e", alias="fuelN2O") + total_co2: Union[StrictFloat, StrictInt] = Field(description="Total CO2 scope 1 emissions, in tonnes-CO2e", alias="totalCO2") + total_ch4: Union[StrictFloat, StrictInt] = Field(description="Total CH4 scope 1 emissions, in tonnes-CO2e", alias="totalCH4") + total_n2_o: Union[StrictFloat, StrictInt] = Field(description="Total N2O scope 1 emissions, in tonnes-CO2e", alias="totalN2O") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 1 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuelCO2", "limeCO2", "ureaCO2", "fieldBurningCH4", "riceCultivationCH4", "fuelCH4", "fertiliserN2O", "atmosphericDepositionN2O", "fieldBurningN2O", "cropResidueN2O", "leachingAndRunoffN2O", "fuelN2O", "totalCO2", "totalCH4", "totalN2O", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostRice200ResponseScope1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostRice200ResponseScope1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuelCO2": obj.get("fuelCO2"), + "limeCO2": obj.get("limeCO2"), + "ureaCO2": obj.get("ureaCO2"), + "fieldBurningCH4": obj.get("fieldBurningCH4"), + "riceCultivationCH4": obj.get("riceCultivationCH4"), + "fuelCH4": obj.get("fuelCH4"), + "fertiliserN2O": obj.get("fertiliserN2O"), + "atmosphericDepositionN2O": obj.get("atmosphericDepositionN2O"), + "fieldBurningN2O": obj.get("fieldBurningN2O"), + "cropResidueN2O": obj.get("cropResidueN2O"), + "leachingAndRunoffN2O": obj.get("leachingAndRunoffN2O"), + "fuelN2O": obj.get("fuelN2O"), + "totalCO2": obj.get("totalCO2"), + "totalCH4": obj.get("totalCH4"), + "totalN2O": obj.get("totalN2O"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_rice_request.py b/examples/python-api-client/api-client/openapi_client/models/post_rice_request.py new file mode 100644 index 00000000..d2989f09 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_rice_request.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from openapi_client.models.post_cotton_request_vegetation_inner import PostCottonRequestVegetationInner +from openapi_client.models.post_rice_request_crops_inner import PostRiceRequestCropsInner +from typing import Optional, Set +from typing_extensions import Self + +class PostRiceRequest(BaseModel): + """ + Input data required for the `rice` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + crops: List[PostRiceRequestCropsInner] + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + vegetation: List[PostCottonRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "crops", "electricityRenewable", "electricityUse", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostRiceRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in crops (list) + _items = [] + if self.crops: + for _item_crops in self.crops: + if _item_crops: + _items.append(_item_crops.to_dict()) + _dict['crops'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostRiceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "crops": [PostRiceRequestCropsInner.from_dict(_item) for _item in obj["crops"]] if obj.get("crops") is not None else None, + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "vegetation": [PostCottonRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_rice_request_crops_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_rice_request_crops_inner.py new file mode 100644 index 00000000..bd85701d --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_rice_request_crops_inner.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PostRiceRequestCropsInner(BaseModel): + """ + PostRiceRequestCropsInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + average_rice_yield: Union[StrictFloat, StrictInt] = Field(description="Average rice yield, in t/ha (tonnes per hectare)", alias="averageRiceYield") + area_sown: Union[StrictFloat, StrictInt] = Field(description="Area sown, in ha (hectares)", alias="areaSown") + growing_season_days: Union[StrictFloat, StrictInt] = Field(description="The length of the growing season for this crop, in days", alias="growingSeasonDays") + water_regime_type: StrictStr = Field(alias="waterRegimeType") + water_regime_sub_type: StrictStr = Field(alias="waterRegimeSubType") + rice_preseason_flooding_period: StrictStr = Field(alias="ricePreseasonFloodingPeriod") + urea_application: Union[StrictFloat, StrictInt] = Field(description="Urea application, in kg Urea/ha (kilograms of urea per hectare)", alias="ureaApplication") + non_urea_nitrogen: Union[StrictFloat, StrictInt] = Field(description="Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare)", alias="nonUreaNitrogen") + urea_ammonium_nitrate: Union[StrictFloat, StrictInt] = Field(description="Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare)", alias="ureaAmmoniumNitrate") + phosphorus_application: Union[StrictFloat, StrictInt] = Field(description="Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare)", alias="phosphorusApplication") + potassium_application: Union[StrictFloat, StrictInt] = Field(description="Potassium application, in kg K/ha (kilograms of potassium per hectare)", alias="potassiumApplication") + sulfur_application: Union[StrictFloat, StrictInt] = Field(description="Sulfur application, in kg S/ha (kilograms of sulfur per hectare)", alias="sulfurApplication") + fraction_of_annual_crop_burnt: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Fraction of annual production of crop that is burnt, from 0 to 1", alias="fractionOfAnnualCropBurnt") + herbicide_use: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram)", alias="herbicideUse") + glyphosate_other_herbicide_use: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram)", alias="glyphosateOtherHerbicideUse") + electricity_allocation: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percentage of electricity use to allocate to this crop, from 0 to 1", alias="electricityAllocation") + limestone: Union[StrictFloat, StrictInt] = Field(description="Lime applied in tonnes") + limestone_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of lime as limestone vs dolomite, between 0 and 1", alias="limestoneFraction") + diesel_use: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)", alias="dieselUse") + petrol_use: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)", alias="petrolUse") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "averageRiceYield", "areaSown", "growingSeasonDays", "waterRegimeType", "waterRegimeSubType", "ricePreseasonFloodingPeriod", "ureaApplication", "nonUreaNitrogen", "ureaAmmoniumNitrate", "phosphorusApplication", "potassiumApplication", "sulfurApplication", "fractionOfAnnualCropBurnt", "herbicideUse", "glyphosateOtherHerbicideUse", "electricityAllocation", "limestone", "limestoneFraction", "dieselUse", "petrolUse", "lpg"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + @field_validator('water_regime_type') + def water_regime_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Upland', 'Irrigated', 'Rainfed']): + raise ValueError("must be one of enum values ('Upland', 'Irrigated', 'Rainfed')") + return value + + @field_validator('water_regime_sub_type') + def water_regime_sub_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Continuously flooded', 'Single drainage period', 'Multiple drainage periods', 'Regular rainfed', 'Drought prone', 'Deep water', 'Paddy rotation', 'Fallow without flooding in previous year']): + raise ValueError("must be one of enum values ('Continuously flooded', 'Single drainage period', 'Multiple drainage periods', 'Regular rainfed', 'Drought prone', 'Deep water', 'Paddy rotation', 'Fallow without flooding in previous year')") + return value + + @field_validator('rice_preseason_flooding_period') + def rice_preseason_flooding_period_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Non flooded pre-season < 180 days', 'Non flooded pre-season > 180 days', 'Flooded pre-season > 30 days', 'Non-flooded pre-season > 365 days']): + raise ValueError("must be one of enum values ('Non flooded pre-season < 180 days', 'Non flooded pre-season > 180 days', 'Flooded pre-season > 30 days', 'Non-flooded pre-season > 365 days')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostRiceRequestCropsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostRiceRequestCropsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "averageRiceYield": obj.get("averageRiceYield"), + "areaSown": obj.get("areaSown"), + "growingSeasonDays": obj.get("growingSeasonDays"), + "waterRegimeType": obj.get("waterRegimeType"), + "waterRegimeSubType": obj.get("waterRegimeSubType"), + "ricePreseasonFloodingPeriod": obj.get("ricePreseasonFloodingPeriod"), + "ureaApplication": obj.get("ureaApplication"), + "nonUreaNitrogen": obj.get("nonUreaNitrogen"), + "ureaAmmoniumNitrate": obj.get("ureaAmmoniumNitrate"), + "phosphorusApplication": obj.get("phosphorusApplication"), + "potassiumApplication": obj.get("potassiumApplication"), + "sulfurApplication": obj.get("sulfurApplication"), + "fractionOfAnnualCropBurnt": obj.get("fractionOfAnnualCropBurnt"), + "herbicideUse": obj.get("herbicideUse"), + "glyphosateOtherHerbicideUse": obj.get("glyphosateOtherHerbicideUse"), + "electricityAllocation": obj.get("electricityAllocation"), + "limestone": obj.get("limestone"), + "limestoneFraction": obj.get("limestoneFraction"), + "dieselUse": obj.get("dieselUse"), + "petrolUse": obj.get("petrolUse"), + "lpg": obj.get("lpg") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheep200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_sheep200_response.py new file mode 100644 index 00000000..56b08645 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheep200_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 +from openapi_client.models.post_buffalo200_response_scope1 import PostBuffalo200ResponseScope1 +from openapi_client.models.post_sheep200_response_intermediate_inner import PostSheep200ResponseIntermediateInner +from openapi_client.models.post_sheep200_response_intermediate_inner_intensities import PostSheep200ResponseIntermediateInnerIntensities +from openapi_client.models.post_sheep200_response_net import PostSheep200ResponseNet +from typing import Optional, Set +from typing_extensions import Self + +class PostSheep200Response(BaseModel): + """ + Emissions calculation output for the `sheep` calculator + """ # noqa: E501 + scope1: PostBuffalo200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostBeef200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + intermediate: List[PostSheep200ResponseIntermediateInner] + net: PostSheep200ResponseNet + intensities: PostSheep200ResponseIntermediateInnerIntensities + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "intermediate", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheep200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheep200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostBuffalo200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostBeef200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intermediate": [PostSheep200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None, + "net": PostSheep200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostSheep200ResponseIntermediateInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheep200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_sheep200_response_intermediate_inner.py new file mode 100644 index 00000000..3d80a728 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheep200_response_intermediate_inner.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 +from openapi_client.models.post_buffalo200_response_scope1 import PostBuffalo200ResponseScope1 +from openapi_client.models.post_sheep200_response_intermediate_inner_intensities import PostSheep200ResponseIntermediateInnerIntensities +from typing import Optional, Set +from typing_extensions import Self + +class PostSheep200ResponseIntermediateInner(BaseModel): + """ + PostSheep200ResponseIntermediateInner + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostBuffalo200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostBeef200ResponseScope3 + carbon_sequestration: Union[StrictFloat, StrictInt] = Field(description="Carbon sequestration, in tonnes-CO2e", alias="carbonSequestration") + intensities: PostSheep200ResponseIntermediateInnerIntensities + net: PostAquaculture200ResponseNet + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "carbonSequestration", "intensities", "net"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheep200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheep200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostBuffalo200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostBeef200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": obj.get("carbonSequestration"), + "intensities": PostSheep200ResponseIntermediateInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheep200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_sheep200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..4f725546 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheep200_response_intermediate_inner_intensities.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostSheep200ResponseIntermediateInnerIntensities(BaseModel): + """ + PostSheep200ResponseIntermediateInnerIntensities + """ # noqa: E501 + wool_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Greasy wool produced in kg", alias="woolProducedKg") + sheep_meat_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Sheep meat produced in kg liveweight", alias="sheepMeatProducedKg") + wool_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Wool production including carbon sequestration, in kg-CO2e/kg greasy", alias="woolIncludingSequestration") + wool_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Wool production excluding carbon sequestration, in kg-CO2e/kg greasy", alias="woolExcludingSequestration") + sheep_meat_breeding_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Sheep meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight", alias="sheepMeatBreedingIncludingSequestration") + sheep_meat_breeding_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Sheep meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight", alias="sheepMeatBreedingExcludingSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["woolProducedKg", "sheepMeatProducedKg", "woolIncludingSequestration", "woolExcludingSequestration", "sheepMeatBreedingIncludingSequestration", "sheepMeatBreedingExcludingSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheep200ResponseIntermediateInnerIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheep200ResponseIntermediateInnerIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "woolProducedKg": obj.get("woolProducedKg"), + "sheepMeatProducedKg": obj.get("sheepMeatProducedKg"), + "woolIncludingSequestration": obj.get("woolIncludingSequestration"), + "woolExcludingSequestration": obj.get("woolExcludingSequestration"), + "sheepMeatBreedingIncludingSequestration": obj.get("sheepMeatBreedingIncludingSequestration"), + "sheepMeatBreedingExcludingSequestration": obj.get("sheepMeatBreedingExcludingSequestration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheep200_response_net.py b/examples/python-api-client/api-client/openapi_client/models/post_sheep200_response_net.py new file mode 100644 index 00000000..5275bdd9 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheep200_response_net.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostSheep200ResponseNet(BaseModel): + """ + PostSheep200ResponseNet + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] = Field(description="Total net emissions of this activity, in tonnes-CO2e/year") + sheep: Union[StrictFloat, StrictInt] = Field(description="Net emissions of sheep, in tonnes-CO2e/year") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "sheep"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheep200ResponseNet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheep200ResponseNet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "sheep": obj.get("sheep") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheep_request.py b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request.py new file mode 100644 index 00000000..dfd0cbac --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_sheep_request_sheep_inner import PostSheepRequestSheepInner +from openapi_client.models.post_sheep_request_vegetation_inner import PostSheepRequestVegetationInner +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepRequest(BaseModel): + """ + Input data required for the `sheep` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + north_of_tropic_of_capricorn: StrictBool = Field(description="Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude", alias="northOfTropicOfCapricorn") + rainfall_above600: StrictBool = Field(description="Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm", alias="rainfallAbove600") + sheep: List[PostSheepRequestSheepInner] + vegetation: List[PostSheepRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "northOfTropicOfCapricorn", "rainfallAbove600", "sheep", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in sheep (list) + _items = [] + if self.sheep: + for _item_sheep in self.sheep: + if _item_sheep: + _items.append(_item_sheep.to_dict()) + _dict['sheep'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "northOfTropicOfCapricorn": obj.get("northOfTropicOfCapricorn"), + "rainfallAbove600": obj.get("rainfallAbove600"), + "sheep": [PostSheepRequestSheepInner.from_dict(_item) for _item in obj["sheep"]] if obj.get("sheep") is not None else None, + "vegetation": [PostSheepRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner.py new file mode 100644 index 00000000..3d0a21f3 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_beef_request_beef_inner_fertiliser import PostBeefRequestBeefInnerFertiliser +from openapi_client.models.post_beef_request_beef_inner_mineral_supplementation import PostBeefRequestBeefInnerMineralSupplementation +from openapi_client.models.post_sheep_request_sheep_inner_classes import PostSheepRequestSheepInnerClasses +from openapi_client.models.post_sheep_request_sheep_inner_ewes_lambing import PostSheepRequestSheepInnerEwesLambing +from openapi_client.models.post_sheep_request_sheep_inner_seasonal_lambing import PostSheepRequestSheepInnerSeasonalLambing +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepRequestSheepInner(BaseModel): + """ + PostSheepRequestSheepInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + classes: PostSheepRequestSheepInnerClasses + limestone: Union[StrictFloat, StrictInt] = Field(description="Lime applied in tonnes") + limestone_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of lime as limestone vs dolomite, between 0 and 1", alias="limestoneFraction") + fertiliser: PostBeefRequestBeefInnerFertiliser + diesel: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)") + petrol: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + mineral_supplementation: PostBeefRequestBeefInnerMineralSupplementation = Field(alias="mineralSupplementation") + electricity_source: StrictStr = Field(description="Source of electricity", alias="electricitySource") + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + grain_feed: Union[StrictFloat, StrictInt] = Field(description="Grain purchased for cattle feed in tonnes", alias="grainFeed") + hay_feed: Union[StrictFloat, StrictInt] = Field(description="Hay purchased for cattle feed in tonnes", alias="hayFeed") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms)") + herbicide_other: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients of from other herbicides in kg (kilograms)", alias="herbicideOther") + merino_percent: Union[StrictFloat, StrictInt] = Field(description="Percent of sheep purchases that are of type Merino, from 0 to 100", alias="merinoPercent") + ewes_lambing: PostSheepRequestSheepInnerEwesLambing = Field(alias="ewesLambing") + seasonal_lambing: PostSheepRequestSheepInnerSeasonalLambing = Field(alias="seasonalLambing") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "classes", "limestone", "limestoneFraction", "fertiliser", "diesel", "petrol", "lpg", "mineralSupplementation", "electricitySource", "electricityRenewable", "electricityUse", "grainFeed", "hayFeed", "herbicide", "herbicideOther", "merinoPercent", "ewesLambing", "seasonalLambing"] + + @field_validator('electricity_source') + def electricity_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['State Grid', 'Renewable']): + raise ValueError("must be one of enum values ('State Grid', 'Renewable')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of classes + if self.classes: + _dict['classes'] = self.classes.to_dict() + # override the default output from pydantic by calling `to_dict()` of fertiliser + if self.fertiliser: + _dict['fertiliser'] = self.fertiliser.to_dict() + # override the default output from pydantic by calling `to_dict()` of mineral_supplementation + if self.mineral_supplementation: + _dict['mineralSupplementation'] = self.mineral_supplementation.to_dict() + # override the default output from pydantic by calling `to_dict()` of ewes_lambing + if self.ewes_lambing: + _dict['ewesLambing'] = self.ewes_lambing.to_dict() + # override the default output from pydantic by calling `to_dict()` of seasonal_lambing + if self.seasonal_lambing: + _dict['seasonalLambing'] = self.seasonal_lambing.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "classes": PostSheepRequestSheepInnerClasses.from_dict(obj["classes"]) if obj.get("classes") is not None else None, + "limestone": obj.get("limestone"), + "limestoneFraction": obj.get("limestoneFraction"), + "fertiliser": PostBeefRequestBeefInnerFertiliser.from_dict(obj["fertiliser"]) if obj.get("fertiliser") is not None else None, + "diesel": obj.get("diesel"), + "petrol": obj.get("petrol"), + "lpg": obj.get("lpg"), + "mineralSupplementation": PostBeefRequestBeefInnerMineralSupplementation.from_dict(obj["mineralSupplementation"]) if obj.get("mineralSupplementation") is not None else None, + "electricitySource": obj.get("electricitySource"), + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "grainFeed": obj.get("grainFeed"), + "hayFeed": obj.get("hayFeed"), + "herbicide": obj.get("herbicide"), + "herbicideOther": obj.get("herbicideOther"), + "merinoPercent": obj.get("merinoPercent"), + "ewesLambing": PostSheepRequestSheepInnerEwesLambing.from_dict(obj["ewesLambing"]) if obj.get("ewesLambing") is not None else None, + "seasonalLambing": PostSheepRequestSheepInnerSeasonalLambing.from_dict(obj["seasonalLambing"]) if obj.get("seasonalLambing") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes.py b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes.py new file mode 100644 index 00000000..3af6f850 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from openapi_client.models.post_sheep_request_sheep_inner_classes_rams import PostSheepRequestSheepInnerClassesRams +from openapi_client.models.post_sheep_request_sheep_inner_classes_trade_ewes import PostSheepRequestSheepInnerClassesTradeEwes +from openapi_client.models.post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets import PostSheepRequestSheepInnerClassesTradeLambsAndHoggets +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepRequestSheepInnerClasses(BaseModel): + """ + PostSheepRequestSheepInnerClasses + """ # noqa: E501 + rams: Optional[PostSheepRequestSheepInnerClassesRams] = None + trade_rams: Optional[PostSheepRequestSheepInnerClassesRams] = Field(default=None, alias="tradeRams") + wethers: Optional[PostSheepRequestSheepInnerClassesRams] = None + trade_wethers: Optional[PostSheepRequestSheepInnerClassesRams] = Field(default=None, alias="tradeWethers") + maiden_breeding_ewes: Optional[PostSheepRequestSheepInnerClassesRams] = Field(default=None, alias="maidenBreedingEwes") + trade_maiden_breeding_ewes: Optional[PostSheepRequestSheepInnerClassesRams] = Field(default=None, alias="tradeMaidenBreedingEwes") + breeding_ewes: PostSheepRequestSheepInnerClassesRams = Field(alias="breedingEwes") + trade_breeding_ewes: Optional[PostSheepRequestSheepInnerClassesRams] = Field(default=None, alias="tradeBreedingEwes") + other_ewes: Optional[PostSheepRequestSheepInnerClassesRams] = Field(default=None, alias="otherEwes") + trade_other_ewes: Optional[PostSheepRequestSheepInnerClassesRams] = Field(default=None, alias="tradeOtherEwes") + ewe_lambs: PostSheepRequestSheepInnerClassesRams = Field(alias="eweLambs") + trade_ewe_lambs: Optional[PostSheepRequestSheepInnerClassesRams] = Field(default=None, alias="tradeEweLambs") + wether_lambs: PostSheepRequestSheepInnerClassesRams = Field(alias="wetherLambs") + trade_wether_lambs: Optional[PostSheepRequestSheepInnerClassesRams] = Field(default=None, alias="tradeWetherLambs") + trade_ewes: Optional[PostSheepRequestSheepInnerClassesTradeEwes] = Field(default=None, alias="tradeEwes") + trade_lambs_and_hoggets: Optional[PostSheepRequestSheepInnerClassesTradeLambsAndHoggets] = Field(default=None, alias="tradeLambsAndHoggets") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["rams", "tradeRams", "wethers", "tradeWethers", "maidenBreedingEwes", "tradeMaidenBreedingEwes", "breedingEwes", "tradeBreedingEwes", "otherEwes", "tradeOtherEwes", "eweLambs", "tradeEweLambs", "wetherLambs", "tradeWetherLambs", "tradeEwes", "tradeLambsAndHoggets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInnerClasses from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of rams + if self.rams: + _dict['rams'] = self.rams.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_rams + if self.trade_rams: + _dict['tradeRams'] = self.trade_rams.to_dict() + # override the default output from pydantic by calling `to_dict()` of wethers + if self.wethers: + _dict['wethers'] = self.wethers.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_wethers + if self.trade_wethers: + _dict['tradeWethers'] = self.trade_wethers.to_dict() + # override the default output from pydantic by calling `to_dict()` of maiden_breeding_ewes + if self.maiden_breeding_ewes: + _dict['maidenBreedingEwes'] = self.maiden_breeding_ewes.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_maiden_breeding_ewes + if self.trade_maiden_breeding_ewes: + _dict['tradeMaidenBreedingEwes'] = self.trade_maiden_breeding_ewes.to_dict() + # override the default output from pydantic by calling `to_dict()` of breeding_ewes + if self.breeding_ewes: + _dict['breedingEwes'] = self.breeding_ewes.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_breeding_ewes + if self.trade_breeding_ewes: + _dict['tradeBreedingEwes'] = self.trade_breeding_ewes.to_dict() + # override the default output from pydantic by calling `to_dict()` of other_ewes + if self.other_ewes: + _dict['otherEwes'] = self.other_ewes.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_other_ewes + if self.trade_other_ewes: + _dict['tradeOtherEwes'] = self.trade_other_ewes.to_dict() + # override the default output from pydantic by calling `to_dict()` of ewe_lambs + if self.ewe_lambs: + _dict['eweLambs'] = self.ewe_lambs.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_ewe_lambs + if self.trade_ewe_lambs: + _dict['tradeEweLambs'] = self.trade_ewe_lambs.to_dict() + # override the default output from pydantic by calling `to_dict()` of wether_lambs + if self.wether_lambs: + _dict['wetherLambs'] = self.wether_lambs.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_wether_lambs + if self.trade_wether_lambs: + _dict['tradeWetherLambs'] = self.trade_wether_lambs.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_ewes + if self.trade_ewes: + _dict['tradeEwes'] = self.trade_ewes.to_dict() + # override the default output from pydantic by calling `to_dict()` of trade_lambs_and_hoggets + if self.trade_lambs_and_hoggets: + _dict['tradeLambsAndHoggets'] = self.trade_lambs_and_hoggets.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInnerClasses from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rams": PostSheepRequestSheepInnerClassesRams.from_dict(obj["rams"]) if obj.get("rams") is not None else None, + "tradeRams": PostSheepRequestSheepInnerClassesRams.from_dict(obj["tradeRams"]) if obj.get("tradeRams") is not None else None, + "wethers": PostSheepRequestSheepInnerClassesRams.from_dict(obj["wethers"]) if obj.get("wethers") is not None else None, + "tradeWethers": PostSheepRequestSheepInnerClassesRams.from_dict(obj["tradeWethers"]) if obj.get("tradeWethers") is not None else None, + "maidenBreedingEwes": PostSheepRequestSheepInnerClassesRams.from_dict(obj["maidenBreedingEwes"]) if obj.get("maidenBreedingEwes") is not None else None, + "tradeMaidenBreedingEwes": PostSheepRequestSheepInnerClassesRams.from_dict(obj["tradeMaidenBreedingEwes"]) if obj.get("tradeMaidenBreedingEwes") is not None else None, + "breedingEwes": PostSheepRequestSheepInnerClassesRams.from_dict(obj["breedingEwes"]) if obj.get("breedingEwes") is not None else None, + "tradeBreedingEwes": PostSheepRequestSheepInnerClassesRams.from_dict(obj["tradeBreedingEwes"]) if obj.get("tradeBreedingEwes") is not None else None, + "otherEwes": PostSheepRequestSheepInnerClassesRams.from_dict(obj["otherEwes"]) if obj.get("otherEwes") is not None else None, + "tradeOtherEwes": PostSheepRequestSheepInnerClassesRams.from_dict(obj["tradeOtherEwes"]) if obj.get("tradeOtherEwes") is not None else None, + "eweLambs": PostSheepRequestSheepInnerClassesRams.from_dict(obj["eweLambs"]) if obj.get("eweLambs") is not None else None, + "tradeEweLambs": PostSheepRequestSheepInnerClassesRams.from_dict(obj["tradeEweLambs"]) if obj.get("tradeEweLambs") is not None else None, + "wetherLambs": PostSheepRequestSheepInnerClassesRams.from_dict(obj["wetherLambs"]) if obj.get("wetherLambs") is not None else None, + "tradeWetherLambs": PostSheepRequestSheepInnerClassesRams.from_dict(obj["tradeWetherLambs"]) if obj.get("tradeWetherLambs") is not None else None, + "tradeEwes": PostSheepRequestSheepInnerClassesTradeEwes.from_dict(obj["tradeEwes"]) if obj.get("tradeEwes") is not None else None, + "tradeLambsAndHoggets": PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.from_dict(obj["tradeLambsAndHoggets"]) if obj.get("tradeLambsAndHoggets") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_rams.py b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_rams.py new file mode 100644 index 00000000..36e43f69 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_rams.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from openapi_client.models.post_sheep_request_sheep_inner_classes_rams_autumn import PostSheepRequestSheepInnerClassesRamsAutumn +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepRequestSheepInnerClassesRams(BaseModel): + """ + PostSheepRequestSheepInnerClassesRams + """ # noqa: E501 + autumn: PostSheepRequestSheepInnerClassesRamsAutumn + winter: PostSheepRequestSheepInnerClassesRamsAutumn + spring: PostSheepRequestSheepInnerClassesRamsAutumn + summer: PostSheepRequestSheepInnerClassesRamsAutumn + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of sheep shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headShorn", "woolShorn", "cleanWoolYield", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInnerClassesRams from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInnerClassesRams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostSheepRequestSheepInnerClassesRamsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostSheepRequestSheepInnerClassesRamsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostSheepRequestSheepInnerClassesRamsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostSheepRequestSheepInnerClassesRamsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_rams_autumn.py b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_rams_autumn.py new file mode 100644 index 00000000..325de5dd --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_rams_autumn.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepRequestSheepInnerClassesRamsAutumn(BaseModel): + """ + PostSheepRequestSheepInnerClassesRamsAutumn + """ # noqa: E501 + head: Union[StrictFloat, StrictInt] = Field(description="Number of animals (head)") + liveweight: Union[StrictFloat, StrictInt] = Field(description="Average liveweight of animals in kg/head (kilogram per head)") + liveweight_gain: Union[StrictFloat, StrictInt] = Field(description="Average liveweight gain in kg/day (kilogram per day)", alias="liveweightGain") + crude_protein: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Crude protein percent, between 0 and 100", alias="crudeProtein") + dry_matter_digestibility: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Dry matter digestibility percent, between 0 and 100", alias="dryMatterDigestibility") + feed_availability: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Feed availability, in t/ha (tonnes per hectare)", alias="feedAvailability") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["head", "liveweight", "liveweightGain", "crudeProtein", "dryMatterDigestibility", "feedAvailability"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInnerClassesRamsAutumn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInnerClassesRamsAutumn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "head": obj.get("head"), + "liveweight": obj.get("liveweight"), + "liveweightGain": obj.get("liveweightGain"), + "crudeProtein": obj.get("crudeProtein"), + "dryMatterDigestibility": obj.get("dryMatterDigestibility"), + "feedAvailability": obj.get("feedAvailability") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_trade_ewes.py b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_trade_ewes.py new file mode 100644 index 00000000..47ff4544 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_trade_ewes.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from openapi_client.models.post_sheep_request_sheep_inner_classes_rams_autumn import PostSheepRequestSheepInnerClassesRamsAutumn +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepRequestSheepInnerClassesTradeEwes(BaseModel): + """ + Trading ewes. Deprecation note: More specific trading classes are now available + """ # noqa: E501 + autumn: PostSheepRequestSheepInnerClassesRamsAutumn + winter: PostSheepRequestSheepInnerClassesRamsAutumn + spring: PostSheepRequestSheepInnerClassesRamsAutumn + summer: PostSheepRequestSheepInnerClassesRamsAutumn + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of sheep shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headShorn", "woolShorn", "cleanWoolYield", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInnerClassesTradeEwes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInnerClassesTradeEwes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostSheepRequestSheepInnerClassesRamsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostSheepRequestSheepInnerClassesRamsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostSheepRequestSheepInnerClassesRamsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostSheepRequestSheepInnerClassesRamsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py new file mode 100644 index 00000000..3938c47b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner +from openapi_client.models.post_sheep_request_sheep_inner_classes_rams_autumn import PostSheepRequestSheepInnerClassesRamsAutumn +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepRequestSheepInnerClassesTradeLambsAndHoggets(BaseModel): + """ + Trading lambs and hoggets. Deprecation note: More specific trading classes are now available + """ # noqa: E501 + autumn: PostSheepRequestSheepInnerClassesRamsAutumn + winter: PostSheepRequestSheepInnerClassesRamsAutumn + spring: PostSheepRequestSheepInnerClassesRamsAutumn + summer: PostSheepRequestSheepInnerClassesRamsAutumn + head_shorn: Union[StrictFloat, StrictInt] = Field(description="Number of sheep shorn, in head", alias="headShorn") + wool_shorn: Union[StrictFloat, StrictInt] = Field(description="Weight of wool shorn, in kg/head (kilogram per head)", alias="woolShorn") + clean_wool_yield: Union[StrictFloat, StrictInt] = Field(description="Percentage of clean wool from weight of yield, from 0 to 100", alias="cleanWoolYield") + head_purchased: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of animals purchased (head). Deprecation note: Please use `purchases` instead", alias="headPurchased") + purchased_weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead", alias="purchasedWeight") + head_sold: Union[StrictFloat, StrictInt] = Field(description="Number of animals sold (head)", alias="headSold") + sale_weight: Union[StrictFloat, StrictInt] = Field(description="Weight at sale, in liveweight kg/head (kilogram per head)", alias="saleWeight") + purchases: Optional[List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer", "headShorn", "woolShorn", "cleanWoolYield", "headPurchased", "purchasedWeight", "headSold", "saleWeight", "purchases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInnerClassesTradeLambsAndHoggets from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of autumn + if self.autumn: + _dict['autumn'] = self.autumn.to_dict() + # override the default output from pydantic by calling `to_dict()` of winter + if self.winter: + _dict['winter'] = self.winter.to_dict() + # override the default output from pydantic by calling `to_dict()` of spring + if self.spring: + _dict['spring'] = self.spring.to_dict() + # override the default output from pydantic by calling `to_dict()` of summer + if self.summer: + _dict['summer'] = self.summer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in purchases (list) + _items = [] + if self.purchases: + for _item_purchases in self.purchases: + if _item_purchases: + _items.append(_item_purchases.to_dict()) + _dict['purchases'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInnerClassesTradeLambsAndHoggets from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": PostSheepRequestSheepInnerClassesRamsAutumn.from_dict(obj["autumn"]) if obj.get("autumn") is not None else None, + "winter": PostSheepRequestSheepInnerClassesRamsAutumn.from_dict(obj["winter"]) if obj.get("winter") is not None else None, + "spring": PostSheepRequestSheepInnerClassesRamsAutumn.from_dict(obj["spring"]) if obj.get("spring") is not None else None, + "summer": PostSheepRequestSheepInnerClassesRamsAutumn.from_dict(obj["summer"]) if obj.get("summer") is not None else None, + "headShorn": obj.get("headShorn"), + "woolShorn": obj.get("woolShorn"), + "cleanWoolYield": obj.get("cleanWoolYield"), + "headPurchased": obj.get("headPurchased"), + "purchasedWeight": obj.get("purchasedWeight"), + "headSold": obj.get("headSold"), + "saleWeight": obj.get("saleWeight"), + "purchases": [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(_item) for _item in obj["purchases"]] if obj.get("purchases") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_ewes_lambing.py b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_ewes_lambing.py new file mode 100644 index 00000000..9d271cf9 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_ewes_lambing.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepRequestSheepInnerEwesLambing(BaseModel): + """ + The proportion of ewes lambing in each season, as a value from 0 to 1 + """ # noqa: E501 + autumn: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] + winter: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] + spring: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] + summer: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInnerEwesLambing from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInnerEwesLambing from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": obj.get("autumn"), + "winter": obj.get("winter"), + "spring": obj.get("spring"), + "summer": obj.get("summer") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_seasonal_lambing.py b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_seasonal_lambing.py new file mode 100644 index 00000000..e31b721b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_sheep_inner_seasonal_lambing.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepRequestSheepInnerSeasonalLambing(BaseModel): + """ + Seasonal lamb marking rates, i.e. the rate of lambs marked per ewe lambed. Values may exceed 1 if there are more lambs marked than ewes lambed in a season. + """ # noqa: E501 + autumn: Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]] + winter: Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]] + spring: Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]] + summer: Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autumn", "winter", "spring", "summer"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInnerSeasonalLambing from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepRequestSheepInnerSeasonalLambing from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autumn": obj.get("autumn"), + "winter": obj.get("winter"), + "spring": obj.get("spring"), + "summer": obj.get("summer") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_vegetation_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_vegetation_inner.py new file mode 100644 index 00000000..b634dbe7 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheep_request_vegetation_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepRequestVegetationInner(BaseModel): + """ + Non-productive vegetation inputs along with allocations to sheep + """ # noqa: E501 + vegetation: PostBeefRequestVegetationInnerVegetation + sheep_proportion: List[Union[StrictFloat, StrictInt]] = Field(description="The proportion of the sequestration that is allocated to sheep", alias="sheepProportion") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vegetation", "sheepProportion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepRequestVegetationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of vegetation + if self.vegetation: + _dict['vegetation'] = self.vegetation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepRequestVegetationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vegetation": PostBeefRequestVegetationInnerVegetation.from_dict(obj["vegetation"]) if obj.get("vegetation") is not None else None, + "sheepProportion": obj.get("sheepProportion") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response.py new file mode 100644 index 00000000..7f3e2fa0 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_beef200_response_intermediate_inner import PostBeef200ResponseIntermediateInner +from openapi_client.models.post_beef200_response_scope1 import PostBeef200ResponseScope1 +from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 +from openapi_client.models.post_sheep200_response_intermediate_inner import PostSheep200ResponseIntermediateInner +from openapi_client.models.post_sheepbeef200_response_intensities import PostSheepbeef200ResponseIntensities +from openapi_client.models.post_sheepbeef200_response_intermediate import PostSheepbeef200ResponseIntermediate +from openapi_client.models.post_sheepbeef200_response_net import PostSheepbeef200ResponseNet +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepbeef200Response(BaseModel): + """ + Emissions calculation output for the `sheepbeef` calculator + """ # noqa: E501 + scope1: PostBeef200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostBeef200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + intermediate: PostSheepbeef200ResponseIntermediate + intermediate_beef: List[PostBeef200ResponseIntermediateInner] = Field(alias="intermediateBeef") + intermediate_sheep: List[PostSheep200ResponseIntermediateInner] = Field(alias="intermediateSheep") + net: PostSheepbeef200ResponseNet + intensities: PostSheepbeef200ResponseIntensities + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "intermediate", "intermediateBeef", "intermediateSheep", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepbeef200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of intermediate + if self.intermediate: + _dict['intermediate'] = self.intermediate.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate_beef (list) + _items = [] + if self.intermediate_beef: + for _item_intermediate_beef in self.intermediate_beef: + if _item_intermediate_beef: + _items.append(_item_intermediate_beef.to_dict()) + _dict['intermediateBeef'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in intermediate_sheep (list) + _items = [] + if self.intermediate_sheep: + for _item_intermediate_sheep in self.intermediate_sheep: + if _item_intermediate_sheep: + _items.append(_item_intermediate_sheep.to_dict()) + _dict['intermediateSheep'] = _items + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepbeef200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostBeef200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostBeef200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intermediate": PostSheepbeef200ResponseIntermediate.from_dict(obj["intermediate"]) if obj.get("intermediate") is not None else None, + "intermediateBeef": [PostBeef200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediateBeef"]] if obj.get("intermediateBeef") is not None else None, + "intermediateSheep": [PostSheep200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediateSheep"]] if obj.get("intermediateSheep") is not None else None, + "net": PostSheepbeef200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostSheepbeef200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intensities.py new file mode 100644 index 00000000..7f2485c0 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intensities.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepbeef200ResponseIntensities(BaseModel): + """ + PostSheepbeef200ResponseIntensities + """ # noqa: E501 + beef_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Beef including carbon sequestration, in kg-CO2e/kg liveweight", alias="beefIncludingSequestration") + beef_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Beef excluding carbon sequestration, in kg-CO2e/kg liveweight", alias="beefExcludingSequestration") + liveweight_beef_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Liveweight produced in kg", alias="liveweightBeefProducedKg") + wool_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Wool production including carbon sequestration, in kg-CO2e/kg greasy", alias="woolIncludingSequestration") + wool_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Wool production excluding carbon sequestration, in kg-CO2e/kg greasy", alias="woolExcludingSequestration") + sheep_meat_breeding_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Sheep meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight", alias="sheepMeatBreedingIncludingSequestration") + sheep_meat_breeding_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Sheep meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight", alias="sheepMeatBreedingExcludingSequestration") + wool_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Greasy wool produced in kg", alias="woolProducedKg") + sheep_meat_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Sheep meat produced in kg liveweight", alias="sheepMeatProducedKg") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["beefIncludingSequestration", "beefExcludingSequestration", "liveweightBeefProducedKg", "woolIncludingSequestration", "woolExcludingSequestration", "sheepMeatBreedingIncludingSequestration", "sheepMeatBreedingExcludingSequestration", "woolProducedKg", "sheepMeatProducedKg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepbeef200ResponseIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepbeef200ResponseIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "beefIncludingSequestration": obj.get("beefIncludingSequestration"), + "beefExcludingSequestration": obj.get("beefExcludingSequestration"), + "liveweightBeefProducedKg": obj.get("liveweightBeefProducedKg"), + "woolIncludingSequestration": obj.get("woolIncludingSequestration"), + "woolExcludingSequestration": obj.get("woolExcludingSequestration"), + "sheepMeatBreedingIncludingSequestration": obj.get("sheepMeatBreedingIncludingSequestration"), + "sheepMeatBreedingExcludingSequestration": obj.get("sheepMeatBreedingExcludingSequestration"), + "woolProducedKg": obj.get("woolProducedKg"), + "sheepMeatProducedKg": obj.get("sheepMeatProducedKg") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intermediate.py b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intermediate.py new file mode 100644 index 00000000..09ca1273 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intermediate.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_sheepbeef200_response_intermediate_beef import PostSheepbeef200ResponseIntermediateBeef +from openapi_client.models.post_sheepbeef200_response_intermediate_sheep import PostSheepbeef200ResponseIntermediateSheep +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepbeef200ResponseIntermediate(BaseModel): + """ + Intermediate emission output breakdown just for sheep and beef livestock. These combine to make up the total emission output for each scope + """ # noqa: E501 + beef: PostSheepbeef200ResponseIntermediateBeef + sheep: PostSheepbeef200ResponseIntermediateSheep + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["beef", "sheep"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepbeef200ResponseIntermediate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of beef + if self.beef: + _dict['beef'] = self.beef.to_dict() + # override the default output from pydantic by calling `to_dict()` of sheep + if self.sheep: + _dict['sheep'] = self.sheep.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepbeef200ResponseIntermediate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "beef": PostSheepbeef200ResponseIntermediateBeef.from_dict(obj["beef"]) if obj.get("beef") is not None else None, + "sheep": PostSheepbeef200ResponseIntermediateSheep.from_dict(obj["sheep"]) if obj.get("sheep") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intermediate_beef.py b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intermediate_beef.py new file mode 100644 index 00000000..7798e4e4 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intermediate_beef.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_beef200_response_intermediate_inner_intensities import PostBeef200ResponseIntermediateInnerIntensities +from openapi_client.models.post_beef200_response_scope1 import PostBeef200ResponseScope1 +from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepbeef200ResponseIntermediateBeef(BaseModel): + """ + Emission output breakdown just for beef livestock + """ # noqa: E501 + scope1: PostBeef200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostBeef200ResponseScope3 + carbon_sequestration: Union[StrictFloat, StrictInt] = Field(description="Carbon sequestration, in tonnes-CO2e", alias="carbonSequestration") + net: PostAquaculture200ResponseNet + intensities: PostBeef200ResponseIntermediateInnerIntensities + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepbeef200ResponseIntermediateBeef from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepbeef200ResponseIntermediateBeef from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostBeef200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostBeef200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": obj.get("carbonSequestration"), + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostBeef200ResponseIntermediateInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intermediate_sheep.py b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intermediate_sheep.py new file mode 100644 index 00000000..95e3694d --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_intermediate_sheep.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_beef200_response_scope1 import PostBeef200ResponseScope1 +from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 +from openapi_client.models.post_sheep200_response_intermediate_inner_intensities import PostSheep200ResponseIntermediateInnerIntensities +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepbeef200ResponseIntermediateSheep(BaseModel): + """ + Emission output breakdown just for sheep livestock + """ # noqa: E501 + scope1: PostBeef200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostBeef200ResponseScope3 + carbon_sequestration: Union[StrictFloat, StrictInt] = Field(description="Carbon sequestration, in tonnes-CO2e", alias="carbonSequestration") + net: PostAquaculture200ResponseNet + intensities: PostSheep200ResponseIntermediateInnerIntensities + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepbeef200ResponseIntermediateSheep from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepbeef200ResponseIntermediateSheep from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostBeef200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostBeef200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": obj.get("carbonSequestration"), + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostSheep200ResponseIntermediateInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_net.py b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_net.py new file mode 100644 index 00000000..07d2ab2e --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef200_response_net.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepbeef200ResponseNet(BaseModel): + """ + PostSheepbeef200ResponseNet + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] = Field(description="Total net emissions of this activity, in tonnes-CO2e/year") + beef: Union[StrictFloat, StrictInt] = Field(description="Net emissions of beef, in tonnes-CO2e/year") + sheep: Union[StrictFloat, StrictInt] = Field(description="Net emissions of sheep, in tonnes-CO2e/year") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "beef", "sheep"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepbeef200ResponseNet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepbeef200ResponseNet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "beef": obj.get("beef"), + "sheep": obj.get("sheep") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef_request.py b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef_request.py new file mode 100644 index 00000000..1587c41f --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef_request.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_beef_request_beef_inner import PostBeefRequestBeefInner +from openapi_client.models.post_beef_request_burning_inner_burning import PostBeefRequestBurningInnerBurning +from openapi_client.models.post_sheep_request_sheep_inner import PostSheepRequestSheepInner +from openapi_client.models.post_sheepbeef_request_vegetation_inner import PostSheepbeefRequestVegetationInner +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepbeefRequest(BaseModel): + """ + Input data required for the `sheepbeef` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + north_of_tropic_of_capricorn: StrictBool = Field(description="Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude", alias="northOfTropicOfCapricorn") + rainfall_above600: StrictBool = Field(description="Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm", alias="rainfallAbove600") + beef: List[PostBeefRequestBeefInner] + sheep: List[PostSheepRequestSheepInner] + burning: List[PostBeefRequestBurningInnerBurning] + vegetation: List[PostSheepbeefRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "northOfTropicOfCapricorn", "rainfallAbove600", "beef", "sheep", "burning", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepbeefRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in beef (list) + _items = [] + if self.beef: + for _item_beef in self.beef: + if _item_beef: + _items.append(_item_beef.to_dict()) + _dict['beef'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in sheep (list) + _items = [] + if self.sheep: + for _item_sheep in self.sheep: + if _item_sheep: + _items.append(_item_sheep.to_dict()) + _dict['sheep'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in burning (list) + _items = [] + if self.burning: + for _item_burning in self.burning: + if _item_burning: + _items.append(_item_burning.to_dict()) + _dict['burning'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepbeefRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "northOfTropicOfCapricorn": obj.get("northOfTropicOfCapricorn"), + "rainfallAbove600": obj.get("rainfallAbove600"), + "beef": [PostBeefRequestBeefInner.from_dict(_item) for _item in obj["beef"]] if obj.get("beef") is not None else None, + "sheep": [PostSheepRequestSheepInner.from_dict(_item) for _item in obj["sheep"]] if obj.get("sheep") is not None else None, + "burning": [PostBeefRequestBurningInnerBurning.from_dict(_item) for _item in obj["burning"]] if obj.get("burning") is not None else None, + "vegetation": [PostSheepbeefRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef_request_vegetation_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef_request_vegetation_inner.py new file mode 100644 index 00000000..03b90990 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sheepbeef_request_vegetation_inner.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation +from typing import Optional, Set +from typing_extensions import Self + +class PostSheepbeefRequestVegetationInner(BaseModel): + """ + Non-productive vegetation inputs along with allocations to sheep and beef + """ # noqa: E501 + vegetation: PostBeefRequestVegetationInnerVegetation + beef_proportion: List[Union[StrictFloat, StrictInt]] = Field(description="The proportion of the sequestration that is allocated to beef", alias="beefProportion") + sheep_proportion: List[Union[StrictFloat, StrictInt]] = Field(description="The proportion of the sequestration that is allocated to sheep", alias="sheepProportion") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vegetation", "beefProportion", "sheepProportion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSheepbeefRequestVegetationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of vegetation + if self.vegetation: + _dict['vegetation'] = self.vegetation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSheepbeefRequestVegetationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vegetation": PostBeefRequestVegetationInnerVegetation.from_dict(obj["vegetation"]) if obj.get("vegetation") is not None else None, + "beefProportion": obj.get("beefProportion"), + "sheepProportion": obj.get("sheepProportion") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sugar200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_sugar200_response.py new file mode 100644 index 00000000..efdf1f4b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sugar200_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_cotton200_response_net import PostCotton200ResponseNet +from openapi_client.models.post_cotton200_response_scope1 import PostCotton200ResponseScope1 +from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 +from openapi_client.models.post_sugar200_response_intermediate_inner import PostSugar200ResponseIntermediateInner +from openapi_client.models.post_sugar200_response_intermediate_inner_intensities import PostSugar200ResponseIntermediateInnerIntensities +from typing import Optional, Set +from typing_extensions import Self + +class PostSugar200Response(BaseModel): + """ + Emissions calculation output for the `sugar` calculator + """ # noqa: E501 + scope1: PostCotton200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostCotton200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + intermediate: List[PostSugar200ResponseIntermediateInner] + net: PostCotton200ResponseNet + intensities: List[PostSugar200ResponseIntermediateInnerIntensities] = Field(description="Emissions intensity for each crop (in order), in t-CO2e/t crop") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "intermediate", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSugar200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intensities (list) + _items = [] + if self.intensities: + for _item_intensities in self.intensities: + if _item_intensities: + _items.append(_item_intensities.to_dict()) + _dict['intensities'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSugar200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostCotton200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostCotton200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intermediate": [PostSugar200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None, + "net": PostCotton200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": [PostSugar200ResponseIntermediateInnerIntensities.from_dict(_item) for _item in obj["intensities"]] if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sugar200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_sugar200_response_intermediate_inner.py new file mode 100644 index 00000000..98080d11 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sugar200_response_intermediate_inner.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_cotton200_response_scope1 import PostCotton200ResponseScope1 +from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 +from openapi_client.models.post_sugar200_response_intermediate_inner_intensities import PostSugar200ResponseIntermediateInnerIntensities +from typing import Optional, Set +from typing_extensions import Self + +class PostSugar200ResponseIntermediateInner(BaseModel): + """ + Intermediate emissions calculation output for the Sugar calculator + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostCotton200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostCotton200ResponseScope3 + carbon_sequestration: Union[StrictFloat, StrictInt] = Field(description="Carbon sequestration, in tonnes-CO2e", alias="carbonSequestration") + intensities: PostSugar200ResponseIntermediateInnerIntensities + net: PostAquaculture200ResponseNet + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "carbonSequestration", "intensities", "net"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSugar200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSugar200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostCotton200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostCotton200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": obj.get("carbonSequestration"), + "intensities": PostSugar200ResponseIntermediateInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sugar200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_sugar200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..a793a55f --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sugar200_response_intermediate_inner_intensities.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostSugar200ResponseIntermediateInnerIntensities(BaseModel): + """ + PostSugar200ResponseIntermediateInnerIntensities + """ # noqa: E501 + sugar_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Sugar emissions intensity excluding sequestration, in kg-CO2e/kg sugar", alias="sugarExcludingSequestration") + sugar_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Sugar emissions intensity including sequestration, in kg-CO2e/kg sugar", alias="sugarIncludingSequestration") + sugar_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Sugar produced in kg", alias="sugarProducedKg") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sugarExcludingSequestration", "sugarIncludingSequestration", "sugarProducedKg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSugar200ResponseIntermediateInnerIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSugar200ResponseIntermediateInnerIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sugarExcludingSequestration": obj.get("sugarExcludingSequestration"), + "sugarIncludingSequestration": obj.get("sugarIncludingSequestration"), + "sugarProducedKg": obj.get("sugarProducedKg") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sugar_request.py b/examples/python-api-client/api-client/openapi_client/models/post_sugar_request.py new file mode 100644 index 00000000..530d00f0 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sugar_request.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from openapi_client.models.post_cotton_request_vegetation_inner import PostCottonRequestVegetationInner +from openapi_client.models.post_sugar_request_crops_inner import PostSugarRequestCropsInner +from typing import Optional, Set +from typing_extensions import Self + +class PostSugarRequest(BaseModel): + """ + Input data required for the `sugar` calculator + """ # noqa: E501 + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + crops: List[PostSugarRequestCropsInner] + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + vegetation: List[PostCottonRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "crops", "electricityRenewable", "electricityUse", "vegetation"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSugarRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in crops (list) + _items = [] + if self.crops: + for _item_crops in self.crops: + if _item_crops: + _items.append(_item_crops.to_dict()) + _dict['crops'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSugarRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "crops": [PostSugarRequestCropsInner.from_dict(_item) for _item in obj["crops"]] if obj.get("crops") is not None else None, + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "vegetation": [PostCottonRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_sugar_request_crops_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_sugar_request_crops_inner.py new file mode 100644 index 00000000..52419ef9 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_sugar_request_crops_inner.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostSugarRequestCropsInner(BaseModel): + """ + PostSugarRequestCropsInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + production_system: StrictStr = Field(description="Production system of this crop", alias="productionSystem") + average_cane_yield: Union[StrictFloat, StrictInt] = Field(description="Average cane/crop yield, in t/ha (tonnes per hectare)", alias="averageCaneYield") + percent_milled_cane_yield: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of cane yield that becomes milled sugar, from 0 to 1", alias="percentMilledCaneYield") + area_sown: Union[StrictFloat, StrictInt] = Field(description="Area sown, in ha (hectares)", alias="areaSown") + non_urea_nitrogen: Union[StrictFloat, StrictInt] = Field(description="Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare)", alias="nonUreaNitrogen") + urea_application: Union[StrictFloat, StrictInt] = Field(description="Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare)", alias="ureaApplication") + urea_ammonium_nitrate: Union[StrictFloat, StrictInt] = Field(description="Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare)", alias="ureaAmmoniumNitrate") + phosphorus_application: Union[StrictFloat, StrictInt] = Field(description="Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare)", alias="phosphorusApplication") + potassium_application: Union[StrictFloat, StrictInt] = Field(description="Potassium application, in kg K/ha (kilograms of potassium per hectare)", alias="potassiumApplication") + sulfur_application: Union[StrictFloat, StrictInt] = Field(description="Sulfur application, in kg S/ha (kilograms of sulfur per hectare)", alias="sulfurApplication") + rainfall_above600: StrictBool = Field(description="Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm", alias="rainfallAbove600") + fraction_of_annual_crop_burnt: Union[StrictFloat, StrictInt] = Field(description="Fraction of annual production of crop that is burnt, from 0 to 1", alias="fractionOfAnnualCropBurnt") + herbicide_use: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram)", alias="herbicideUse") + glyphosate_other_herbicide_use: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram)", alias="glyphosateOtherHerbicideUse") + electricity_allocation: Union[StrictFloat, StrictInt] = Field(description="Percentage of electricity use to allocate to this crop, from 0 to 1", alias="electricityAllocation") + limestone: Union[StrictFloat, StrictInt] = Field(description="Lime applied in tonnes") + limestone_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of lime as limestone vs dolomite, between 0 and 1", alias="limestoneFraction") + diesel_use: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)", alias="dieselUse") + petrol_use: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)", alias="petrolUse") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "productionSystem", "averageCaneYield", "percentMilledCaneYield", "areaSown", "nonUreaNitrogen", "ureaApplication", "ureaAmmoniumNitrate", "phosphorusApplication", "potassiumApplication", "sulfurApplication", "rainfallAbove600", "fractionOfAnnualCropBurnt", "herbicideUse", "glyphosateOtherHerbicideUse", "electricityAllocation", "limestone", "limestoneFraction", "dieselUse", "petrolUse", "lpg"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + @field_validator('production_system') + def production_system_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Non-irrigated crop', 'Irrigated crop', 'Sugar cane', 'Cotton', 'Horticulture']): + raise ValueError("must be one of enum values ('Non-irrigated crop', 'Irrigated crop', 'Sugar cane', 'Cotton', 'Horticulture')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostSugarRequestCropsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostSugarRequestCropsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "productionSystem": obj.get("productionSystem"), + "averageCaneYield": obj.get("averageCaneYield"), + "percentMilledCaneYield": obj.get("percentMilledCaneYield"), + "areaSown": obj.get("areaSown"), + "nonUreaNitrogen": obj.get("nonUreaNitrogen"), + "ureaApplication": obj.get("ureaApplication"), + "ureaAmmoniumNitrate": obj.get("ureaAmmoniumNitrate"), + "phosphorusApplication": obj.get("phosphorusApplication"), + "potassiumApplication": obj.get("potassiumApplication"), + "sulfurApplication": obj.get("sulfurApplication"), + "rainfallAbove600": obj.get("rainfallAbove600"), + "fractionOfAnnualCropBurnt": obj.get("fractionOfAnnualCropBurnt"), + "herbicideUse": obj.get("herbicideUse"), + "glyphosateOtherHerbicideUse": obj.get("glyphosateOtherHerbicideUse"), + "electricityAllocation": obj.get("electricityAllocation"), + "limestone": obj.get("limestone"), + "limestoneFraction": obj.get("limestoneFraction"), + "dieselUse": obj.get("dieselUse"), + "petrolUse": obj.get("petrolUse"), + "lpg": obj.get("lpg") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response.py new file mode 100644 index 00000000..b2c5efc5 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_vineyard200_response_intermediate_inner import PostVineyard200ResponseIntermediateInner +from openapi_client.models.post_vineyard200_response_intermediate_inner_intensities import PostVineyard200ResponseIntermediateInnerIntensities +from openapi_client.models.post_vineyard200_response_net import PostVineyard200ResponseNet +from openapi_client.models.post_vineyard200_response_scope1 import PostVineyard200ResponseScope1 +from openapi_client.models.post_vineyard200_response_scope3 import PostVineyard200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostVineyard200Response(BaseModel): + """ + Emissions calculation output for the `vineyard` calculator + """ # noqa: E501 + scope1: PostVineyard200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostVineyard200ResponseScope3 + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + intermediate: List[PostVineyard200ResponseIntermediateInner] + net: PostVineyard200ResponseNet + intensities: List[PostVineyard200ResponseIntermediateInnerIntensities] = Field(description="Emissions intensity for each vineyard (in order), in t-CO2e/t yield") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "carbonSequestration", "intermediate", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostVineyard200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intensities (list) + _items = [] + if self.intensities: + for _item_intensities in self.intensities: + if _item_intensities: + _items.append(_item_intensities.to_dict()) + _dict['intensities'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostVineyard200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostVineyard200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostVineyard200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intermediate": [PostVineyard200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None, + "net": PostVineyard200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": [PostVineyard200ResponseIntermediateInnerIntensities.from_dict(_item) for _item in obj["intensities"]] if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_intermediate_inner.py new file mode 100644 index 00000000..dc69fb89 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_intermediate_inner.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_vineyard200_response_intermediate_inner_intensities import PostVineyard200ResponseIntermediateInnerIntensities +from openapi_client.models.post_vineyard200_response_scope1 import PostVineyard200ResponseScope1 +from openapi_client.models.post_vineyard200_response_scope3 import PostVineyard200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostVineyard200ResponseIntermediateInner(BaseModel): + """ + Intermediate emissions calculation output for the Vineyard calculator + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostVineyard200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostVineyard200ResponseScope3 + carbon_sequestration: Union[StrictFloat, StrictInt] = Field(description="Carbon sequestration, in tonnes-CO2e", alias="carbonSequestration") + intensities: PostVineyard200ResponseIntermediateInnerIntensities + net: PostAquaculture200ResponseNet + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "carbonSequestration", "intensities", "net"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostVineyard200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostVineyard200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostVineyard200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostVineyard200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "carbonSequestration": obj.get("carbonSequestration"), + "intensities": PostVineyard200ResponseIntermediateInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..7c3d5bfb --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_intermediate_inner_intensities.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostVineyard200ResponseIntermediateInnerIntensities(BaseModel): + """ + PostVineyard200ResponseIntermediateInnerIntensities + """ # noqa: E501 + vineyards_excluding_sequestration: Union[StrictFloat, StrictInt] = Field(description="Vineyard emissions intensity excluding sequestration, in kg-CO2e/kg crop", alias="vineyardsExcludingSequestration") + vineyards_including_sequestration: Union[StrictFloat, StrictInt] = Field(description="Vineyard emissions intensity including sequestration, in kg-CO2e/kg crop", alias="vineyardsIncludingSequestration") + crop_produced_kg: Union[StrictFloat, StrictInt] = Field(description="Vineyard crop produced in kg", alias="cropProducedKg") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vineyardsExcludingSequestration", "vineyardsIncludingSequestration", "cropProducedKg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostVineyard200ResponseIntermediateInnerIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostVineyard200ResponseIntermediateInnerIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vineyardsExcludingSequestration": obj.get("vineyardsExcludingSequestration"), + "vineyardsIncludingSequestration": obj.get("vineyardsIncludingSequestration"), + "cropProducedKg": obj.get("cropProducedKg") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_net.py b/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_net.py new file mode 100644 index 00000000..36d6b1d1 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_net.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostVineyard200ResponseNet(BaseModel): + """ + Net emissions for each vineyard (in order) + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] + vineyards: List[Union[StrictFloat, StrictInt]] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "vineyards"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostVineyard200ResponseNet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostVineyard200ResponseNet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "vineyards": obj.get("vineyards") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_scope1.py b/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_scope1.py new file mode 100644 index 00000000..30d5a98f --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_scope1.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostVineyard200ResponseScope1(BaseModel): + """ + Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fuel_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from fuel use, in tonnes-CO2e", alias="fuelCO2") + lime_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from lime, in tonnes-CO2e", alias="limeCO2") + urea_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from urea, in tonnes-CO2e", alias="ureaCO2") + waste_water_co2: Union[StrictFloat, StrictInt] = Field(description="Emissions from wastewater, in tonnes-CO2e", alias="wasteWaterCO2") + composted_solid_waste_co2: Union[StrictFloat, StrictInt] = Field(description="Emissions from composted solid waste, in tonnes-CO2e", alias="compostedSolidWasteCO2") + fuel_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from fuel use, in tonnes-CO2e", alias="fuelCH4") + fertiliser_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fertiliser, in tonnes-CO2e", alias="fertiliserN2O") + atmospheric_deposition_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from atmospheric deposition, in tonnes-CO2e", alias="atmosphericDepositionN2O") + crop_residue_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from crop residue, in tonnes-CO2e", alias="cropResidueN2O") + leaching_and_runoff_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from leeching and runoff, in tonnes-CO2e", alias="leachingAndRunoffN2O") + fuel_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fuel use, in tonnes-CO2e", alias="fuelN2O") + total_co2: Union[StrictFloat, StrictInt] = Field(description="Total CO2 scope 1 emissions, in tonnes-CO2e", alias="totalCO2") + total_ch4: Union[StrictFloat, StrictInt] = Field(description="Total CH4 scope 1 emissions, in tonnes-CO2e", alias="totalCH4") + total_n2_o: Union[StrictFloat, StrictInt] = Field(description="Total N2O scope 1 emissions, in tonnes-CO2e", alias="totalN2O") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 1 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuelCO2", "limeCO2", "ureaCO2", "wasteWaterCO2", "compostedSolidWasteCO2", "fuelCH4", "fertiliserN2O", "atmosphericDepositionN2O", "cropResidueN2O", "leachingAndRunoffN2O", "fuelN2O", "totalCO2", "totalCH4", "totalN2O", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostVineyard200ResponseScope1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostVineyard200ResponseScope1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuelCO2": obj.get("fuelCO2"), + "limeCO2": obj.get("limeCO2"), + "ureaCO2": obj.get("ureaCO2"), + "wasteWaterCO2": obj.get("wasteWaterCO2"), + "compostedSolidWasteCO2": obj.get("compostedSolidWasteCO2"), + "fuelCH4": obj.get("fuelCH4"), + "fertiliserN2O": obj.get("fertiliserN2O"), + "atmosphericDepositionN2O": obj.get("atmosphericDepositionN2O"), + "cropResidueN2O": obj.get("cropResidueN2O"), + "leachingAndRunoffN2O": obj.get("leachingAndRunoffN2O"), + "fuelN2O": obj.get("fuelN2O"), + "totalCO2": obj.get("totalCO2"), + "totalCH4": obj.get("totalCH4"), + "totalN2O": obj.get("totalN2O"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_scope3.py b/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_scope3.py new file mode 100644 index 00000000..31264f02 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_vineyard200_response_scope3.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostVineyard200ResponseScope3(BaseModel): + """ + Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fertiliser: Union[StrictFloat, StrictInt] = Field(description="Emissions from fertiliser, in tonnes-CO2e") + herbicide: Union[StrictFloat, StrictInt] = Field(description="Emissions from herbicide, in tonnes-CO2e") + electricity: Union[StrictFloat, StrictInt] = Field(description="Emissions from electricity, in tonnes-CO2e") + fuel: Union[StrictFloat, StrictInt] = Field(description="Emissions from fuel, in tonnes-CO2e") + lime: Union[StrictFloat, StrictInt] = Field(description="Emissions from lime, in tonnes-CO2e") + commercial_flights: Union[StrictFloat, StrictInt] = Field(description="Emissions from commercial flights, in tonnes-CO2e", alias="commercialFlights") + inbound_freight: Union[StrictFloat, StrictInt] = Field(description="Emissions from inbound freight, in tonnes-CO2e", alias="inboundFreight") + solid_waste_sent_offsite: Union[StrictFloat, StrictInt] = Field(description="Emissions from solid waste sent offsite, in tonnes-CO2e", alias="solidWasteSentOffsite") + outbound_freight: Union[StrictFloat, StrictInt] = Field(description="Emissions from outbound freight, in tonnes-CO2e", alias="outboundFreight") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 3 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fertiliser", "herbicide", "electricity", "fuel", "lime", "commercialFlights", "inboundFreight", "solidWasteSentOffsite", "outboundFreight", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostVineyard200ResponseScope3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostVineyard200ResponseScope3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fertiliser": obj.get("fertiliser"), + "herbicide": obj.get("herbicide"), + "electricity": obj.get("electricity"), + "fuel": obj.get("fuel"), + "lime": obj.get("lime"), + "commercialFlights": obj.get("commercialFlights"), + "inboundFreight": obj.get("inboundFreight"), + "solidWasteSentOffsite": obj.get("solidWasteSentOffsite"), + "outboundFreight": obj.get("outboundFreight"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_vineyard_request.py b/examples/python-api-client/api-client/openapi_client/models/post_vineyard_request.py new file mode 100644 index 00000000..a4aec75c --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_vineyard_request.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_vineyard_request_vegetation_inner import PostVineyardRequestVegetationInner +from openapi_client.models.post_vineyard_request_vineyards_inner import PostVineyardRequestVineyardsInner +from typing import Optional, Set +from typing_extensions import Self + +class PostVineyardRequest(BaseModel): + """ + Input data required for the `vineyard` calculator + """ # noqa: E501 + vineyards: List[PostVineyardRequestVineyardsInner] + vegetation: List[PostVineyardRequestVegetationInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vineyards", "vegetation"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostVineyardRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in vineyards (list) + _items = [] + if self.vineyards: + for _item_vineyards in self.vineyards: + if _item_vineyards: + _items.append(_item_vineyards.to_dict()) + _dict['vineyards'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vegetation (list) + _items = [] + if self.vegetation: + for _item_vegetation in self.vegetation: + if _item_vegetation: + _items.append(_item_vegetation.to_dict()) + _dict['vegetation'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostVineyardRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vineyards": [PostVineyardRequestVineyardsInner.from_dict(_item) for _item in obj["vineyards"]] if obj.get("vineyards") is not None else None, + "vegetation": [PostVineyardRequestVegetationInner.from_dict(_item) for _item in obj["vegetation"]] if obj.get("vegetation") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_vineyard_request_vegetation_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_vineyard_request_vegetation_inner.py new file mode 100644 index 00000000..0d2fb3e2 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_vineyard_request_vegetation_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation +from typing import Optional, Set +from typing_extensions import Self + +class PostVineyardRequestVegetationInner(BaseModel): + """ + PostVineyardRequestVegetationInner + """ # noqa: E501 + vegetation: PostBeefRequestVegetationInnerVegetation + allocation_to_vineyards: List[Union[StrictFloat, StrictInt]] = Field(alias="allocationToVineyards") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vegetation", "allocationToVineyards"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostVineyardRequestVegetationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of vegetation + if self.vegetation: + _dict['vegetation'] = self.vegetation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostVineyardRequestVegetationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vegetation": PostBeefRequestVegetationInnerVegetation.from_dict(obj["vegetation"]) if obj.get("vegetation") is not None else None, + "allocationToVineyards": obj.get("allocationToVineyards") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_vineyard_request_vineyards_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_vineyard_request_vineyards_inner.py new file mode 100644 index 00000000..f977e70b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_vineyard_request_vineyards_inner.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_aquaculture_request_enterprises_inner_fluid_waste_inner import PostAquacultureRequestEnterprisesInnerFluidWasteInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel import PostAquacultureRequestEnterprisesInnerFuel +from openapi_client.models.post_aquaculture_request_enterprises_inner_inbound_freight_inner import PostAquacultureRequestEnterprisesInnerInboundFreightInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_solid_waste import PostAquacultureRequestEnterprisesInnerSolidWaste +from typing import Optional, Set +from typing_extensions import Self + +class PostVineyardRequestVineyardsInner(BaseModel): + """ + PostVineyardRequestVineyardsInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + rainfall_above600: StrictBool = Field(description="Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm", alias="rainfallAbove600") + irrigated: StrictBool = Field(description="Is the crop irrigated?") + area_planted: Union[StrictFloat, StrictInt] = Field(description="Area planted, in ha (hectares)", alias="areaPlanted") + average_yield: Union[StrictFloat, StrictInt] = Field(description="Average yield, in t/ha (tonnes per hectare)", alias="averageYield") + non_urea_nitrogen: Union[StrictFloat, StrictInt] = Field(description="Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare)", alias="nonUreaNitrogen") + phosphorus_application: Union[StrictFloat, StrictInt] = Field(description="Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare)", alias="phosphorusApplication") + potassium_application: Union[StrictFloat, StrictInt] = Field(description="Potassium application, in kg K/ha (kilograms of potassium per hectare)", alias="potassiumApplication") + sulfur_application: Union[StrictFloat, StrictInt] = Field(description="Sulfur application, in kg S/ha (kilograms of sulfur per hectare)", alias="sulfurApplication") + urea_application: Union[StrictFloat, StrictInt] = Field(description="Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare)", alias="ureaApplication") + urea_ammonium_nitrate: Union[StrictFloat, StrictInt] = Field(description="Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare)", alias="ureaAmmoniumNitrate") + limestone: Union[StrictFloat, StrictInt] = Field(description="Lime applied in tonnes") + limestone_fraction: Union[StrictFloat, StrictInt] = Field(description="Fraction of lime as limestone vs dolomite, between 0 and 1", alias="limestoneFraction") + herbicide_use: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram)", alias="herbicideUse") + glyphosate_other_herbicide_use: Union[StrictFloat, StrictInt] = Field(description="Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram)", alias="glyphosateOtherHerbicideUse") + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + electricity_source: StrictStr = Field(description="Source of electricity", alias="electricitySource") + fuel: PostAquacultureRequestEnterprisesInnerFuel + fluid_waste: List[PostAquacultureRequestEnterprisesInnerFluidWasteInner] = Field(description="Amount of fluid waste, in kL (kilolitres)", alias="fluidWaste") + solid_waste: PostAquacultureRequestEnterprisesInnerSolidWaste = Field(alias="solidWaste") + inbound_freight: List[PostAquacultureRequestEnterprisesInnerInboundFreightInner] = Field(description="Services used to transport goods to the enterprise", alias="inboundFreight") + outbound_freight: List[PostAquacultureRequestEnterprisesInnerInboundFreightInner] = Field(description="Services used to transport goods from the enterprise", alias="outboundFreight") + total_commercial_flights_km: Union[StrictFloat, StrictInt] = Field(description="Total distance of commercial flights, in km (kilometers)", alias="totalCommercialFlightsKm") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "rainfallAbove600", "irrigated", "areaPlanted", "averageYield", "nonUreaNitrogen", "phosphorusApplication", "potassiumApplication", "sulfurApplication", "ureaApplication", "ureaAmmoniumNitrate", "limestone", "limestoneFraction", "herbicideUse", "glyphosateOtherHerbicideUse", "electricityRenewable", "electricityUse", "electricitySource", "fuel", "fluidWaste", "solidWaste", "inboundFreight", "outboundFreight", "totalCommercialFlightsKm"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + @field_validator('electricity_source') + def electricity_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['State Grid', 'Renewable']): + raise ValueError("must be one of enum values ('State Grid', 'Renewable')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostVineyardRequestVineyardsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of fuel + if self.fuel: + _dict['fuel'] = self.fuel.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in fluid_waste (list) + _items = [] + if self.fluid_waste: + for _item_fluid_waste in self.fluid_waste: + if _item_fluid_waste: + _items.append(_item_fluid_waste.to_dict()) + _dict['fluidWaste'] = _items + # override the default output from pydantic by calling `to_dict()` of solid_waste + if self.solid_waste: + _dict['solidWaste'] = self.solid_waste.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in inbound_freight (list) + _items = [] + if self.inbound_freight: + for _item_inbound_freight in self.inbound_freight: + if _item_inbound_freight: + _items.append(_item_inbound_freight.to_dict()) + _dict['inboundFreight'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in outbound_freight (list) + _items = [] + if self.outbound_freight: + for _item_outbound_freight in self.outbound_freight: + if _item_outbound_freight: + _items.append(_item_outbound_freight.to_dict()) + _dict['outboundFreight'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostVineyardRequestVineyardsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "rainfallAbove600": obj.get("rainfallAbove600"), + "irrigated": obj.get("irrigated"), + "areaPlanted": obj.get("areaPlanted"), + "averageYield": obj.get("averageYield"), + "nonUreaNitrogen": obj.get("nonUreaNitrogen"), + "phosphorusApplication": obj.get("phosphorusApplication"), + "potassiumApplication": obj.get("potassiumApplication"), + "sulfurApplication": obj.get("sulfurApplication"), + "ureaApplication": obj.get("ureaApplication"), + "ureaAmmoniumNitrate": obj.get("ureaAmmoniumNitrate"), + "limestone": obj.get("limestone"), + "limestoneFraction": obj.get("limestoneFraction"), + "herbicideUse": obj.get("herbicideUse"), + "glyphosateOtherHerbicideUse": obj.get("glyphosateOtherHerbicideUse"), + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "electricitySource": obj.get("electricitySource"), + "fuel": PostAquacultureRequestEnterprisesInnerFuel.from_dict(obj["fuel"]) if obj.get("fuel") is not None else None, + "fluidWaste": [PostAquacultureRequestEnterprisesInnerFluidWasteInner.from_dict(_item) for _item in obj["fluidWaste"]] if obj.get("fluidWaste") is not None else None, + "solidWaste": PostAquacultureRequestEnterprisesInnerSolidWaste.from_dict(obj["solidWaste"]) if obj.get("solidWaste") is not None else None, + "inboundFreight": [PostAquacultureRequestEnterprisesInnerInboundFreightInner.from_dict(_item) for _item in obj["inboundFreight"]] if obj.get("inboundFreight") is not None else None, + "outboundFreight": [PostAquacultureRequestEnterprisesInnerInboundFreightInner.from_dict(_item) for _item in obj["outboundFreight"]] if obj.get("outboundFreight") is not None else None, + "totalCommercialFlightsKm": obj.get("totalCommercialFlightsKm") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response.py new file mode 100644 index 00000000..c88bdcbd --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_purchased_offsets import PostAquaculture200ResponsePurchasedOffsets +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_aquaculture200_response_scope3 import PostAquaculture200ResponseScope3 +from openapi_client.models.post_wildcatchfishery200_response_intensities import PostWildcatchfishery200ResponseIntensities +from openapi_client.models.post_wildcatchfishery200_response_intermediate_inner import PostWildcatchfishery200ResponseIntermediateInner +from openapi_client.models.post_wildcatchfishery200_response_scope1 import PostWildcatchfishery200ResponseScope1 +from typing import Optional, Set +from typing_extensions import Self + +class PostWildcatchfishery200Response(BaseModel): + """ + Emissions calculation output for the `wildcatchfishery` calculator + """ # noqa: E501 + scope1: PostWildcatchfishery200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostAquaculture200ResponseScope3 + purchased_offsets: PostAquaculture200ResponsePurchasedOffsets = Field(alias="purchasedOffsets") + net: PostAquaculture200ResponseNet + intensities: PostWildcatchfishery200ResponseIntensities + carbon_sequestration: PostAquaculture200ResponseCarbonSequestration = Field(alias="carbonSequestration") + intermediate: List[PostWildcatchfishery200ResponseIntermediateInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "purchasedOffsets", "net", "intensities", "carbonSequestration", "intermediate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildcatchfishery200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of purchased_offsets + if self.purchased_offsets: + _dict['purchasedOffsets'] = self.purchased_offsets.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildcatchfishery200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostWildcatchfishery200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostAquaculture200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "purchasedOffsets": PostAquaculture200ResponsePurchasedOffsets.from_dict(obj["purchasedOffsets"]) if obj.get("purchasedOffsets") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": PostWildcatchfishery200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "carbonSequestration": PostAquaculture200ResponseCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None, + "intermediate": [PostWildcatchfishery200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response_intensities.py new file mode 100644 index 00000000..6c98b7e3 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response_intensities.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostWildcatchfishery200ResponseIntensities(BaseModel): + """ + PostWildcatchfishery200ResponseIntensities + """ # noqa: E501 + total_harvest_weight_kg: Union[StrictFloat, StrictInt] = Field(description="Total harvest weight in kg", alias="totalHarvestWeightKg") + wild_catch_fishery_excluding_carbon_offsets: Union[StrictFloat, StrictInt] = Field(description="Wild catch fishery emissions intensity excluding sequestration, in kg-CO2e/kg harvest weight", alias="wildCatchFisheryExcludingCarbonOffsets") + wild_catch_fishery_including_carbon_offsets: Union[StrictFloat, StrictInt] = Field(description="Wild catch fishery emissions intensity including sequestration, in kg-CO2e/kg harvest weight", alias="wildCatchFisheryIncludingCarbonOffsets") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["totalHarvestWeightKg", "wildCatchFisheryExcludingCarbonOffsets", "wildCatchFisheryIncludingCarbonOffsets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildcatchfishery200ResponseIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildcatchfishery200ResponseIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalHarvestWeightKg": obj.get("totalHarvestWeightKg"), + "wildCatchFisheryExcludingCarbonOffsets": obj.get("wildCatchFisheryExcludingCarbonOffsets"), + "wildCatchFisheryIncludingCarbonOffsets": obj.get("wildCatchFisheryIncludingCarbonOffsets") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response_intermediate_inner.py new file mode 100644 index 00000000..0aecf07a --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response_intermediate_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_aquaculture200_response_scope3 import PostAquaculture200ResponseScope3 +from openapi_client.models.post_wildcatchfishery200_response_intensities import PostWildcatchfishery200ResponseIntensities +from openapi_client.models.post_wildcatchfishery200_response_scope1 import PostWildcatchfishery200ResponseScope1 +from typing import Optional, Set +from typing_extensions import Self + +class PostWildcatchfishery200ResponseIntermediateInner(BaseModel): + """ + Intermediate emissions calculation output for the `wildcatchfishery` calculator + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostWildcatchfishery200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostAquaculture200ResponseScope3 + intensities: PostWildcatchfishery200ResponseIntensities + net: PostAquaculture200ResponseNet + carbon_sequestration: PostAquaculture200ResponseIntermediateInnerCarbonSequestration = Field(alias="carbonSequestration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "intensities", "net", "carbonSequestration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildcatchfishery200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of carbon_sequestration + if self.carbon_sequestration: + _dict['carbonSequestration'] = self.carbon_sequestration.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildcatchfishery200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostWildcatchfishery200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostAquaculture200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "intensities": PostWildcatchfishery200ResponseIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "carbonSequestration": PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(obj["carbonSequestration"]) if obj.get("carbonSequestration") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response_scope1.py b/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response_scope1.py new file mode 100644 index 00000000..29419d0c --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery200_response_scope1.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostWildcatchfishery200ResponseScope1(BaseModel): + """ + Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fuel_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from fuel use, in tonnes-CO2e", alias="fuelCO2") + fuel_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from fuel use, in tonnes-CO2e", alias="fuelCH4") + fuel_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fuel use, in tonnes-CO2e", alias="fuelN2O") + waste_water_co2: Union[StrictFloat, StrictInt] = Field(description="Emissions from wastewater, in tonnes-CO2e", alias="wasteWaterCO2") + composted_solid_waste_co2: Union[StrictFloat, StrictInt] = Field(description="Emissions from composted solid waste, in tonnes-CO2e", alias="compostedSolidWasteCO2") + hfcs_refrigerant_leakage: Union[StrictFloat, StrictInt] = Field(description="Emissions from refrigerant leakage, in tonnes-HFCs", alias="hfcsRefrigerantLeakage") + total_co2: Union[StrictFloat, StrictInt] = Field(description="Total CO2 scope 1 emissions, in tonnes-CO2e", alias="totalCO2") + total_ch4: Union[StrictFloat, StrictInt] = Field(description="Total CH4 scope 1 emissions, in tonnes-CO2e", alias="totalCH4") + total_n2_o: Union[StrictFloat, StrictInt] = Field(description="Total N2O scope 1 emissions, in tonnes-CO2e", alias="totalN2O") + total_hfcs: Union[StrictFloat, StrictInt] = Field(description="Total HFCs scope 1 emissions, in tonnes-CO2e", alias="totalHFCs") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 1 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuelCO2", "fuelCH4", "fuelN2O", "wasteWaterCO2", "compostedSolidWasteCO2", "hfcsRefrigerantLeakage", "totalCO2", "totalCH4", "totalN2O", "totalHFCs", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildcatchfishery200ResponseScope1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildcatchfishery200ResponseScope1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuelCO2": obj.get("fuelCO2"), + "fuelCH4": obj.get("fuelCH4"), + "fuelN2O": obj.get("fuelN2O"), + "wasteWaterCO2": obj.get("wasteWaterCO2"), + "compostedSolidWasteCO2": obj.get("compostedSolidWasteCO2"), + "hfcsRefrigerantLeakage": obj.get("hfcsRefrigerantLeakage"), + "totalCO2": obj.get("totalCO2"), + "totalCH4": obj.get("totalCH4"), + "totalN2O": obj.get("totalN2O"), + "totalHFCs": obj.get("totalHFCs"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery_request.py b/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery_request.py new file mode 100644 index 00000000..d289f6ee --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery_request.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_wildcatchfishery_request_enterprises_inner import PostWildcatchfisheryRequestEnterprisesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostWildcatchfisheryRequest(BaseModel): + """ + Input data required for the `wildcatchfishery` calculator + """ # noqa: E501 + enterprises: List[PostWildcatchfisheryRequestEnterprisesInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enterprises"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildcatchfisheryRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in enterprises (list) + _items = [] + if self.enterprises: + for _item_enterprises in self.enterprises: + if _item_enterprises: + _items.append(_item_enterprises.to_dict()) + _dict['enterprises'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildcatchfisheryRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enterprises": [PostWildcatchfisheryRequestEnterprisesInner.from_dict(_item) for _item in obj["enterprises"]] if obj.get("enterprises") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery_request_enterprises_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery_request_enterprises_inner.py new file mode 100644 index 00000000..84e1f96b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery_request_enterprises_inner.py @@ -0,0 +1,210 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_aquaculture_request_enterprises_inner_custom_bait_inner import PostAquacultureRequestEnterprisesInnerCustomBaitInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_fluid_waste_inner import PostAquacultureRequestEnterprisesInnerFluidWasteInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel import PostAquacultureRequestEnterprisesInnerFuel +from openapi_client.models.post_aquaculture_request_enterprises_inner_inbound_freight_inner import PostAquacultureRequestEnterprisesInnerInboundFreightInner +from openapi_client.models.post_aquaculture_request_enterprises_inner_solid_waste import PostAquacultureRequestEnterprisesInnerSolidWaste +from openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner import PostHorticultureRequestCropsInnerRefrigerantsInner +from openapi_client.models.post_wildcatchfishery_request_enterprises_inner_bait_inner import PostWildcatchfisheryRequestEnterprisesInnerBaitInner +from typing import Optional, Set +from typing_extensions import Self + +class PostWildcatchfisheryRequestEnterprisesInner(BaseModel): + """ + Input data required for a single wild catch fishery enterprise + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + production_system: StrictStr = Field(description="Production system of the wild catch fishery enterprise", alias="productionSystem") + total_harvest_kg: Union[StrictFloat, StrictInt] = Field(description="Total harvest in kg", alias="totalHarvestKg") + refrigerants: List[PostHorticultureRequestCropsInnerRefrigerantsInner] = Field(description="Refrigerant type") + bait: List[PostWildcatchfisheryRequestEnterprisesInnerBaitInner] = Field(description="Bait purchases") + custom_bait: List[PostAquacultureRequestEnterprisesInnerCustomBaitInner] = Field(description="Custom bait purchases", alias="customBait") + inbound_freight: List[PostAquacultureRequestEnterprisesInnerInboundFreightInner] = Field(description="Services used to transport goods to the enterprise", alias="inboundFreight") + outbound_freight: List[PostAquacultureRequestEnterprisesInnerInboundFreightInner] = Field(description="Services used to transport goods from the enterprise", alias="outboundFreight") + total_commercial_flights_km: Union[StrictFloat, StrictInt] = Field(description="Total distance of commercial flights, in km (kilometers)", alias="totalCommercialFlightsKm") + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + electricity_source: StrictStr = Field(description="Source of electricity", alias="electricitySource") + fuel: PostAquacultureRequestEnterprisesInnerFuel + fluid_waste: List[PostAquacultureRequestEnterprisesInnerFluidWasteInner] = Field(description="Amount of fluid waste, in kL (kilolitres)", alias="fluidWaste") + solid_waste: PostAquacultureRequestEnterprisesInnerSolidWaste = Field(alias="solidWaste") + carbon_offsets: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0)", alias="carbonOffsets") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "productionSystem", "totalHarvestKg", "refrigerants", "bait", "customBait", "inboundFreight", "outboundFreight", "totalCommercialFlightsKm", "electricityRenewable", "electricityUse", "electricitySource", "fuel", "fluidWaste", "solidWaste", "carbonOffsets"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + @field_validator('production_system') + def production_system_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Abalone', 'Crab Fishing', 'Demersal Trawl', 'Gillnet', 'Handline', 'Lobster Pot', 'Longline', 'Northern Fish Trap', 'Northern Prawn trawl', 'Otter Board Trawl', 'Prawn trawl Australian average', 'Purse seine', 'Southern Ocean Longline']): + raise ValueError("must be one of enum values ('Abalone', 'Crab Fishing', 'Demersal Trawl', 'Gillnet', 'Handline', 'Lobster Pot', 'Longline', 'Northern Fish Trap', 'Northern Prawn trawl', 'Otter Board Trawl', 'Prawn trawl Australian average', 'Purse seine', 'Southern Ocean Longline')") + return value + + @field_validator('electricity_source') + def electricity_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['State Grid', 'Renewable']): + raise ValueError("must be one of enum values ('State Grid', 'Renewable')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildcatchfisheryRequestEnterprisesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in refrigerants (list) + _items = [] + if self.refrigerants: + for _item_refrigerants in self.refrigerants: + if _item_refrigerants: + _items.append(_item_refrigerants.to_dict()) + _dict['refrigerants'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in bait (list) + _items = [] + if self.bait: + for _item_bait in self.bait: + if _item_bait: + _items.append(_item_bait.to_dict()) + _dict['bait'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in custom_bait (list) + _items = [] + if self.custom_bait: + for _item_custom_bait in self.custom_bait: + if _item_custom_bait: + _items.append(_item_custom_bait.to_dict()) + _dict['customBait'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in inbound_freight (list) + _items = [] + if self.inbound_freight: + for _item_inbound_freight in self.inbound_freight: + if _item_inbound_freight: + _items.append(_item_inbound_freight.to_dict()) + _dict['inboundFreight'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in outbound_freight (list) + _items = [] + if self.outbound_freight: + for _item_outbound_freight in self.outbound_freight: + if _item_outbound_freight: + _items.append(_item_outbound_freight.to_dict()) + _dict['outboundFreight'] = _items + # override the default output from pydantic by calling `to_dict()` of fuel + if self.fuel: + _dict['fuel'] = self.fuel.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in fluid_waste (list) + _items = [] + if self.fluid_waste: + for _item_fluid_waste in self.fluid_waste: + if _item_fluid_waste: + _items.append(_item_fluid_waste.to_dict()) + _dict['fluidWaste'] = _items + # override the default output from pydantic by calling `to_dict()` of solid_waste + if self.solid_waste: + _dict['solidWaste'] = self.solid_waste.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildcatchfisheryRequestEnterprisesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "productionSystem": obj.get("productionSystem"), + "totalHarvestKg": obj.get("totalHarvestKg"), + "refrigerants": [PostHorticultureRequestCropsInnerRefrigerantsInner.from_dict(_item) for _item in obj["refrigerants"]] if obj.get("refrigerants") is not None else None, + "bait": [PostWildcatchfisheryRequestEnterprisesInnerBaitInner.from_dict(_item) for _item in obj["bait"]] if obj.get("bait") is not None else None, + "customBait": [PostAquacultureRequestEnterprisesInnerCustomBaitInner.from_dict(_item) for _item in obj["customBait"]] if obj.get("customBait") is not None else None, + "inboundFreight": [PostAquacultureRequestEnterprisesInnerInboundFreightInner.from_dict(_item) for _item in obj["inboundFreight"]] if obj.get("inboundFreight") is not None else None, + "outboundFreight": [PostAquacultureRequestEnterprisesInnerInboundFreightInner.from_dict(_item) for _item in obj["outboundFreight"]] if obj.get("outboundFreight") is not None else None, + "totalCommercialFlightsKm": obj.get("totalCommercialFlightsKm"), + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "electricitySource": obj.get("electricitySource"), + "fuel": PostAquacultureRequestEnterprisesInnerFuel.from_dict(obj["fuel"]) if obj.get("fuel") is not None else None, + "fluidWaste": [PostAquacultureRequestEnterprisesInnerFluidWasteInner.from_dict(_item) for _item in obj["fluidWaste"]] if obj.get("fluidWaste") is not None else None, + "solidWaste": PostAquacultureRequestEnterprisesInnerSolidWaste.from_dict(obj["solidWaste"]) if obj.get("solidWaste") is not None else None, + "carbonOffsets": obj.get("carbonOffsets") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery_request_enterprises_inner_bait_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery_request_enterprises_inner_bait_inner.py new file mode 100644 index 00000000..e2b0b7fe --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildcatchfishery_request_enterprises_inner_bait_inner.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PostWildcatchfisheryRequestEnterprisesInnerBaitInner(BaseModel): + """ + PostWildcatchfisheryRequestEnterprisesInnerBaitInner + """ # noqa: E501 + type: StrictStr = Field(description="Bait product type") + purchased_tonnes: Union[StrictFloat, StrictInt] = Field(description="Purchased product in tonnes", alias="purchasedTonnes") + additional_ingredients: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Additional ingredient fraction, from 0 to 1", alias="additionalIngredients") + emissions_intensity: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of additional ingredients, in kg CO2e/kg bait (default 0)", alias="emissionsIntensity") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "purchasedTonnes", "additionalIngredients", "emissionsIntensity"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Fish Frames', 'Fish Heads', 'Sardines', 'Squid', 'Whole Fish']): + raise ValueError("must be one of enum values ('Fish Frames', 'Fish Heads', 'Sardines', 'Squid', 'Whole Fish')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildcatchfisheryRequestEnterprisesInnerBaitInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildcatchfisheryRequestEnterprisesInnerBaitInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "purchasedTonnes": obj.get("purchasedTonnes"), + "additionalIngredients": obj.get("additionalIngredients"), + "emissionsIntensity": obj.get("emissionsIntensity") if obj.get("emissionsIntensity") is not None else 0 + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response.py b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response.py new file mode 100644 index 00000000..1727a97d --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_purchased_offsets import PostAquaculture200ResponsePurchasedOffsets +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_wildseafisheries200_response_intermediate_inner import PostWildseafisheries200ResponseIntermediateInner +from openapi_client.models.post_wildseafisheries200_response_intermediate_inner_intensities import PostWildseafisheries200ResponseIntermediateInnerIntensities +from openapi_client.models.post_wildseafisheries200_response_scope1 import PostWildseafisheries200ResponseScope1 +from openapi_client.models.post_wildseafisheries200_response_scope3 import PostWildseafisheries200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostWildseafisheries200Response(BaseModel): + """ + Emissions calculation output for the `wildseafisheries` calculator + """ # noqa: E501 + scope1: PostWildseafisheries200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostWildseafisheries200ResponseScope3 + purchased_offsets: PostAquaculture200ResponsePurchasedOffsets = Field(alias="purchasedOffsets") + intermediate: List[PostWildseafisheries200ResponseIntermediateInner] + net: PostAquaculture200ResponseNet + intensities: List[PostWildseafisheries200ResponseIntermediateInnerIntensities] = Field(description="Emissions intensity for each enterprise (in order), in t-CO2e/t product caught") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scope1", "scope2", "scope3", "purchasedOffsets", "intermediate", "net", "intensities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildseafisheries200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of purchased_offsets + if self.purchased_offsets: + _dict['purchasedOffsets'] = self.purchased_offsets.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intermediate (list) + _items = [] + if self.intermediate: + for _item_intermediate in self.intermediate: + if _item_intermediate: + _items.append(_item_intermediate.to_dict()) + _dict['intermediate'] = _items + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in intensities (list) + _items = [] + if self.intensities: + for _item_intensities in self.intensities: + if _item_intensities: + _items.append(_item_intensities.to_dict()) + _dict['intensities'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildseafisheries200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope1": PostWildseafisheries200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostWildseafisheries200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "purchasedOffsets": PostAquaculture200ResponsePurchasedOffsets.from_dict(obj["purchasedOffsets"]) if obj.get("purchasedOffsets") is not None else None, + "intermediate": [PostWildseafisheries200ResponseIntermediateInner.from_dict(_item) for _item in obj["intermediate"]] if obj.get("intermediate") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None, + "intensities": [PostWildseafisheries200ResponseIntermediateInnerIntensities.from_dict(_item) for _item in obj["intensities"]] if obj.get("intensities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_intermediate_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_intermediate_inner.py new file mode 100644 index 00000000..a543037d --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_intermediate_inner.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet +from openapi_client.models.post_aquaculture200_response_purchased_offsets import PostAquaculture200ResponsePurchasedOffsets +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 +from openapi_client.models.post_wildseafisheries200_response_intermediate_inner_intensities import PostWildseafisheries200ResponseIntermediateInnerIntensities +from openapi_client.models.post_wildseafisheries200_response_scope1 import PostWildseafisheries200ResponseScope1 +from openapi_client.models.post_wildseafisheries200_response_scope3 import PostWildseafisheries200ResponseScope3 +from typing import Optional, Set +from typing_extensions import Self + +class PostWildseafisheries200ResponseIntermediateInner(BaseModel): + """ + Intermediate emissions calculation output for the Wild Sea Fisheries calculator + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for this activity") + scope1: PostWildseafisheries200ResponseScope1 + scope2: PostAquaculture200ResponseScope2 + scope3: PostWildseafisheries200ResponseScope3 + purchased_offsets: PostAquaculture200ResponsePurchasedOffsets = Field(alias="purchasedOffsets") + carbon_sequestration: Union[StrictFloat, StrictInt] = Field(description="Carbon sequestration, in tonnes-CO2e", alias="carbonSequestration") + intensities: PostWildseafisheries200ResponseIntermediateInnerIntensities + net: PostAquaculture200ResponseNet + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "scope1", "scope2", "scope3", "purchasedOffsets", "carbonSequestration", "intensities", "net"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildseafisheries200ResponseIntermediateInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of scope1 + if self.scope1: + _dict['scope1'] = self.scope1.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope2 + if self.scope2: + _dict['scope2'] = self.scope2.to_dict() + # override the default output from pydantic by calling `to_dict()` of scope3 + if self.scope3: + _dict['scope3'] = self.scope3.to_dict() + # override the default output from pydantic by calling `to_dict()` of purchased_offsets + if self.purchased_offsets: + _dict['purchasedOffsets'] = self.purchased_offsets.to_dict() + # override the default output from pydantic by calling `to_dict()` of intensities + if self.intensities: + _dict['intensities'] = self.intensities.to_dict() + # override the default output from pydantic by calling `to_dict()` of net + if self.net: + _dict['net'] = self.net.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildseafisheries200ResponseIntermediateInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "scope1": PostWildseafisheries200ResponseScope1.from_dict(obj["scope1"]) if obj.get("scope1") is not None else None, + "scope2": PostAquaculture200ResponseScope2.from_dict(obj["scope2"]) if obj.get("scope2") is not None else None, + "scope3": PostWildseafisheries200ResponseScope3.from_dict(obj["scope3"]) if obj.get("scope3") is not None else None, + "purchasedOffsets": PostAquaculture200ResponsePurchasedOffsets.from_dict(obj["purchasedOffsets"]) if obj.get("purchasedOffsets") is not None else None, + "carbonSequestration": obj.get("carbonSequestration"), + "intensities": PostWildseafisheries200ResponseIntermediateInnerIntensities.from_dict(obj["intensities"]) if obj.get("intensities") is not None else None, + "net": PostAquaculture200ResponseNet.from_dict(obj["net"]) if obj.get("net") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..f59bf784 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_intermediate_inner_intensities.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostWildseafisheries200ResponseIntermediateInnerIntensities(BaseModel): + """ + PostWildseafisheries200ResponseIntermediateInnerIntensities + """ # noqa: E501 + intensity_excluding_carbon_offset: Union[StrictFloat, StrictInt] = Field(description="Wild sea fisheries emissions intensity excluding carbon offsets, in kg-CO2e/kg", alias="intensityExcludingCarbonOffset") + intensity_including_carbon_offset: Union[StrictFloat, StrictInt] = Field(description="Wild sea fisheries emissions intensity including carbon offsets, in kg-CO2e/kg", alias="intensityIncludingCarbonOffset") + total_harvest_weight_tonnes: Union[StrictFloat, StrictInt] = Field(description="Total harvest weight in tonnes", alias="totalHarvestWeightTonnes") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["intensityExcludingCarbonOffset", "intensityIncludingCarbonOffset", "totalHarvestWeightTonnes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildseafisheries200ResponseIntermediateInnerIntensities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildseafisheries200ResponseIntermediateInnerIntensities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "intensityExcludingCarbonOffset": obj.get("intensityExcludingCarbonOffset"), + "intensityIncludingCarbonOffset": obj.get("intensityIncludingCarbonOffset"), + "totalHarvestWeightTonnes": obj.get("totalHarvestWeightTonnes") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_scope1.py b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_scope1.py new file mode 100644 index 00000000..5b493f9b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_scope1.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostWildseafisheries200ResponseScope1(BaseModel): + """ + Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + fuel_co2: Union[StrictFloat, StrictInt] = Field(description="CO2 emissions from fuel use, in tonnes-CO2e", alias="fuelCO2") + fuel_ch4: Union[StrictFloat, StrictInt] = Field(description="CH4 emissions from fuel use, in tonnes-CO2e", alias="fuelCH4") + fuel_n2_o: Union[StrictFloat, StrictInt] = Field(description="N2O emissions from fuel use, in tonnes-CO2e", alias="fuelN2O") + hfcs_refrigerant_leakage: Union[StrictFloat, StrictInt] = Field(description="Emissions from refrigerant leakage, in tonnes-HFCs", alias="hfcsRefrigerantLeakage") + total_co2: Union[StrictFloat, StrictInt] = Field(description="Total CO2 scope 1 emissions, in tonnes-CO2e", alias="totalCO2") + total_ch4: Union[StrictFloat, StrictInt] = Field(description="Total CH4 scope 1 emissions, in tonnes-CO2e", alias="totalCH4") + total_n2_o: Union[StrictFloat, StrictInt] = Field(description="Total N2O scope 1 emissions, in tonnes-CO2e", alias="totalN2O") + total_hfcs: Union[StrictFloat, StrictInt] = Field(description="Total HFCs scope 1 emissions, in tonnes-CO2e", alias="totalHFCs") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 1 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fuelCO2", "fuelCH4", "fuelN2O", "hfcsRefrigerantLeakage", "totalCO2", "totalCH4", "totalN2O", "totalHFCs", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildseafisheries200ResponseScope1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildseafisheries200ResponseScope1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fuelCO2": obj.get("fuelCO2"), + "fuelCH4": obj.get("fuelCH4"), + "fuelN2O": obj.get("fuelN2O"), + "hfcsRefrigerantLeakage": obj.get("hfcsRefrigerantLeakage"), + "totalCO2": obj.get("totalCO2"), + "totalCH4": obj.get("totalCH4"), + "totalN2O": obj.get("totalN2O"), + "totalHFCs": obj.get("totalHFCs"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_scope3.py b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_scope3.py new file mode 100644 index 00000000..dce98203 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries200_response_scope3.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostWildseafisheries200ResponseScope3(BaseModel): + """ + Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) + """ # noqa: E501 + electricity: Union[StrictFloat, StrictInt] = Field(description="Emissions from electricity, in tonnes-CO2e") + fuel: Union[StrictFloat, StrictInt] = Field(description="Emissions from fuel, in tonnes-CO2e") + bait: Union[StrictFloat, StrictInt] = Field(description="Emissions from purchased bait, in tonnes-CO2e") + total: Union[StrictFloat, StrictInt] = Field(description="Total scope 3 emissions, in tonnes-CO2e") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["electricity", "fuel", "bait", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildseafisheries200ResponseScope3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildseafisheries200ResponseScope3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "electricity": obj.get("electricity"), + "fuel": obj.get("fuel"), + "bait": obj.get("bait"), + "total": obj.get("total") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request.py b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request.py new file mode 100644 index 00000000..afa1c8b4 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.post_wildseafisheries_request_enterprises_inner import PostWildseafisheriesRequestEnterprisesInner +from typing import Optional, Set +from typing_extensions import Self + +class PostWildseafisheriesRequest(BaseModel): + """ + Input data required for the `wildseafisheries` calculator + """ # noqa: E501 + enterprises: List[PostWildseafisheriesRequestEnterprisesInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enterprises"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildseafisheriesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in enterprises (list) + _items = [] + if self.enterprises: + for _item_enterprises in self.enterprises: + if _item_enterprises: + _items.append(_item_enterprises.to_dict()) + _dict['enterprises'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildseafisheriesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enterprises": [PostWildseafisheriesRequestEnterprisesInner.from_dict(_item) for _item in obj["enterprises"]] if obj.get("enterprises") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner.py new file mode 100644 index 00000000..b3ef8317 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_bait_inner import PostWildseafisheriesRequestEnterprisesInnerBaitInner +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_custombait_inner import PostWildseafisheriesRequestEnterprisesInnerCustombaitInner +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_flights_inner import PostWildseafisheriesRequestEnterprisesInnerFlightsInner +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_refrigerants_inner import PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_transports_inner import PostWildseafisheriesRequestEnterprisesInnerTransportsInner +from typing import Optional, Set +from typing_extensions import Self + +class PostWildseafisheriesRequestEnterprisesInner(BaseModel): + """ + PostWildseafisheriesRequestEnterprisesInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for this activity") + state: StrictStr = Field(description="What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia") + electricity_source: StrictStr = Field(description="Source of electricity", alias="electricitySource") + electricity_renewable: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable`", alias="electricityRenewable") + electricity_use: Union[StrictFloat, StrictInt] = Field(description="Electricity use in KWh (kilowatt hours)", alias="electricityUse") + total_whole_weight_caught: Union[StrictFloat, StrictInt] = Field(description="Total whole weight caught in kg", alias="totalWholeWeightCaught") + diesel: Union[StrictFloat, StrictInt] = Field(description="Diesel usage in L (litres)") + petrol: Union[StrictFloat, StrictInt] = Field(description="Petrol usage in L (litres)") + lpg: Union[StrictFloat, StrictInt] = Field(description="LPG Fuel usage in L (litres)") + refrigerants: List[PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner] + transports: List[PostWildseafisheriesRequestEnterprisesInnerTransportsInner] = Field(description="Transportation") + flights: List[PostWildseafisheriesRequestEnterprisesInnerFlightsInner] = Field(description="CommercialFlight") + bait: List[PostWildseafisheriesRequestEnterprisesInnerBaitInner] = Field(description="Bait") + custombait: List[PostWildseafisheriesRequestEnterprisesInnerCustombaitInner] = Field(description="Custom bait") + carbon_offset: Union[StrictFloat, StrictInt] = Field(description="Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0)", alias="carbonOffset") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "electricitySource", "electricityRenewable", "electricityUse", "totalWholeWeightCaught", "diesel", "petrol", "lpg", "refrigerants", "transports", "flights", "bait", "custombait", "carbonOffset"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act']): + raise ValueError("must be one of enum values ('nsw', 'vic', 'qld', 'sa', 'wa_nw', 'wa_sw', 'tas', 'nt', 'act')") + return value + + @field_validator('electricity_source') + def electricity_source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['State Grid', 'Renewable']): + raise ValueError("must be one of enum values ('State Grid', 'Renewable')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildseafisheriesRequestEnterprisesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in refrigerants (list) + _items = [] + if self.refrigerants: + for _item_refrigerants in self.refrigerants: + if _item_refrigerants: + _items.append(_item_refrigerants.to_dict()) + _dict['refrigerants'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in transports (list) + _items = [] + if self.transports: + for _item_transports in self.transports: + if _item_transports: + _items.append(_item_transports.to_dict()) + _dict['transports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in flights (list) + _items = [] + if self.flights: + for _item_flights in self.flights: + if _item_flights: + _items.append(_item_flights.to_dict()) + _dict['flights'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in bait (list) + _items = [] + if self.bait: + for _item_bait in self.bait: + if _item_bait: + _items.append(_item_bait.to_dict()) + _dict['bait'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in custombait (list) + _items = [] + if self.custombait: + for _item_custombait in self.custombait: + if _item_custombait: + _items.append(_item_custombait.to_dict()) + _dict['custombait'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildseafisheriesRequestEnterprisesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "electricitySource": obj.get("electricitySource"), + "electricityRenewable": obj.get("electricityRenewable"), + "electricityUse": obj.get("electricityUse"), + "totalWholeWeightCaught": obj.get("totalWholeWeightCaught"), + "diesel": obj.get("diesel"), + "petrol": obj.get("petrol"), + "lpg": obj.get("lpg"), + "refrigerants": [PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.from_dict(_item) for _item in obj["refrigerants"]] if obj.get("refrigerants") is not None else None, + "transports": [PostWildseafisheriesRequestEnterprisesInnerTransportsInner.from_dict(_item) for _item in obj["transports"]] if obj.get("transports") is not None else None, + "flights": [PostWildseafisheriesRequestEnterprisesInnerFlightsInner.from_dict(_item) for _item in obj["flights"]] if obj.get("flights") is not None else None, + "bait": [PostWildseafisheriesRequestEnterprisesInnerBaitInner.from_dict(_item) for _item in obj["bait"]] if obj.get("bait") is not None else None, + "custombait": [PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.from_dict(_item) for _item in obj["custombait"]] if obj.get("custombait") is not None else None, + "carbonOffset": obj.get("carbonOffset") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_bait_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_bait_inner.py new file mode 100644 index 00000000..955344bc --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_bait_inner.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PostWildseafisheriesRequestEnterprisesInnerBaitInner(BaseModel): + """ + PostWildseafisheriesRequestEnterprisesInnerBaitInner + """ # noqa: E501 + type: StrictStr = Field(description="Bait product type") + purchased: Union[StrictFloat, StrictInt] = Field(description="Purchased product in tonnes") + additional_ingredient: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Additional ingredient fraction, from 0 to 1", alias="additionalIngredient") + emissions_intensity: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of product, in kg CO2e/kg", alias="emissionsIntensity") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "purchased", "additionalIngredient", "emissionsIntensity"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Fish Frames', 'Fish Heads', 'Sardines', 'Squid', 'Whole Fish']): + raise ValueError("must be one of enum values ('Fish Frames', 'Fish Heads', 'Sardines', 'Squid', 'Whole Fish')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildseafisheriesRequestEnterprisesInnerBaitInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildseafisheriesRequestEnterprisesInnerBaitInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "purchased": obj.get("purchased"), + "additionalIngredient": obj.get("additionalIngredient"), + "emissionsIntensity": obj.get("emissionsIntensity") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_custombait_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_custombait_inner.py new file mode 100644 index 00000000..e051cd0b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_custombait_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostWildseafisheriesRequestEnterprisesInnerCustombaitInner(BaseModel): + """ + PostWildseafisheriesRequestEnterprisesInnerCustombaitInner + """ # noqa: E501 + purchased: Union[StrictFloat, StrictInt] = Field(description="Purchased product in tonnes") + emissions_intensity: Union[StrictFloat, StrictInt] = Field(description="Emissions intensity of product, in kg CO2e/kg", alias="emissionsIntensity") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["purchased", "emissionsIntensity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildseafisheriesRequestEnterprisesInnerCustombaitInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildseafisheriesRequestEnterprisesInnerCustombaitInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "purchased": obj.get("purchased"), + "emissionsIntensity": obj.get("emissionsIntensity") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_flights_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_flights_inner.py new file mode 100644 index 00000000..14c081bc --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_flights_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostWildseafisheriesRequestEnterprisesInnerFlightsInner(BaseModel): + """ + PostWildseafisheriesRequestEnterprisesInnerFlightsInner + """ # noqa: E501 + commercial_flight_passengers: Union[StrictFloat, StrictInt] = Field(description="Commercial flight passengers per year", alias="commercialFlightPassengers") + total_flight_distance: Union[StrictFloat, StrictInt] = Field(description="Total commercial flight distance in km", alias="totalFlightDistance") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["commercialFlightPassengers", "totalFlightDistance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildseafisheriesRequestEnterprisesInnerFlightsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildseafisheriesRequestEnterprisesInnerFlightsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "commercialFlightPassengers": obj.get("commercialFlightPassengers"), + "totalFlightDistance": obj.get("totalFlightDistance") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py new file mode 100644 index 00000000..6874d825 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner(BaseModel): + """ + PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner + """ # noqa: E501 + refrigerant: StrictStr = Field(description="Refrigerant type") + annual_recharge: Union[StrictFloat, StrictInt] = Field(description="Amount of refrigerant annually recharged, kg product/year", alias="annualRecharge") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["refrigerant", "annualRecharge"] + + @field_validator('refrigerant') + def refrigerant_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['HFC-23', 'HFC-32', 'HFC-41', 'HFC-43-10mee', 'HFC-125', 'HFC-134', 'HFC-134a', 'HFC-143', 'HFC-143a', 'HFC-152a', 'HFC-227ea', 'HFC-236fa', 'HFC-245ca', 'HFC-245fa', 'HFC-365mfc', 'R438A', 'R448A', 'R-22', 'Ammonia (R-717)', 'R-11', 'R-12', 'R-13', 'R-23', 'R-32', 'R-113', 'R-114', 'R-115', 'R-116', 'R-123', 'R-124', 'R-125', 'R-134a', 'R-141b', 'R-142b', 'R-143a', 'R-152a', 'R-218', 'R-227ea', 'R-236fa', 'R-245ca', 'R-245fa', 'R-C318', 'R-401A', 'R-401B', 'R-401C', 'R-402A', 'R-402B', 'R-403A', 'R-403B', 'R-404A', 'R-405A', 'R-406A', 'R-407A', 'R-407B', 'R-407C', 'R-407D', 'R-407E', 'R-408A', 'R-409A', 'R-409B', 'R-410A', 'R-411A', 'R-411B', 'R-412A', 'R-413A', 'R-414A', 'R-414B', 'R-415A', 'R-415B', 'R-416A', 'R-417A', 'R-418A', 'R-419A', 'R-420A', 'R-421A', 'R-421B', 'R-422A', 'R-422B', 'R-422C', 'R-422D', 'R-423A', 'R-424A', 'R-425A', 'R-426A', 'R-427A', 'R-428A', 'R-500', 'R-502', 'R-503', 'R-507A', 'R-508A', 'R-508B', 'R-509A']): + raise ValueError("must be one of enum values ('HFC-23', 'HFC-32', 'HFC-41', 'HFC-43-10mee', 'HFC-125', 'HFC-134', 'HFC-134a', 'HFC-143', 'HFC-143a', 'HFC-152a', 'HFC-227ea', 'HFC-236fa', 'HFC-245ca', 'HFC-245fa', 'HFC-365mfc', 'R438A', 'R448A', 'R-22', 'Ammonia (R-717)', 'R-11', 'R-12', 'R-13', 'R-23', 'R-32', 'R-113', 'R-114', 'R-115', 'R-116', 'R-123', 'R-124', 'R-125', 'R-134a', 'R-141b', 'R-142b', 'R-143a', 'R-152a', 'R-218', 'R-227ea', 'R-236fa', 'R-245ca', 'R-245fa', 'R-C318', 'R-401A', 'R-401B', 'R-401C', 'R-402A', 'R-402B', 'R-403A', 'R-403B', 'R-404A', 'R-405A', 'R-406A', 'R-407A', 'R-407B', 'R-407C', 'R-407D', 'R-407E', 'R-408A', 'R-409A', 'R-409B', 'R-410A', 'R-411A', 'R-411B', 'R-412A', 'R-413A', 'R-414A', 'R-414B', 'R-415A', 'R-415B', 'R-416A', 'R-417A', 'R-418A', 'R-419A', 'R-420A', 'R-421A', 'R-421B', 'R-422A', 'R-422B', 'R-422C', 'R-422D', 'R-423A', 'R-424A', 'R-425A', 'R-426A', 'R-427A', 'R-428A', 'R-500', 'R-502', 'R-503', 'R-507A', 'R-508A', 'R-508B', 'R-509A')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "refrigerant": obj.get("refrigerant"), + "annualRecharge": obj.get("annualRecharge") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_transports_inner.py b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_transports_inner.py new file mode 100644 index 00000000..6f31aa2b --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/models/post_wildseafisheries_request_enterprises_inner_transports_inner.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostWildseafisheriesRequestEnterprisesInnerTransportsInner(BaseModel): + """ + PostWildseafisheriesRequestEnterprisesInnerTransportsInner + """ # noqa: E501 + type: StrictStr = Field(description="Transport type") + fuel: StrictStr = Field(description="Fuel type") + distance: Union[StrictFloat, StrictInt] = Field(description="Distance in km") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "fuel", "distance"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['None', 'Small Car', 'Medium Car', 'Large Car', 'Courier Van-Utility', '4WD Mid Size', 'Light Rigid', 'Medium Rigid', 'Heavy Rigid', 'Heavy Bus']): + raise ValueError("must be one of enum values ('None', 'Small Car', 'Medium Car', 'Large Car', 'Courier Van-Utility', '4WD Mid Size', 'Light Rigid', 'Medium Rigid', 'Heavy Rigid', 'Heavy Bus')") + return value + + @field_validator('fuel') + def fuel_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Gasoline', 'Diesel oil', 'Liquefied petroleum gas (LPG)', 'Fuel oil', 'Ethanol', 'Biodiesel', 'Renewable diesel', 'Other biofuels', 'Liquified natural gas']): + raise ValueError("must be one of enum values ('Gasoline', 'Diesel oil', 'Liquefied petroleum gas (LPG)', 'Fuel oil', 'Ethanol', 'Biodiesel', 'Renewable diesel', 'Other biofuels', 'Liquified natural gas')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostWildseafisheriesRequestEnterprisesInnerTransportsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostWildseafisheriesRequestEnterprisesInnerTransportsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "fuel": obj.get("fuel"), + "distance": obj.get("distance") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/examples/python-api-client/api-client/openapi_client/py.typed b/examples/python-api-client/api-client/openapi_client/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/examples/python-api-client/api-client/openapi_client/rest.py b/examples/python-api-client/api-client/openapi_client/rest.py new file mode 100644 index 00000000..ccc62943 --- /dev/null +++ b/examples/python-api-client/api-client/openapi_client/rest.py @@ -0,0 +1,259 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from openapi_client.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + "ca_cert_data": configuration.ca_cert_data, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/examples/python-api-client/api-client/pyproject.toml b/examples/python-api-client/api-client/pyproject.toml new file mode 100644 index 00000000..a8d93f0b --- /dev/null +++ b/examples/python-api-client/api-client/pyproject.toml @@ -0,0 +1,95 @@ +[project] +name = "openapi_client" +version = "1.0.0" +description = "AIA Calculator API" +authors = [ + {name = "AIA",email = "contact@aginnovationaustralia.com.au"}, +] +license = "CC-BY-ND-4.0" +readme = "README.md" +keywords = ["OpenAPI", "OpenAPI-Generator", "AIA Calculator API"] +requires-python = ">=3.9" + +dependencies = [ + "urllib3 (>=2.1.0,<3.0.0)", + "python-dateutil (>=2.8.2)", + "pydantic (>=2)", + "typing-extensions (>=4.7.1)" +] + +[project.urls] +Repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" + +[tool.poetry] +requires-poetry = ">=2.0" + +[tool.poetry.group.dev.dependencies] +pytest = ">= 7.2.1" +pytest-cov = ">= 2.8.1" +tox = ">= 3.9.0" +flake8 = ">= 4.0.0" +types-python-dateutil = ">= 2.8.19.14" +mypy = ">= 1.5" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "openapi_client", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +extra_checks = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true + +[[tool.mypy.overrides]] +module = [ + "openapi_client.configuration", +] +warn_unused_ignores = true +strict_equality = true +extra_checks = true +check_untyped_defs = true +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true +disallow_untyped_calls = true +disallow_incomplete_defs = true +disallow_untyped_defs = true +no_implicit_reexport = true +warn_return_any = true diff --git a/examples/python-api-client/api-client/requirements.txt b/examples/python-api-client/api-client/requirements.txt new file mode 100644 index 00000000..6cbb2b98 --- /dev/null +++ b/examples/python-api-client/api-client/requirements.txt @@ -0,0 +1,4 @@ +urllib3 >= 2.1.0, < 3.0.0 +python_dateutil >= 2.8.2 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/examples/python-api-client/api-client/run_test.sh b/examples/python-api-client/api-client/run_test.sh new file mode 100755 index 00000000..c75860b2 --- /dev/null +++ b/examples/python-api-client/api-client/run_test.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Quick run script for testing the API client +# This script activates the virtual environment and runs the test + +set -e + +# Check if virtual environment exists +if [ ! -d "venv" ]; then + echo "Virtual environment not found. Please run ./setup_local.sh first" + exit 1 +fi + +# Activate virtual environment +echo "Activating virtual environment..." +source venv/bin/activate + +# Run the test script +echo "Running API test script..." +python test_api.py + +echo "" +echo "Test complete! Virtual environment is still active." +echo "To deactivate: deactivate" + diff --git a/examples/python-api-client/api-client/setup.cfg b/examples/python-api-client/api-client/setup.cfg new file mode 100644 index 00000000..11433ee8 --- /dev/null +++ b/examples/python-api-client/api-client/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/examples/python-api-client/api-client/setup.py b/examples/python-api-client/api-client/setup.py new file mode 100644 index 00000000..5b07dd88 --- /dev/null +++ b/examples/python-api-client/api-client/setup.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "openapi-client" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">= 3.9" +REQUIRES = [ + "urllib3 >= 2.1.0, < 3.0.0", + "python-dateutil >= 2.8.2", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="AIA Calculator API", + author="AIA", + author_email="contact@aginnovationaustralia.com.au", + url="", + keywords=["OpenAPI", "OpenAPI-Generator", "AIA Calculator API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + license="CC-BY-ND-4.0", + long_description_content_type='text/markdown', + long_description="""\ + Emissions Calculators for various farming activities + """, # noqa: E501 + package_data={"openapi_client": ["py.typed"]}, +) \ No newline at end of file diff --git a/examples/python-api-client/api-client/setup_local.sh b/examples/python-api-client/api-client/setup_local.sh new file mode 100755 index 00000000..17f898b0 --- /dev/null +++ b/examples/python-api-client/api-client/setup_local.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# Setup script for local development and testing of the API client +# This script creates a virtual environment and installs the client locally + +set -e + +echo "Setting up Python API client for local development..." + +# Check if Python 3.9+ is available +python_version=$(python3 --version 2>&1 | grep -o '[0-9]\+\.[0-9]\+' | head -1) +required_version="3.9" + +if [ "$(printf '%s\n' "$required_version" "$python_version" | sort -V | head -n1)" != "$required_version" ]; then + echo "Error: Python 3.9+ is required, but found Python $python_version" + echo "Please install Python 3.9 or later" + exit 1 +fi + +# Create virtual environment if it doesn't exist +if [ ! -d "venv" ]; then + echo "Creating virtual environment..." + python3 -m venv venv +else + echo "Virtual environment already exists" +fi + +# Activate virtual environment +echo "Activating virtual environment..." +source venv/bin/activate + +# Upgrade pip +echo "Upgrading pip..." +pip install --upgrade pip + +# Install the client in development mode +echo "Installing API client in development mode..." +pip install -e . + +# Install additional dependencies for testing +echo "Installing additional dependencies..." +pip install pytest + +echo "" +echo "Setup complete! To use the API client:" +echo "1. Activate the virtual environment: source venv/bin/activate" +echo "2. Run the test script: python test_api.py" +echo "3. Or run tests: pytest" +echo "" +echo "To deactivate the virtual environment when done: deactivate" + diff --git a/examples/python-api-client/api-client/test-requirements.txt b/examples/python-api-client/api-client/test-requirements.txt new file mode 100644 index 00000000..e98555c1 --- /dev/null +++ b/examples/python-api-client/api-client/test-requirements.txt @@ -0,0 +1,6 @@ +pytest >= 7.2.1 +pytest-cov >= 2.8.1 +tox >= 3.9.0 +flake8 >= 4.0.0 +types-python-dateutil >= 2.8.19.14 +mypy >= 1.5 diff --git a/examples/python-api-client/api-client/test/__init__.py b/examples/python-api-client/api-client/test/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/examples/python-api-client/api-client/test/test_gaf_api.py b/examples/python-api-client/api-client/test/test_gaf_api.py new file mode 100644 index 00000000..d62c5b86 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_gaf_api.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.gaf_api import GAFApi + + +class TestGAFApi(unittest.TestCase): + """GAFApi unit test stubs""" + + def setUp(self) -> None: + self.api = GAFApi() + + def tearDown(self) -> None: + pass + + def test_post_aquaculture(self) -> None: + """Test case for post_aquaculture + + Perform aquaculture calculation + """ + pass + + def test_post_beef(self) -> None: + """Test case for post_beef + + Perform beef calculation + """ + pass + + def test_post_buffalo(self) -> None: + """Test case for post_buffalo + + Perform buffalo calculation + """ + pass + + def test_post_cotton(self) -> None: + """Test case for post_cotton + + Perform cotton calculation + """ + pass + + def test_post_dairy(self) -> None: + """Test case for post_dairy + + Perform dairy calculation + """ + pass + + def test_post_deer(self) -> None: + """Test case for post_deer + + Perform deer calculation + """ + pass + + def test_post_feedlot(self) -> None: + """Test case for post_feedlot + + Perform feedlot calculation + """ + pass + + def test_post_goat(self) -> None: + """Test case for post_goat + + Perform goat calculation + """ + pass + + def test_post_grains(self) -> None: + """Test case for post_grains + + Perform grains calculation + """ + pass + + def test_post_horticulture(self) -> None: + """Test case for post_horticulture + + Perform horticulture calculation + """ + pass + + def test_post_pork(self) -> None: + """Test case for post_pork + + Perform pork calculation + """ + pass + + def test_post_poultry(self) -> None: + """Test case for post_poultry + + Perform poultry calculation + """ + pass + + def test_post_processing(self) -> None: + """Test case for post_processing + + Perform processing calculation + """ + pass + + def test_post_rice(self) -> None: + """Test case for post_rice + + Perform rice calculation + """ + pass + + def test_post_sheep(self) -> None: + """Test case for post_sheep + + Perform sheep calculation + """ + pass + + def test_post_sheepbeef(self) -> None: + """Test case for post_sheepbeef + + Perform sheepbeef calculation + """ + pass + + def test_post_sugar(self) -> None: + """Test case for post_sugar + + Perform sugar calculation + """ + pass + + def test_post_vineyard(self) -> None: + """Test case for post_vineyard + + Perform vineyard calculation + """ + pass + + def test_post_wildcatchfishery(self) -> None: + """Test case for post_wildcatchfishery + + Perform wildcatchfishery calculation + """ + pass + + def test_post_wildseafisheries(self) -> None: + """Test case for post_wildseafisheries + + Perform wildseafisheries calculation + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response.py new file mode 100644 index 00000000..338e4a8e --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture200_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture200_response import PostAquaculture200Response + +class TestPostAquaculture200Response(unittest.TestCase): + """PostAquaculture200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquaculture200Response: + """Test PostAquaculture200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquaculture200Response` + """ + model = PostAquaculture200Response() + if include_optional: + return PostAquaculture200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + purchased_offsets = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ] + ) + else: + return PostAquaculture200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + purchased_offsets = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + ) + """ + + def testPostAquaculture200Response(self): + """Test PostAquaculture200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_carbon_sequestration.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_carbon_sequestration.py new file mode 100644 index 00000000..902e7203 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_carbon_sequestration.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration + +class TestPostAquaculture200ResponseCarbonSequestration(unittest.TestCase): + """PostAquaculture200ResponseCarbonSequestration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquaculture200ResponseCarbonSequestration: + """Test PostAquaculture200ResponseCarbonSequestration + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquaculture200ResponseCarbonSequestration` + """ + model = PostAquaculture200ResponseCarbonSequestration() + if include_optional: + return PostAquaculture200ResponseCarbonSequestration( + total = 1.337, + intermediate = [ + 1.337 + ] + ) + else: + return PostAquaculture200ResponseCarbonSequestration( + total = 1.337, + intermediate = [ + 1.337 + ], + ) + """ + + def testPostAquaculture200ResponseCarbonSequestration(self): + """Test PostAquaculture200ResponseCarbonSequestration""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intensities.py new file mode 100644 index 00000000..4b0dbf21 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intensities.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture200_response_intensities import PostAquaculture200ResponseIntensities + +class TestPostAquaculture200ResponseIntensities(unittest.TestCase): + """PostAquaculture200ResponseIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquaculture200ResponseIntensities: + """Test PostAquaculture200ResponseIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquaculture200ResponseIntensities` + """ + model = PostAquaculture200ResponseIntensities() + if include_optional: + return PostAquaculture200ResponseIntensities( + total_harvest_weight_kg = 1.337, + aquaculture_excluding_carbon_offsets = 1.337, + aquaculture_including_carbon_offsets = 1.337 + ) + else: + return PostAquaculture200ResponseIntensities( + total_harvest_weight_kg = 1.337, + aquaculture_excluding_carbon_offsets = 1.337, + aquaculture_including_carbon_offsets = 1.337, + ) + """ + + def testPostAquaculture200ResponseIntensities(self): + """Test PostAquaculture200ResponseIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner.py new file mode 100644 index 00000000..65d10074 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture200_response_intermediate_inner import PostAquaculture200ResponseIntermediateInner + +class TestPostAquaculture200ResponseIntermediateInner(unittest.TestCase): + """PostAquaculture200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquaculture200ResponseIntermediateInner: + """Test PostAquaculture200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquaculture200ResponseIntermediateInner` + """ + model = PostAquaculture200ResponseIntermediateInner() + if include_optional: + return PostAquaculture200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + } + ) + else: + return PostAquaculture200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + ) + """ + + def testPostAquaculture200ResponseIntermediateInner(self): + """Test PostAquaculture200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner_carbon_sequestration.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner_carbon_sequestration.py new file mode 100644 index 00000000..9b4692e3 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner_carbon_sequestration.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration + +class TestPostAquaculture200ResponseIntermediateInnerCarbonSequestration(unittest.TestCase): + """PostAquaculture200ResponseIntermediateInnerCarbonSequestration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquaculture200ResponseIntermediateInnerCarbonSequestration: + """Test PostAquaculture200ResponseIntermediateInnerCarbonSequestration + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquaculture200ResponseIntermediateInnerCarbonSequestration` + """ + model = PostAquaculture200ResponseIntermediateInnerCarbonSequestration() + if include_optional: + return PostAquaculture200ResponseIntermediateInnerCarbonSequestration( + total = 1.337 + ) + else: + return PostAquaculture200ResponseIntermediateInnerCarbonSequestration( + total = 1.337, + ) + """ + + def testPostAquaculture200ResponseIntermediateInnerCarbonSequestration(self): + """Test PostAquaculture200ResponseIntermediateInnerCarbonSequestration""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_net.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_net.py new file mode 100644 index 00000000..c8a0fd06 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_net.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet + +class TestPostAquaculture200ResponseNet(unittest.TestCase): + """PostAquaculture200ResponseNet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquaculture200ResponseNet: + """Test PostAquaculture200ResponseNet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquaculture200ResponseNet` + """ + model = PostAquaculture200ResponseNet() + if include_optional: + return PostAquaculture200ResponseNet( + total = 1.337 + ) + else: + return PostAquaculture200ResponseNet( + total = 1.337, + ) + """ + + def testPostAquaculture200ResponseNet(self): + """Test PostAquaculture200ResponseNet""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_purchased_offsets.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_purchased_offsets.py new file mode 100644 index 00000000..58f478cd --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_purchased_offsets.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture200_response_purchased_offsets import PostAquaculture200ResponsePurchasedOffsets + +class TestPostAquaculture200ResponsePurchasedOffsets(unittest.TestCase): + """PostAquaculture200ResponsePurchasedOffsets unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquaculture200ResponsePurchasedOffsets: + """Test PostAquaculture200ResponsePurchasedOffsets + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquaculture200ResponsePurchasedOffsets` + """ + model = PostAquaculture200ResponsePurchasedOffsets() + if include_optional: + return PostAquaculture200ResponsePurchasedOffsets( + total = 1.337 + ) + else: + return PostAquaculture200ResponsePurchasedOffsets( + total = 1.337, + ) + """ + + def testPostAquaculture200ResponsePurchasedOffsets(self): + """Test PostAquaculture200ResponsePurchasedOffsets""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope1.py new file mode 100644 index 00000000..bf6e9e5c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope1.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture200_response_scope1 import PostAquaculture200ResponseScope1 + +class TestPostAquaculture200ResponseScope1(unittest.TestCase): + """PostAquaculture200ResponseScope1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquaculture200ResponseScope1: + """Test PostAquaculture200ResponseScope1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquaculture200ResponseScope1` + """ + model = PostAquaculture200ResponseScope1() + if include_optional: + return PostAquaculture200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + hfcs_refrigerant_leakage = 1.337, + waste_water_co2 = 1.337, + composted_solid_waste_co2 = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total_hfcs = 1.337, + total = 1.337 + ) + else: + return PostAquaculture200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + hfcs_refrigerant_leakage = 1.337, + waste_water_co2 = 1.337, + composted_solid_waste_co2 = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total_hfcs = 1.337, + total = 1.337, + ) + """ + + def testPostAquaculture200ResponseScope1(self): + """Test PostAquaculture200ResponseScope1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope2.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope2.py new file mode 100644 index 00000000..186ec90f --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope2.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 + +class TestPostAquaculture200ResponseScope2(unittest.TestCase): + """PostAquaculture200ResponseScope2 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquaculture200ResponseScope2: + """Test PostAquaculture200ResponseScope2 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquaculture200ResponseScope2` + """ + model = PostAquaculture200ResponseScope2() + if include_optional: + return PostAquaculture200ResponseScope2( + electricity = 1.337, + total = 1.337 + ) + else: + return PostAquaculture200ResponseScope2( + electricity = 1.337, + total = 1.337, + ) + """ + + def testPostAquaculture200ResponseScope2(self): + """Test PostAquaculture200ResponseScope2""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope3.py new file mode 100644 index 00000000..532b4e45 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope3.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture200_response_scope3 import PostAquaculture200ResponseScope3 + +class TestPostAquaculture200ResponseScope3(unittest.TestCase): + """PostAquaculture200ResponseScope3 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquaculture200ResponseScope3: + """Test PostAquaculture200ResponseScope3 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquaculture200ResponseScope3` + """ + model = PostAquaculture200ResponseScope3() + if include_optional: + return PostAquaculture200ResponseScope3( + purchased_bait = 1.337, + electricity = 1.337, + fuel = 1.337, + commercial_flights = 1.337, + inbound_freight = 1.337, + outbound_freight = 1.337, + solid_waste_sent_offsite = 1.337, + total = 1.337 + ) + else: + return PostAquaculture200ResponseScope3( + purchased_bait = 1.337, + electricity = 1.337, + fuel = 1.337, + commercial_flights = 1.337, + inbound_freight = 1.337, + outbound_freight = 1.337, + solid_waste_sent_offsite = 1.337, + total = 1.337, + ) + """ + + def testPostAquaculture200ResponseScope3(self): + """Test PostAquaculture200ResponseScope3""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request.py new file mode 100644 index 00000000..11a69df5 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture_request.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture_request import PostAquacultureRequest + +class TestPostAquacultureRequest(unittest.TestCase): + """PostAquacultureRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquacultureRequest: + """Test PostAquacultureRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquacultureRequest` + """ + model = PostAquacultureRequest() + if include_optional: + return PostAquacultureRequest( + enterprises = [ + { + 'key' : null + } + ] + ) + else: + return PostAquacultureRequest( + enterprises = [ + { + 'key' : null + } + ], + ) + """ + + def testPostAquacultureRequest(self): + """Test PostAquacultureRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner.py new file mode 100644 index 00000000..7fd75c70 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture_request_enterprises_inner import PostAquacultureRequestEnterprisesInner + +class TestPostAquacultureRequestEnterprisesInner(unittest.TestCase): + """PostAquacultureRequestEnterprisesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInner: + """Test PostAquacultureRequestEnterprisesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInner` + """ + model = PostAquacultureRequestEnterprisesInner() + if include_optional: + return PostAquacultureRequestEnterprisesInner( + id = '', + state = 'nsw', + production_system = 'Abalone Farming', + total_harvest_kg = 1.337, + refrigerants = [ + { + 'key' : null + } + ], + bait = [ + { + 'key' : null + } + ], + custom_bait = [ + { + 'key' : null + } + ], + inbound_freight = [ + { + 'key' : null + } + ], + outbound_freight = [ + { + 'key' : null + } + ], + total_commercial_flights_km = 1.337, + electricity_renewable = 0, + electricity_use = 1.337, + electricity_source = 'State Grid', + fuel = { + 'key' : null + }, + fluid_waste = [ + { + 'key' : null + } + ], + solid_waste = { + 'key' : null + }, + carbon_offsets = 1.337 + ) + else: + return PostAquacultureRequestEnterprisesInner( + state = 'nsw', + production_system = 'Abalone Farming', + total_harvest_kg = 1.337, + refrigerants = [ + { + 'key' : null + } + ], + bait = [ + { + 'key' : null + } + ], + custom_bait = [ + { + 'key' : null + } + ], + inbound_freight = [ + { + 'key' : null + } + ], + outbound_freight = [ + { + 'key' : null + } + ], + total_commercial_flights_km = 1.337, + electricity_renewable = 0, + electricity_use = 1.337, + electricity_source = 'State Grid', + fuel = { + 'key' : null + }, + fluid_waste = [ + { + 'key' : null + } + ], + solid_waste = { + 'key' : null + }, + ) + """ + + def testPostAquacultureRequestEnterprisesInner(self): + """Test PostAquacultureRequestEnterprisesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_bait_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_bait_inner.py new file mode 100644 index 00000000..0114fabb --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_bait_inner.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture_request_enterprises_inner_bait_inner import PostAquacultureRequestEnterprisesInnerBaitInner + +class TestPostAquacultureRequestEnterprisesInnerBaitInner(unittest.TestCase): + """PostAquacultureRequestEnterprisesInnerBaitInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerBaitInner: + """Test PostAquacultureRequestEnterprisesInnerBaitInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerBaitInner` + """ + model = PostAquacultureRequestEnterprisesInnerBaitInner() + if include_optional: + return PostAquacultureRequestEnterprisesInnerBaitInner( + type = 'Whole Sardines', + purchased_tonnes = 1.337, + additional_ingredients = 0, + emissions_intensity = 1.337 + ) + else: + return PostAquacultureRequestEnterprisesInnerBaitInner( + type = 'Whole Sardines', + purchased_tonnes = 1.337, + additional_ingredients = 0, + emissions_intensity = 1.337, + ) + """ + + def testPostAquacultureRequestEnterprisesInnerBaitInner(self): + """Test PostAquacultureRequestEnterprisesInnerBaitInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_custom_bait_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_custom_bait_inner.py new file mode 100644 index 00000000..7807adb4 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_custom_bait_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture_request_enterprises_inner_custom_bait_inner import PostAquacultureRequestEnterprisesInnerCustomBaitInner + +class TestPostAquacultureRequestEnterprisesInnerCustomBaitInner(unittest.TestCase): + """PostAquacultureRequestEnterprisesInnerCustomBaitInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerCustomBaitInner: + """Test PostAquacultureRequestEnterprisesInnerCustomBaitInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerCustomBaitInner` + """ + model = PostAquacultureRequestEnterprisesInnerCustomBaitInner() + if include_optional: + return PostAquacultureRequestEnterprisesInnerCustomBaitInner( + purchased_tonnes = 1.337, + emissions_intensity = 1.337 + ) + else: + return PostAquacultureRequestEnterprisesInnerCustomBaitInner( + purchased_tonnes = 1.337, + emissions_intensity = 1.337, + ) + """ + + def testPostAquacultureRequestEnterprisesInnerCustomBaitInner(self): + """Test PostAquacultureRequestEnterprisesInnerCustomBaitInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fluid_waste_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fluid_waste_inner.py new file mode 100644 index 00000000..40a25b8c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fluid_waste_inner.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture_request_enterprises_inner_fluid_waste_inner import PostAquacultureRequestEnterprisesInnerFluidWasteInner + +class TestPostAquacultureRequestEnterprisesInnerFluidWasteInner(unittest.TestCase): + """PostAquacultureRequestEnterprisesInnerFluidWasteInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerFluidWasteInner: + """Test PostAquacultureRequestEnterprisesInnerFluidWasteInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerFluidWasteInner` + """ + model = PostAquacultureRequestEnterprisesInnerFluidWasteInner() + if include_optional: + return PostAquacultureRequestEnterprisesInnerFluidWasteInner( + fluid_waste_kl = 1.337, + fluid_waste_treatment_type = 'Managed Aerobic', + average_inlet_cod = 1.337, + average_outlet_cod = 1.337, + flared_combusted_fraction = 1.337 + ) + else: + return PostAquacultureRequestEnterprisesInnerFluidWasteInner( + fluid_waste_kl = 1.337, + fluid_waste_treatment_type = 'Managed Aerobic', + average_inlet_cod = 1.337, + average_outlet_cod = 1.337, + flared_combusted_fraction = 1.337, + ) + """ + + def testPostAquacultureRequestEnterprisesInnerFluidWasteInner(self): + """Test PostAquacultureRequestEnterprisesInnerFluidWasteInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel.py new file mode 100644 index 00000000..19d84e79 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel import PostAquacultureRequestEnterprisesInnerFuel + +class TestPostAquacultureRequestEnterprisesInnerFuel(unittest.TestCase): + """PostAquacultureRequestEnterprisesInnerFuel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerFuel: + """Test PostAquacultureRequestEnterprisesInnerFuel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerFuel` + """ + model = PostAquacultureRequestEnterprisesInnerFuel() + if include_optional: + return PostAquacultureRequestEnterprisesInnerFuel( + transport_fuel = [ + { + 'key' : null + } + ], + stationary_fuel = [ + { + 'key' : null + } + ], + natural_gas = 1.337 + ) + else: + return PostAquacultureRequestEnterprisesInnerFuel( + transport_fuel = [ + { + 'key' : null + } + ], + stationary_fuel = [ + { + 'key' : null + } + ], + natural_gas = 1.337, + ) + """ + + def testPostAquacultureRequestEnterprisesInnerFuel(self): + """Test PostAquacultureRequestEnterprisesInnerFuel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py new file mode 100644 index 00000000..4b540160 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner import PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner + +class TestPostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner(unittest.TestCase): + """PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner: + """Test PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner` + """ + model = PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner() + if include_optional: + return PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner( + type = 'petrol', + amount_litres = 1.337 + ) + else: + return PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner( + type = 'petrol', + amount_litres = 1.337, + ) + """ + + def testPostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner(self): + """Test PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py new file mode 100644 index 00000000..9e3ab5f0 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner import PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner + +class TestPostAquacultureRequestEnterprisesInnerFuelTransportFuelInner(unittest.TestCase): + """PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner: + """Test PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner` + """ + model = PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner() + if include_optional: + return PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner( + type = 'petrol', + amount_litres = 1.337 + ) + else: + return PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner( + type = 'petrol', + amount_litres = 1.337, + ) + """ + + def testPostAquacultureRequestEnterprisesInnerFuelTransportFuelInner(self): + """Test PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_inbound_freight_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_inbound_freight_inner.py new file mode 100644 index 00000000..3c456e00 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_inbound_freight_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture_request_enterprises_inner_inbound_freight_inner import PostAquacultureRequestEnterprisesInnerInboundFreightInner + +class TestPostAquacultureRequestEnterprisesInnerInboundFreightInner(unittest.TestCase): + """PostAquacultureRequestEnterprisesInnerInboundFreightInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerInboundFreightInner: + """Test PostAquacultureRequestEnterprisesInnerInboundFreightInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerInboundFreightInner` + """ + model = PostAquacultureRequestEnterprisesInnerInboundFreightInner() + if include_optional: + return PostAquacultureRequestEnterprisesInnerInboundFreightInner( + type = 'Truck', + total_km_tonnes = 1.337 + ) + else: + return PostAquacultureRequestEnterprisesInnerInboundFreightInner( + type = 'Truck', + total_km_tonnes = 1.337, + ) + """ + + def testPostAquacultureRequestEnterprisesInnerInboundFreightInner(self): + """Test PostAquacultureRequestEnterprisesInnerInboundFreightInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_refrigerants_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_refrigerants_inner.py new file mode 100644 index 00000000..836c9bb7 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_refrigerants_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture_request_enterprises_inner_refrigerants_inner import PostAquacultureRequestEnterprisesInnerRefrigerantsInner + +class TestPostAquacultureRequestEnterprisesInnerRefrigerantsInner(unittest.TestCase): + """PostAquacultureRequestEnterprisesInnerRefrigerantsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerRefrigerantsInner: + """Test PostAquacultureRequestEnterprisesInnerRefrigerantsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerRefrigerantsInner` + """ + model = PostAquacultureRequestEnterprisesInnerRefrigerantsInner() + if include_optional: + return PostAquacultureRequestEnterprisesInnerRefrigerantsInner( + refrigerant = 'HFC-23', + charge_size = 1.337 + ) + else: + return PostAquacultureRequestEnterprisesInnerRefrigerantsInner( + refrigerant = 'HFC-23', + charge_size = 1.337, + ) + """ + + def testPostAquacultureRequestEnterprisesInnerRefrigerantsInner(self): + """Test PostAquacultureRequestEnterprisesInnerRefrigerantsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_solid_waste.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_solid_waste.py new file mode 100644 index 00000000..90becb20 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_solid_waste.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_aquaculture_request_enterprises_inner_solid_waste import PostAquacultureRequestEnterprisesInnerSolidWaste + +class TestPostAquacultureRequestEnterprisesInnerSolidWaste(unittest.TestCase): + """PostAquacultureRequestEnterprisesInnerSolidWaste unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerSolidWaste: + """Test PostAquacultureRequestEnterprisesInnerSolidWaste + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerSolidWaste` + """ + model = PostAquacultureRequestEnterprisesInnerSolidWaste() + if include_optional: + return PostAquacultureRequestEnterprisesInnerSolidWaste( + sent_offsite_tonnes = 1.337, + onsite_composting_tonnes = 1.337 + ) + else: + return PostAquacultureRequestEnterprisesInnerSolidWaste( + sent_offsite_tonnes = 1.337, + onsite_composting_tonnes = 1.337, + ) + """ + + def testPostAquacultureRequestEnterprisesInnerSolidWaste(self): + """Test PostAquacultureRequestEnterprisesInnerSolidWaste""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef200_response.py b/examples/python-api-client/api-client/test/test_post_beef200_response.py new file mode 100644 index 00000000..87bd656f --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef200_response import PostBeef200Response + +class TestPostBeef200Response(unittest.TestCase): + """PostBeef200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeef200Response: + """Test PostBeef200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeef200Response` + """ + model = PostBeef200Response() + if include_optional: + return PostBeef200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = { + 'key' : null + } + ) + else: + return PostBeef200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + ) + """ + + def testPostBeef200Response(self): + """Test PostBeef200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner.py new file mode 100644 index 00000000..90afba7c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef200_response_intermediate_inner import PostBeef200ResponseIntermediateInner + +class TestPostBeef200ResponseIntermediateInner(unittest.TestCase): + """PostBeef200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeef200ResponseIntermediateInner: + """Test PostBeef200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeef200ResponseIntermediateInner` + """ + model = PostBeef200ResponseIntermediateInner() + if include_optional: + return PostBeef200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + intensities = { + 'key' : null + }, + net = { + 'key' : null + } + ) + else: + return PostBeef200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + ) + """ + + def testPostBeef200ResponseIntermediateInner(self): + """Test PostBeef200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..6e9686b4 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner_intensities.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef200_response_intermediate_inner_intensities import PostBeef200ResponseIntermediateInnerIntensities + +class TestPostBeef200ResponseIntermediateInnerIntensities(unittest.TestCase): + """PostBeef200ResponseIntermediateInnerIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeef200ResponseIntermediateInnerIntensities: + """Test PostBeef200ResponseIntermediateInnerIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeef200ResponseIntermediateInnerIntensities` + """ + model = PostBeef200ResponseIntermediateInnerIntensities() + if include_optional: + return PostBeef200ResponseIntermediateInnerIntensities( + liveweight_beef_produced_kg = 1.337, + beef_excluding_sequestration = 1.337, + beef_including_sequestration = 1.337 + ) + else: + return PostBeef200ResponseIntermediateInnerIntensities( + liveweight_beef_produced_kg = 1.337, + beef_excluding_sequestration = 1.337, + beef_including_sequestration = 1.337, + ) + """ + + def testPostBeef200ResponseIntermediateInnerIntensities(self): + """Test PostBeef200ResponseIntermediateInnerIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef200_response_net.py b/examples/python-api-client/api-client/test/test_post_beef200_response_net.py new file mode 100644 index 00000000..966e4c43 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef200_response_net.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef200_response_net import PostBeef200ResponseNet + +class TestPostBeef200ResponseNet(unittest.TestCase): + """PostBeef200ResponseNet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeef200ResponseNet: + """Test PostBeef200ResponseNet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeef200ResponseNet` + """ + model = PostBeef200ResponseNet() + if include_optional: + return PostBeef200ResponseNet( + total = 1.337, + beef = 1.337 + ) + else: + return PostBeef200ResponseNet( + total = 1.337, + beef = 1.337, + ) + """ + + def testPostBeef200ResponseNet(self): + """Test PostBeef200ResponseNet""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_beef200_response_scope1.py new file mode 100644 index 00000000..39bb174b --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef200_response_scope1.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef200_response_scope1 import PostBeef200ResponseScope1 + +class TestPostBeef200ResponseScope1(unittest.TestCase): + """PostBeef200ResponseScope1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeef200ResponseScope1: + """Test PostBeef200ResponseScope1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeef200ResponseScope1` + """ + model = PostBeef200ResponseScope1() + if include_optional: + return PostBeef200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + urea_co2 = 1.337, + lime_co2 = 1.337, + fertiliser_n2_o = 1.337, + enteric_ch4 = 1.337, + manure_management_ch4 = 1.337, + urine_and_dung_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + savannah_burning_n2_o = 1.337, + savannah_burning_ch4 = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337 + ) + else: + return PostBeef200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + urea_co2 = 1.337, + lime_co2 = 1.337, + fertiliser_n2_o = 1.337, + enteric_ch4 = 1.337, + manure_management_ch4 = 1.337, + urine_and_dung_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + savannah_burning_n2_o = 1.337, + savannah_burning_ch4 = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337, + ) + """ + + def testPostBeef200ResponseScope1(self): + """Test PostBeef200ResponseScope1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_beef200_response_scope3.py new file mode 100644 index 00000000..7cb4603e --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef200_response_scope3.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 + +class TestPostBeef200ResponseScope3(unittest.TestCase): + """PostBeef200ResponseScope3 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeef200ResponseScope3: + """Test PostBeef200ResponseScope3 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeef200ResponseScope3` + """ + model = PostBeef200ResponseScope3() + if include_optional: + return PostBeef200ResponseScope3( + fertiliser = 1.337, + purchased_mineral_supplementation = 1.337, + purchased_feed = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + lime = 1.337, + purchased_livestock = 1.337, + total = 1.337 + ) + else: + return PostBeef200ResponseScope3( + fertiliser = 1.337, + purchased_mineral_supplementation = 1.337, + purchased_feed = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + lime = 1.337, + purchased_livestock = 1.337, + total = 1.337, + ) + """ + + def testPostBeef200ResponseScope3(self): + """Test PostBeef200ResponseScope3""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request.py b/examples/python-api-client/api-client/test/test_post_beef_request.py new file mode 100644 index 00000000..5ff133b9 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request import PostBeefRequest + +class TestPostBeefRequest(unittest.TestCase): + """PostBeefRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequest: + """Test PostBeefRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequest` + """ + model = PostBeefRequest() + if include_optional: + return PostBeefRequest( + state = 'nsw', + north_of_tropic_of_capricorn = True, + rainfall_above600 = True, + beef = [ + { + 'key' : null + } + ], + burning = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequest( + state = 'nsw', + north_of_tropic_of_capricorn = True, + rainfall_above600 = True, + beef = [ + { + 'key' : null + } + ], + burning = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostBeefRequest(self): + """Test PostBeefRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner.py new file mode 100644 index 00000000..1996e5aa --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner import PostBeefRequestBeefInner + +class TestPostBeefRequestBeefInner(unittest.TestCase): + """PostBeefRequestBeefInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInner: + """Test PostBeefRequestBeefInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInner` + """ + model = PostBeefRequestBeefInner() + if include_optional: + return PostBeefRequestBeefInner( + id = '', + classes = { + 'key' : null + }, + limestone = 1.337, + limestone_fraction = 1.337, + fertiliser = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + mineral_supplementation = { + 'key' : null + }, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + grain_feed = 1.337, + hay_feed = 1.337, + cottonseed_feed = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + cows_calving = { + 'key' : null + } + ) + else: + return PostBeefRequestBeefInner( + classes = { + 'key' : null + }, + limestone = 1.337, + limestone_fraction = 1.337, + fertiliser = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + mineral_supplementation = { + 'key' : null + }, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + grain_feed = 1.337, + hay_feed = 1.337, + cottonseed_feed = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + cows_calving = { + 'key' : null + }, + ) + """ + + def testPostBeefRequestBeefInner(self): + """Test PostBeefRequestBeefInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes.py new file mode 100644 index 00000000..31de7529 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes import PostBeefRequestBeefInnerClasses + +class TestPostBeefRequestBeefInnerClasses(unittest.TestCase): + """PostBeefRequestBeefInnerClasses unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClasses: + """Test PostBeefRequestBeefInnerClasses + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClasses` + """ + model = PostBeefRequestBeefInnerClasses() + if include_optional: + return PostBeefRequestBeefInnerClasses( + bulls_gt1 = { + 'key' : null + }, + bulls_gt1_traded = { + 'key' : null + }, + steers_lt1 = { + 'key' : null + }, + steers_lt1_traded = { + 'key' : null + }, + steers1_to2 = { + 'key' : null + }, + steers1_to2_traded = { + 'key' : null + }, + steers_gt2 = { + 'key' : null + }, + steers_gt2_traded = { + 'key' : null + }, + cows_gt2 = { + 'key' : null + }, + cows_gt2_traded = { + 'key' : null + }, + heifers_lt1 = { + 'key' : null + }, + heifers_lt1_traded = { + 'key' : null + }, + heifers1_to2 = { + 'key' : null + }, + heifers1_to2_traded = { + 'key' : null + }, + heifers_gt2 = { + 'key' : null + }, + heifers_gt2_traded = { + 'key' : null + } + ) + else: + return PostBeefRequestBeefInnerClasses( + ) + """ + + def testPostBeefRequestBeefInnerClasses(self): + """Test PostBeefRequestBeefInnerClasses""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1.py new file mode 100644 index 00000000..dfd19c1a --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1 import PostBeefRequestBeefInnerClassesBullsGt1 + +class TestPostBeefRequestBeefInnerClassesBullsGt1(unittest.TestCase): + """PostBeefRequestBeefInnerClassesBullsGt1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesBullsGt1: + """Test PostBeefRequestBeefInnerClassesBullsGt1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesBullsGt1` + """ + model = PostBeefRequestBeefInnerClassesBullsGt1() + if include_optional: + return PostBeefRequestBeefInnerClassesBullsGt1( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesBullsGt1( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesBullsGt1(self): + """Test PostBeefRequestBeefInnerClassesBullsGt1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_autumn.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_autumn.py new file mode 100644 index 00000000..10ffee9d --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_autumn.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn + +class TestPostBeefRequestBeefInnerClassesBullsGt1Autumn(unittest.TestCase): + """PostBeefRequestBeefInnerClassesBullsGt1Autumn unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesBullsGt1Autumn: + """Test PostBeefRequestBeefInnerClassesBullsGt1Autumn + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesBullsGt1Autumn` + """ + model = PostBeefRequestBeefInnerClassesBullsGt1Autumn() + if include_optional: + return PostBeefRequestBeefInnerClassesBullsGt1Autumn( + head = 1.337, + liveweight = 1.337, + liveweight_gain = 1.337, + crude_protein = 1.337, + dry_matter_digestibility = 1.337 + ) + else: + return PostBeefRequestBeefInnerClassesBullsGt1Autumn( + head = 1.337, + liveweight = 1.337, + liveweight_gain = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesBullsGt1Autumn(self): + """Test PostBeefRequestBeefInnerClassesBullsGt1Autumn""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py new file mode 100644 index 00000000..0358c9fb --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner + +class TestPostBeefRequestBeefInnerClassesBullsGt1PurchasesInner(unittest.TestCase): + """PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner: + """Test PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner` + """ + model = PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner() + if include_optional: + return PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner( + head = 1.337, + purchase_weight = 1.337, + purchase_source = 'Dairy origin' + ) + else: + return PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner( + head = 1.337, + purchase_weight = 1.337, + purchase_source = 'Dairy origin', + ) + """ + + def testPostBeefRequestBeefInnerClassesBullsGt1PurchasesInner(self): + """Test PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_traded.py new file mode 100644 index 00000000..d9ed0e4c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_traded.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_traded import PostBeefRequestBeefInnerClassesBullsGt1Traded + +class TestPostBeefRequestBeefInnerClassesBullsGt1Traded(unittest.TestCase): + """PostBeefRequestBeefInnerClassesBullsGt1Traded unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesBullsGt1Traded: + """Test PostBeefRequestBeefInnerClassesBullsGt1Traded + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesBullsGt1Traded` + """ + model = PostBeefRequestBeefInnerClassesBullsGt1Traded() + if include_optional: + return PostBeefRequestBeefInnerClassesBullsGt1Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesBullsGt1Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesBullsGt1Traded(self): + """Test PostBeefRequestBeefInnerClassesBullsGt1Traded""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2.py new file mode 100644 index 00000000..d0f0b13c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_cows_gt2 import PostBeefRequestBeefInnerClassesCowsGt2 + +class TestPostBeefRequestBeefInnerClassesCowsGt2(unittest.TestCase): + """PostBeefRequestBeefInnerClassesCowsGt2 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesCowsGt2: + """Test PostBeefRequestBeefInnerClassesCowsGt2 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesCowsGt2` + """ + model = PostBeefRequestBeefInnerClassesCowsGt2() + if include_optional: + return PostBeefRequestBeefInnerClassesCowsGt2( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesCowsGt2( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesCowsGt2(self): + """Test PostBeefRequestBeefInnerClassesCowsGt2""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2_traded.py new file mode 100644 index 00000000..afc5b133 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2_traded.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_cows_gt2_traded import PostBeefRequestBeefInnerClassesCowsGt2Traded + +class TestPostBeefRequestBeefInnerClassesCowsGt2Traded(unittest.TestCase): + """PostBeefRequestBeefInnerClassesCowsGt2Traded unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesCowsGt2Traded: + """Test PostBeefRequestBeefInnerClassesCowsGt2Traded + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesCowsGt2Traded` + """ + model = PostBeefRequestBeefInnerClassesCowsGt2Traded() + if include_optional: + return PostBeefRequestBeefInnerClassesCowsGt2Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesCowsGt2Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesCowsGt2Traded(self): + """Test PostBeefRequestBeefInnerClassesCowsGt2Traded""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2.py new file mode 100644 index 00000000..3c1349b7 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_heifers1_to2 import PostBeefRequestBeefInnerClassesHeifers1To2 + +class TestPostBeefRequestBeefInnerClassesHeifers1To2(unittest.TestCase): + """PostBeefRequestBeefInnerClassesHeifers1To2 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesHeifers1To2: + """Test PostBeefRequestBeefInnerClassesHeifers1To2 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesHeifers1To2` + """ + model = PostBeefRequestBeefInnerClassesHeifers1To2() + if include_optional: + return PostBeefRequestBeefInnerClassesHeifers1To2( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesHeifers1To2( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesHeifers1To2(self): + """Test PostBeefRequestBeefInnerClassesHeifers1To2""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2_traded.py new file mode 100644 index 00000000..6b499afc --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2_traded.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_heifers1_to2_traded import PostBeefRequestBeefInnerClassesHeifers1To2Traded + +class TestPostBeefRequestBeefInnerClassesHeifers1To2Traded(unittest.TestCase): + """PostBeefRequestBeefInnerClassesHeifers1To2Traded unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesHeifers1To2Traded: + """Test PostBeefRequestBeefInnerClassesHeifers1To2Traded + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesHeifers1To2Traded` + """ + model = PostBeefRequestBeefInnerClassesHeifers1To2Traded() + if include_optional: + return PostBeefRequestBeefInnerClassesHeifers1To2Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesHeifers1To2Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesHeifers1To2Traded(self): + """Test PostBeefRequestBeefInnerClassesHeifers1To2Traded""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2.py new file mode 100644 index 00000000..b1373cbe --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_gt2 import PostBeefRequestBeefInnerClassesHeifersGt2 + +class TestPostBeefRequestBeefInnerClassesHeifersGt2(unittest.TestCase): + """PostBeefRequestBeefInnerClassesHeifersGt2 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesHeifersGt2: + """Test PostBeefRequestBeefInnerClassesHeifersGt2 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesHeifersGt2` + """ + model = PostBeefRequestBeefInnerClassesHeifersGt2() + if include_optional: + return PostBeefRequestBeefInnerClassesHeifersGt2( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesHeifersGt2( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesHeifersGt2(self): + """Test PostBeefRequestBeefInnerClassesHeifersGt2""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2_traded.py new file mode 100644 index 00000000..62bfafaa --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2_traded.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_gt2_traded import PostBeefRequestBeefInnerClassesHeifersGt2Traded + +class TestPostBeefRequestBeefInnerClassesHeifersGt2Traded(unittest.TestCase): + """PostBeefRequestBeefInnerClassesHeifersGt2Traded unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesHeifersGt2Traded: + """Test PostBeefRequestBeefInnerClassesHeifersGt2Traded + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesHeifersGt2Traded` + """ + model = PostBeefRequestBeefInnerClassesHeifersGt2Traded() + if include_optional: + return PostBeefRequestBeefInnerClassesHeifersGt2Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesHeifersGt2Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesHeifersGt2Traded(self): + """Test PostBeefRequestBeefInnerClassesHeifersGt2Traded""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1.py new file mode 100644 index 00000000..300b7944 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_lt1 import PostBeefRequestBeefInnerClassesHeifersLt1 + +class TestPostBeefRequestBeefInnerClassesHeifersLt1(unittest.TestCase): + """PostBeefRequestBeefInnerClassesHeifersLt1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesHeifersLt1: + """Test PostBeefRequestBeefInnerClassesHeifersLt1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesHeifersLt1` + """ + model = PostBeefRequestBeefInnerClassesHeifersLt1() + if include_optional: + return PostBeefRequestBeefInnerClassesHeifersLt1( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesHeifersLt1( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesHeifersLt1(self): + """Test PostBeefRequestBeefInnerClassesHeifersLt1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1_traded.py new file mode 100644 index 00000000..7dc9ac9f --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1_traded.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_heifers_lt1_traded import PostBeefRequestBeefInnerClassesHeifersLt1Traded + +class TestPostBeefRequestBeefInnerClassesHeifersLt1Traded(unittest.TestCase): + """PostBeefRequestBeefInnerClassesHeifersLt1Traded unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesHeifersLt1Traded: + """Test PostBeefRequestBeefInnerClassesHeifersLt1Traded + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesHeifersLt1Traded` + """ + model = PostBeefRequestBeefInnerClassesHeifersLt1Traded() + if include_optional: + return PostBeefRequestBeefInnerClassesHeifersLt1Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesHeifersLt1Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesHeifersLt1Traded(self): + """Test PostBeefRequestBeefInnerClassesHeifersLt1Traded""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2.py new file mode 100644 index 00000000..980a4894 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_steers1_to2 import PostBeefRequestBeefInnerClassesSteers1To2 + +class TestPostBeefRequestBeefInnerClassesSteers1To2(unittest.TestCase): + """PostBeefRequestBeefInnerClassesSteers1To2 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesSteers1To2: + """Test PostBeefRequestBeefInnerClassesSteers1To2 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesSteers1To2` + """ + model = PostBeefRequestBeefInnerClassesSteers1To2() + if include_optional: + return PostBeefRequestBeefInnerClassesSteers1To2( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesSteers1To2( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesSteers1To2(self): + """Test PostBeefRequestBeefInnerClassesSteers1To2""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2_traded.py new file mode 100644 index 00000000..b546b3e0 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2_traded.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_steers1_to2_traded import PostBeefRequestBeefInnerClassesSteers1To2Traded + +class TestPostBeefRequestBeefInnerClassesSteers1To2Traded(unittest.TestCase): + """PostBeefRequestBeefInnerClassesSteers1To2Traded unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesSteers1To2Traded: + """Test PostBeefRequestBeefInnerClassesSteers1To2Traded + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesSteers1To2Traded` + """ + model = PostBeefRequestBeefInnerClassesSteers1To2Traded() + if include_optional: + return PostBeefRequestBeefInnerClassesSteers1To2Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesSteers1To2Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesSteers1To2Traded(self): + """Test PostBeefRequestBeefInnerClassesSteers1To2Traded""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2.py new file mode 100644 index 00000000..577bc36d --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_steers_gt2 import PostBeefRequestBeefInnerClassesSteersGt2 + +class TestPostBeefRequestBeefInnerClassesSteersGt2(unittest.TestCase): + """PostBeefRequestBeefInnerClassesSteersGt2 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesSteersGt2: + """Test PostBeefRequestBeefInnerClassesSteersGt2 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesSteersGt2` + """ + model = PostBeefRequestBeefInnerClassesSteersGt2() + if include_optional: + return PostBeefRequestBeefInnerClassesSteersGt2( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesSteersGt2( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesSteersGt2(self): + """Test PostBeefRequestBeefInnerClassesSteersGt2""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2_traded.py new file mode 100644 index 00000000..1ec56f7f --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2_traded.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_steers_gt2_traded import PostBeefRequestBeefInnerClassesSteersGt2Traded + +class TestPostBeefRequestBeefInnerClassesSteersGt2Traded(unittest.TestCase): + """PostBeefRequestBeefInnerClassesSteersGt2Traded unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesSteersGt2Traded: + """Test PostBeefRequestBeefInnerClassesSteersGt2Traded + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesSteersGt2Traded` + """ + model = PostBeefRequestBeefInnerClassesSteersGt2Traded() + if include_optional: + return PostBeefRequestBeefInnerClassesSteersGt2Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesSteersGt2Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesSteersGt2Traded(self): + """Test PostBeefRequestBeefInnerClassesSteersGt2Traded""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1.py new file mode 100644 index 00000000..0f2cb7e3 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_steers_lt1 import PostBeefRequestBeefInnerClassesSteersLt1 + +class TestPostBeefRequestBeefInnerClassesSteersLt1(unittest.TestCase): + """PostBeefRequestBeefInnerClassesSteersLt1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesSteersLt1: + """Test PostBeefRequestBeefInnerClassesSteersLt1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesSteersLt1` + """ + model = PostBeefRequestBeefInnerClassesSteersLt1() + if include_optional: + return PostBeefRequestBeefInnerClassesSteersLt1( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesSteersLt1( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesSteersLt1(self): + """Test PostBeefRequestBeefInnerClassesSteersLt1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1_traded.py new file mode 100644 index 00000000..bcb8174d --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1_traded.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_classes_steers_lt1_traded import PostBeefRequestBeefInnerClassesSteersLt1Traded + +class TestPostBeefRequestBeefInnerClassesSteersLt1Traded(unittest.TestCase): + """PostBeefRequestBeefInnerClassesSteersLt1Traded unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesSteersLt1Traded: + """Test PostBeefRequestBeefInnerClassesSteersLt1Traded + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesSteersLt1Traded` + """ + model = PostBeefRequestBeefInnerClassesSteersLt1Traded() + if include_optional: + return PostBeefRequestBeefInnerClassesSteersLt1Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + source = 'Dairy origin', + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerClassesSteersLt1Traded( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerClassesSteersLt1Traded(self): + """Test PostBeefRequestBeefInnerClassesSteersLt1Traded""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_cows_calving.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_cows_calving.py new file mode 100644 index 00000000..04aef4fd --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_cows_calving.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_cows_calving import PostBeefRequestBeefInnerCowsCalving + +class TestPostBeefRequestBeefInnerCowsCalving(unittest.TestCase): + """PostBeefRequestBeefInnerCowsCalving unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerCowsCalving: + """Test PostBeefRequestBeefInnerCowsCalving + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerCowsCalving` + """ + model = PostBeefRequestBeefInnerCowsCalving() + if include_optional: + return PostBeefRequestBeefInnerCowsCalving( + spring = 1.337, + summer = 1.337, + autumn = 1.337, + winter = 1.337 + ) + else: + return PostBeefRequestBeefInnerCowsCalving( + spring = 1.337, + summer = 1.337, + autumn = 1.337, + winter = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerCowsCalving(self): + """Test PostBeefRequestBeefInnerCowsCalving""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser.py new file mode 100644 index 00000000..13e4e49a --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_fertiliser import PostBeefRequestBeefInnerFertiliser + +class TestPostBeefRequestBeefInnerFertiliser(unittest.TestCase): + """PostBeefRequestBeefInnerFertiliser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerFertiliser: + """Test PostBeefRequestBeefInnerFertiliser + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerFertiliser` + """ + model = PostBeefRequestBeefInnerFertiliser() + if include_optional: + return PostBeefRequestBeefInnerFertiliser( + single_superphosphate = 1.337, + other_type = 'Monoammonium phosphate (MAP)', + pasture_dryland = 1.337, + pasture_irrigated = 1.337, + crops_dryland = 1.337, + crops_irrigated = 1.337, + other_dryland = 1.337, + other_irrigated = 1.337, + other_fertilisers = [ + { + 'key' : null + } + ] + ) + else: + return PostBeefRequestBeefInnerFertiliser( + single_superphosphate = 1.337, + pasture_dryland = 1.337, + pasture_irrigated = 1.337, + crops_dryland = 1.337, + crops_irrigated = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerFertiliser(self): + """Test PostBeefRequestBeefInnerFertiliser""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py new file mode 100644 index 00000000..d90404e5 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_fertiliser_other_fertilisers_inner import PostBeefRequestBeefInnerFertiliserOtherFertilisersInner + +class TestPostBeefRequestBeefInnerFertiliserOtherFertilisersInner(unittest.TestCase): + """PostBeefRequestBeefInnerFertiliserOtherFertilisersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerFertiliserOtherFertilisersInner: + """Test PostBeefRequestBeefInnerFertiliserOtherFertilisersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerFertiliserOtherFertilisersInner` + """ + model = PostBeefRequestBeefInnerFertiliserOtherFertilisersInner() + if include_optional: + return PostBeefRequestBeefInnerFertiliserOtherFertilisersInner( + other_type = 'Monoammonium phosphate (MAP)', + other_dryland = 1.337, + other_irrigated = 1.337 + ) + else: + return PostBeefRequestBeefInnerFertiliserOtherFertilisersInner( + other_type = 'Monoammonium phosphate (MAP)', + other_dryland = 1.337, + other_irrigated = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerFertiliserOtherFertilisersInner(self): + """Test PostBeefRequestBeefInnerFertiliserOtherFertilisersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_mineral_supplementation.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_mineral_supplementation.py new file mode 100644 index 00000000..cb016383 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_mineral_supplementation.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_beef_inner_mineral_supplementation import PostBeefRequestBeefInnerMineralSupplementation + +class TestPostBeefRequestBeefInnerMineralSupplementation(unittest.TestCase): + """PostBeefRequestBeefInnerMineralSupplementation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBeefInnerMineralSupplementation: + """Test PostBeefRequestBeefInnerMineralSupplementation + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBeefInnerMineralSupplementation` + """ + model = PostBeefRequestBeefInnerMineralSupplementation() + if include_optional: + return PostBeefRequestBeefInnerMineralSupplementation( + mineral_block = 1.337, + mineral_block_urea = 1.337, + weaner_block = 1.337, + weaner_block_urea = 1.337, + dry_season_mix = 1.337, + dry_season_mix_urea = 1.337 + ) + else: + return PostBeefRequestBeefInnerMineralSupplementation( + mineral_block = 1.337, + mineral_block_urea = 1.337, + weaner_block = 1.337, + weaner_block_urea = 1.337, + dry_season_mix = 1.337, + dry_season_mix_urea = 1.337, + ) + """ + + def testPostBeefRequestBeefInnerMineralSupplementation(self): + """Test PostBeefRequestBeefInnerMineralSupplementation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_burning_inner.py b/examples/python-api-client/api-client/test/test_post_beef_request_burning_inner.py new file mode 100644 index 00000000..9c54c4da --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_burning_inner.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_burning_inner import PostBeefRequestBurningInner + +class TestPostBeefRequestBurningInner(unittest.TestCase): + """PostBeefRequestBurningInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBurningInner: + """Test PostBeefRequestBurningInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBurningInner` + """ + model = PostBeefRequestBurningInner() + if include_optional: + return PostBeefRequestBurningInner( + burning = { + 'key' : null + }, + allocation_to_beef = [ + 1.337 + ] + ) + else: + return PostBeefRequestBurningInner( + burning = { + 'key' : null + }, + allocation_to_beef = [ + 1.337 + ], + ) + """ + + def testPostBeefRequestBurningInner(self): + """Test PostBeefRequestBurningInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_burning_inner_burning.py b/examples/python-api-client/api-client/test/test_post_beef_request_burning_inner_burning.py new file mode 100644 index 00000000..86c6627c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_burning_inner_burning.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_burning_inner_burning import PostBeefRequestBurningInnerBurning + +class TestPostBeefRequestBurningInnerBurning(unittest.TestCase): + """PostBeefRequestBurningInnerBurning unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestBurningInnerBurning: + """Test PostBeefRequestBurningInnerBurning + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestBurningInnerBurning` + """ + model = PostBeefRequestBurningInnerBurning() + if include_optional: + return PostBeefRequestBurningInnerBurning( + fuel = 'coarse', + season = 'early dry season', + patchiness = 'high', + rainfall_zone = 'low', + years_since_last_fire = 1.337, + fire_scar_area = 1.337, + vegetation = 'Melaleuca woodland' + ) + else: + return PostBeefRequestBurningInnerBurning( + fuel = 'coarse', + season = 'early dry season', + patchiness = 'high', + rainfall_zone = 'low', + years_since_last_fire = 1.337, + fire_scar_area = 1.337, + vegetation = 'Melaleuca woodland', + ) + """ + + def testPostBeefRequestBurningInnerBurning(self): + """Test PostBeefRequestBurningInnerBurning""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner.py new file mode 100644 index 00000000..7734765d --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_vegetation_inner import PostBeefRequestVegetationInner + +class TestPostBeefRequestVegetationInner(unittest.TestCase): + """PostBeefRequestVegetationInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestVegetationInner: + """Test PostBeefRequestVegetationInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestVegetationInner` + """ + model = PostBeefRequestVegetationInner() + if include_optional: + return PostBeefRequestVegetationInner( + vegetation = { + 'key' : null + }, + beef_proportion = 1.337, + allocation_to_beef = [ + 1.337 + ] + ) + else: + return PostBeefRequestVegetationInner( + vegetation = { + 'key' : null + }, + allocation_to_beef = [ + 1.337 + ], + ) + """ + + def testPostBeefRequestVegetationInner(self): + """Test PostBeefRequestVegetationInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner_vegetation.py b/examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner_vegetation.py new file mode 100644 index 00000000..4c19e8b6 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner_vegetation.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation + +class TestPostBeefRequestVegetationInnerVegetation(unittest.TestCase): + """PostBeefRequestVegetationInnerVegetation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBeefRequestVegetationInnerVegetation: + """Test PostBeefRequestVegetationInnerVegetation + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBeefRequestVegetationInnerVegetation` + """ + model = PostBeefRequestVegetationInnerVegetation() + if include_optional: + return PostBeefRequestVegetationInnerVegetation( + region = 'South West', + tree_species = 'Mixed species (Environmental Plantings)', + soil = 'Loams & Clays', + area = 1.337, + age = 1.337 + ) + else: + return PostBeefRequestVegetationInnerVegetation( + region = 'South West', + tree_species = 'Mixed species (Environmental Plantings)', + soil = 'Loams & Clays', + area = 1.337, + age = 1.337, + ) + """ + + def testPostBeefRequestVegetationInnerVegetation(self): + """Test PostBeefRequestVegetationInnerVegetation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo200_response.py b/examples/python-api-client/api-client/test/test_post_buffalo200_response.py new file mode 100644 index 00000000..433f951b --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo200_response import PostBuffalo200Response + +class TestPostBuffalo200Response(unittest.TestCase): + """PostBuffalo200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffalo200Response: + """Test PostBuffalo200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffalo200Response` + """ + model = PostBuffalo200Response() + if include_optional: + return PostBuffalo200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ] + ) + else: + return PostBuffalo200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + ) + """ + + def testPostBuffalo200Response(self): + """Test PostBuffalo200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_buffalo200_response_intensities.py new file mode 100644 index 00000000..f28daa58 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo200_response_intensities.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo200_response_intensities import PostBuffalo200ResponseIntensities + +class TestPostBuffalo200ResponseIntensities(unittest.TestCase): + """PostBuffalo200ResponseIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffalo200ResponseIntensities: + """Test PostBuffalo200ResponseIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffalo200ResponseIntensities` + """ + model = PostBuffalo200ResponseIntensities() + if include_optional: + return PostBuffalo200ResponseIntensities( + liveweight_produced_kg = 1.337, + buffalo_meat_excluding_sequestration = 1.337, + buffalo_meat_including_sequestration = 1.337 + ) + else: + return PostBuffalo200ResponseIntensities( + liveweight_produced_kg = 1.337, + buffalo_meat_excluding_sequestration = 1.337, + buffalo_meat_including_sequestration = 1.337, + ) + """ + + def testPostBuffalo200ResponseIntensities(self): + """Test PostBuffalo200ResponseIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_buffalo200_response_intermediate_inner.py new file mode 100644 index 00000000..1960f961 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo200_response_intermediate_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo200_response_intermediate_inner import PostBuffalo200ResponseIntermediateInner + +class TestPostBuffalo200ResponseIntermediateInner(unittest.TestCase): + """PostBuffalo200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffalo200ResponseIntermediateInner: + """Test PostBuffalo200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffalo200ResponseIntermediateInner` + """ + model = PostBuffalo200ResponseIntermediateInner() + if include_optional: + return PostBuffalo200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + } + ) + else: + return PostBuffalo200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + ) + """ + + def testPostBuffalo200ResponseIntermediateInner(self): + """Test PostBuffalo200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo200_response_net.py b/examples/python-api-client/api-client/test/test_post_buffalo200_response_net.py new file mode 100644 index 00000000..988cebe0 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo200_response_net.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo200_response_net import PostBuffalo200ResponseNet + +class TestPostBuffalo200ResponseNet(unittest.TestCase): + """PostBuffalo200ResponseNet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffalo200ResponseNet: + """Test PostBuffalo200ResponseNet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffalo200ResponseNet` + """ + model = PostBuffalo200ResponseNet() + if include_optional: + return PostBuffalo200ResponseNet( + total = 1.337 + ) + else: + return PostBuffalo200ResponseNet( + total = 1.337, + ) + """ + + def testPostBuffalo200ResponseNet(self): + """Test PostBuffalo200ResponseNet""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_buffalo200_response_scope1.py new file mode 100644 index 00000000..2daaf6e1 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo200_response_scope1.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo200_response_scope1 import PostBuffalo200ResponseScope1 + +class TestPostBuffalo200ResponseScope1(unittest.TestCase): + """PostBuffalo200ResponseScope1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffalo200ResponseScope1: + """Test PostBuffalo200ResponseScope1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffalo200ResponseScope1` + """ + model = PostBuffalo200ResponseScope1() + if include_optional: + return PostBuffalo200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + urea_co2 = 1.337, + lime_co2 = 1.337, + fertiliser_n2_o = 1.337, + enteric_ch4 = 1.337, + manure_management_ch4 = 1.337, + urine_and_dung_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337 + ) + else: + return PostBuffalo200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + urea_co2 = 1.337, + lime_co2 = 1.337, + fertiliser_n2_o = 1.337, + enteric_ch4 = 1.337, + manure_management_ch4 = 1.337, + urine_and_dung_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337, + ) + """ + + def testPostBuffalo200ResponseScope1(self): + """Test PostBuffalo200ResponseScope1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_buffalo200_response_scope3.py new file mode 100644 index 00000000..fd8f93a6 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo200_response_scope3.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo200_response_scope3 import PostBuffalo200ResponseScope3 + +class TestPostBuffalo200ResponseScope3(unittest.TestCase): + """PostBuffalo200ResponseScope3 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffalo200ResponseScope3: + """Test PostBuffalo200ResponseScope3 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffalo200ResponseScope3` + """ + model = PostBuffalo200ResponseScope3() + if include_optional: + return PostBuffalo200ResponseScope3( + fertiliser = 1.337, + purchased_feed = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + lime = 1.337, + purchased_livestock = 1.337, + total = 1.337 + ) + else: + return PostBuffalo200ResponseScope3( + fertiliser = 1.337, + purchased_feed = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + lime = 1.337, + purchased_livestock = 1.337, + total = 1.337, + ) + """ + + def testPostBuffalo200ResponseScope3(self): + """Test PostBuffalo200ResponseScope3""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request.py b/examples/python-api-client/api-client/test/test_post_buffalo_request.py new file mode 100644 index 00000000..b4fa7146 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request import PostBuffaloRequest + +class TestPostBuffaloRequest(unittest.TestCase): + """PostBuffaloRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequest: + """Test PostBuffaloRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequest` + """ + model = PostBuffaloRequest() + if include_optional: + return PostBuffaloRequest( + state = 'nsw', + rainfall_above600 = True, + buffalos = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostBuffaloRequest( + state = 'nsw', + rainfall_above600 = True, + buffalos = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostBuffaloRequest(self): + """Test PostBuffaloRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner.py new file mode 100644 index 00000000..2513e6c2 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_buffalos_inner import PostBuffaloRequestBuffalosInner + +class TestPostBuffaloRequestBuffalosInner(unittest.TestCase): + """PostBuffaloRequestBuffalosInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInner: + """Test PostBuffaloRequestBuffalosInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestBuffalosInner` + """ + model = PostBuffaloRequestBuffalosInner() + if include_optional: + return PostBuffaloRequestBuffalosInner( + id = '', + classes = { + 'key' : null + }, + limestone = 1.337, + limestone_fraction = 1.337, + fertiliser = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + grain_feed = 1.337, + hay_feed = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + cows_calving = { + 'key' : null + }, + seasonal_calving = { + 'key' : null + } + ) + else: + return PostBuffaloRequestBuffalosInner( + classes = { + 'key' : null + }, + limestone = 1.337, + limestone_fraction = 1.337, + fertiliser = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + grain_feed = 1.337, + hay_feed = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + cows_calving = { + 'key' : null + }, + seasonal_calving = { + 'key' : null + }, + ) + """ + + def testPostBuffaloRequestBuffalosInner(self): + """Test PostBuffaloRequestBuffalosInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes.py new file mode 100644 index 00000000..18f4a7f2 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_buffalos_inner_classes import PostBuffaloRequestBuffalosInnerClasses + +class TestPostBuffaloRequestBuffalosInnerClasses(unittest.TestCase): + """PostBuffaloRequestBuffalosInnerClasses unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClasses: + """Test PostBuffaloRequestBuffalosInnerClasses + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClasses` + """ + model = PostBuffaloRequestBuffalosInnerClasses() + if include_optional: + return PostBuffaloRequestBuffalosInnerClasses( + bulls = { + 'key' : null + }, + trade_bulls = { + 'key' : null + }, + cows = { + 'key' : null + }, + trade_cows = { + 'key' : null + }, + steers = { + 'key' : null + }, + trade_steers = { + 'key' : null + }, + calfs = { + 'key' : null + }, + trade_calfs = { + 'key' : null + } + ) + else: + return PostBuffaloRequestBuffalosInnerClasses( + ) + """ + + def testPostBuffaloRequestBuffalosInnerClasses(self): + """Test PostBuffaloRequestBuffalosInnerClasses""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls.py new file mode 100644 index 00000000..5cf29124 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls import PostBuffaloRequestBuffalosInnerClassesBulls + +class TestPostBuffaloRequestBuffalosInnerClassesBulls(unittest.TestCase): + """PostBuffaloRequestBuffalosInnerClassesBulls unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesBulls: + """Test PostBuffaloRequestBuffalosInnerClassesBulls + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesBulls` + """ + model = PostBuffaloRequestBuffalosInnerClassesBulls() + if include_optional: + return PostBuffaloRequestBuffalosInnerClassesBulls( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBuffaloRequestBuffalosInnerClassesBulls( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBuffaloRequestBuffalosInnerClassesBulls(self): + """Test PostBuffaloRequestBuffalosInnerClassesBulls""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_autumn.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_autumn.py new file mode 100644 index 00000000..687966f7 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_autumn.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn + +class TestPostBuffaloRequestBuffalosInnerClassesBullsAutumn(unittest.TestCase): + """PostBuffaloRequestBuffalosInnerClassesBullsAutumn unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesBullsAutumn: + """Test PostBuffaloRequestBuffalosInnerClassesBullsAutumn + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesBullsAutumn` + """ + model = PostBuffaloRequestBuffalosInnerClassesBullsAutumn() + if include_optional: + return PostBuffaloRequestBuffalosInnerClassesBullsAutumn( + head = 1.337 + ) + else: + return PostBuffaloRequestBuffalosInnerClassesBullsAutumn( + head = 1.337, + ) + """ + + def testPostBuffaloRequestBuffalosInnerClassesBullsAutumn(self): + """Test PostBuffaloRequestBuffalosInnerClassesBullsAutumn""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py new file mode 100644 index 00000000..ea14496f --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner + +class TestPostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner(unittest.TestCase): + """PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner: + """Test PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner` + """ + model = PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner() + if include_optional: + return PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner( + head = 1.337, + purchase_weight = 1.337 + ) + else: + return PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner( + head = 1.337, + purchase_weight = 1.337, + ) + """ + + def testPostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner(self): + """Test PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_calfs.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_calfs.py new file mode 100644 index 00000000..0c69786a --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_calfs.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_calfs import PostBuffaloRequestBuffalosInnerClassesCalfs + +class TestPostBuffaloRequestBuffalosInnerClassesCalfs(unittest.TestCase): + """PostBuffaloRequestBuffalosInnerClassesCalfs unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesCalfs: + """Test PostBuffaloRequestBuffalosInnerClassesCalfs + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesCalfs` + """ + model = PostBuffaloRequestBuffalosInnerClassesCalfs() + if include_optional: + return PostBuffaloRequestBuffalosInnerClassesCalfs( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBuffaloRequestBuffalosInnerClassesCalfs( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBuffaloRequestBuffalosInnerClassesCalfs(self): + """Test PostBuffaloRequestBuffalosInnerClassesCalfs""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_cows.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_cows.py new file mode 100644 index 00000000..cc043407 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_cows.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_cows import PostBuffaloRequestBuffalosInnerClassesCows + +class TestPostBuffaloRequestBuffalosInnerClassesCows(unittest.TestCase): + """PostBuffaloRequestBuffalosInnerClassesCows unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesCows: + """Test PostBuffaloRequestBuffalosInnerClassesCows + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesCows` + """ + model = PostBuffaloRequestBuffalosInnerClassesCows() + if include_optional: + return PostBuffaloRequestBuffalosInnerClassesCows( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBuffaloRequestBuffalosInnerClassesCows( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBuffaloRequestBuffalosInnerClassesCows(self): + """Test PostBuffaloRequestBuffalosInnerClassesCows""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_steers.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_steers.py new file mode 100644 index 00000000..db3e901b --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_steers.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_steers import PostBuffaloRequestBuffalosInnerClassesSteers + +class TestPostBuffaloRequestBuffalosInnerClassesSteers(unittest.TestCase): + """PostBuffaloRequestBuffalosInnerClassesSteers unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesSteers: + """Test PostBuffaloRequestBuffalosInnerClassesSteers + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesSteers` + """ + model = PostBuffaloRequestBuffalosInnerClassesSteers() + if include_optional: + return PostBuffaloRequestBuffalosInnerClassesSteers( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBuffaloRequestBuffalosInnerClassesSteers( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBuffaloRequestBuffalosInnerClassesSteers(self): + """Test PostBuffaloRequestBuffalosInnerClassesSteers""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_bulls.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_bulls.py new file mode 100644 index 00000000..17e461dc --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_bulls.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_bulls import PostBuffaloRequestBuffalosInnerClassesTradeBulls + +class TestPostBuffaloRequestBuffalosInnerClassesTradeBulls(unittest.TestCase): + """PostBuffaloRequestBuffalosInnerClassesTradeBulls unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesTradeBulls: + """Test PostBuffaloRequestBuffalosInnerClassesTradeBulls + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesTradeBulls` + """ + model = PostBuffaloRequestBuffalosInnerClassesTradeBulls() + if include_optional: + return PostBuffaloRequestBuffalosInnerClassesTradeBulls( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBuffaloRequestBuffalosInnerClassesTradeBulls( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBuffaloRequestBuffalosInnerClassesTradeBulls(self): + """Test PostBuffaloRequestBuffalosInnerClassesTradeBulls""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_calfs.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_calfs.py new file mode 100644 index 00000000..1e82e4a1 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_calfs.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_calfs import PostBuffaloRequestBuffalosInnerClassesTradeCalfs + +class TestPostBuffaloRequestBuffalosInnerClassesTradeCalfs(unittest.TestCase): + """PostBuffaloRequestBuffalosInnerClassesTradeCalfs unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesTradeCalfs: + """Test PostBuffaloRequestBuffalosInnerClassesTradeCalfs + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesTradeCalfs` + """ + model = PostBuffaloRequestBuffalosInnerClassesTradeCalfs() + if include_optional: + return PostBuffaloRequestBuffalosInnerClassesTradeCalfs( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBuffaloRequestBuffalosInnerClassesTradeCalfs( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBuffaloRequestBuffalosInnerClassesTradeCalfs(self): + """Test PostBuffaloRequestBuffalosInnerClassesTradeCalfs""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_cows.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_cows.py new file mode 100644 index 00000000..deceb274 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_cows.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_cows import PostBuffaloRequestBuffalosInnerClassesTradeCows + +class TestPostBuffaloRequestBuffalosInnerClassesTradeCows(unittest.TestCase): + """PostBuffaloRequestBuffalosInnerClassesTradeCows unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesTradeCows: + """Test PostBuffaloRequestBuffalosInnerClassesTradeCows + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesTradeCows` + """ + model = PostBuffaloRequestBuffalosInnerClassesTradeCows() + if include_optional: + return PostBuffaloRequestBuffalosInnerClassesTradeCows( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBuffaloRequestBuffalosInnerClassesTradeCows( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBuffaloRequestBuffalosInnerClassesTradeCows(self): + """Test PostBuffaloRequestBuffalosInnerClassesTradeCows""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_steers.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_steers.py new file mode 100644 index 00000000..83843337 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_steers.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_steers import PostBuffaloRequestBuffalosInnerClassesTradeSteers + +class TestPostBuffaloRequestBuffalosInnerClassesTradeSteers(unittest.TestCase): + """PostBuffaloRequestBuffalosInnerClassesTradeSteers unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesTradeSteers: + """Test PostBuffaloRequestBuffalosInnerClassesTradeSteers + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesTradeSteers` + """ + model = PostBuffaloRequestBuffalosInnerClassesTradeSteers() + if include_optional: + return PostBuffaloRequestBuffalosInnerClassesTradeSteers( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostBuffaloRequestBuffalosInnerClassesTradeSteers( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostBuffaloRequestBuffalosInnerClassesTradeSteers(self): + """Test PostBuffaloRequestBuffalosInnerClassesTradeSteers""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_cows_calving.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_cows_calving.py new file mode 100644 index 00000000..bdc8dbd1 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_cows_calving.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_buffalos_inner_cows_calving import PostBuffaloRequestBuffalosInnerCowsCalving + +class TestPostBuffaloRequestBuffalosInnerCowsCalving(unittest.TestCase): + """PostBuffaloRequestBuffalosInnerCowsCalving unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerCowsCalving: + """Test PostBuffaloRequestBuffalosInnerCowsCalving + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerCowsCalving` + """ + model = PostBuffaloRequestBuffalosInnerCowsCalving() + if include_optional: + return PostBuffaloRequestBuffalosInnerCowsCalving( + spring = 1.337, + summer = 1.337, + autumn = 1.337, + winter = 1.337 + ) + else: + return PostBuffaloRequestBuffalosInnerCowsCalving( + spring = 1.337, + summer = 1.337, + autumn = 1.337, + winter = 1.337, + ) + """ + + def testPostBuffaloRequestBuffalosInnerCowsCalving(self): + """Test PostBuffaloRequestBuffalosInnerCowsCalving""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_seasonal_calving.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_seasonal_calving.py new file mode 100644 index 00000000..73faa93f --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_seasonal_calving.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_buffalos_inner_seasonal_calving import PostBuffaloRequestBuffalosInnerSeasonalCalving + +class TestPostBuffaloRequestBuffalosInnerSeasonalCalving(unittest.TestCase): + """PostBuffaloRequestBuffalosInnerSeasonalCalving unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerSeasonalCalving: + """Test PostBuffaloRequestBuffalosInnerSeasonalCalving + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerSeasonalCalving` + """ + model = PostBuffaloRequestBuffalosInnerSeasonalCalving() + if include_optional: + return PostBuffaloRequestBuffalosInnerSeasonalCalving( + spring = 1.337, + summer = 1.337, + autumn = 1.337, + winter = 1.337 + ) + else: + return PostBuffaloRequestBuffalosInnerSeasonalCalving( + spring = 1.337, + summer = 1.337, + autumn = 1.337, + winter = 1.337, + ) + """ + + def testPostBuffaloRequestBuffalosInnerSeasonalCalving(self): + """Test PostBuffaloRequestBuffalosInnerSeasonalCalving""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_vegetation_inner.py new file mode 100644 index 00000000..f8471675 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_buffalo_request_vegetation_inner.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_buffalo_request_vegetation_inner import PostBuffaloRequestVegetationInner + +class TestPostBuffaloRequestVegetationInner(unittest.TestCase): + """PostBuffaloRequestVegetationInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostBuffaloRequestVegetationInner: + """Test PostBuffaloRequestVegetationInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostBuffaloRequestVegetationInner` + """ + model = PostBuffaloRequestVegetationInner() + if include_optional: + return PostBuffaloRequestVegetationInner( + vegetation = { + 'key' : null + }, + buffalo_proportion = [ + 1.337 + ] + ) + else: + return PostBuffaloRequestVegetationInner( + vegetation = { + 'key' : null + }, + buffalo_proportion = [ + 1.337 + ], + ) + """ + + def testPostBuffaloRequestVegetationInner(self): + """Test PostBuffaloRequestVegetationInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton200_response.py b/examples/python-api-client/api-client/test/test_post_cotton200_response.py new file mode 100644 index 00000000..7a72ec04 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_cotton200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_cotton200_response import PostCotton200Response + +class TestPostCotton200Response(unittest.TestCase): + """PostCotton200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostCotton200Response: + """Test PostCotton200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostCotton200Response` + """ + model = PostCotton200Response() + if include_optional: + return PostCotton200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = [ + { + 'key' : null + } + ] + ) + else: + return PostCotton200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = [ + { + 'key' : null + } + ], + ) + """ + + def testPostCotton200Response(self): + """Test PostCotton200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner.py new file mode 100644 index 00000000..ccf9e57e --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_cotton200_response_intermediate_inner import PostCotton200ResponseIntermediateInner + +class TestPostCotton200ResponseIntermediateInner(unittest.TestCase): + """PostCotton200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostCotton200ResponseIntermediateInner: + """Test PostCotton200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostCotton200ResponseIntermediateInner` + """ + model = PostCotton200ResponseIntermediateInner() + if include_optional: + return PostCotton200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + } + ) + else: + return PostCotton200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + ) + """ + + def testPostCotton200ResponseIntermediateInner(self): + """Test PostCotton200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..e4616a99 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner_intensities.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_cotton200_response_intermediate_inner_intensities import PostCotton200ResponseIntermediateInnerIntensities + +class TestPostCotton200ResponseIntermediateInnerIntensities(unittest.TestCase): + """PostCotton200ResponseIntermediateInnerIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostCotton200ResponseIntermediateInnerIntensities: + """Test PostCotton200ResponseIntermediateInnerIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostCotton200ResponseIntermediateInnerIntensities` + """ + model = PostCotton200ResponseIntermediateInnerIntensities() + if include_optional: + return PostCotton200ResponseIntermediateInnerIntensities( + cotton_yield_produced_tonnes = 1.337, + bales_produced = 1.337, + lint_produced_tonnes = 1.337, + seed_produced_tonnes = 1.337, + tonnes_crop_excluding_sequestration = 1.337, + tonnes_crop_including_sequestration = 1.337, + bales_excluding_sequestration = 1.337, + bales_including_sequestration = 1.337, + lint_including_sequestration = 1.337, + lint_excluding_sequestration = 1.337, + seed_including_sequestration = 1.337, + seed_excluding_sequestration = 1.337, + lint_economic_allocation = 1.337, + seed_economic_allocation = 1.337 + ) + else: + return PostCotton200ResponseIntermediateInnerIntensities( + cotton_yield_produced_tonnes = 1.337, + bales_produced = 1.337, + lint_produced_tonnes = 1.337, + seed_produced_tonnes = 1.337, + tonnes_crop_excluding_sequestration = 1.337, + tonnes_crop_including_sequestration = 1.337, + bales_excluding_sequestration = 1.337, + bales_including_sequestration = 1.337, + lint_including_sequestration = 1.337, + lint_excluding_sequestration = 1.337, + seed_including_sequestration = 1.337, + seed_excluding_sequestration = 1.337, + lint_economic_allocation = 1.337, + seed_economic_allocation = 1.337, + ) + """ + + def testPostCotton200ResponseIntermediateInnerIntensities(self): + """Test PostCotton200ResponseIntermediateInnerIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton200_response_net.py b/examples/python-api-client/api-client/test/test_post_cotton200_response_net.py new file mode 100644 index 00000000..9f013ae5 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_cotton200_response_net.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_cotton200_response_net import PostCotton200ResponseNet + +class TestPostCotton200ResponseNet(unittest.TestCase): + """PostCotton200ResponseNet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostCotton200ResponseNet: + """Test PostCotton200ResponseNet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostCotton200ResponseNet` + """ + model = PostCotton200ResponseNet() + if include_optional: + return PostCotton200ResponseNet( + total = 1.337, + crops = [ + 1.337 + ] + ) + else: + return PostCotton200ResponseNet( + total = 1.337, + crops = [ + 1.337 + ], + ) + """ + + def testPostCotton200ResponseNet(self): + """Test PostCotton200ResponseNet""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_cotton200_response_scope1.py new file mode 100644 index 00000000..579b7213 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_cotton200_response_scope1.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_cotton200_response_scope1 import PostCotton200ResponseScope1 + +class TestPostCotton200ResponseScope1(unittest.TestCase): + """PostCotton200ResponseScope1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostCotton200ResponseScope1: + """Test PostCotton200ResponseScope1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostCotton200ResponseScope1` + """ + model = PostCotton200ResponseScope1() + if include_optional: + return PostCotton200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + urea_co2 = 1.337, + lime_co2 = 1.337, + fertiliser_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + crop_residue_n2_o = 1.337, + field_burning_n2_o = 1.337, + field_burning_ch4 = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337 + ) + else: + return PostCotton200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + urea_co2 = 1.337, + lime_co2 = 1.337, + fertiliser_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + crop_residue_n2_o = 1.337, + field_burning_n2_o = 1.337, + field_burning_ch4 = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337, + ) + """ + + def testPostCotton200ResponseScope1(self): + """Test PostCotton200ResponseScope1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_cotton200_response_scope3.py new file mode 100644 index 00000000..c22cb001 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_cotton200_response_scope3.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 + +class TestPostCotton200ResponseScope3(unittest.TestCase): + """PostCotton200ResponseScope3 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostCotton200ResponseScope3: + """Test PostCotton200ResponseScope3 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostCotton200ResponseScope3` + """ + model = PostCotton200ResponseScope3() + if include_optional: + return PostCotton200ResponseScope3( + fertiliser = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + lime = 1.337, + total = 1.337 + ) + else: + return PostCotton200ResponseScope3( + fertiliser = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + lime = 1.337, + total = 1.337, + ) + """ + + def testPostCotton200ResponseScope3(self): + """Test PostCotton200ResponseScope3""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton_request.py b/examples/python-api-client/api-client/test/test_post_cotton_request.py new file mode 100644 index 00000000..0fb369ee --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_cotton_request.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_cotton_request import PostCottonRequest + +class TestPostCottonRequest(unittest.TestCase): + """PostCottonRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostCottonRequest: + """Test PostCottonRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostCottonRequest` + """ + model = PostCottonRequest() + if include_optional: + return PostCottonRequest( + state = 'nsw', + crops = [ + { + 'key' : null + } + ], + electricity_renewable = 0, + electricity_use = 1.337, + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostCottonRequest( + state = 'nsw', + crops = [ + { + 'key' : null + } + ], + electricity_renewable = 0, + electricity_use = 1.337, + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostCottonRequest(self): + """Test PostCottonRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton_request_crops_inner.py b/examples/python-api-client/api-client/test/test_post_cotton_request_crops_inner.py new file mode 100644 index 00000000..4784d13c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_cotton_request_crops_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_cotton_request_crops_inner import PostCottonRequestCropsInner + +class TestPostCottonRequestCropsInner(unittest.TestCase): + """PostCottonRequestCropsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostCottonRequestCropsInner: + """Test PostCottonRequestCropsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostCottonRequestCropsInner` + """ + model = PostCottonRequestCropsInner() + if include_optional: + return PostCottonRequestCropsInner( + id = '', + state = 'nsw', + average_cotton_yield = 1.337, + area_sown = 1.337, + average_weight_per_bale_kg = 1.337, + cotton_lint_per_bale_kg = 1.337, + cotton_seed_per_bale_kg = 1.337, + waste_per_bale_kg = 1.337, + urea_application = 1.337, + other_fertiliser_type = 'Monoammonium phosphate (MAP)', + other_fertiliser_application = 1.337, + non_urea_nitrogen = 1.337, + urea_ammonium_nitrate = 1.337, + phosphorus_application = 1.337, + potassium_application = 1.337, + sulfur_application = 1.337, + single_super_phosphate = 1.337, + rainfall_above600 = True, + fraction_of_annual_crop_burnt = 1.337, + herbicide_use = 1.337, + glyphosate_other_herbicide_use = 1.337, + electricity_allocation = 1.337, + limestone = 1.337, + limestone_fraction = 1.337, + diesel_use = 1.337, + petrol_use = 1.337, + lpg = 1.337 + ) + else: + return PostCottonRequestCropsInner( + state = 'nsw', + average_cotton_yield = 1.337, + area_sown = 1.337, + average_weight_per_bale_kg = 1.337, + cotton_lint_per_bale_kg = 1.337, + cotton_seed_per_bale_kg = 1.337, + waste_per_bale_kg = 1.337, + urea_application = 1.337, + other_fertiliser_application = 1.337, + non_urea_nitrogen = 1.337, + urea_ammonium_nitrate = 1.337, + phosphorus_application = 1.337, + potassium_application = 1.337, + sulfur_application = 1.337, + single_super_phosphate = 1.337, + rainfall_above600 = True, + fraction_of_annual_crop_burnt = 1.337, + herbicide_use = 1.337, + glyphosate_other_herbicide_use = 1.337, + electricity_allocation = 1.337, + limestone = 1.337, + limestone_fraction = 1.337, + diesel_use = 1.337, + petrol_use = 1.337, + lpg = 1.337, + ) + """ + + def testPostCottonRequestCropsInner(self): + """Test PostCottonRequestCropsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_cotton_request_vegetation_inner.py new file mode 100644 index 00000000..befa6319 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_cotton_request_vegetation_inner.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_cotton_request_vegetation_inner import PostCottonRequestVegetationInner + +class TestPostCottonRequestVegetationInner(unittest.TestCase): + """PostCottonRequestVegetationInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostCottonRequestVegetationInner: + """Test PostCottonRequestVegetationInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostCottonRequestVegetationInner` + """ + model = PostCottonRequestVegetationInner() + if include_optional: + return PostCottonRequestVegetationInner( + vegetation = { + 'key' : null + }, + allocation_to_crops = [ + 1.337 + ] + ) + else: + return PostCottonRequestVegetationInner( + vegetation = { + 'key' : null + }, + allocation_to_crops = [ + 1.337 + ], + ) + """ + + def testPostCottonRequestVegetationInner(self): + """Test PostCottonRequestVegetationInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy200_response.py b/examples/python-api-client/api-client/test/test_post_dairy200_response.py new file mode 100644 index 00000000..71037664 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy200_response import PostDairy200Response + +class TestPostDairy200Response(unittest.TestCase): + """PostDairy200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairy200Response: + """Test PostDairy200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairy200Response` + """ + model = PostDairy200Response() + if include_optional: + return PostDairy200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ] + ) + else: + return PostDairy200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + ) + """ + + def testPostDairy200Response(self): + """Test PostDairy200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_dairy200_response_intensities.py new file mode 100644 index 00000000..4bdc61fb --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy200_response_intensities.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy200_response_intensities import PostDairy200ResponseIntensities + +class TestPostDairy200ResponseIntensities(unittest.TestCase): + """PostDairy200ResponseIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairy200ResponseIntensities: + """Test PostDairy200ResponseIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairy200ResponseIntensities` + """ + model = PostDairy200ResponseIntensities() + if include_optional: + return PostDairy200ResponseIntensities( + milk_solids_produced_tonnes = 1.337, + intensity = 1.337 + ) + else: + return PostDairy200ResponseIntensities( + milk_solids_produced_tonnes = 1.337, + intensity = 1.337, + ) + """ + + def testPostDairy200ResponseIntensities(self): + """Test PostDairy200ResponseIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_dairy200_response_intermediate_inner.py new file mode 100644 index 00000000..9e6e7bf3 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy200_response_intermediate_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy200_response_intermediate_inner import PostDairy200ResponseIntermediateInner + +class TestPostDairy200ResponseIntermediateInner(unittest.TestCase): + """PostDairy200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairy200ResponseIntermediateInner: + """Test PostDairy200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairy200ResponseIntermediateInner` + """ + model = PostDairy200ResponseIntermediateInner() + if include_optional: + return PostDairy200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + } + ) + else: + return PostDairy200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + ) + """ + + def testPostDairy200ResponseIntermediateInner(self): + """Test PostDairy200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy200_response_net.py b/examples/python-api-client/api-client/test/test_post_dairy200_response_net.py new file mode 100644 index 00000000..9f4b5dfb --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy200_response_net.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy200_response_net import PostDairy200ResponseNet + +class TestPostDairy200ResponseNet(unittest.TestCase): + """PostDairy200ResponseNet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairy200ResponseNet: + """Test PostDairy200ResponseNet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairy200ResponseNet` + """ + model = PostDairy200ResponseNet() + if include_optional: + return PostDairy200ResponseNet( + total = 1.337 + ) + else: + return PostDairy200ResponseNet( + total = 1.337, + ) + """ + + def testPostDairy200ResponseNet(self): + """Test PostDairy200ResponseNet""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_dairy200_response_scope1.py new file mode 100644 index 00000000..29a3c411 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy200_response_scope1.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy200_response_scope1 import PostDairy200ResponseScope1 + +class TestPostDairy200ResponseScope1(unittest.TestCase): + """PostDairy200ResponseScope1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairy200ResponseScope1: + """Test PostDairy200ResponseScope1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairy200ResponseScope1` + """ + model = PostDairy200ResponseScope1() + if include_optional: + return PostDairy200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + urea_co2 = 1.337, + lime_co2 = 1.337, + enteric_ch4 = 1.337, + manure_management_ch4 = 1.337, + manure_management_n2_o = 1.337, + animal_waste_n2_o = 1.337, + fertiliser_n2_o = 1.337, + urine_and_dung_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + transport_n2_o = 1.337, + transport_ch4 = 1.337, + transport_co2 = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337 + ) + else: + return PostDairy200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + urea_co2 = 1.337, + lime_co2 = 1.337, + enteric_ch4 = 1.337, + manure_management_ch4 = 1.337, + manure_management_n2_o = 1.337, + animal_waste_n2_o = 1.337, + fertiliser_n2_o = 1.337, + urine_and_dung_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + transport_n2_o = 1.337, + transport_ch4 = 1.337, + transport_co2 = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337, + ) + """ + + def testPostDairy200ResponseScope1(self): + """Test PostDairy200ResponseScope1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_dairy200_response_scope3.py new file mode 100644 index 00000000..3312c804 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy200_response_scope3.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy200_response_scope3 import PostDairy200ResponseScope3 + +class TestPostDairy200ResponseScope3(unittest.TestCase): + """PostDairy200ResponseScope3 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairy200ResponseScope3: + """Test PostDairy200ResponseScope3 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairy200ResponseScope3` + """ + model = PostDairy200ResponseScope3() + if include_optional: + return PostDairy200ResponseScope3( + fertiliser = 1.337, + purchased_feed = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + lime = 1.337, + total = 1.337 + ) + else: + return PostDairy200ResponseScope3( + fertiliser = 1.337, + purchased_feed = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + lime = 1.337, + total = 1.337, + ) + """ + + def testPostDairy200ResponseScope3(self): + """Test PostDairy200ResponseScope3""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request.py b/examples/python-api-client/api-client/test/test_post_dairy_request.py new file mode 100644 index 00000000..525fadc3 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy_request.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy_request import PostDairyRequest + +class TestPostDairyRequest(unittest.TestCase): + """PostDairyRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairyRequest: + """Test PostDairyRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairyRequest` + """ + model = PostDairyRequest() + if include_optional: + return PostDairyRequest( + state = 'nsw', + rainfall_above600 = True, + production_system = 'Non-irrigated Crop', + dairy = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostDairyRequest( + state = 'nsw', + rainfall_above600 = True, + production_system = 'Non-irrigated Crop', + dairy = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostDairyRequest(self): + """Test PostDairyRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner.py new file mode 100644 index 00000000..dd2346d8 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy_request_dairy_inner import PostDairyRequestDairyInner + +class TestPostDairyRequestDairyInner(unittest.TestCase): + """PostDairyRequestDairyInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairyRequestDairyInner: + """Test PostDairyRequestDairyInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairyRequestDairyInner` + """ + model = PostDairyRequestDairyInner() + if include_optional: + return PostDairyRequestDairyInner( + id = '', + classes = { + 'key' : null + }, + limestone = 1.337, + limestone_fraction = 1.337, + fertiliser = { + 'key' : null + }, + seasonal_fertiliser = { + 'key' : null + }, + areas = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + electricity_renewable = 0, + electricity_use = 1.337, + grain_feed = 1.337, + hay_feed = 1.337, + cottonseed_feed = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + manure_management_milking_cows = { + 'key' : null + }, + manure_management_other_dairy_cows = { + 'key' : null + }, + emissions_allocation_to_red_meat_production = 0, + truck_type = '4 Deck Trailer', + distance_cattle_transported = 1.337 + ) + else: + return PostDairyRequestDairyInner( + classes = { + 'key' : null + }, + limestone = 1.337, + limestone_fraction = 1.337, + fertiliser = { + 'key' : null + }, + seasonal_fertiliser = { + 'key' : null + }, + areas = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + electricity_renewable = 0, + electricity_use = 1.337, + grain_feed = 1.337, + hay_feed = 1.337, + cottonseed_feed = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + manure_management_milking_cows = { + 'key' : null + }, + manure_management_other_dairy_cows = { + 'key' : null + }, + emissions_allocation_to_red_meat_production = 0, + truck_type = '4 Deck Trailer', + distance_cattle_transported = 1.337, + ) + """ + + def testPostDairyRequestDairyInner(self): + """Test PostDairyRequestDairyInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_areas.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_areas.py new file mode 100644 index 00000000..71fcbf58 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_areas.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy_request_dairy_inner_areas import PostDairyRequestDairyInnerAreas + +class TestPostDairyRequestDairyInnerAreas(unittest.TestCase): + """PostDairyRequestDairyInnerAreas unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairyRequestDairyInnerAreas: + """Test PostDairyRequestDairyInnerAreas + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairyRequestDairyInnerAreas` + """ + model = PostDairyRequestDairyInnerAreas() + if include_optional: + return PostDairyRequestDairyInnerAreas( + cropped_dryland = 1.337, + cropped_irrigated = 1.337, + improved_pasture_dryland = 1.337, + improved_pasture_irrigated = 1.337 + ) + else: + return PostDairyRequestDairyInnerAreas( + cropped_dryland = 1.337, + cropped_irrigated = 1.337, + improved_pasture_dryland = 1.337, + improved_pasture_irrigated = 1.337, + ) + """ + + def testPostDairyRequestDairyInnerAreas(self): + """Test PostDairyRequestDairyInnerAreas""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes.py new file mode 100644 index 00000000..525a897c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy_request_dairy_inner_classes import PostDairyRequestDairyInnerClasses + +class TestPostDairyRequestDairyInnerClasses(unittest.TestCase): + """PostDairyRequestDairyInnerClasses unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairyRequestDairyInnerClasses: + """Test PostDairyRequestDairyInnerClasses + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairyRequestDairyInnerClasses` + """ + model = PostDairyRequestDairyInnerClasses() + if include_optional: + return PostDairyRequestDairyInnerClasses( + milking_cows = { + 'key' : null + }, + heifers_lt1 = { + 'key' : null + }, + heifers_gt1 = { + 'key' : null + }, + dairy_bulls_lt1 = { + 'key' : null + }, + dairy_bulls_gt1 = { + 'key' : null + } + ) + else: + return PostDairyRequestDairyInnerClasses( + milking_cows = { + 'key' : null + }, + heifers_lt1 = { + 'key' : null + }, + heifers_gt1 = { + 'key' : null + }, + dairy_bulls_lt1 = { + 'key' : null + }, + dairy_bulls_gt1 = { + 'key' : null + }, + ) + """ + + def testPostDairyRequestDairyInnerClasses(self): + """Test PostDairyRequestDairyInnerClasses""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py new file mode 100644 index 00000000..5ee15d1e --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy_request_dairy_inner_classes_dairy_bulls_gt1 import PostDairyRequestDairyInnerClassesDairyBullsGt1 + +class TestPostDairyRequestDairyInnerClassesDairyBullsGt1(unittest.TestCase): + """PostDairyRequestDairyInnerClassesDairyBullsGt1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairyRequestDairyInnerClassesDairyBullsGt1: + """Test PostDairyRequestDairyInnerClassesDairyBullsGt1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairyRequestDairyInnerClassesDairyBullsGt1` + """ + model = PostDairyRequestDairyInnerClassesDairyBullsGt1() + if include_optional: + return PostDairyRequestDairyInnerClassesDairyBullsGt1( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + } + ) + else: + return PostDairyRequestDairyInnerClassesDairyBullsGt1( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + ) + """ + + def testPostDairyRequestDairyInnerClassesDairyBullsGt1(self): + """Test PostDairyRequestDairyInnerClassesDairyBullsGt1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py new file mode 100644 index 00000000..27994d6d --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy_request_dairy_inner_classes_dairy_bulls_lt1 import PostDairyRequestDairyInnerClassesDairyBullsLt1 + +class TestPostDairyRequestDairyInnerClassesDairyBullsLt1(unittest.TestCase): + """PostDairyRequestDairyInnerClassesDairyBullsLt1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairyRequestDairyInnerClassesDairyBullsLt1: + """Test PostDairyRequestDairyInnerClassesDairyBullsLt1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairyRequestDairyInnerClassesDairyBullsLt1` + """ + model = PostDairyRequestDairyInnerClassesDairyBullsLt1() + if include_optional: + return PostDairyRequestDairyInnerClassesDairyBullsLt1( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + } + ) + else: + return PostDairyRequestDairyInnerClassesDairyBullsLt1( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + ) + """ + + def testPostDairyRequestDairyInnerClassesDairyBullsLt1(self): + """Test PostDairyRequestDairyInnerClassesDairyBullsLt1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_gt1.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_gt1.py new file mode 100644 index 00000000..3a70b394 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_gt1.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy_request_dairy_inner_classes_heifers_gt1 import PostDairyRequestDairyInnerClassesHeifersGt1 + +class TestPostDairyRequestDairyInnerClassesHeifersGt1(unittest.TestCase): + """PostDairyRequestDairyInnerClassesHeifersGt1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairyRequestDairyInnerClassesHeifersGt1: + """Test PostDairyRequestDairyInnerClassesHeifersGt1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairyRequestDairyInnerClassesHeifersGt1` + """ + model = PostDairyRequestDairyInnerClassesHeifersGt1() + if include_optional: + return PostDairyRequestDairyInnerClassesHeifersGt1( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + } + ) + else: + return PostDairyRequestDairyInnerClassesHeifersGt1( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + ) + """ + + def testPostDairyRequestDairyInnerClassesHeifersGt1(self): + """Test PostDairyRequestDairyInnerClassesHeifersGt1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_lt1.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_lt1.py new file mode 100644 index 00000000..345814d8 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_lt1.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy_request_dairy_inner_classes_heifers_lt1 import PostDairyRequestDairyInnerClassesHeifersLt1 + +class TestPostDairyRequestDairyInnerClassesHeifersLt1(unittest.TestCase): + """PostDairyRequestDairyInnerClassesHeifersLt1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairyRequestDairyInnerClassesHeifersLt1: + """Test PostDairyRequestDairyInnerClassesHeifersLt1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairyRequestDairyInnerClassesHeifersLt1` + """ + model = PostDairyRequestDairyInnerClassesHeifersLt1() + if include_optional: + return PostDairyRequestDairyInnerClassesHeifersLt1( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + } + ) + else: + return PostDairyRequestDairyInnerClassesHeifersLt1( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + ) + """ + + def testPostDairyRequestDairyInnerClassesHeifersLt1(self): + """Test PostDairyRequestDairyInnerClassesHeifersLt1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows.py new file mode 100644 index 00000000..11718a5d --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows import PostDairyRequestDairyInnerClassesMilkingCows + +class TestPostDairyRequestDairyInnerClassesMilkingCows(unittest.TestCase): + """PostDairyRequestDairyInnerClassesMilkingCows unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairyRequestDairyInnerClassesMilkingCows: + """Test PostDairyRequestDairyInnerClassesMilkingCows + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairyRequestDairyInnerClassesMilkingCows` + """ + model = PostDairyRequestDairyInnerClassesMilkingCows() + if include_optional: + return PostDairyRequestDairyInnerClassesMilkingCows( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + } + ) + else: + return PostDairyRequestDairyInnerClassesMilkingCows( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + ) + """ + + def testPostDairyRequestDairyInnerClassesMilkingCows(self): + """Test PostDairyRequestDairyInnerClassesMilkingCows""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows_autumn.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows_autumn.py new file mode 100644 index 00000000..31134649 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows_autumn.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows_autumn import PostDairyRequestDairyInnerClassesMilkingCowsAutumn + +class TestPostDairyRequestDairyInnerClassesMilkingCowsAutumn(unittest.TestCase): + """PostDairyRequestDairyInnerClassesMilkingCowsAutumn unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairyRequestDairyInnerClassesMilkingCowsAutumn: + """Test PostDairyRequestDairyInnerClassesMilkingCowsAutumn + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairyRequestDairyInnerClassesMilkingCowsAutumn` + """ + model = PostDairyRequestDairyInnerClassesMilkingCowsAutumn() + if include_optional: + return PostDairyRequestDairyInnerClassesMilkingCowsAutumn( + head = 1.337, + liveweight = 1.337, + liveweight_gain = 1.337, + crude_protein = 1.337, + dry_matter_digestibility = 1.337, + milk_production = 1.337 + ) + else: + return PostDairyRequestDairyInnerClassesMilkingCowsAutumn( + head = 1.337, + liveweight = 1.337, + liveweight_gain = 1.337, + ) + """ + + def testPostDairyRequestDairyInnerClassesMilkingCowsAutumn(self): + """Test PostDairyRequestDairyInnerClassesMilkingCowsAutumn""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_manure_management_milking_cows.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_manure_management_milking_cows.py new file mode 100644 index 00000000..a8495b90 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_manure_management_milking_cows.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy_request_dairy_inner_manure_management_milking_cows import PostDairyRequestDairyInnerManureManagementMilkingCows + +class TestPostDairyRequestDairyInnerManureManagementMilkingCows(unittest.TestCase): + """PostDairyRequestDairyInnerManureManagementMilkingCows unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairyRequestDairyInnerManureManagementMilkingCows: + """Test PostDairyRequestDairyInnerManureManagementMilkingCows + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairyRequestDairyInnerManureManagementMilkingCows` + """ + model = PostDairyRequestDairyInnerManureManagementMilkingCows() + if include_optional: + return PostDairyRequestDairyInnerManureManagementMilkingCows( + pasture = 0, + anaerobic_lagoon = 0, + sump_and_dispersal = 0, + drain_to_paddocks = 0, + soild_storage = 0 + ) + else: + return PostDairyRequestDairyInnerManureManagementMilkingCows( + pasture = 0, + anaerobic_lagoon = 0, + sump_and_dispersal = 0, + drain_to_paddocks = 0, + soild_storage = 0, + ) + """ + + def testPostDairyRequestDairyInnerManureManagementMilkingCows(self): + """Test PostDairyRequestDairyInnerManureManagementMilkingCows""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser.py new file mode 100644 index 00000000..b71914a4 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy_request_dairy_inner_seasonal_fertiliser import PostDairyRequestDairyInnerSeasonalFertiliser + +class TestPostDairyRequestDairyInnerSeasonalFertiliser(unittest.TestCase): + """PostDairyRequestDairyInnerSeasonalFertiliser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairyRequestDairyInnerSeasonalFertiliser: + """Test PostDairyRequestDairyInnerSeasonalFertiliser + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairyRequestDairyInnerSeasonalFertiliser` + """ + model = PostDairyRequestDairyInnerSeasonalFertiliser() + if include_optional: + return PostDairyRequestDairyInnerSeasonalFertiliser( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + } + ) + else: + return PostDairyRequestDairyInnerSeasonalFertiliser( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + ) + """ + + def testPostDairyRequestDairyInnerSeasonalFertiliser(self): + """Test PostDairyRequestDairyInnerSeasonalFertiliser""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py new file mode 100644 index 00000000..1e0fbb19 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy_request_dairy_inner_seasonal_fertiliser_autumn import PostDairyRequestDairyInnerSeasonalFertiliserAutumn + +class TestPostDairyRequestDairyInnerSeasonalFertiliserAutumn(unittest.TestCase): + """PostDairyRequestDairyInnerSeasonalFertiliserAutumn unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairyRequestDairyInnerSeasonalFertiliserAutumn: + """Test PostDairyRequestDairyInnerSeasonalFertiliserAutumn + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairyRequestDairyInnerSeasonalFertiliserAutumn` + """ + model = PostDairyRequestDairyInnerSeasonalFertiliserAutumn() + if include_optional: + return PostDairyRequestDairyInnerSeasonalFertiliserAutumn( + crops_irrigated = 1.337, + crops_dryland = 1.337, + pasture_irrigated = 1.337, + pasture_dryland = 1.337 + ) + else: + return PostDairyRequestDairyInnerSeasonalFertiliserAutumn( + crops_irrigated = 1.337, + crops_dryland = 1.337, + pasture_irrigated = 1.337, + pasture_dryland = 1.337, + ) + """ + + def testPostDairyRequestDairyInnerSeasonalFertiliserAutumn(self): + """Test PostDairyRequestDairyInnerSeasonalFertiliserAutumn""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_dairy_request_vegetation_inner.py new file mode 100644 index 00000000..6d957ca1 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_dairy_request_vegetation_inner.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_dairy_request_vegetation_inner import PostDairyRequestVegetationInner + +class TestPostDairyRequestVegetationInner(unittest.TestCase): + """PostDairyRequestVegetationInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDairyRequestVegetationInner: + """Test PostDairyRequestVegetationInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDairyRequestVegetationInner` + """ + model = PostDairyRequestVegetationInner() + if include_optional: + return PostDairyRequestVegetationInner( + vegetation = { + 'key' : null + }, + dairy_proportion = [ + 1.337 + ] + ) + else: + return PostDairyRequestVegetationInner( + vegetation = { + 'key' : null + }, + dairy_proportion = [ + 1.337 + ], + ) + """ + + def testPostDairyRequestVegetationInner(self): + """Test PostDairyRequestVegetationInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer200_response.py b/examples/python-api-client/api-client/test/test_post_deer200_response.py new file mode 100644 index 00000000..2e0d0aa0 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer200_response import PostDeer200Response + +class TestPostDeer200Response(unittest.TestCase): + """PostDeer200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeer200Response: + """Test PostDeer200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeer200Response` + """ + model = PostDeer200Response() + if include_optional: + return PostDeer200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ] + ) + else: + return PostDeer200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + ) + """ + + def testPostDeer200Response(self): + """Test PostDeer200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_deer200_response_intensities.py new file mode 100644 index 00000000..cf641d12 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer200_response_intensities.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer200_response_intensities import PostDeer200ResponseIntensities + +class TestPostDeer200ResponseIntensities(unittest.TestCase): + """PostDeer200ResponseIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeer200ResponseIntensities: + """Test PostDeer200ResponseIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeer200ResponseIntensities` + """ + model = PostDeer200ResponseIntensities() + if include_optional: + return PostDeer200ResponseIntensities( + liveweight_produced_kg = 1.337, + deer_meat_excluding_sequestration = 1.337, + deer_meat_including_sequestration = 1.337 + ) + else: + return PostDeer200ResponseIntensities( + liveweight_produced_kg = 1.337, + deer_meat_excluding_sequestration = 1.337, + deer_meat_including_sequestration = 1.337, + ) + """ + + def testPostDeer200ResponseIntensities(self): + """Test PostDeer200ResponseIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_deer200_response_intermediate_inner.py new file mode 100644 index 00000000..7abc9351 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer200_response_intermediate_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer200_response_intermediate_inner import PostDeer200ResponseIntermediateInner + +class TestPostDeer200ResponseIntermediateInner(unittest.TestCase): + """PostDeer200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeer200ResponseIntermediateInner: + """Test PostDeer200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeer200ResponseIntermediateInner` + """ + model = PostDeer200ResponseIntermediateInner() + if include_optional: + return PostDeer200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + } + ) + else: + return PostDeer200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + ) + """ + + def testPostDeer200ResponseIntermediateInner(self): + """Test PostDeer200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer200_response_net.py b/examples/python-api-client/api-client/test/test_post_deer200_response_net.py new file mode 100644 index 00000000..e8d0a744 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer200_response_net.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer200_response_net import PostDeer200ResponseNet + +class TestPostDeer200ResponseNet(unittest.TestCase): + """PostDeer200ResponseNet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeer200ResponseNet: + """Test PostDeer200ResponseNet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeer200ResponseNet` + """ + model = PostDeer200ResponseNet() + if include_optional: + return PostDeer200ResponseNet( + total = 1.337 + ) + else: + return PostDeer200ResponseNet( + total = 1.337, + ) + """ + + def testPostDeer200ResponseNet(self): + """Test PostDeer200ResponseNet""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request.py b/examples/python-api-client/api-client/test/test_post_deer_request.py new file mode 100644 index 00000000..e8571d13 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer_request.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer_request import PostDeerRequest + +class TestPostDeerRequest(unittest.TestCase): + """PostDeerRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeerRequest: + """Test PostDeerRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeerRequest` + """ + model = PostDeerRequest() + if include_optional: + return PostDeerRequest( + state = 'nsw', + rainfall_above600 = True, + deers = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostDeerRequest( + state = 'nsw', + rainfall_above600 = True, + deers = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostDeerRequest(self): + """Test PostDeerRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner.py new file mode 100644 index 00000000..6833b01a --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer_request_deers_inner import PostDeerRequestDeersInner + +class TestPostDeerRequestDeersInner(unittest.TestCase): + """PostDeerRequestDeersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeerRequestDeersInner: + """Test PostDeerRequestDeersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeerRequestDeersInner` + """ + model = PostDeerRequestDeersInner() + if include_optional: + return PostDeerRequestDeersInner( + id = '', + classes = { + 'key' : null + }, + limestone = 1.337, + limestone_fraction = 1.337, + fertiliser = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + grain_feed = 1.337, + hay_feed = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + does_fawning = { + 'key' : null + }, + seasonal_fawning = { + 'key' : null + } + ) + else: + return PostDeerRequestDeersInner( + classes = { + 'key' : null + }, + limestone = 1.337, + limestone_fraction = 1.337, + fertiliser = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + grain_feed = 1.337, + hay_feed = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + does_fawning = { + 'key' : null + }, + seasonal_fawning = { + 'key' : null + }, + ) + """ + + def testPostDeerRequestDeersInner(self): + """Test PostDeerRequestDeersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes.py new file mode 100644 index 00000000..6cdf3798 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer_request_deers_inner_classes import PostDeerRequestDeersInnerClasses + +class TestPostDeerRequestDeersInnerClasses(unittest.TestCase): + """PostDeerRequestDeersInnerClasses unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClasses: + """Test PostDeerRequestDeersInnerClasses + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeerRequestDeersInnerClasses` + """ + model = PostDeerRequestDeersInnerClasses() + if include_optional: + return PostDeerRequestDeersInnerClasses( + bucks = { + 'key' : null + }, + trade_bucks = { + 'key' : null + }, + breeding_does = { + 'key' : null + }, + trade_does = { + 'key' : null + }, + other_does = { + 'key' : null + }, + trade_other_does = { + 'key' : null + }, + fawn = { + 'key' : null + }, + trade_fawn = { + 'key' : null + } + ) + else: + return PostDeerRequestDeersInnerClasses( + ) + """ + + def testPostDeerRequestDeersInnerClasses(self): + """Test PostDeerRequestDeersInnerClasses""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_breeding_does.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_breeding_does.py new file mode 100644 index 00000000..a23a8a66 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_breeding_does.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer_request_deers_inner_classes_breeding_does import PostDeerRequestDeersInnerClassesBreedingDoes + +class TestPostDeerRequestDeersInnerClassesBreedingDoes(unittest.TestCase): + """PostDeerRequestDeersInnerClassesBreedingDoes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesBreedingDoes: + """Test PostDeerRequestDeersInnerClassesBreedingDoes + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesBreedingDoes` + """ + model = PostDeerRequestDeersInnerClassesBreedingDoes() + if include_optional: + return PostDeerRequestDeersInnerClassesBreedingDoes( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostDeerRequestDeersInnerClassesBreedingDoes( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostDeerRequestDeersInnerClassesBreedingDoes(self): + """Test PostDeerRequestDeersInnerClassesBreedingDoes""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_bucks.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_bucks.py new file mode 100644 index 00000000..17278d54 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_bucks.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer_request_deers_inner_classes_bucks import PostDeerRequestDeersInnerClassesBucks + +class TestPostDeerRequestDeersInnerClassesBucks(unittest.TestCase): + """PostDeerRequestDeersInnerClassesBucks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesBucks: + """Test PostDeerRequestDeersInnerClassesBucks + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesBucks` + """ + model = PostDeerRequestDeersInnerClassesBucks() + if include_optional: + return PostDeerRequestDeersInnerClassesBucks( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostDeerRequestDeersInnerClassesBucks( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostDeerRequestDeersInnerClassesBucks(self): + """Test PostDeerRequestDeersInnerClassesBucks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_fawn.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_fawn.py new file mode 100644 index 00000000..8895b114 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_fawn.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer_request_deers_inner_classes_fawn import PostDeerRequestDeersInnerClassesFawn + +class TestPostDeerRequestDeersInnerClassesFawn(unittest.TestCase): + """PostDeerRequestDeersInnerClassesFawn unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesFawn: + """Test PostDeerRequestDeersInnerClassesFawn + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesFawn` + """ + model = PostDeerRequestDeersInnerClassesFawn() + if include_optional: + return PostDeerRequestDeersInnerClassesFawn( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostDeerRequestDeersInnerClassesFawn( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostDeerRequestDeersInnerClassesFawn(self): + """Test PostDeerRequestDeersInnerClassesFawn""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_other_does.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_other_does.py new file mode 100644 index 00000000..282434e4 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_other_does.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer_request_deers_inner_classes_other_does import PostDeerRequestDeersInnerClassesOtherDoes + +class TestPostDeerRequestDeersInnerClassesOtherDoes(unittest.TestCase): + """PostDeerRequestDeersInnerClassesOtherDoes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesOtherDoes: + """Test PostDeerRequestDeersInnerClassesOtherDoes + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesOtherDoes` + """ + model = PostDeerRequestDeersInnerClassesOtherDoes() + if include_optional: + return PostDeerRequestDeersInnerClassesOtherDoes( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostDeerRequestDeersInnerClassesOtherDoes( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostDeerRequestDeersInnerClassesOtherDoes(self): + """Test PostDeerRequestDeersInnerClassesOtherDoes""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_bucks.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_bucks.py new file mode 100644 index 00000000..47e1c625 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_bucks.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer_request_deers_inner_classes_trade_bucks import PostDeerRequestDeersInnerClassesTradeBucks + +class TestPostDeerRequestDeersInnerClassesTradeBucks(unittest.TestCase): + """PostDeerRequestDeersInnerClassesTradeBucks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesTradeBucks: + """Test PostDeerRequestDeersInnerClassesTradeBucks + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesTradeBucks` + """ + model = PostDeerRequestDeersInnerClassesTradeBucks() + if include_optional: + return PostDeerRequestDeersInnerClassesTradeBucks( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostDeerRequestDeersInnerClassesTradeBucks( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostDeerRequestDeersInnerClassesTradeBucks(self): + """Test PostDeerRequestDeersInnerClassesTradeBucks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_does.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_does.py new file mode 100644 index 00000000..23fa187e --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_does.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer_request_deers_inner_classes_trade_does import PostDeerRequestDeersInnerClassesTradeDoes + +class TestPostDeerRequestDeersInnerClassesTradeDoes(unittest.TestCase): + """PostDeerRequestDeersInnerClassesTradeDoes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesTradeDoes: + """Test PostDeerRequestDeersInnerClassesTradeDoes + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesTradeDoes` + """ + model = PostDeerRequestDeersInnerClassesTradeDoes() + if include_optional: + return PostDeerRequestDeersInnerClassesTradeDoes( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostDeerRequestDeersInnerClassesTradeDoes( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostDeerRequestDeersInnerClassesTradeDoes(self): + """Test PostDeerRequestDeersInnerClassesTradeDoes""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_fawn.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_fawn.py new file mode 100644 index 00000000..8e4a00e2 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_fawn.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer_request_deers_inner_classes_trade_fawn import PostDeerRequestDeersInnerClassesTradeFawn + +class TestPostDeerRequestDeersInnerClassesTradeFawn(unittest.TestCase): + """PostDeerRequestDeersInnerClassesTradeFawn unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesTradeFawn: + """Test PostDeerRequestDeersInnerClassesTradeFawn + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesTradeFawn` + """ + model = PostDeerRequestDeersInnerClassesTradeFawn() + if include_optional: + return PostDeerRequestDeersInnerClassesTradeFawn( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostDeerRequestDeersInnerClassesTradeFawn( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostDeerRequestDeersInnerClassesTradeFawn(self): + """Test PostDeerRequestDeersInnerClassesTradeFawn""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_other_does.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_other_does.py new file mode 100644 index 00000000..e827eb8f --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_other_does.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer_request_deers_inner_classes_trade_other_does import PostDeerRequestDeersInnerClassesTradeOtherDoes + +class TestPostDeerRequestDeersInnerClassesTradeOtherDoes(unittest.TestCase): + """PostDeerRequestDeersInnerClassesTradeOtherDoes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesTradeOtherDoes: + """Test PostDeerRequestDeersInnerClassesTradeOtherDoes + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesTradeOtherDoes` + """ + model = PostDeerRequestDeersInnerClassesTradeOtherDoes() + if include_optional: + return PostDeerRequestDeersInnerClassesTradeOtherDoes( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostDeerRequestDeersInnerClassesTradeOtherDoes( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostDeerRequestDeersInnerClassesTradeOtherDoes(self): + """Test PostDeerRequestDeersInnerClassesTradeOtherDoes""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_does_fawning.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_does_fawning.py new file mode 100644 index 00000000..fc30d97c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_does_fawning.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer_request_deers_inner_does_fawning import PostDeerRequestDeersInnerDoesFawning + +class TestPostDeerRequestDeersInnerDoesFawning(unittest.TestCase): + """PostDeerRequestDeersInnerDoesFawning unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeerRequestDeersInnerDoesFawning: + """Test PostDeerRequestDeersInnerDoesFawning + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeerRequestDeersInnerDoesFawning` + """ + model = PostDeerRequestDeersInnerDoesFawning() + if include_optional: + return PostDeerRequestDeersInnerDoesFawning( + spring = 1.337, + summer = 1.337, + autumn = 1.337, + winter = 1.337 + ) + else: + return PostDeerRequestDeersInnerDoesFawning( + spring = 1.337, + summer = 1.337, + autumn = 1.337, + winter = 1.337, + ) + """ + + def testPostDeerRequestDeersInnerDoesFawning(self): + """Test PostDeerRequestDeersInnerDoesFawning""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_seasonal_fawning.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_seasonal_fawning.py new file mode 100644 index 00000000..7f4ead75 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_seasonal_fawning.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer_request_deers_inner_seasonal_fawning import PostDeerRequestDeersInnerSeasonalFawning + +class TestPostDeerRequestDeersInnerSeasonalFawning(unittest.TestCase): + """PostDeerRequestDeersInnerSeasonalFawning unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeerRequestDeersInnerSeasonalFawning: + """Test PostDeerRequestDeersInnerSeasonalFawning + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeerRequestDeersInnerSeasonalFawning` + """ + model = PostDeerRequestDeersInnerSeasonalFawning() + if include_optional: + return PostDeerRequestDeersInnerSeasonalFawning( + spring = 1.337, + summer = 1.337, + autumn = 1.337, + winter = 1.337 + ) + else: + return PostDeerRequestDeersInnerSeasonalFawning( + spring = 1.337, + summer = 1.337, + autumn = 1.337, + winter = 1.337, + ) + """ + + def testPostDeerRequestDeersInnerSeasonalFawning(self): + """Test PostDeerRequestDeersInnerSeasonalFawning""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_deer_request_vegetation_inner.py new file mode 100644 index 00000000..b9dcc51f --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_deer_request_vegetation_inner.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_deer_request_vegetation_inner import PostDeerRequestVegetationInner + +class TestPostDeerRequestVegetationInner(unittest.TestCase): + """PostDeerRequestVegetationInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostDeerRequestVegetationInner: + """Test PostDeerRequestVegetationInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostDeerRequestVegetationInner` + """ + model = PostDeerRequestVegetationInner() + if include_optional: + return PostDeerRequestVegetationInner( + vegetation = { + 'key' : null + }, + deer_proportion = [ + 1.337 + ] + ) + else: + return PostDeerRequestVegetationInner( + vegetation = { + 'key' : null + }, + deer_proportion = [ + 1.337 + ], + ) + """ + + def testPostDeerRequestVegetationInner(self): + """Test PostDeerRequestVegetationInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot200_response.py b/examples/python-api-client/api-client/test/test_post_feedlot200_response.py new file mode 100644 index 00000000..6f6fc466 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot200_response import PostFeedlot200Response + +class TestPostFeedlot200Response(unittest.TestCase): + """PostFeedlot200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlot200Response: + """Test PostFeedlot200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlot200Response` + """ + model = PostFeedlot200Response() + if include_optional: + return PostFeedlot200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = { + 'key' : null + } + ) + else: + return PostFeedlot200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + ) + """ + + def testPostFeedlot200Response(self): + """Test PostFeedlot200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner.py new file mode 100644 index 00000000..1a28f739 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot200_response_intermediate_inner import PostFeedlot200ResponseIntermediateInner + +class TestPostFeedlot200ResponseIntermediateInner(unittest.TestCase): + """PostFeedlot200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlot200ResponseIntermediateInner: + """Test PostFeedlot200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlot200ResponseIntermediateInner` + """ + model = PostFeedlot200ResponseIntermediateInner() + if include_optional: + return PostFeedlot200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + } + ) + else: + return PostFeedlot200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + ) + """ + + def testPostFeedlot200ResponseIntermediateInner(self): + """Test PostFeedlot200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..3261312b --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_intensities.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot200_response_intermediate_inner_intensities import PostFeedlot200ResponseIntermediateInnerIntensities + +class TestPostFeedlot200ResponseIntermediateInnerIntensities(unittest.TestCase): + """PostFeedlot200ResponseIntermediateInnerIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlot200ResponseIntermediateInnerIntensities: + """Test PostFeedlot200ResponseIntermediateInnerIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlot200ResponseIntermediateInnerIntensities` + """ + model = PostFeedlot200ResponseIntermediateInnerIntensities() + if include_optional: + return PostFeedlot200ResponseIntermediateInnerIntensities( + liveweight_produced_kg = 1.337, + beef_including_sequestration = 1.337, + beef_excluding_sequestration = 1.337 + ) + else: + return PostFeedlot200ResponseIntermediateInnerIntensities( + liveweight_produced_kg = 1.337, + beef_including_sequestration = 1.337, + beef_excluding_sequestration = 1.337, + ) + """ + + def testPostFeedlot200ResponseIntermediateInnerIntensities(self): + """Test PostFeedlot200ResponseIntermediateInnerIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_net.py b/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_net.py new file mode 100644 index 00000000..21915220 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_net.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot200_response_intermediate_inner_net import PostFeedlot200ResponseIntermediateInnerNet + +class TestPostFeedlot200ResponseIntermediateInnerNet(unittest.TestCase): + """PostFeedlot200ResponseIntermediateInnerNet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlot200ResponseIntermediateInnerNet: + """Test PostFeedlot200ResponseIntermediateInnerNet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlot200ResponseIntermediateInnerNet` + """ + model = PostFeedlot200ResponseIntermediateInnerNet() + if include_optional: + return PostFeedlot200ResponseIntermediateInnerNet( + total = 1.337 + ) + else: + return PostFeedlot200ResponseIntermediateInnerNet( + total = 1.337, + ) + """ + + def testPostFeedlot200ResponseIntermediateInnerNet(self): + """Test PostFeedlot200ResponseIntermediateInnerNet""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_feedlot200_response_scope1.py new file mode 100644 index 00000000..f9f26ada --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot200_response_scope1.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot200_response_scope1 import PostFeedlot200ResponseScope1 + +class TestPostFeedlot200ResponseScope1(unittest.TestCase): + """PostFeedlot200ResponseScope1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlot200ResponseScope1: + """Test PostFeedlot200ResponseScope1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlot200ResponseScope1` + """ + model = PostFeedlot200ResponseScope1() + if include_optional: + return PostFeedlot200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + transport_co2 = 1.337, + transport_ch4 = 1.337, + transport_n2_o = 1.337, + urea_co2 = 1.337, + lime_co2 = 1.337, + atmospheric_deposition_n2_o = 1.337, + manure_direct_n2_o = 1.337, + manure_indirect_n2_o = 1.337, + manure_management_ch4 = 1.337, + manure_applied_to_soil_n2_o = 1.337, + enteric_ch4 = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337 + ) + else: + return PostFeedlot200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + transport_co2 = 1.337, + transport_ch4 = 1.337, + transport_n2_o = 1.337, + urea_co2 = 1.337, + lime_co2 = 1.337, + atmospheric_deposition_n2_o = 1.337, + manure_direct_n2_o = 1.337, + manure_indirect_n2_o = 1.337, + manure_management_ch4 = 1.337, + manure_applied_to_soil_n2_o = 1.337, + enteric_ch4 = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337, + ) + """ + + def testPostFeedlot200ResponseScope1(self): + """Test PostFeedlot200ResponseScope1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_feedlot200_response_scope3.py new file mode 100644 index 00000000..54c52112 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot200_response_scope3.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot200_response_scope3 import PostFeedlot200ResponseScope3 + +class TestPostFeedlot200ResponseScope3(unittest.TestCase): + """PostFeedlot200ResponseScope3 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlot200ResponseScope3: + """Test PostFeedlot200ResponseScope3 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlot200ResponseScope3` + """ + model = PostFeedlot200ResponseScope3() + if include_optional: + return PostFeedlot200ResponseScope3( + fertiliser = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + lime = 1.337, + feed = 1.337, + purchase_livestock = 1.337, + total = 1.337 + ) + else: + return PostFeedlot200ResponseScope3( + fertiliser = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + lime = 1.337, + feed = 1.337, + purchase_livestock = 1.337, + total = 1.337, + ) + """ + + def testPostFeedlot200ResponseScope3(self): + """Test PostFeedlot200ResponseScope3""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request.py b/examples/python-api-client/api-client/test/test_post_feedlot_request.py new file mode 100644 index 00000000..e3b4a061 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot_request.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot_request import PostFeedlotRequest + +class TestPostFeedlotRequest(unittest.TestCase): + """PostFeedlotRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlotRequest: + """Test PostFeedlotRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlotRequest` + """ + model = PostFeedlotRequest() + if include_optional: + return PostFeedlotRequest( + state = 'nsw', + feedlots = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostFeedlotRequest( + state = 'nsw', + feedlots = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostFeedlotRequest(self): + """Test PostFeedlotRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner.py new file mode 100644 index 00000000..6e6c1e25 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot_request_feedlots_inner import PostFeedlotRequestFeedlotsInner + +class TestPostFeedlotRequestFeedlotsInner(unittest.TestCase): + """PostFeedlotRequestFeedlotsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlotRequestFeedlotsInner: + """Test PostFeedlotRequestFeedlotsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlotRequestFeedlotsInner` + """ + model = PostFeedlotRequestFeedlotsInner() + if include_optional: + return PostFeedlotRequestFeedlotsInner( + id = '', + system = 'Drylot', + groups = [ + { + 'key' : null + } + ], + fertiliser = { + 'key' : null + }, + purchases = { + 'key' : null + }, + sales = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + grain_feed = 1.337, + hay_feed = 1.337, + cottonseed_feed = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + distance_cattle_transported = 1.337, + truck_type = '4 Deck Trailer', + limestone = 1.337, + limestone_fraction = 1.337 + ) + else: + return PostFeedlotRequestFeedlotsInner( + system = 'Drylot', + groups = [ + { + 'key' : null + } + ], + fertiliser = { + 'key' : null + }, + purchases = { + 'key' : null + }, + sales = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + grain_feed = 1.337, + hay_feed = 1.337, + cottonseed_feed = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + distance_cattle_transported = 1.337, + truck_type = '4 Deck Trailer', + limestone = 1.337, + limestone_fraction = 1.337, + ) + """ + + def testPostFeedlotRequestFeedlotsInner(self): + """Test PostFeedlotRequestFeedlotsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner.py new file mode 100644 index 00000000..80946c02 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot_request_feedlots_inner_groups_inner import PostFeedlotRequestFeedlotsInnerGroupsInner + +class TestPostFeedlotRequestFeedlotsInnerGroupsInner(unittest.TestCase): + """PostFeedlotRequestFeedlotsInnerGroupsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlotRequestFeedlotsInnerGroupsInner: + """Test PostFeedlotRequestFeedlotsInnerGroupsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlotRequestFeedlotsInnerGroupsInner` + """ + model = PostFeedlotRequestFeedlotsInnerGroupsInner() + if include_optional: + return PostFeedlotRequestFeedlotsInnerGroupsInner( + stays = [ + { + 'key' : null + } + ] + ) + else: + return PostFeedlotRequestFeedlotsInnerGroupsInner( + stays = [ + { + 'key' : null + } + ], + ) + """ + + def testPostFeedlotRequestFeedlotsInnerGroupsInner(self): + """Test PostFeedlotRequestFeedlotsInnerGroupsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py new file mode 100644 index 00000000..d63251fd --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot_request_feedlots_inner_groups_inner_stays_inner import PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner + +class TestPostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner(unittest.TestCase): + """PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner: + """Test PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner` + """ + model = PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner() + if include_optional: + return PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner( + livestock = 1.337, + stay_average_duration = 1.337, + liveweight = 1.337, + dry_matter_digestibility = 1.337, + crude_protein = 1.337, + nitrogen_retention = 1.337, + daily_intake = 1.337, + ndf = 1.337, + ether_extract = 1.337 + ) + else: + return PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner( + livestock = 1.337, + stay_average_duration = 1.337, + liveweight = 1.337, + dry_matter_digestibility = 1.337, + crude_protein = 1.337, + nitrogen_retention = 1.337, + daily_intake = 1.337, + ndf = 1.337, + ether_extract = 1.337, + ) + """ + + def testPostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner(self): + """Test PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases.py new file mode 100644 index 00000000..b47d60b9 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot_request_feedlots_inner_purchases import PostFeedlotRequestFeedlotsInnerPurchases + +class TestPostFeedlotRequestFeedlotsInnerPurchases(unittest.TestCase): + """PostFeedlotRequestFeedlotsInnerPurchases unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlotRequestFeedlotsInnerPurchases: + """Test PostFeedlotRequestFeedlotsInnerPurchases + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlotRequestFeedlotsInnerPurchases` + """ + model = PostFeedlotRequestFeedlotsInnerPurchases() + if include_optional: + return PostFeedlotRequestFeedlotsInnerPurchases( + bulls_gt1 = [ + { + 'key' : null + } + ], + bulls_gt1_traded = [ + { + 'key' : null + } + ], + steers_lt1 = [ + { + 'key' : null + } + ], + steers_lt1_traded = [ + { + 'key' : null + } + ], + steers1_to2 = [ + { + 'key' : null + } + ], + steers1_to2_traded = [ + { + 'key' : null + } + ], + steers_gt2 = [ + { + 'key' : null + } + ], + steers_gt2_traded = [ + { + 'key' : null + } + ], + cows_gt2 = [ + { + 'key' : null + } + ], + cows_gt2_traded = [ + { + 'key' : null + } + ], + heifers_lt1 = [ + { + 'key' : null + } + ], + heifers_lt1_traded = [ + { + 'key' : null + } + ], + heifers1_to2 = [ + { + 'key' : null + } + ], + heifers1_to2_traded = [ + { + 'key' : null + } + ], + heifers_gt2 = [ + { + 'key' : null + } + ], + heifers_gt2_traded = [ + { + 'key' : null + } + ] + ) + else: + return PostFeedlotRequestFeedlotsInnerPurchases( + ) + """ + + def testPostFeedlotRequestFeedlotsInnerPurchases(self): + """Test PostFeedlotRequestFeedlotsInnerPurchases""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py new file mode 100644 index 00000000..94f99e13 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner + +class TestPostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner(unittest.TestCase): + """PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner: + """Test PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner` + """ + model = PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner() + if include_optional: + return PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner( + head = 1.337, + purchase_weight = 1.337, + purchase_source = 'sth NSW/VIC/sth SA' + ) + else: + return PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner( + head = 1.337, + purchase_weight = 1.337, + purchase_source = 'sth NSW/VIC/sth SA', + ) + """ + + def testPostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner(self): + """Test PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales.py new file mode 100644 index 00000000..1f297c52 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales.py @@ -0,0 +1,211 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot_request_feedlots_inner_sales import PostFeedlotRequestFeedlotsInnerSales + +class TestPostFeedlotRequestFeedlotsInnerSales(unittest.TestCase): + """PostFeedlotRequestFeedlotsInnerSales unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlotRequestFeedlotsInnerSales: + """Test PostFeedlotRequestFeedlotsInnerSales + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlotRequestFeedlotsInnerSales` + """ + model = PostFeedlotRequestFeedlotsInnerSales() + if include_optional: + return PostFeedlotRequestFeedlotsInnerSales( + bulls_gt1 = [ + { + 'key' : null + } + ], + bulls_gt1_traded = [ + { + 'key' : null + } + ], + steers_lt1 = [ + { + 'key' : null + } + ], + steers_lt1_traded = [ + { + 'key' : null + } + ], + steers1_to2 = [ + { + 'key' : null + } + ], + steers1_to2_traded = [ + { + 'key' : null + } + ], + steers_gt2 = [ + { + 'key' : null + } + ], + steers_gt2_traded = [ + { + 'key' : null + } + ], + cows_gt2 = [ + { + 'key' : null + } + ], + cows_gt2_traded = [ + { + 'key' : null + } + ], + heifers_lt1 = [ + { + 'key' : null + } + ], + heifers_lt1_traded = [ + { + 'key' : null + } + ], + heifers1_to2 = [ + { + 'key' : null + } + ], + heifers1_to2_traded = [ + { + 'key' : null + } + ], + heifers_gt2 = [ + { + 'key' : null + } + ], + heifers_gt2_traded = [ + { + 'key' : null + } + ] + ) + else: + return PostFeedlotRequestFeedlotsInnerSales( + bulls_gt1 = [ + { + 'key' : null + } + ], + bulls_gt1_traded = [ + { + 'key' : null + } + ], + steers_lt1 = [ + { + 'key' : null + } + ], + steers_lt1_traded = [ + { + 'key' : null + } + ], + steers1_to2 = [ + { + 'key' : null + } + ], + steers1_to2_traded = [ + { + 'key' : null + } + ], + steers_gt2 = [ + { + 'key' : null + } + ], + steers_gt2_traded = [ + { + 'key' : null + } + ], + cows_gt2 = [ + { + 'key' : null + } + ], + cows_gt2_traded = [ + { + 'key' : null + } + ], + heifers_lt1 = [ + { + 'key' : null + } + ], + heifers_lt1_traded = [ + { + 'key' : null + } + ], + heifers1_to2 = [ + { + 'key' : null + } + ], + heifers1_to2_traded = [ + { + 'key' : null + } + ], + heifers_gt2 = [ + { + 'key' : null + } + ], + heifers_gt2_traded = [ + { + 'key' : null + } + ], + ) + """ + + def testPostFeedlotRequestFeedlotsInnerSales(self): + """Test PostFeedlotRequestFeedlotsInnerSales""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py new file mode 100644 index 00000000..9e8e1bcb --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner + +class TestPostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner(unittest.TestCase): + """PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner: + """Test PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner` + """ + model = PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner() + if include_optional: + return PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner( + head = 1.337, + sale_weight = 1.337 + ) + else: + return PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner( + head = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner(self): + """Test PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_vegetation_inner.py new file mode 100644 index 00000000..6779a479 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_feedlot_request_vegetation_inner.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_feedlot_request_vegetation_inner import PostFeedlotRequestVegetationInner + +class TestPostFeedlotRequestVegetationInner(unittest.TestCase): + """PostFeedlotRequestVegetationInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFeedlotRequestVegetationInner: + """Test PostFeedlotRequestVegetationInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFeedlotRequestVegetationInner` + """ + model = PostFeedlotRequestVegetationInner() + if include_optional: + return PostFeedlotRequestVegetationInner( + vegetation = { + 'key' : null + }, + feedlot_proportion = [ + 1.337 + ] + ) + else: + return PostFeedlotRequestVegetationInner( + vegetation = { + 'key' : null + }, + feedlot_proportion = [ + 1.337 + ], + ) + """ + + def testPostFeedlotRequestVegetationInner(self): + """Test PostFeedlotRequestVegetationInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat200_response.py b/examples/python-api-client/api-client/test/test_post_goat200_response.py new file mode 100644 index 00000000..1efe1d9d --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat200_response import PostGoat200Response + +class TestPostGoat200Response(unittest.TestCase): + """PostGoat200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoat200Response: + """Test PostGoat200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoat200Response` + """ + model = PostGoat200Response() + if include_optional: + return PostGoat200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ] + ) + else: + return PostGoat200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + ) + """ + + def testPostGoat200Response(self): + """Test PostGoat200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_goat200_response_intensities.py new file mode 100644 index 00000000..1a568f25 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat200_response_intensities.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat200_response_intensities import PostGoat200ResponseIntensities + +class TestPostGoat200ResponseIntensities(unittest.TestCase): + """PostGoat200ResponseIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoat200ResponseIntensities: + """Test PostGoat200ResponseIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoat200ResponseIntensities` + """ + model = PostGoat200ResponseIntensities() + if include_optional: + return PostGoat200ResponseIntensities( + amount_meat_produced = 1.337, + amount_wool_produced = 1.337, + goat_meat_breeding_including_sequestration = 1.337, + goat_meat_breeding_excluding_sequestration = 1.337, + wool_including_sequestration = 1.337, + wool_excluding_sequestration = 1.337 + ) + else: + return PostGoat200ResponseIntensities( + amount_meat_produced = 1.337, + amount_wool_produced = 1.337, + goat_meat_breeding_including_sequestration = 1.337, + goat_meat_breeding_excluding_sequestration = 1.337, + wool_including_sequestration = 1.337, + wool_excluding_sequestration = 1.337, + ) + """ + + def testPostGoat200ResponseIntensities(self): + """Test PostGoat200ResponseIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_goat200_response_intermediate_inner.py new file mode 100644 index 00000000..7f660710 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat200_response_intermediate_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat200_response_intermediate_inner import PostGoat200ResponseIntermediateInner + +class TestPostGoat200ResponseIntermediateInner(unittest.TestCase): + """PostGoat200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoat200ResponseIntermediateInner: + """Test PostGoat200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoat200ResponseIntermediateInner` + """ + model = PostGoat200ResponseIntermediateInner() + if include_optional: + return PostGoat200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + } + ) + else: + return PostGoat200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + ) + """ + + def testPostGoat200ResponseIntermediateInner(self): + """Test PostGoat200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat200_response_net.py b/examples/python-api-client/api-client/test/test_post_goat200_response_net.py new file mode 100644 index 00000000..1b995ecc --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat200_response_net.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat200_response_net import PostGoat200ResponseNet + +class TestPostGoat200ResponseNet(unittest.TestCase): + """PostGoat200ResponseNet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoat200ResponseNet: + """Test PostGoat200ResponseNet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoat200ResponseNet` + """ + model = PostGoat200ResponseNet() + if include_optional: + return PostGoat200ResponseNet( + total = 1.337 + ) + else: + return PostGoat200ResponseNet( + total = 1.337, + ) + """ + + def testPostGoat200ResponseNet(self): + """Test PostGoat200ResponseNet""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request.py b/examples/python-api-client/api-client/test/test_post_goat_request.py new file mode 100644 index 00000000..34a9f1ff --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request import PostGoatRequest + +class TestPostGoatRequest(unittest.TestCase): + """PostGoatRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequest: + """Test PostGoatRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequest` + """ + model = PostGoatRequest() + if include_optional: + return PostGoatRequest( + state = 'nsw', + rainfall_above600 = True, + goats = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostGoatRequest( + state = 'nsw', + rainfall_above600 = True, + goats = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostGoatRequest(self): + """Test PostGoatRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner.py new file mode 100644 index 00000000..80b14332 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner import PostGoatRequestGoatsInner + +class TestPostGoatRequestGoatsInner(unittest.TestCase): + """PostGoatRequestGoatsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInner: + """Test PostGoatRequestGoatsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInner` + """ + model = PostGoatRequestGoatsInner() + if include_optional: + return PostGoatRequestGoatsInner( + id = '', + classes = { + 'key' : null + }, + limestone = 1.337, + limestone_fraction = 1.337, + fertiliser = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + mineral_supplementation = { + 'key' : null + }, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + grain_feed = 1.337, + hay_feed = 1.337, + herbicide = 1.337, + herbicide_other = 1.337 + ) + else: + return PostGoatRequestGoatsInner( + classes = { + 'key' : null + }, + limestone = 1.337, + limestone_fraction = 1.337, + fertiliser = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + mineral_supplementation = { + 'key' : null + }, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + grain_feed = 1.337, + hay_feed = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + ) + """ + + def testPostGoatRequestGoatsInner(self): + """Test PostGoatRequestGoatsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes.py new file mode 100644 index 00000000..6381e1ec --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner_classes import PostGoatRequestGoatsInnerClasses + +class TestPostGoatRequestGoatsInnerClasses(unittest.TestCase): + """PostGoatRequestGoatsInnerClasses unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClasses: + """Test PostGoatRequestGoatsInnerClasses + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInnerClasses` + """ + model = PostGoatRequestGoatsInnerClasses() + if include_optional: + return PostGoatRequestGoatsInnerClasses( + bucks_billy = { + 'key' : null + }, + trade_bucks = { + 'key' : null + }, + wethers = { + 'key' : null + }, + trade_wethers = { + 'key' : null + }, + maiden_breeding_does_nannies = { + 'key' : null + }, + trade_maiden_breeding_does_nannies = { + 'key' : null + }, + breeding_does_nannies = { + 'key' : null + }, + trade_breeding_does_nannies = { + 'key' : null + }, + other_does_culled_females = { + 'key' : null + }, + trade_other_does_culled_females = { + 'key' : null + }, + kids = { + 'key' : null + }, + trade_kids = { + 'key' : null + }, + trade_does = { + 'key' : null + } + ) + else: + return PostGoatRequestGoatsInnerClasses( + ) + """ + + def testPostGoatRequestGoatsInnerClasses(self): + """Test PostGoatRequestGoatsInnerClasses""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_breeding_does_nannies.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_breeding_does_nannies.py new file mode 100644 index 00000000..8374dc9a --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_breeding_does_nannies.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner_classes_breeding_does_nannies import PostGoatRequestGoatsInnerClassesBreedingDoesNannies + +class TestPostGoatRequestGoatsInnerClassesBreedingDoesNannies(unittest.TestCase): + """PostGoatRequestGoatsInnerClassesBreedingDoesNannies unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesBreedingDoesNannies: + """Test PostGoatRequestGoatsInnerClassesBreedingDoesNannies + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesBreedingDoesNannies` + """ + model = PostGoatRequestGoatsInnerClassesBreedingDoesNannies() + if include_optional: + return PostGoatRequestGoatsInnerClassesBreedingDoesNannies( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostGoatRequestGoatsInnerClassesBreedingDoesNannies( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + ) + """ + + def testPostGoatRequestGoatsInnerClassesBreedingDoesNannies(self): + """Test PostGoatRequestGoatsInnerClassesBreedingDoesNannies""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_bucks_billy.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_bucks_billy.py new file mode 100644 index 00000000..dca559ec --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_bucks_billy.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner_classes_bucks_billy import PostGoatRequestGoatsInnerClassesBucksBilly + +class TestPostGoatRequestGoatsInnerClassesBucksBilly(unittest.TestCase): + """PostGoatRequestGoatsInnerClassesBucksBilly unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesBucksBilly: + """Test PostGoatRequestGoatsInnerClassesBucksBilly + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesBucksBilly` + """ + model = PostGoatRequestGoatsInnerClassesBucksBilly() + if include_optional: + return PostGoatRequestGoatsInnerClassesBucksBilly( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostGoatRequestGoatsInnerClassesBucksBilly( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + ) + """ + + def testPostGoatRequestGoatsInnerClassesBucksBilly(self): + """Test PostGoatRequestGoatsInnerClassesBucksBilly""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_kids.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_kids.py new file mode 100644 index 00000000..a0f2acd7 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_kids.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner_classes_kids import PostGoatRequestGoatsInnerClassesKids + +class TestPostGoatRequestGoatsInnerClassesKids(unittest.TestCase): + """PostGoatRequestGoatsInnerClassesKids unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesKids: + """Test PostGoatRequestGoatsInnerClassesKids + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesKids` + """ + model = PostGoatRequestGoatsInnerClassesKids() + if include_optional: + return PostGoatRequestGoatsInnerClassesKids( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostGoatRequestGoatsInnerClassesKids( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + ) + """ + + def testPostGoatRequestGoatsInnerClassesKids(self): + """Test PostGoatRequestGoatsInnerClassesKids""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py new file mode 100644 index 00000000..f6e8ca63 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner_classes_maiden_breeding_does_nannies import PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies + +class TestPostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies(unittest.TestCase): + """PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies: + """Test PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies` + """ + model = PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies() + if include_optional: + return PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + ) + """ + + def testPostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies(self): + """Test PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_other_does_culled_females.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_other_does_culled_females.py new file mode 100644 index 00000000..e23b854a --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_other_does_culled_females.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner_classes_other_does_culled_females import PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales + +class TestPostGoatRequestGoatsInnerClassesOtherDoesCulledFemales(unittest.TestCase): + """PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales: + """Test PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales` + """ + model = PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales() + if include_optional: + return PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + ) + """ + + def testPostGoatRequestGoatsInnerClassesOtherDoesCulledFemales(self): + """Test PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py new file mode 100644 index 00000000..388d40e7 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner_classes_trade_breeding_does_nannies import PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies + +class TestPostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies(unittest.TestCase): + """PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies: + """Test PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies` + """ + model = PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies() + if include_optional: + return PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + ) + """ + + def testPostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies(self): + """Test PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_bucks.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_bucks.py new file mode 100644 index 00000000..e222b66a --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_bucks.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner_classes_trade_bucks import PostGoatRequestGoatsInnerClassesTradeBucks + +class TestPostGoatRequestGoatsInnerClassesTradeBucks(unittest.TestCase): + """PostGoatRequestGoatsInnerClassesTradeBucks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesTradeBucks: + """Test PostGoatRequestGoatsInnerClassesTradeBucks + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesTradeBucks` + """ + model = PostGoatRequestGoatsInnerClassesTradeBucks() + if include_optional: + return PostGoatRequestGoatsInnerClassesTradeBucks( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostGoatRequestGoatsInnerClassesTradeBucks( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + ) + """ + + def testPostGoatRequestGoatsInnerClassesTradeBucks(self): + """Test PostGoatRequestGoatsInnerClassesTradeBucks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_does.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_does.py new file mode 100644 index 00000000..5c61d44c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_does.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner_classes_trade_does import PostGoatRequestGoatsInnerClassesTradeDoes + +class TestPostGoatRequestGoatsInnerClassesTradeDoes(unittest.TestCase): + """PostGoatRequestGoatsInnerClassesTradeDoes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesTradeDoes: + """Test PostGoatRequestGoatsInnerClassesTradeDoes + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesTradeDoes` + """ + model = PostGoatRequestGoatsInnerClassesTradeDoes() + if include_optional: + return PostGoatRequestGoatsInnerClassesTradeDoes( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostGoatRequestGoatsInnerClassesTradeDoes( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + ) + """ + + def testPostGoatRequestGoatsInnerClassesTradeDoes(self): + """Test PostGoatRequestGoatsInnerClassesTradeDoes""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_kids.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_kids.py new file mode 100644 index 00000000..72d606d3 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_kids.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner_classes_trade_kids import PostGoatRequestGoatsInnerClassesTradeKids + +class TestPostGoatRequestGoatsInnerClassesTradeKids(unittest.TestCase): + """PostGoatRequestGoatsInnerClassesTradeKids unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesTradeKids: + """Test PostGoatRequestGoatsInnerClassesTradeKids + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesTradeKids` + """ + model = PostGoatRequestGoatsInnerClassesTradeKids() + if include_optional: + return PostGoatRequestGoatsInnerClassesTradeKids( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostGoatRequestGoatsInnerClassesTradeKids( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + ) + """ + + def testPostGoatRequestGoatsInnerClassesTradeKids(self): + """Test PostGoatRequestGoatsInnerClassesTradeKids""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py new file mode 100644 index 00000000..c5cb8124 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies import PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies + +class TestPostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies(unittest.TestCase): + """PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies: + """Test PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies` + """ + model = PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies() + if include_optional: + return PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + ) + """ + + def testPostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies(self): + """Test PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_other_does_culled_females.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_other_does_culled_females.py new file mode 100644 index 00000000..00a0b8ca --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_other_does_culled_females.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner_classes_trade_other_does_culled_females import PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales + +class TestPostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales(unittest.TestCase): + """PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales: + """Test PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales` + """ + model = PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales() + if include_optional: + return PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + ) + """ + + def testPostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales(self): + """Test PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_wethers.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_wethers.py new file mode 100644 index 00000000..dc063b1e --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_wethers.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner_classes_trade_wethers import PostGoatRequestGoatsInnerClassesTradeWethers + +class TestPostGoatRequestGoatsInnerClassesTradeWethers(unittest.TestCase): + """PostGoatRequestGoatsInnerClassesTradeWethers unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesTradeWethers: + """Test PostGoatRequestGoatsInnerClassesTradeWethers + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesTradeWethers` + """ + model = PostGoatRequestGoatsInnerClassesTradeWethers() + if include_optional: + return PostGoatRequestGoatsInnerClassesTradeWethers( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostGoatRequestGoatsInnerClassesTradeWethers( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + ) + """ + + def testPostGoatRequestGoatsInnerClassesTradeWethers(self): + """Test PostGoatRequestGoatsInnerClassesTradeWethers""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_wethers.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_wethers.py new file mode 100644 index 00000000..7c4cb171 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_wethers.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_goats_inner_classes_wethers import PostGoatRequestGoatsInnerClassesWethers + +class TestPostGoatRequestGoatsInnerClassesWethers(unittest.TestCase): + """PostGoatRequestGoatsInnerClassesWethers unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesWethers: + """Test PostGoatRequestGoatsInnerClassesWethers + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesWethers` + """ + model = PostGoatRequestGoatsInnerClassesWethers() + if include_optional: + return PostGoatRequestGoatsInnerClassesWethers( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostGoatRequestGoatsInnerClassesWethers( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_sold = 1.337, + sale_weight = 1.337, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + ) + """ + + def testPostGoatRequestGoatsInnerClassesWethers(self): + """Test PostGoatRequestGoatsInnerClassesWethers""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_goat_request_vegetation_inner.py new file mode 100644 index 00000000..34d2dbe0 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_goat_request_vegetation_inner.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_goat_request_vegetation_inner import PostGoatRequestVegetationInner + +class TestPostGoatRequestVegetationInner(unittest.TestCase): + """PostGoatRequestVegetationInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGoatRequestVegetationInner: + """Test PostGoatRequestVegetationInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGoatRequestVegetationInner` + """ + model = PostGoatRequestVegetationInner() + if include_optional: + return PostGoatRequestVegetationInner( + vegetation = { + 'key' : null + }, + goat_proportion = [ + 1.337 + ] + ) + else: + return PostGoatRequestVegetationInner( + vegetation = { + 'key' : null + }, + goat_proportion = [ + 1.337 + ], + ) + """ + + def testPostGoatRequestVegetationInner(self): + """Test PostGoatRequestVegetationInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_grains200_response.py b/examples/python-api-client/api-client/test/test_post_grains200_response.py new file mode 100644 index 00000000..faf560f4 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_grains200_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_grains200_response import PostGrains200Response + +class TestPostGrains200Response(unittest.TestCase): + """PostGrains200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGrains200Response: + """Test PostGrains200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGrains200Response` + """ + model = PostGrains200Response() + if include_optional: + return PostGrains200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities_with_sequestration = [ + { + 'key' : null + } + ], + intensities = [ + 1.337 + ] + ) + else: + return PostGrains200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities_with_sequestration = [ + { + 'key' : null + } + ], + intensities = [ + 1.337 + ], + ) + """ + + def testPostGrains200Response(self): + """Test PostGrains200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner.py new file mode 100644 index 00000000..e4aea811 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_grains200_response_intermediate_inner import PostGrains200ResponseIntermediateInner + +class TestPostGrains200ResponseIntermediateInner(unittest.TestCase): + """PostGrains200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGrains200ResponseIntermediateInner: + """Test PostGrains200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGrains200ResponseIntermediateInner` + """ + model = PostGrains200ResponseIntermediateInner() + if include_optional: + return PostGrains200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + intensities_with_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + } + ) + else: + return PostGrains200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + intensities_with_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + ) + """ + + def testPostGrains200ResponseIntermediateInner(self): + """Test PostGrains200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner_intensities_with_sequestration.py b/examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner_intensities_with_sequestration.py new file mode 100644 index 00000000..a5604bc8 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner_intensities_with_sequestration.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_grains200_response_intermediate_inner_intensities_with_sequestration import PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration + +class TestPostGrains200ResponseIntermediateInnerIntensitiesWithSequestration(unittest.TestCase): + """PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration: + """Test PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration` + """ + model = PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration() + if include_optional: + return PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration( + grain_produced_tonnes = 1.337, + grains_excluding_sequestration = 1.337, + grains_including_sequestration = 1.337 + ) + else: + return PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration( + grain_produced_tonnes = 1.337, + grains_excluding_sequestration = 1.337, + grains_including_sequestration = 1.337, + ) + """ + + def testPostGrains200ResponseIntermediateInnerIntensitiesWithSequestration(self): + """Test PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_grains_request.py b/examples/python-api-client/api-client/test/test_post_grains_request.py new file mode 100644 index 00000000..4b9f096c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_grains_request.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_grains_request import PostGrainsRequest + +class TestPostGrainsRequest(unittest.TestCase): + """PostGrainsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGrainsRequest: + """Test PostGrainsRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGrainsRequest` + """ + model = PostGrainsRequest() + if include_optional: + return PostGrainsRequest( + state = 'nsw', + crops = [ + { + 'key' : null + } + ], + electricity_renewable = 0, + electricity_use = 1.337, + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostGrainsRequest( + state = 'nsw', + crops = [ + { + 'key' : null + } + ], + electricity_renewable = 0, + electricity_use = 1.337, + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostGrainsRequest(self): + """Test PostGrainsRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_grains_request_crops_inner.py b/examples/python-api-client/api-client/test/test_post_grains_request_crops_inner.py new file mode 100644 index 00000000..cc324b1d --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_grains_request_crops_inner.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_grains_request_crops_inner import PostGrainsRequestCropsInner + +class TestPostGrainsRequestCropsInner(unittest.TestCase): + """PostGrainsRequestCropsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostGrainsRequestCropsInner: + """Test PostGrainsRequestCropsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostGrainsRequestCropsInner` + """ + model = PostGrainsRequestCropsInner() + if include_optional: + return PostGrainsRequestCropsInner( + id = '', + type = 'Wheat', + state = 'nsw', + production_system = 'Non-irrigated crop', + average_grain_yield = 1.337, + area_sown = 1.337, + non_urea_nitrogen = 1.337, + urea_application = 1.337, + urea_ammonium_nitrate = 1.337, + phosphorus_application = 1.337, + potassium_application = 1.337, + sulfur_application = 1.337, + rainfall_above600 = True, + fraction_of_annual_crop_burnt = 1.337, + herbicide_use = 1.337, + glyphosate_other_herbicide_use = 1.337, + electricity_allocation = 1.337, + limestone = 1.337, + limestone_fraction = 1.337, + diesel_use = 1.337, + petrol_use = 1.337, + lpg = 1.337 + ) + else: + return PostGrainsRequestCropsInner( + type = 'Wheat', + state = 'nsw', + production_system = 'Non-irrigated crop', + average_grain_yield = 1.337, + area_sown = 1.337, + non_urea_nitrogen = 1.337, + urea_application = 1.337, + urea_ammonium_nitrate = 1.337, + phosphorus_application = 1.337, + potassium_application = 1.337, + sulfur_application = 1.337, + rainfall_above600 = True, + fraction_of_annual_crop_burnt = 1.337, + herbicide_use = 1.337, + glyphosate_other_herbicide_use = 1.337, + electricity_allocation = 1.337, + limestone = 1.337, + limestone_fraction = 1.337, + diesel_use = 1.337, + petrol_use = 1.337, + lpg = 1.337, + ) + """ + + def testPostGrainsRequestCropsInner(self): + """Test PostGrainsRequestCropsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_horticulture200_response.py b/examples/python-api-client/api-client/test/test_post_horticulture200_response.py new file mode 100644 index 00000000..9a900a98 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_horticulture200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_horticulture200_response import PostHorticulture200Response + +class TestPostHorticulture200Response(unittest.TestCase): + """PostHorticulture200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostHorticulture200Response: + """Test PostHorticulture200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostHorticulture200Response` + """ + model = PostHorticulture200Response() + if include_optional: + return PostHorticulture200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = [ + { + 'key' : null + } + ] + ) + else: + return PostHorticulture200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = [ + { + 'key' : null + } + ], + ) + """ + + def testPostHorticulture200Response(self): + """Test PostHorticulture200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner.py new file mode 100644 index 00000000..c80e0a86 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_horticulture200_response_intermediate_inner import PostHorticulture200ResponseIntermediateInner + +class TestPostHorticulture200ResponseIntermediateInner(unittest.TestCase): + """PostHorticulture200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostHorticulture200ResponseIntermediateInner: + """Test PostHorticulture200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostHorticulture200ResponseIntermediateInner` + """ + model = PostHorticulture200ResponseIntermediateInner() + if include_optional: + return PostHorticulture200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + intensities_with_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + } + ) + else: + return PostHorticulture200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + intensities_with_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + ) + """ + + def testPostHorticulture200ResponseIntermediateInner(self): + """Test PostHorticulture200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py b/examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py new file mode 100644 index 00000000..5d17c297 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_horticulture200_response_intermediate_inner_intensities_with_sequestration import PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration + +class TestPostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration(unittest.TestCase): + """PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration: + """Test PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration` + """ + model = PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration() + if include_optional: + return PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration( + crop_produced_tonnes = 1.337, + tonnes_crop_excluding_sequestration = 1.337, + tonnes_crop_including_sequestration = 1.337 + ) + else: + return PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration( + crop_produced_tonnes = 1.337, + tonnes_crop_excluding_sequestration = 1.337, + tonnes_crop_including_sequestration = 1.337, + ) + """ + + def testPostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration(self): + """Test PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_horticulture200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_horticulture200_response_scope1.py new file mode 100644 index 00000000..ebef0e64 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_horticulture200_response_scope1.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_horticulture200_response_scope1 import PostHorticulture200ResponseScope1 + +class TestPostHorticulture200ResponseScope1(unittest.TestCase): + """PostHorticulture200ResponseScope1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostHorticulture200ResponseScope1: + """Test PostHorticulture200ResponseScope1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostHorticulture200ResponseScope1` + """ + model = PostHorticulture200ResponseScope1() + if include_optional: + return PostHorticulture200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + urea_co2 = 1.337, + lime_co2 = 1.337, + fertiliser_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + crop_residue_n2_o = 1.337, + field_burning_n2_o = 1.337, + field_burning_ch4 = 1.337, + hfcs_refrigerant_leakage = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total_hfcs = 1.337, + total = 1.337 + ) + else: + return PostHorticulture200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + urea_co2 = 1.337, + lime_co2 = 1.337, + fertiliser_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + crop_residue_n2_o = 1.337, + field_burning_n2_o = 1.337, + field_burning_ch4 = 1.337, + hfcs_refrigerant_leakage = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total_hfcs = 1.337, + total = 1.337, + ) + """ + + def testPostHorticulture200ResponseScope1(self): + """Test PostHorticulture200ResponseScope1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_horticulture_request.py b/examples/python-api-client/api-client/test/test_post_horticulture_request.py new file mode 100644 index 00000000..febbe4db --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_horticulture_request.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_horticulture_request import PostHorticultureRequest + +class TestPostHorticultureRequest(unittest.TestCase): + """PostHorticultureRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostHorticultureRequest: + """Test PostHorticultureRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostHorticultureRequest` + """ + model = PostHorticultureRequest() + if include_optional: + return PostHorticultureRequest( + state = 'nsw', + crops = [ + { + 'key' : null + } + ], + electricity_renewable = 0, + electricity_use = 1.337, + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostHorticultureRequest( + state = 'nsw', + crops = [ + { + 'key' : null + } + ], + electricity_renewable = 0, + electricity_use = 1.337, + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostHorticultureRequest(self): + """Test PostHorticultureRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner.py b/examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner.py new file mode 100644 index 00000000..5294ed12 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_horticulture_request_crops_inner import PostHorticultureRequestCropsInner + +class TestPostHorticultureRequestCropsInner(unittest.TestCase): + """PostHorticultureRequestCropsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostHorticultureRequestCropsInner: + """Test PostHorticultureRequestCropsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostHorticultureRequestCropsInner` + """ + model = PostHorticultureRequestCropsInner() + if include_optional: + return PostHorticultureRequestCropsInner( + id = '', + type = 'Pulses', + average_yield = 1.337, + area_sown = 1.337, + urea_application = 1.337, + non_urea_nitrogen = 1.337, + urea_ammonium_nitrate = 1.337, + phosphorus_application = 1.337, + potassium_application = 1.337, + sulfur_application = 1.337, + rainfall_above600 = True, + urease_inhibitor_used = True, + nitrification_inhibitor_used = True, + fraction_of_annual_crop_burnt = 1.337, + herbicide_use = 1.337, + glyphosate_other_herbicide_use = 1.337, + electricity_allocation = 1.337, + limestone = 1.337, + limestone_fraction = 1.337, + diesel_use = 1.337, + petrol_use = 1.337, + lpg = 1.337, + refrigerants = [ + openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner.post_horticulture_request_crops_inner_refrigerants_inner( + refrigerant = 'HFC-23', + charge_size = 1.337, ) + ] + ) + else: + return PostHorticultureRequestCropsInner( + type = 'Pulses', + average_yield = 1.337, + area_sown = 1.337, + urea_application = 1.337, + non_urea_nitrogen = 1.337, + urea_ammonium_nitrate = 1.337, + phosphorus_application = 1.337, + potassium_application = 1.337, + sulfur_application = 1.337, + rainfall_above600 = True, + fraction_of_annual_crop_burnt = 1.337, + herbicide_use = 1.337, + glyphosate_other_herbicide_use = 1.337, + electricity_allocation = 1.337, + limestone = 1.337, + limestone_fraction = 1.337, + diesel_use = 1.337, + petrol_use = 1.337, + lpg = 1.337, + refrigerants = [ + openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner.post_horticulture_request_crops_inner_refrigerants_inner( + refrigerant = 'HFC-23', + charge_size = 1.337, ) + ], + ) + """ + + def testPostHorticultureRequestCropsInner(self): + """Test PostHorticultureRequestCropsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner_refrigerants_inner.py b/examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner_refrigerants_inner.py new file mode 100644 index 00000000..73c2d24e --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner_refrigerants_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner import PostHorticultureRequestCropsInnerRefrigerantsInner + +class TestPostHorticultureRequestCropsInnerRefrigerantsInner(unittest.TestCase): + """PostHorticultureRequestCropsInnerRefrigerantsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostHorticultureRequestCropsInnerRefrigerantsInner: + """Test PostHorticultureRequestCropsInnerRefrigerantsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostHorticultureRequestCropsInnerRefrigerantsInner` + """ + model = PostHorticultureRequestCropsInnerRefrigerantsInner() + if include_optional: + return PostHorticultureRequestCropsInnerRefrigerantsInner( + refrigerant = 'HFC-23', + charge_size = 1.337 + ) + else: + return PostHorticultureRequestCropsInnerRefrigerantsInner( + refrigerant = 'HFC-23', + charge_size = 1.337, + ) + """ + + def testPostHorticultureRequestCropsInnerRefrigerantsInner(self): + """Test PostHorticultureRequestCropsInnerRefrigerantsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork200_response.py b/examples/python-api-client/api-client/test/test_post_pork200_response.py new file mode 100644 index 00000000..3d4c0600 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork200_response import PostPork200Response + +class TestPostPork200Response(unittest.TestCase): + """PostPork200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPork200Response: + """Test PostPork200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPork200Response` + """ + model = PostPork200Response() + if include_optional: + return PostPork200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ] + ) + else: + return PostPork200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + ) + """ + + def testPostPork200Response(self): + """Test PostPork200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_pork200_response_intensities.py new file mode 100644 index 00000000..741436cc --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork200_response_intensities.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork200_response_intensities import PostPork200ResponseIntensities + +class TestPostPork200ResponseIntensities(unittest.TestCase): + """PostPork200ResponseIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPork200ResponseIntensities: + """Test PostPork200ResponseIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPork200ResponseIntensities` + """ + model = PostPork200ResponseIntensities() + if include_optional: + return PostPork200ResponseIntensities( + pork_meat_including_sequestration = 1.337, + pork_meat_excluding_sequestration = 1.337, + liveweight_produced_kg = 1.337 + ) + else: + return PostPork200ResponseIntensities( + pork_meat_including_sequestration = 1.337, + pork_meat_excluding_sequestration = 1.337, + liveweight_produced_kg = 1.337, + ) + """ + + def testPostPork200ResponseIntensities(self): + """Test PostPork200ResponseIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_pork200_response_intermediate_inner.py new file mode 100644 index 00000000..9b433afd --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork200_response_intermediate_inner.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork200_response_intermediate_inner import PostPork200ResponseIntermediateInner + +class TestPostPork200ResponseIntermediateInner(unittest.TestCase): + """PostPork200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPork200ResponseIntermediateInner: + """Test PostPork200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPork200ResponseIntermediateInner` + """ + model = PostPork200ResponseIntermediateInner() + if include_optional: + return PostPork200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + net = { + 'key' : null + }, + intensities = { + 'key' : null + } + ) + else: + return PostPork200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + ) + """ + + def testPostPork200ResponseIntermediateInner(self): + """Test PostPork200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork200_response_net.py b/examples/python-api-client/api-client/test/test_post_pork200_response_net.py new file mode 100644 index 00000000..7a5158fa --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork200_response_net.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork200_response_net import PostPork200ResponseNet + +class TestPostPork200ResponseNet(unittest.TestCase): + """PostPork200ResponseNet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPork200ResponseNet: + """Test PostPork200ResponseNet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPork200ResponseNet` + """ + model = PostPork200ResponseNet() + if include_optional: + return PostPork200ResponseNet( + total = 1.337 + ) + else: + return PostPork200ResponseNet( + total = 1.337, + ) + """ + + def testPostPork200ResponseNet(self): + """Test PostPork200ResponseNet""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_pork200_response_scope1.py new file mode 100644 index 00000000..ce9c783f --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork200_response_scope1.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork200_response_scope1 import PostPork200ResponseScope1 + +class TestPostPork200ResponseScope1(unittest.TestCase): + """PostPork200ResponseScope1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPork200ResponseScope1: + """Test PostPork200ResponseScope1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPork200ResponseScope1` + """ + model = PostPork200ResponseScope1() + if include_optional: + return PostPork200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + urea_co2 = 1.337, + lime_co2 = 1.337, + fertiliser_n2_o = 1.337, + enteric_ch4 = 1.337, + manure_management_ch4 = 1.337, + manure_management_direct_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + atmospheric_deposition_indirect_n2_o = 1.337, + leaching_and_runoff_soil_n2_o = 1.337, + leaching_and_runoff_mmsn2_o = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337 + ) + else: + return PostPork200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + urea_co2 = 1.337, + lime_co2 = 1.337, + fertiliser_n2_o = 1.337, + enteric_ch4 = 1.337, + manure_management_ch4 = 1.337, + manure_management_direct_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + atmospheric_deposition_indirect_n2_o = 1.337, + leaching_and_runoff_soil_n2_o = 1.337, + leaching_and_runoff_mmsn2_o = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337, + ) + """ + + def testPostPork200ResponseScope1(self): + """Test PostPork200ResponseScope1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_pork200_response_scope3.py new file mode 100644 index 00000000..cd06ebda --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork200_response_scope3.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork200_response_scope3 import PostPork200ResponseScope3 + +class TestPostPork200ResponseScope3(unittest.TestCase): + """PostPork200ResponseScope3 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPork200ResponseScope3: + """Test PostPork200ResponseScope3 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPork200ResponseScope3` + """ + model = PostPork200ResponseScope3() + if include_optional: + return PostPork200ResponseScope3( + fertiliser = 1.337, + purchased_feed = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + lime = 1.337, + purchased_livestock = 1.337, + bedding = 1.337, + total = 1.337 + ) + else: + return PostPork200ResponseScope3( + fertiliser = 1.337, + purchased_feed = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + lime = 1.337, + purchased_livestock = 1.337, + bedding = 1.337, + total = 1.337, + ) + """ + + def testPostPork200ResponseScope3(self): + """Test PostPork200ResponseScope3""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request.py b/examples/python-api-client/api-client/test/test_post_pork_request.py new file mode 100644 index 00000000..bdcf49dc --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request import PostPorkRequest + +class TestPostPorkRequest(unittest.TestCase): + """PostPorkRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequest: + """Test PostPorkRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequest` + """ + model = PostPorkRequest() + if include_optional: + return PostPorkRequest( + state = 'nsw', + north_of_tropic_of_capricorn = True, + rainfall_above600 = True, + pork = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostPorkRequest( + state = 'nsw', + north_of_tropic_of_capricorn = True, + rainfall_above600 = True, + pork = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostPorkRequest(self): + """Test PostPorkRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner.py new file mode 100644 index 00000000..6ce737df --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request_pork_inner import PostPorkRequestPorkInner + +class TestPostPorkRequestPorkInner(unittest.TestCase): + """PostPorkRequestPorkInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequestPorkInner: + """Test PostPorkRequestPorkInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequestPorkInner` + """ + model = PostPorkRequestPorkInner() + if include_optional: + return PostPorkRequestPorkInner( + id = '', + classes = { + 'key' : null + }, + limestone = 1.337, + limestone_fraction = 1.337, + fertiliser = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + bedding_hay_barley_straw = 1.337, + feed_products = [ + { + 'key' : null + } + ] + ) + else: + return PostPorkRequestPorkInner( + classes = { + 'key' : null + }, + limestone = 1.337, + limestone_fraction = 1.337, + fertiliser = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + bedding_hay_barley_straw = 1.337, + feed_products = [ + { + 'key' : null + } + ], + ) + """ + + def testPostPorkRequestPorkInner(self): + """Test PostPorkRequestPorkInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes.py new file mode 100644 index 00000000..09cfca99 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request_pork_inner_classes import PostPorkRequestPorkInnerClasses + +class TestPostPorkRequestPorkInnerClasses(unittest.TestCase): + """PostPorkRequestPorkInnerClasses unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClasses: + """Test PostPorkRequestPorkInnerClasses + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequestPorkInnerClasses` + """ + model = PostPorkRequestPorkInnerClasses() + if include_optional: + return PostPorkRequestPorkInnerClasses( + sows = { + 'key' : null + }, + boars = { + 'key' : null + }, + gilts = { + 'key' : null + }, + suckers = { + 'key' : null + }, + weaners = { + 'key' : null + }, + growers = { + 'key' : null + }, + slaughter_pigs = { + 'key' : null + } + ) + else: + return PostPorkRequestPorkInnerClasses( + ) + """ + + def testPostPorkRequestPorkInnerClasses(self): + """Test PostPorkRequestPorkInnerClasses""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_boars.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_boars.py new file mode 100644 index 00000000..ac8f5a7e --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_boars.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request_pork_inner_classes_boars import PostPorkRequestPorkInnerClassesBoars + +class TestPostPorkRequestPorkInnerClassesBoars(unittest.TestCase): + """PostPorkRequestPorkInnerClassesBoars unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesBoars: + """Test PostPorkRequestPorkInnerClassesBoars + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesBoars` + """ + model = PostPorkRequestPorkInnerClassesBoars() + if include_optional: + return PostPorkRequestPorkInnerClassesBoars( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ], + manure = { + 'key' : null + } + ) + else: + return PostPorkRequestPorkInnerClassesBoars( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + manure = { + 'key' : null + }, + ) + """ + + def testPostPorkRequestPorkInnerClassesBoars(self): + """Test PostPorkRequestPorkInnerClassesBoars""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_gilts.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_gilts.py new file mode 100644 index 00000000..87fb7459 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_gilts.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request_pork_inner_classes_gilts import PostPorkRequestPorkInnerClassesGilts + +class TestPostPorkRequestPorkInnerClassesGilts(unittest.TestCase): + """PostPorkRequestPorkInnerClassesGilts unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesGilts: + """Test PostPorkRequestPorkInnerClassesGilts + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesGilts` + """ + model = PostPorkRequestPorkInnerClassesGilts() + if include_optional: + return PostPorkRequestPorkInnerClassesGilts( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ], + manure = { + 'key' : null + } + ) + else: + return PostPorkRequestPorkInnerClassesGilts( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + manure = { + 'key' : null + }, + ) + """ + + def testPostPorkRequestPorkInnerClassesGilts(self): + """Test PostPorkRequestPorkInnerClassesGilts""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_growers.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_growers.py new file mode 100644 index 00000000..a8d80ef1 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_growers.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request_pork_inner_classes_growers import PostPorkRequestPorkInnerClassesGrowers + +class TestPostPorkRequestPorkInnerClassesGrowers(unittest.TestCase): + """PostPorkRequestPorkInnerClassesGrowers unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesGrowers: + """Test PostPorkRequestPorkInnerClassesGrowers + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesGrowers` + """ + model = PostPorkRequestPorkInnerClassesGrowers() + if include_optional: + return PostPorkRequestPorkInnerClassesGrowers( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ], + manure = { + 'key' : null + } + ) + else: + return PostPorkRequestPorkInnerClassesGrowers( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + manure = { + 'key' : null + }, + ) + """ + + def testPostPorkRequestPorkInnerClassesGrowers(self): + """Test PostPorkRequestPorkInnerClassesGrowers""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_slaughter_pigs.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_slaughter_pigs.py new file mode 100644 index 00000000..74810895 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_slaughter_pigs.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request_pork_inner_classes_slaughter_pigs import PostPorkRequestPorkInnerClassesSlaughterPigs + +class TestPostPorkRequestPorkInnerClassesSlaughterPigs(unittest.TestCase): + """PostPorkRequestPorkInnerClassesSlaughterPigs unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesSlaughterPigs: + """Test PostPorkRequestPorkInnerClassesSlaughterPigs + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesSlaughterPigs` + """ + model = PostPorkRequestPorkInnerClassesSlaughterPigs() + if include_optional: + return PostPorkRequestPorkInnerClassesSlaughterPigs( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ], + manure = { + 'key' : null + } + ) + else: + return PostPorkRequestPorkInnerClassesSlaughterPigs( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + manure = { + 'key' : null + }, + ) + """ + + def testPostPorkRequestPorkInnerClassesSlaughterPigs(self): + """Test PostPorkRequestPorkInnerClassesSlaughterPigs""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows.py new file mode 100644 index 00000000..31d09401 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request_pork_inner_classes_sows import PostPorkRequestPorkInnerClassesSows + +class TestPostPorkRequestPorkInnerClassesSows(unittest.TestCase): + """PostPorkRequestPorkInnerClassesSows unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesSows: + """Test PostPorkRequestPorkInnerClassesSows + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesSows` + """ + model = PostPorkRequestPorkInnerClassesSows() + if include_optional: + return PostPorkRequestPorkInnerClassesSows( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ], + manure = { + 'key' : null + } + ) + else: + return PostPorkRequestPorkInnerClassesSows( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + manure = { + 'key' : null + }, + ) + """ + + def testPostPorkRequestPorkInnerClassesSows(self): + """Test PostPorkRequestPorkInnerClassesSows""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure.py new file mode 100644 index 00000000..6a6f5f6c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure import PostPorkRequestPorkInnerClassesSowsManure + +class TestPostPorkRequestPorkInnerClassesSowsManure(unittest.TestCase): + """PostPorkRequestPorkInnerClassesSowsManure unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesSowsManure: + """Test PostPorkRequestPorkInnerClassesSowsManure + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesSowsManure` + """ + model = PostPorkRequestPorkInnerClassesSowsManure() + if include_optional: + return PostPorkRequestPorkInnerClassesSowsManure( + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + autumn = { + 'key' : null + }, + winter = { + 'key' : null + } + ) + else: + return PostPorkRequestPorkInnerClassesSowsManure( + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + ) + """ + + def testPostPorkRequestPorkInnerClassesSowsManure(self): + """Test PostPorkRequestPorkInnerClassesSowsManure""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure_spring.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure_spring.py new file mode 100644 index 00000000..326fe898 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure_spring.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure_spring import PostPorkRequestPorkInnerClassesSowsManureSpring + +class TestPostPorkRequestPorkInnerClassesSowsManureSpring(unittest.TestCase): + """PostPorkRequestPorkInnerClassesSowsManureSpring unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesSowsManureSpring: + """Test PostPorkRequestPorkInnerClassesSowsManureSpring + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesSowsManureSpring` + """ + model = PostPorkRequestPorkInnerClassesSowsManureSpring() + if include_optional: + return PostPorkRequestPorkInnerClassesSowsManureSpring( + outdoor_systems = 1.337, + covered_anaerobic_pond = 1.337, + uncovered_anaerobic_pond = 1.337, + deep_litter = 1.337, + undefined_system = 1.337 + ) + else: + return PostPorkRequestPorkInnerClassesSowsManureSpring( + ) + """ + + def testPostPorkRequestPorkInnerClassesSowsManureSpring(self): + """Test PostPorkRequestPorkInnerClassesSowsManureSpring""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_suckers.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_suckers.py new file mode 100644 index 00000000..92ebd389 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_suckers.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request_pork_inner_classes_suckers import PostPorkRequestPorkInnerClassesSuckers + +class TestPostPorkRequestPorkInnerClassesSuckers(unittest.TestCase): + """PostPorkRequestPorkInnerClassesSuckers unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesSuckers: + """Test PostPorkRequestPorkInnerClassesSuckers + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesSuckers` + """ + model = PostPorkRequestPorkInnerClassesSuckers() + if include_optional: + return PostPorkRequestPorkInnerClassesSuckers( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ], + manure = { + 'key' : null + } + ) + else: + return PostPorkRequestPorkInnerClassesSuckers( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + manure = { + 'key' : null + }, + ) + """ + + def testPostPorkRequestPorkInnerClassesSuckers(self): + """Test PostPorkRequestPorkInnerClassesSuckers""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_weaners.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_weaners.py new file mode 100644 index 00000000..5ff71cec --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_weaners.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request_pork_inner_classes_weaners import PostPorkRequestPorkInnerClassesWeaners + +class TestPostPorkRequestPorkInnerClassesWeaners(unittest.TestCase): + """PostPorkRequestPorkInnerClassesWeaners unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesWeaners: + """Test PostPorkRequestPorkInnerClassesWeaners + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesWeaners` + """ + model = PostPorkRequestPorkInnerClassesWeaners() + if include_optional: + return PostPorkRequestPorkInnerClassesWeaners( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ], + manure = { + 'key' : null + } + ) + else: + return PostPorkRequestPorkInnerClassesWeaners( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + manure = { + 'key' : null + }, + ) + """ + + def testPostPorkRequestPorkInnerClassesWeaners(self): + """Test PostPorkRequestPorkInnerClassesWeaners""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner.py new file mode 100644 index 00000000..7bb98062 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request_pork_inner_feed_products_inner import PostPorkRequestPorkInnerFeedProductsInner + +class TestPostPorkRequestPorkInnerFeedProductsInner(unittest.TestCase): + """PostPorkRequestPorkInnerFeedProductsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequestPorkInnerFeedProductsInner: + """Test PostPorkRequestPorkInnerFeedProductsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequestPorkInnerFeedProductsInner` + """ + model = PostPorkRequestPorkInnerFeedProductsInner() + if include_optional: + return PostPorkRequestPorkInnerFeedProductsInner( + feed_purchased = 1.337, + additional_ingredients = 0, + emissions_intensity = 1.337, + ingredients = { + 'key' : null + } + ) + else: + return PostPorkRequestPorkInnerFeedProductsInner( + feed_purchased = 1.337, + additional_ingredients = 0, + emissions_intensity = 1.337, + ingredients = { + 'key' : null + }, + ) + """ + + def testPostPorkRequestPorkInnerFeedProductsInner(self): + """Test PostPorkRequestPorkInnerFeedProductsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner_ingredients.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner_ingredients.py new file mode 100644 index 00000000..0cd01412 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner_ingredients.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request_pork_inner_feed_products_inner_ingredients import PostPorkRequestPorkInnerFeedProductsInnerIngredients + +class TestPostPorkRequestPorkInnerFeedProductsInnerIngredients(unittest.TestCase): + """PostPorkRequestPorkInnerFeedProductsInnerIngredients unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequestPorkInnerFeedProductsInnerIngredients: + """Test PostPorkRequestPorkInnerFeedProductsInnerIngredients + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequestPorkInnerFeedProductsInnerIngredients` + """ + model = PostPorkRequestPorkInnerFeedProductsInnerIngredients() + if include_optional: + return PostPorkRequestPorkInnerFeedProductsInnerIngredients( + wheat = 0, + barley = 0, + whey_powder = 0, + canola_meal = 0, + soybean_meal = 0, + meat_meal = 0, + blood_meal = 0, + fishmeal = 0, + tallow = 0, + wheat_bran = 0, + beet_pulp = 0, + mill_mix = 0 + ) + else: + return PostPorkRequestPorkInnerFeedProductsInnerIngredients( + ) + """ + + def testPostPorkRequestPorkInnerFeedProductsInnerIngredients(self): + """Test PostPorkRequestPorkInnerFeedProductsInnerIngredients""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_pork_request_vegetation_inner.py new file mode 100644 index 00000000..9aa5d358 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_pork_request_vegetation_inner.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_pork_request_vegetation_inner import PostPorkRequestVegetationInner + +class TestPostPorkRequestVegetationInner(unittest.TestCase): + """PostPorkRequestVegetationInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPorkRequestVegetationInner: + """Test PostPorkRequestVegetationInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPorkRequestVegetationInner` + """ + model = PostPorkRequestVegetationInner() + if include_optional: + return PostPorkRequestVegetationInner( + vegetation = { + 'key' : null + }, + allocated_proportion = [ + 1.337 + ] + ) + else: + return PostPorkRequestVegetationInner( + vegetation = { + 'key' : null + }, + allocated_proportion = [ + 1.337 + ], + ) + """ + + def testPostPorkRequestVegetationInner(self): + """Test PostPorkRequestVegetationInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response.py b/examples/python-api-client/api-client/test/test_post_poultry200_response.py new file mode 100644 index 00000000..b0c38981 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry200_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry200_response import PostPoultry200Response + +class TestPostPoultry200Response(unittest.TestCase): + """PostPoultry200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultry200Response: + """Test PostPoultry200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultry200Response` + """ + model = PostPoultry200Response() + if include_optional: + return PostPoultry200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate_broilers = [ + { + 'key' : null + } + ], + intermediate_layers = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = { + 'key' : null + } + ) + else: + return PostPoultry200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate_broilers = [ + { + 'key' : null + } + ], + intermediate_layers = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + ) + """ + + def testPostPoultry200Response(self): + """Test PostPoultry200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_intensities.py new file mode 100644 index 00000000..ec882d2c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry200_response_intensities.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry200_response_intensities import PostPoultry200ResponseIntensities + +class TestPostPoultry200ResponseIntensities(unittest.TestCase): + """PostPoultry200ResponseIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultry200ResponseIntensities: + """Test PostPoultry200ResponseIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultry200ResponseIntensities` + """ + model = PostPoultry200ResponseIntensities() + if include_optional: + return PostPoultry200ResponseIntensities( + poultry_meat_including_sequestration = 1.337, + poultry_meat_excluding_sequestration = 1.337, + poultry_eggs_including_sequestration = 1.337, + poultry_eggs_excluding_sequestration = 1.337, + meat_produced_kg = 1.337, + eggs_produced_kg = 1.337 + ) + else: + return PostPoultry200ResponseIntensities( + poultry_meat_including_sequestration = 1.337, + poultry_meat_excluding_sequestration = 1.337, + poultry_eggs_including_sequestration = 1.337, + poultry_eggs_excluding_sequestration = 1.337, + meat_produced_kg = 1.337, + eggs_produced_kg = 1.337, + ) + """ + + def testPostPoultry200ResponseIntensities(self): + """Test PostPoultry200ResponseIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner.py new file mode 100644 index 00000000..5ea8c76d --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry200_response_intermediate_broilers_inner import PostPoultry200ResponseIntermediateBroilersInner + +class TestPostPoultry200ResponseIntermediateBroilersInner(unittest.TestCase): + """PostPoultry200ResponseIntermediateBroilersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultry200ResponseIntermediateBroilersInner: + """Test PostPoultry200ResponseIntermediateBroilersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultry200ResponseIntermediateBroilersInner` + """ + model = PostPoultry200ResponseIntermediateBroilersInner() + if include_optional: + return PostPoultry200ResponseIntermediateBroilersInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intensities = { + 'key' : null + }, + net = { + 'key' : null + } + ) + else: + return PostPoultry200ResponseIntermediateBroilersInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + ) + """ + + def testPostPoultry200ResponseIntermediateBroilersInner(self): + """Test PostPoultry200ResponseIntermediateBroilersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner_intensities.py new file mode 100644 index 00000000..622211ff --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner_intensities.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry200_response_intermediate_broilers_inner_intensities import PostPoultry200ResponseIntermediateBroilersInnerIntensities + +class TestPostPoultry200ResponseIntermediateBroilersInnerIntensities(unittest.TestCase): + """PostPoultry200ResponseIntermediateBroilersInnerIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultry200ResponseIntermediateBroilersInnerIntensities: + """Test PostPoultry200ResponseIntermediateBroilersInnerIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultry200ResponseIntermediateBroilersInnerIntensities` + """ + model = PostPoultry200ResponseIntermediateBroilersInnerIntensities() + if include_optional: + return PostPoultry200ResponseIntermediateBroilersInnerIntensities( + poultry_meat_including_sequestration = 1.337, + poultry_meat_excluding_sequestration = 1.337, + meat_produced_kg = 1.337 + ) + else: + return PostPoultry200ResponseIntermediateBroilersInnerIntensities( + poultry_meat_including_sequestration = 1.337, + poultry_meat_excluding_sequestration = 1.337, + meat_produced_kg = 1.337, + ) + """ + + def testPostPoultry200ResponseIntermediateBroilersInnerIntensities(self): + """Test PostPoultry200ResponseIntermediateBroilersInnerIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner.py new file mode 100644 index 00000000..946bb8eb --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry200_response_intermediate_layers_inner import PostPoultry200ResponseIntermediateLayersInner + +class TestPostPoultry200ResponseIntermediateLayersInner(unittest.TestCase): + """PostPoultry200ResponseIntermediateLayersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultry200ResponseIntermediateLayersInner: + """Test PostPoultry200ResponseIntermediateLayersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultry200ResponseIntermediateLayersInner` + """ + model = PostPoultry200ResponseIntermediateLayersInner() + if include_optional: + return PostPoultry200ResponseIntermediateLayersInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intensities = { + 'key' : null + }, + net = { + 'key' : null + } + ) + else: + return PostPoultry200ResponseIntermediateLayersInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + ) + """ + + def testPostPoultry200ResponseIntermediateLayersInner(self): + """Test PostPoultry200ResponseIntermediateLayersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner_intensities.py new file mode 100644 index 00000000..afc1e883 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner_intensities.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry200_response_intermediate_layers_inner_intensities import PostPoultry200ResponseIntermediateLayersInnerIntensities + +class TestPostPoultry200ResponseIntermediateLayersInnerIntensities(unittest.TestCase): + """PostPoultry200ResponseIntermediateLayersInnerIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultry200ResponseIntermediateLayersInnerIntensities: + """Test PostPoultry200ResponseIntermediateLayersInnerIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultry200ResponseIntermediateLayersInnerIntensities` + """ + model = PostPoultry200ResponseIntermediateLayersInnerIntensities() + if include_optional: + return PostPoultry200ResponseIntermediateLayersInnerIntensities( + poultry_eggs_including_sequestration = 1.337, + poultry_eggs_excluding_sequestration = 1.337, + eggs_produced_kg = 1.337 + ) + else: + return PostPoultry200ResponseIntermediateLayersInnerIntensities( + poultry_eggs_including_sequestration = 1.337, + poultry_eggs_excluding_sequestration = 1.337, + eggs_produced_kg = 1.337, + ) + """ + + def testPostPoultry200ResponseIntermediateLayersInnerIntensities(self): + """Test PostPoultry200ResponseIntermediateLayersInnerIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_net.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_net.py new file mode 100644 index 00000000..e6caa6d3 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry200_response_net.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry200_response_net import PostPoultry200ResponseNet + +class TestPostPoultry200ResponseNet(unittest.TestCase): + """PostPoultry200ResponseNet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultry200ResponseNet: + """Test PostPoultry200ResponseNet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultry200ResponseNet` + """ + model = PostPoultry200ResponseNet() + if include_optional: + return PostPoultry200ResponseNet( + total = 1.337, + broilers = 1.337, + layers = 1.337 + ) + else: + return PostPoultry200ResponseNet( + total = 1.337, + broilers = 1.337, + layers = 1.337, + ) + """ + + def testPostPoultry200ResponseNet(self): + """Test PostPoultry200ResponseNet""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_scope1.py new file mode 100644 index 00000000..58aa188a --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry200_response_scope1.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry200_response_scope1 import PostPoultry200ResponseScope1 + +class TestPostPoultry200ResponseScope1(unittest.TestCase): + """PostPoultry200ResponseScope1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultry200ResponseScope1: + """Test PostPoultry200ResponseScope1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultry200ResponseScope1` + """ + model = PostPoultry200ResponseScope1() + if include_optional: + return PostPoultry200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + manure_management_ch4 = 1.337, + manure_management_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337 + ) + else: + return PostPoultry200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + manure_management_ch4 = 1.337, + manure_management_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337, + ) + """ + + def testPostPoultry200ResponseScope1(self): + """Test PostPoultry200ResponseScope1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_scope3.py new file mode 100644 index 00000000..f5018958 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry200_response_scope3.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry200_response_scope3 import PostPoultry200ResponseScope3 + +class TestPostPoultry200ResponseScope3(unittest.TestCase): + """PostPoultry200ResponseScope3 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultry200ResponseScope3: + """Test PostPoultry200ResponseScope3 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultry200ResponseScope3` + """ + model = PostPoultry200ResponseScope3() + if include_optional: + return PostPoultry200ResponseScope3( + purchased_feed = 1.337, + purchased_hay = 1.337, + purchased_livestock = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + total = 1.337 + ) + else: + return PostPoultry200ResponseScope3( + purchased_feed = 1.337, + purchased_hay = 1.337, + purchased_livestock = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + total = 1.337, + ) + """ + + def testPostPoultry200ResponseScope3(self): + """Test PostPoultry200ResponseScope3""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request.py b/examples/python-api-client/api-client/test/test_post_poultry_request.py new file mode 100644 index 00000000..1b1b25dc --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request import PostPoultryRequest + +class TestPostPoultryRequest(unittest.TestCase): + """PostPoultryRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequest: + """Test PostPoultryRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequest` + """ + model = PostPoultryRequest() + if include_optional: + return PostPoultryRequest( + state = 'nsw', + north_of_tropic_of_capricorn = True, + rainfall_above600 = True, + broilers = [ + { + 'key' : null + } + ], + layers = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostPoultryRequest( + state = 'nsw', + north_of_tropic_of_capricorn = True, + rainfall_above600 = True, + broilers = [ + { + 'key' : null + } + ], + layers = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostPoultryRequest(self): + """Test PostPoultryRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner.py new file mode 100644 index 00000000..abcf0c41 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_broilers_inner import PostPoultryRequestBroilersInner + +class TestPostPoultryRequestBroilersInner(unittest.TestCase): + """PostPoultryRequestBroilersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestBroilersInner: + """Test PostPoultryRequestBroilersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestBroilersInner` + """ + model = PostPoultryRequestBroilersInner() + if include_optional: + return PostPoultryRequestBroilersInner( + id = '', + groups = [ + { + 'key' : null + } + ], + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + hay = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + manure_waste_allocation = 1.337, + waste_handled_drylot_or_storage = 1.337, + litter_recycled = 1.337, + litter_recycle_frequency = 1.337, + purchased_free_range = 1.337, + meat_chicken_growers_purchases = { + 'key' : null + }, + meat_chicken_layers_purchases = { + 'key' : null + }, + meat_other_purchases = { + 'key' : null + }, + sales = [ + { + 'key' : null + } + ] + ) + else: + return PostPoultryRequestBroilersInner( + groups = [ + { + 'key' : null + } + ], + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + hay = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + manure_waste_allocation = 1.337, + waste_handled_drylot_or_storage = 1.337, + litter_recycled = 1.337, + litter_recycle_frequency = 1.337, + purchased_free_range = 1.337, + meat_chicken_growers_purchases = { + 'key' : null + }, + meat_chicken_layers_purchases = { + 'key' : null + }, + meat_other_purchases = { + 'key' : null + }, + sales = [ + { + 'key' : null + } + ], + ) + """ + + def testPostPoultryRequestBroilersInner(self): + """Test PostPoultryRequestBroilersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner.py new file mode 100644 index 00000000..e6009ef4 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner import PostPoultryRequestBroilersInnerGroupsInner + +class TestPostPoultryRequestBroilersInnerGroupsInner(unittest.TestCase): + """PostPoultryRequestBroilersInnerGroupsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerGroupsInner: + """Test PostPoultryRequestBroilersInnerGroupsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestBroilersInnerGroupsInner` + """ + model = PostPoultryRequestBroilersInnerGroupsInner() + if include_optional: + return PostPoultryRequestBroilersInnerGroupsInner( + meat_chicken_growers = { + 'key' : null + }, + meat_chicken_layers = { + 'key' : null + }, + meat_other = { + 'key' : null + }, + feed = [ + { + 'key' : null + } + ], + custom_feed_purchased = 1.337, + custom_feed_emission_intensity = 1.337 + ) + else: + return PostPoultryRequestBroilersInnerGroupsInner( + meat_chicken_growers = { + 'key' : null + }, + meat_chicken_layers = { + 'key' : null + }, + meat_other = { + 'key' : null + }, + feed = [ + { + 'key' : null + } + ], + custom_feed_purchased = 1.337, + custom_feed_emission_intensity = 1.337, + ) + """ + + def testPostPoultryRequestBroilersInnerGroupsInner(self): + """Test PostPoultryRequestBroilersInnerGroupsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner.py new file mode 100644 index 00000000..39560083 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner import PostPoultryRequestBroilersInnerGroupsInnerFeedInner + +class TestPostPoultryRequestBroilersInnerGroupsInnerFeedInner(unittest.TestCase): + """PostPoultryRequestBroilersInnerGroupsInnerFeedInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerGroupsInnerFeedInner: + """Test PostPoultryRequestBroilersInnerGroupsInnerFeedInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestBroilersInnerGroupsInnerFeedInner` + """ + model = PostPoultryRequestBroilersInnerGroupsInnerFeedInner() + if include_optional: + return PostPoultryRequestBroilersInnerGroupsInnerFeedInner( + ingredients = { + 'key' : null + }, + feed_purchased = 1.337, + additional_ingredient = 1.337, + emission_intensity = 1.337 + ) + else: + return PostPoultryRequestBroilersInnerGroupsInnerFeedInner( + ingredients = { + 'key' : null + }, + feed_purchased = 1.337, + additional_ingredient = 1.337, + emission_intensity = 1.337, + ) + """ + + def testPostPoultryRequestBroilersInnerGroupsInnerFeedInner(self): + """Test PostPoultryRequestBroilersInnerGroupsInnerFeedInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py new file mode 100644 index 00000000..49b923c0 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients import PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients + +class TestPostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients(unittest.TestCase): + """PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients: + """Test PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients` + """ + model = PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients() + if include_optional: + return PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients( + wheat = 1.337, + barley = 1.337, + sorghum = 1.337, + soybean = 1.337, + millrun = 1.337 + ) + else: + return PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients( + ) + """ + + def testPostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients(self): + """Test PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py new file mode 100644 index 00000000..ec8f8fd8 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers import PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers + +class TestPostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers(unittest.TestCase): + """PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers: + """Test PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers` + """ + model = PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers() + if include_optional: + return PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers( + birds = 1.337, + average_stay_length50 = 1.337, + liveweight50 = 1.337, + average_stay_length100 = 1.337, + liveweight100 = 1.337, + dry_matter_intake = 1.337, + dry_matter_digestibility = 1.337, + crude_protein = 1.337, + manure_ash = 1.337, + nitrogen_retention_rate = 1.337 + ) + else: + return PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers( + birds = 1.337, + average_stay_length50 = 1.337, + liveweight50 = 1.337, + average_stay_length100 = 1.337, + liveweight100 = 1.337, + ) + """ + + def testPostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers(self): + """Test PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py new file mode 100644 index 00000000..b4df0e84 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_growers_purchases import PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases + +class TestPostPoultryRequestBroilersInnerMeatChickenGrowersPurchases(unittest.TestCase): + """PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases: + """Test PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases` + """ + model = PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases() + if include_optional: + return PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases( + head = 1.337, + purchase_weight = 1.337 + ) + else: + return PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases( + head = 1.337, + purchase_weight = 1.337, + ) + """ + + def testPostPoultryRequestBroilersInnerMeatChickenGrowersPurchases(self): + """Test PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py new file mode 100644 index 00000000..7e9f0221 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_layers_purchases import PostPoultryRequestBroilersInnerMeatChickenLayersPurchases + +class TestPostPoultryRequestBroilersInnerMeatChickenLayersPurchases(unittest.TestCase): + """PostPoultryRequestBroilersInnerMeatChickenLayersPurchases unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerMeatChickenLayersPurchases: + """Test PostPoultryRequestBroilersInnerMeatChickenLayersPurchases + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestBroilersInnerMeatChickenLayersPurchases` + """ + model = PostPoultryRequestBroilersInnerMeatChickenLayersPurchases() + if include_optional: + return PostPoultryRequestBroilersInnerMeatChickenLayersPurchases( + head = 1.337, + purchase_weight = 1.337 + ) + else: + return PostPoultryRequestBroilersInnerMeatChickenLayersPurchases( + head = 1.337, + purchase_weight = 1.337, + ) + """ + + def testPostPoultryRequestBroilersInnerMeatChickenLayersPurchases(self): + """Test PostPoultryRequestBroilersInnerMeatChickenLayersPurchases""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_other_purchases.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_other_purchases.py new file mode 100644 index 00000000..c2b72e50 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_other_purchases.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_broilers_inner_meat_other_purchases import PostPoultryRequestBroilersInnerMeatOtherPurchases + +class TestPostPoultryRequestBroilersInnerMeatOtherPurchases(unittest.TestCase): + """PostPoultryRequestBroilersInnerMeatOtherPurchases unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerMeatOtherPurchases: + """Test PostPoultryRequestBroilersInnerMeatOtherPurchases + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestBroilersInnerMeatOtherPurchases` + """ + model = PostPoultryRequestBroilersInnerMeatOtherPurchases() + if include_optional: + return PostPoultryRequestBroilersInnerMeatOtherPurchases( + head = 1.337, + purchase_weight = 1.337 + ) + else: + return PostPoultryRequestBroilersInnerMeatOtherPurchases( + head = 1.337, + purchase_weight = 1.337, + ) + """ + + def testPostPoultryRequestBroilersInnerMeatOtherPurchases(self): + """Test PostPoultryRequestBroilersInnerMeatOtherPurchases""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_sales_inner.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_sales_inner.py new file mode 100644 index 00000000..08976099 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_sales_inner.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_broilers_inner_sales_inner import PostPoultryRequestBroilersInnerSalesInner + +class TestPostPoultryRequestBroilersInnerSalesInner(unittest.TestCase): + """PostPoultryRequestBroilersInnerSalesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerSalesInner: + """Test PostPoultryRequestBroilersInnerSalesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestBroilersInnerSalesInner` + """ + model = PostPoultryRequestBroilersInnerSalesInner() + if include_optional: + return PostPoultryRequestBroilersInnerSalesInner( + meat_chicken_growers_sales = { + 'key' : null + }, + meat_chicken_layers = { + 'key' : null + }, + meat_other = { + 'key' : null + } + ) + else: + return PostPoultryRequestBroilersInnerSalesInner( + meat_chicken_growers_sales = { + 'key' : null + }, + meat_chicken_layers = { + 'key' : null + }, + meat_other = { + 'key' : null + }, + ) + """ + + def testPostPoultryRequestBroilersInnerSalesInner(self): + """Test PostPoultryRequestBroilersInnerSalesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner.py b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner.py new file mode 100644 index 00000000..c69577d9 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_layers_inner import PostPoultryRequestLayersInner + +class TestPostPoultryRequestLayersInner(unittest.TestCase): + """PostPoultryRequestLayersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestLayersInner: + """Test PostPoultryRequestLayersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestLayersInner` + """ + model = PostPoultryRequestLayersInner() + if include_optional: + return PostPoultryRequestLayersInner( + id = '', + layers = { + 'key' : null + }, + meat_chicken_layers = { + 'key' : null + }, + feed = [ + { + 'key' : null + } + ], + purchased_free_range = 1.337, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + hay = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + manure_waste_allocation = 1.337, + waste_handled_drylot_or_storage = 1.337, + litter_recycled = 1.337, + litter_recycle_frequency = 1.337, + meat_chicken_layers_purchases = { + 'key' : null + }, + layers_purchases = { + 'key' : null + }, + custom_feed_purchased = 1.337, + custom_feed_emission_intensity = 1.337, + meat_chicken_layers_egg_sale = { + 'key' : null + }, + layers_egg_sale = { + 'key' : null + } + ) + else: + return PostPoultryRequestLayersInner( + layers = { + 'key' : null + }, + meat_chicken_layers = { + 'key' : null + }, + feed = [ + { + 'key' : null + } + ], + purchased_free_range = 1.337, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + hay = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + manure_waste_allocation = 1.337, + waste_handled_drylot_or_storage = 1.337, + litter_recycled = 1.337, + litter_recycle_frequency = 1.337, + meat_chicken_layers_purchases = { + 'key' : null + }, + layers_purchases = { + 'key' : null + }, + custom_feed_purchased = 1.337, + custom_feed_emission_intensity = 1.337, + meat_chicken_layers_egg_sale = { + 'key' : null + }, + layers_egg_sale = { + 'key' : null + }, + ) + """ + + def testPostPoultryRequestLayersInner(self): + """Test PostPoultryRequestLayersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers.py b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers.py new file mode 100644 index 00000000..6f5bc4fe --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_layers_inner_layers import PostPoultryRequestLayersInnerLayers + +class TestPostPoultryRequestLayersInnerLayers(unittest.TestCase): + """PostPoultryRequestLayersInnerLayers unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestLayersInnerLayers: + """Test PostPoultryRequestLayersInnerLayers + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestLayersInnerLayers` + """ + model = PostPoultryRequestLayersInnerLayers() + if include_optional: + return PostPoultryRequestLayersInnerLayers( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337 + ) + else: + return PostPoultryRequestLayersInnerLayers( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + ) + """ + + def testPostPoultryRequestLayersInnerLayers(self): + """Test PostPoultryRequestLayersInnerLayers""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_egg_sale.py b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_egg_sale.py new file mode 100644 index 00000000..a195d572 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_egg_sale.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_layers_inner_layers_egg_sale import PostPoultryRequestLayersInnerLayersEggSale + +class TestPostPoultryRequestLayersInnerLayersEggSale(unittest.TestCase): + """PostPoultryRequestLayersInnerLayersEggSale unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestLayersInnerLayersEggSale: + """Test PostPoultryRequestLayersInnerLayersEggSale + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestLayersInnerLayersEggSale` + """ + model = PostPoultryRequestLayersInnerLayersEggSale() + if include_optional: + return PostPoultryRequestLayersInnerLayersEggSale( + eggs_produced = 1.337, + average_weight = 1.337 + ) + else: + return PostPoultryRequestLayersInnerLayersEggSale( + eggs_produced = 1.337, + average_weight = 1.337, + ) + """ + + def testPostPoultryRequestLayersInnerLayersEggSale(self): + """Test PostPoultryRequestLayersInnerLayersEggSale""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_purchases.py b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_purchases.py new file mode 100644 index 00000000..77379408 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_purchases.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_layers_inner_layers_purchases import PostPoultryRequestLayersInnerLayersPurchases + +class TestPostPoultryRequestLayersInnerLayersPurchases(unittest.TestCase): + """PostPoultryRequestLayersInnerLayersPurchases unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestLayersInnerLayersPurchases: + """Test PostPoultryRequestLayersInnerLayersPurchases + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestLayersInnerLayersPurchases` + """ + model = PostPoultryRequestLayersInnerLayersPurchases() + if include_optional: + return PostPoultryRequestLayersInnerLayersPurchases( + head = 1.337, + purchase_weight = 1.337 + ) + else: + return PostPoultryRequestLayersInnerLayersPurchases( + head = 1.337, + purchase_weight = 1.337, + ) + """ + + def testPostPoultryRequestLayersInnerLayersPurchases(self): + """Test PostPoultryRequestLayersInnerLayersPurchases""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers.py b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers.py new file mode 100644 index 00000000..2ff5d48a --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_layers_inner_meat_chicken_layers import PostPoultryRequestLayersInnerMeatChickenLayers + +class TestPostPoultryRequestLayersInnerMeatChickenLayers(unittest.TestCase): + """PostPoultryRequestLayersInnerMeatChickenLayers unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestLayersInnerMeatChickenLayers: + """Test PostPoultryRequestLayersInnerMeatChickenLayers + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestLayersInnerMeatChickenLayers` + """ + model = PostPoultryRequestLayersInnerMeatChickenLayers() + if include_optional: + return PostPoultryRequestLayersInnerMeatChickenLayers( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337 + ) + else: + return PostPoultryRequestLayersInnerMeatChickenLayers( + autumn = 1.337, + winter = 1.337, + spring = 1.337, + summer = 1.337, + ) + """ + + def testPostPoultryRequestLayersInnerMeatChickenLayers(self): + """Test PostPoultryRequestLayersInnerMeatChickenLayers""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py new file mode 100644 index 00000000..1c372630 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_layers_inner_meat_chicken_layers_egg_sale import PostPoultryRequestLayersInnerMeatChickenLayersEggSale + +class TestPostPoultryRequestLayersInnerMeatChickenLayersEggSale(unittest.TestCase): + """PostPoultryRequestLayersInnerMeatChickenLayersEggSale unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestLayersInnerMeatChickenLayersEggSale: + """Test PostPoultryRequestLayersInnerMeatChickenLayersEggSale + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestLayersInnerMeatChickenLayersEggSale` + """ + model = PostPoultryRequestLayersInnerMeatChickenLayersEggSale() + if include_optional: + return PostPoultryRequestLayersInnerMeatChickenLayersEggSale( + eggs_produced = 1.337, + average_weight = 1.337 + ) + else: + return PostPoultryRequestLayersInnerMeatChickenLayersEggSale( + eggs_produced = 1.337, + average_weight = 1.337, + ) + """ + + def testPostPoultryRequestLayersInnerMeatChickenLayersEggSale(self): + """Test PostPoultryRequestLayersInnerMeatChickenLayersEggSale""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_poultry_request_vegetation_inner.py new file mode 100644 index 00000000..6530a8d1 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_poultry_request_vegetation_inner.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_poultry_request_vegetation_inner import PostPoultryRequestVegetationInner + +class TestPostPoultryRequestVegetationInner(unittest.TestCase): + """PostPoultryRequestVegetationInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostPoultryRequestVegetationInner: + """Test PostPoultryRequestVegetationInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostPoultryRequestVegetationInner` + """ + model = PostPoultryRequestVegetationInner() + if include_optional: + return PostPoultryRequestVegetationInner( + vegetation = { + 'key' : null + }, + broilers_proportion = [ + 1.337 + ], + layers_proportion = [ + 1.337 + ] + ) + else: + return PostPoultryRequestVegetationInner( + vegetation = { + 'key' : null + }, + broilers_proportion = [ + 1.337 + ], + layers_proportion = [ + 1.337 + ], + ) + """ + + def testPostPoultryRequestVegetationInner(self): + """Test PostPoultryRequestVegetationInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing200_response.py b/examples/python-api-client/api-client/test/test_post_processing200_response.py new file mode 100644 index 00000000..8b81b6b7 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_processing200_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_processing200_response import PostProcessing200Response + +class TestPostProcessing200Response(unittest.TestCase): + """PostProcessing200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostProcessing200Response: + """Test PostProcessing200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostProcessing200Response` + """ + model = PostProcessing200Response() + if include_optional: + return PostProcessing200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + purchased_offsets = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = [ + { + 'key' : null + } + ], + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ] + ) + else: + return PostProcessing200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + purchased_offsets = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = [ + { + 'key' : null + } + ], + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + ) + """ + + def testPostProcessing200Response(self): + """Test PostProcessing200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing200_response_intensities_inner.py b/examples/python-api-client/api-client/test/test_post_processing200_response_intensities_inner.py new file mode 100644 index 00000000..240f4cdc --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_processing200_response_intensities_inner.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_processing200_response_intensities_inner import PostProcessing200ResponseIntensitiesInner + +class TestPostProcessing200ResponseIntensitiesInner(unittest.TestCase): + """PostProcessing200ResponseIntensitiesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostProcessing200ResponseIntensitiesInner: + """Test PostProcessing200ResponseIntensitiesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostProcessing200ResponseIntensitiesInner` + """ + model = PostProcessing200ResponseIntensitiesInner() + if include_optional: + return PostProcessing200ResponseIntensitiesInner( + units_produced = 1.337, + unit_of_product = 'litre', + processing_excluding_carbon_offsets = 1.337, + processing_including_carbon_offsets = 1.337 + ) + else: + return PostProcessing200ResponseIntensitiesInner( + units_produced = 1.337, + unit_of_product = 'litre', + processing_excluding_carbon_offsets = 1.337, + processing_including_carbon_offsets = 1.337, + ) + """ + + def testPostProcessing200ResponseIntensitiesInner(self): + """Test PostProcessing200ResponseIntensitiesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_processing200_response_intermediate_inner.py new file mode 100644 index 00000000..78a09351 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_processing200_response_intermediate_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_processing200_response_intermediate_inner import PostProcessing200ResponseIntermediateInner + +class TestPostProcessing200ResponseIntermediateInner(unittest.TestCase): + """PostProcessing200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostProcessing200ResponseIntermediateInner: + """Test PostProcessing200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostProcessing200ResponseIntermediateInner` + """ + model = PostProcessing200ResponseIntermediateInner() + if include_optional: + return PostProcessing200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intensities = { + 'key' : null + }, + net = { + 'key' : null + } + ) + else: + return PostProcessing200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + ) + """ + + def testPostProcessing200ResponseIntermediateInner(self): + """Test PostProcessing200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing200_response_net.py b/examples/python-api-client/api-client/test/test_post_processing200_response_net.py new file mode 100644 index 00000000..1548d9ff --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_processing200_response_net.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_processing200_response_net import PostProcessing200ResponseNet + +class TestPostProcessing200ResponseNet(unittest.TestCase): + """PostProcessing200ResponseNet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostProcessing200ResponseNet: + """Test PostProcessing200ResponseNet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostProcessing200ResponseNet` + """ + model = PostProcessing200ResponseNet() + if include_optional: + return PostProcessing200ResponseNet( + total = 1.337 + ) + else: + return PostProcessing200ResponseNet( + total = 1.337, + ) + """ + + def testPostProcessing200ResponseNet(self): + """Test PostProcessing200ResponseNet""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_processing200_response_scope1.py new file mode 100644 index 00000000..4aa407df --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_processing200_response_scope1.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_processing200_response_scope1 import PostProcessing200ResponseScope1 + +class TestPostProcessing200ResponseScope1(unittest.TestCase): + """PostProcessing200ResponseScope1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostProcessing200ResponseScope1: + """Test PostProcessing200ResponseScope1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostProcessing200ResponseScope1` + """ + model = PostProcessing200ResponseScope1() + if include_optional: + return PostProcessing200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + hfcs_refrigerant_leakage = 1.337, + purchased_co2 = 1.337, + wastewater_co2 = 1.337, + composted_solid_waste_co2 = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total_hfcs = 1.337, + total = 1.337 + ) + else: + return PostProcessing200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + hfcs_refrigerant_leakage = 1.337, + purchased_co2 = 1.337, + wastewater_co2 = 1.337, + composted_solid_waste_co2 = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total_hfcs = 1.337, + total = 1.337, + ) + """ + + def testPostProcessing200ResponseScope1(self): + """Test PostProcessing200ResponseScope1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_processing200_response_scope3.py new file mode 100644 index 00000000..2d35bddc --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_processing200_response_scope3.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_processing200_response_scope3 import PostProcessing200ResponseScope3 + +class TestPostProcessing200ResponseScope3(unittest.TestCase): + """PostProcessing200ResponseScope3 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostProcessing200ResponseScope3: + """Test PostProcessing200ResponseScope3 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostProcessing200ResponseScope3` + """ + model = PostProcessing200ResponseScope3() + if include_optional: + return PostProcessing200ResponseScope3( + electricity = 1.337, + fuel = 1.337, + solid_waste_sent_offsite = 1.337, + total = 1.337 + ) + else: + return PostProcessing200ResponseScope3( + electricity = 1.337, + fuel = 1.337, + solid_waste_sent_offsite = 1.337, + total = 1.337, + ) + """ + + def testPostProcessing200ResponseScope3(self): + """Test PostProcessing200ResponseScope3""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing_request.py b/examples/python-api-client/api-client/test/test_post_processing_request.py new file mode 100644 index 00000000..929f1a23 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_processing_request.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_processing_request import PostProcessingRequest + +class TestPostProcessingRequest(unittest.TestCase): + """PostProcessingRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostProcessingRequest: + """Test PostProcessingRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostProcessingRequest` + """ + model = PostProcessingRequest() + if include_optional: + return PostProcessingRequest( + state = 'nsw', + products = [ + { + 'key' : null + } + ] + ) + else: + return PostProcessingRequest( + state = 'nsw', + products = [ + { + 'key' : null + } + ], + ) + """ + + def testPostProcessingRequest(self): + """Test PostProcessingRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing_request_products_inner.py b/examples/python-api-client/api-client/test/test_post_processing_request_products_inner.py new file mode 100644 index 00000000..c3fe2e1a --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_processing_request_products_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_processing_request_products_inner import PostProcessingRequestProductsInner + +class TestPostProcessingRequestProductsInner(unittest.TestCase): + """PostProcessingRequestProductsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostProcessingRequestProductsInner: + """Test PostProcessingRequestProductsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostProcessingRequestProductsInner` + """ + model = PostProcessingRequestProductsInner() + if include_optional: + return PostProcessingRequestProductsInner( + id = '', + product = { + 'key' : null + }, + electricity_renewable = 0, + electricity_use = 1.337, + electricity_source = 'State Grid', + fuel = { + 'key' : null + }, + refrigerants = [ + openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner.post_horticulture_request_crops_inner_refrigerants_inner( + refrigerant = 'HFC-23', + charge_size = 1.337, ) + ], + fluid_waste = [ + { + 'key' : null + } + ], + solid_waste = { + 'key' : null + }, + purchased_co2 = 1.337, + carbon_offsets = 1.337 + ) + else: + return PostProcessingRequestProductsInner( + product = { + 'key' : null + }, + electricity_renewable = 0, + electricity_use = 1.337, + electricity_source = 'State Grid', + fuel = { + 'key' : null + }, + refrigerants = [ + openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner.post_horticulture_request_crops_inner_refrigerants_inner( + refrigerant = 'HFC-23', + charge_size = 1.337, ) + ], + fluid_waste = [ + { + 'key' : null + } + ], + solid_waste = { + 'key' : null + }, + purchased_co2 = 1.337, + ) + """ + + def testPostProcessingRequestProductsInner(self): + """Test PostProcessingRequestProductsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing_request_products_inner_product.py b/examples/python-api-client/api-client/test/test_post_processing_request_products_inner_product.py new file mode 100644 index 00000000..fbcbf54d --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_processing_request_products_inner_product.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_processing_request_products_inner_product import PostProcessingRequestProductsInnerProduct + +class TestPostProcessingRequestProductsInnerProduct(unittest.TestCase): + """PostProcessingRequestProductsInnerProduct unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostProcessingRequestProductsInnerProduct: + """Test PostProcessingRequestProductsInnerProduct + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostProcessingRequestProductsInnerProduct` + """ + model = PostProcessingRequestProductsInnerProduct() + if include_optional: + return PostProcessingRequestProductsInnerProduct( + unit = 'litre', + amount_made_per_year = 1.337 + ) + else: + return PostProcessingRequestProductsInnerProduct( + unit = 'litre', + amount_made_per_year = 1.337, + ) + """ + + def testPostProcessingRequestProductsInnerProduct(self): + """Test PostProcessingRequestProductsInnerProduct""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_rice200_response.py b/examples/python-api-client/api-client/test/test_post_rice200_response.py new file mode 100644 index 00000000..6d140d2d --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_rice200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_rice200_response import PostRice200Response + +class TestPostRice200Response(unittest.TestCase): + """PostRice200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostRice200Response: + """Test PostRice200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostRice200Response` + """ + model = PostRice200Response() + if include_optional: + return PostRice200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = { + 'key' : null + } + ) + else: + return PostRice200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + ) + """ + + def testPostRice200Response(self): + """Test PostRice200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_rice200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_rice200_response_intensities.py new file mode 100644 index 00000000..67fb71c7 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_rice200_response_intensities.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_rice200_response_intensities import PostRice200ResponseIntensities + +class TestPostRice200ResponseIntensities(unittest.TestCase): + """PostRice200ResponseIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostRice200ResponseIntensities: + """Test PostRice200ResponseIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostRice200ResponseIntensities` + """ + model = PostRice200ResponseIntensities() + if include_optional: + return PostRice200ResponseIntensities( + rice_produced_tonnes = 1.337, + rice_excluding_sequestration = 1.337, + rice_including_sequestration = 1.337, + intensity = 1.337 + ) + else: + return PostRice200ResponseIntensities( + rice_produced_tonnes = 1.337, + rice_excluding_sequestration = 1.337, + rice_including_sequestration = 1.337, + intensity = 1.337, + ) + """ + + def testPostRice200ResponseIntensities(self): + """Test PostRice200ResponseIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner.py new file mode 100644 index 00000000..b9ae225a --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_rice200_response_intermediate_inner import PostRice200ResponseIntermediateInner + +class TestPostRice200ResponseIntermediateInner(unittest.TestCase): + """PostRice200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostRice200ResponseIntermediateInner: + """Test PostRice200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostRice200ResponseIntermediateInner` + """ + model = PostRice200ResponseIntermediateInner() + if include_optional: + return PostRice200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + intensities = { + 'key' : null + }, + net = { + 'key' : null + } + ) + else: + return PostRice200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + ) + """ + + def testPostRice200ResponseIntermediateInner(self): + """Test PostRice200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..9850bcf0 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner_intensities.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_rice200_response_intermediate_inner_intensities import PostRice200ResponseIntermediateInnerIntensities + +class TestPostRice200ResponseIntermediateInnerIntensities(unittest.TestCase): + """PostRice200ResponseIntermediateInnerIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostRice200ResponseIntermediateInnerIntensities: + """Test PostRice200ResponseIntermediateInnerIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostRice200ResponseIntermediateInnerIntensities` + """ + model = PostRice200ResponseIntermediateInnerIntensities() + if include_optional: + return PostRice200ResponseIntermediateInnerIntensities( + rice_produced_tonnes = 1.337, + rice_excluding_sequestration = 1.337, + rice_including_sequestration = 1.337, + intensity = 1.337 + ) + else: + return PostRice200ResponseIntermediateInnerIntensities( + rice_produced_tonnes = 1.337, + rice_excluding_sequestration = 1.337, + rice_including_sequestration = 1.337, + intensity = 1.337, + ) + """ + + def testPostRice200ResponseIntermediateInnerIntensities(self): + """Test PostRice200ResponseIntermediateInnerIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_rice200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_rice200_response_scope1.py new file mode 100644 index 00000000..445222e8 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_rice200_response_scope1.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_rice200_response_scope1 import PostRice200ResponseScope1 + +class TestPostRice200ResponseScope1(unittest.TestCase): + """PostRice200ResponseScope1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostRice200ResponseScope1: + """Test PostRice200ResponseScope1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostRice200ResponseScope1` + """ + model = PostRice200ResponseScope1() + if include_optional: + return PostRice200ResponseScope1( + fuel_co2 = 1.337, + lime_co2 = 1.337, + urea_co2 = 1.337, + field_burning_ch4 = 1.337, + rice_cultivation_ch4 = 1.337, + fuel_ch4 = 1.337, + fertiliser_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + field_burning_n2_o = 1.337, + crop_residue_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + fuel_n2_o = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337 + ) + else: + return PostRice200ResponseScope1( + fuel_co2 = 1.337, + lime_co2 = 1.337, + urea_co2 = 1.337, + field_burning_ch4 = 1.337, + rice_cultivation_ch4 = 1.337, + fuel_ch4 = 1.337, + fertiliser_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + field_burning_n2_o = 1.337, + crop_residue_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + fuel_n2_o = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337, + ) + """ + + def testPostRice200ResponseScope1(self): + """Test PostRice200ResponseScope1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_rice_request.py b/examples/python-api-client/api-client/test/test_post_rice_request.py new file mode 100644 index 00000000..3316dd91 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_rice_request.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_rice_request import PostRiceRequest + +class TestPostRiceRequest(unittest.TestCase): + """PostRiceRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostRiceRequest: + """Test PostRiceRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostRiceRequest` + """ + model = PostRiceRequest() + if include_optional: + return PostRiceRequest( + state = 'nsw', + crops = [ + { + 'key' : null + } + ], + electricity_renewable = 0, + electricity_use = 1.337, + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostRiceRequest( + state = 'nsw', + crops = [ + { + 'key' : null + } + ], + electricity_renewable = 0, + electricity_use = 1.337, + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostRiceRequest(self): + """Test PostRiceRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_rice_request_crops_inner.py b/examples/python-api-client/api-client/test/test_post_rice_request_crops_inner.py new file mode 100644 index 00000000..b9a667a0 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_rice_request_crops_inner.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_rice_request_crops_inner import PostRiceRequestCropsInner + +class TestPostRiceRequestCropsInner(unittest.TestCase): + """PostRiceRequestCropsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostRiceRequestCropsInner: + """Test PostRiceRequestCropsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostRiceRequestCropsInner` + """ + model = PostRiceRequestCropsInner() + if include_optional: + return PostRiceRequestCropsInner( + id = '', + state = 'nsw', + average_rice_yield = 1.337, + area_sown = 1.337, + growing_season_days = 1.337, + water_regime_type = 'Upland', + water_regime_sub_type = 'Continuously flooded', + rice_preseason_flooding_period = 'Non flooded pre-season < 180 days', + urea_application = 1.337, + non_urea_nitrogen = 1.337, + urea_ammonium_nitrate = 1.337, + phosphorus_application = 1.337, + potassium_application = 1.337, + sulfur_application = 1.337, + fraction_of_annual_crop_burnt = 0, + herbicide_use = 1.337, + glyphosate_other_herbicide_use = 1.337, + electricity_allocation = 0, + limestone = 1.337, + limestone_fraction = 1.337, + diesel_use = 1.337, + petrol_use = 1.337, + lpg = 1.337 + ) + else: + return PostRiceRequestCropsInner( + state = 'nsw', + average_rice_yield = 1.337, + area_sown = 1.337, + growing_season_days = 1.337, + water_regime_type = 'Upland', + water_regime_sub_type = 'Continuously flooded', + rice_preseason_flooding_period = 'Non flooded pre-season < 180 days', + urea_application = 1.337, + non_urea_nitrogen = 1.337, + urea_ammonium_nitrate = 1.337, + phosphorus_application = 1.337, + potassium_application = 1.337, + sulfur_application = 1.337, + fraction_of_annual_crop_burnt = 0, + herbicide_use = 1.337, + glyphosate_other_herbicide_use = 1.337, + electricity_allocation = 0, + limestone = 1.337, + limestone_fraction = 1.337, + diesel_use = 1.337, + petrol_use = 1.337, + lpg = 1.337, + ) + """ + + def testPostRiceRequestCropsInner(self): + """Test PostRiceRequestCropsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep200_response.py b/examples/python-api-client/api-client/test/test_post_sheep200_response.py new file mode 100644 index 00000000..299d9b97 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheep200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheep200_response import PostSheep200Response + +class TestPostSheep200Response(unittest.TestCase): + """PostSheep200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheep200Response: + """Test PostSheep200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheep200Response` + """ + model = PostSheep200Response() + if include_optional: + return PostSheep200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = { + 'key' : null + } + ) + else: + return PostSheep200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + ) + """ + + def testPostSheep200Response(self): + """Test PostSheep200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner.py new file mode 100644 index 00000000..1f9cc6b3 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheep200_response_intermediate_inner import PostSheep200ResponseIntermediateInner + +class TestPostSheep200ResponseIntermediateInner(unittest.TestCase): + """PostSheep200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheep200ResponseIntermediateInner: + """Test PostSheep200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheep200ResponseIntermediateInner` + """ + model = PostSheep200ResponseIntermediateInner() + if include_optional: + return PostSheep200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + intensities = { + 'key' : null + }, + net = { + 'key' : null + } + ) + else: + return PostSheep200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + ) + """ + + def testPostSheep200ResponseIntermediateInner(self): + """Test PostSheep200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..c091979d --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner_intensities.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheep200_response_intermediate_inner_intensities import PostSheep200ResponseIntermediateInnerIntensities + +class TestPostSheep200ResponseIntermediateInnerIntensities(unittest.TestCase): + """PostSheep200ResponseIntermediateInnerIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheep200ResponseIntermediateInnerIntensities: + """Test PostSheep200ResponseIntermediateInnerIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheep200ResponseIntermediateInnerIntensities` + """ + model = PostSheep200ResponseIntermediateInnerIntensities() + if include_optional: + return PostSheep200ResponseIntermediateInnerIntensities( + wool_produced_kg = 1.337, + sheep_meat_produced_kg = 1.337, + wool_including_sequestration = 1.337, + wool_excluding_sequestration = 1.337, + sheep_meat_breeding_including_sequestration = 1.337, + sheep_meat_breeding_excluding_sequestration = 1.337 + ) + else: + return PostSheep200ResponseIntermediateInnerIntensities( + wool_produced_kg = 1.337, + sheep_meat_produced_kg = 1.337, + wool_including_sequestration = 1.337, + wool_excluding_sequestration = 1.337, + sheep_meat_breeding_including_sequestration = 1.337, + sheep_meat_breeding_excluding_sequestration = 1.337, + ) + """ + + def testPostSheep200ResponseIntermediateInnerIntensities(self): + """Test PostSheep200ResponseIntermediateInnerIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep200_response_net.py b/examples/python-api-client/api-client/test/test_post_sheep200_response_net.py new file mode 100644 index 00000000..84546de3 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheep200_response_net.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheep200_response_net import PostSheep200ResponseNet + +class TestPostSheep200ResponseNet(unittest.TestCase): + """PostSheep200ResponseNet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheep200ResponseNet: + """Test PostSheep200ResponseNet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheep200ResponseNet` + """ + model = PostSheep200ResponseNet() + if include_optional: + return PostSheep200ResponseNet( + total = 1.337, + sheep = 1.337 + ) + else: + return PostSheep200ResponseNet( + total = 1.337, + sheep = 1.337, + ) + """ + + def testPostSheep200ResponseNet(self): + """Test PostSheep200ResponseNet""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request.py b/examples/python-api-client/api-client/test/test_post_sheep_request.py new file mode 100644 index 00000000..5ad1cfe6 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheep_request.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheep_request import PostSheepRequest + +class TestPostSheepRequest(unittest.TestCase): + """PostSheepRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepRequest: + """Test PostSheepRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepRequest` + """ + model = PostSheepRequest() + if include_optional: + return PostSheepRequest( + state = 'nsw', + north_of_tropic_of_capricorn = True, + rainfall_above600 = True, + sheep = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostSheepRequest( + state = 'nsw', + north_of_tropic_of_capricorn = True, + rainfall_above600 = True, + sheep = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostSheepRequest(self): + """Test PostSheepRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner.py new file mode 100644 index 00000000..570c4f7c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheep_request_sheep_inner import PostSheepRequestSheepInner + +class TestPostSheepRequestSheepInner(unittest.TestCase): + """PostSheepRequestSheepInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepRequestSheepInner: + """Test PostSheepRequestSheepInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepRequestSheepInner` + """ + model = PostSheepRequestSheepInner() + if include_optional: + return PostSheepRequestSheepInner( + id = '', + classes = { + 'key' : null + }, + limestone = 1.337, + limestone_fraction = 1.337, + fertiliser = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + mineral_supplementation = { + 'key' : null + }, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + grain_feed = 1.337, + hay_feed = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + merino_percent = 1.337, + ewes_lambing = { + 'key' : null + }, + seasonal_lambing = { + 'key' : null + } + ) + else: + return PostSheepRequestSheepInner( + classes = { + 'key' : null + }, + limestone = 1.337, + limestone_fraction = 1.337, + fertiliser = { + 'key' : null + }, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + mineral_supplementation = { + 'key' : null + }, + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + grain_feed = 1.337, + hay_feed = 1.337, + herbicide = 1.337, + herbicide_other = 1.337, + merino_percent = 1.337, + ewes_lambing = { + 'key' : null + }, + seasonal_lambing = { + 'key' : null + }, + ) + """ + + def testPostSheepRequestSheepInner(self): + """Test PostSheepRequestSheepInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes.py new file mode 100644 index 00000000..edc74267 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheep_request_sheep_inner_classes import PostSheepRequestSheepInnerClasses + +class TestPostSheepRequestSheepInnerClasses(unittest.TestCase): + """PostSheepRequestSheepInnerClasses unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepRequestSheepInnerClasses: + """Test PostSheepRequestSheepInnerClasses + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepRequestSheepInnerClasses` + """ + model = PostSheepRequestSheepInnerClasses() + if include_optional: + return PostSheepRequestSheepInnerClasses( + rams = { + 'key' : null + }, + trade_rams = { + 'key' : null + }, + wethers = { + 'key' : null + }, + trade_wethers = { + 'key' : null + }, + maiden_breeding_ewes = { + 'key' : null + }, + trade_maiden_breeding_ewes = { + 'key' : null + }, + breeding_ewes = { + 'key' : null + }, + trade_breeding_ewes = { + 'key' : null + }, + other_ewes = { + 'key' : null + }, + trade_other_ewes = { + 'key' : null + }, + ewe_lambs = { + 'key' : null + }, + trade_ewe_lambs = { + 'key' : null + }, + wether_lambs = { + 'key' : null + }, + trade_wether_lambs = { + 'key' : null + }, + trade_ewes = { + 'key' : null + }, + trade_lambs_and_hoggets = { + 'key' : null + } + ) + else: + return PostSheepRequestSheepInnerClasses( + breeding_ewes = { + 'key' : null + }, + ewe_lambs = { + 'key' : null + }, + wether_lambs = { + 'key' : null + }, + ) + """ + + def testPostSheepRequestSheepInnerClasses(self): + """Test PostSheepRequestSheepInnerClasses""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams.py new file mode 100644 index 00000000..0fd9f9cb --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheep_request_sheep_inner_classes_rams import PostSheepRequestSheepInnerClassesRams + +class TestPostSheepRequestSheepInnerClassesRams(unittest.TestCase): + """PostSheepRequestSheepInnerClassesRams unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepRequestSheepInnerClassesRams: + """Test PostSheepRequestSheepInnerClassesRams + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepRequestSheepInnerClassesRams` + """ + model = PostSheepRequestSheepInnerClassesRams() + if include_optional: + return PostSheepRequestSheepInnerClassesRams( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostSheepRequestSheepInnerClassesRams( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostSheepRequestSheepInnerClassesRams(self): + """Test PostSheepRequestSheepInnerClassesRams""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams_autumn.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams_autumn.py new file mode 100644 index 00000000..58353d1e --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams_autumn.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheep_request_sheep_inner_classes_rams_autumn import PostSheepRequestSheepInnerClassesRamsAutumn + +class TestPostSheepRequestSheepInnerClassesRamsAutumn(unittest.TestCase): + """PostSheepRequestSheepInnerClassesRamsAutumn unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepRequestSheepInnerClassesRamsAutumn: + """Test PostSheepRequestSheepInnerClassesRamsAutumn + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepRequestSheepInnerClassesRamsAutumn` + """ + model = PostSheepRequestSheepInnerClassesRamsAutumn() + if include_optional: + return PostSheepRequestSheepInnerClassesRamsAutumn( + head = 1.337, + liveweight = 1.337, + liveweight_gain = 1.337, + crude_protein = 1.337, + dry_matter_digestibility = 1.337, + feed_availability = 1.337 + ) + else: + return PostSheepRequestSheepInnerClassesRamsAutumn( + head = 1.337, + liveweight = 1.337, + liveweight_gain = 1.337, + ) + """ + + def testPostSheepRequestSheepInnerClassesRamsAutumn(self): + """Test PostSheepRequestSheepInnerClassesRamsAutumn""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_ewes.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_ewes.py new file mode 100644 index 00000000..1e8c22e8 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_ewes.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheep_request_sheep_inner_classes_trade_ewes import PostSheepRequestSheepInnerClassesTradeEwes + +class TestPostSheepRequestSheepInnerClassesTradeEwes(unittest.TestCase): + """PostSheepRequestSheepInnerClassesTradeEwes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepRequestSheepInnerClassesTradeEwes: + """Test PostSheepRequestSheepInnerClassesTradeEwes + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepRequestSheepInnerClassesTradeEwes` + """ + model = PostSheepRequestSheepInnerClassesTradeEwes() + if include_optional: + return PostSheepRequestSheepInnerClassesTradeEwes( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostSheepRequestSheepInnerClassesTradeEwes( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostSheepRequestSheepInnerClassesTradeEwes(self): + """Test PostSheepRequestSheepInnerClassesTradeEwes""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py new file mode 100644 index 00000000..3b21592a --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets import PostSheepRequestSheepInnerClassesTradeLambsAndHoggets + +class TestPostSheepRequestSheepInnerClassesTradeLambsAndHoggets(unittest.TestCase): + """PostSheepRequestSheepInnerClassesTradeLambsAndHoggets unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepRequestSheepInnerClassesTradeLambsAndHoggets: + """Test PostSheepRequestSheepInnerClassesTradeLambsAndHoggets + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepRequestSheepInnerClassesTradeLambsAndHoggets` + """ + model = PostSheepRequestSheepInnerClassesTradeLambsAndHoggets() + if include_optional: + return PostSheepRequestSheepInnerClassesTradeLambsAndHoggets( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + head_purchased = 1.337, + purchased_weight = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + purchases = [ + { + 'key' : null + } + ] + ) + else: + return PostSheepRequestSheepInnerClassesTradeLambsAndHoggets( + autumn = { + 'key' : null + }, + winter = { + 'key' : null + }, + spring = { + 'key' : null + }, + summer = { + 'key' : null + }, + head_shorn = 1.337, + wool_shorn = 1.337, + clean_wool_yield = 1.337, + head_sold = 1.337, + sale_weight = 1.337, + ) + """ + + def testPostSheepRequestSheepInnerClassesTradeLambsAndHoggets(self): + """Test PostSheepRequestSheepInnerClassesTradeLambsAndHoggets""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_ewes_lambing.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_ewes_lambing.py new file mode 100644 index 00000000..8bbf0d18 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_ewes_lambing.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheep_request_sheep_inner_ewes_lambing import PostSheepRequestSheepInnerEwesLambing + +class TestPostSheepRequestSheepInnerEwesLambing(unittest.TestCase): + """PostSheepRequestSheepInnerEwesLambing unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepRequestSheepInnerEwesLambing: + """Test PostSheepRequestSheepInnerEwesLambing + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepRequestSheepInnerEwesLambing` + """ + model = PostSheepRequestSheepInnerEwesLambing() + if include_optional: + return PostSheepRequestSheepInnerEwesLambing( + autumn = 0, + winter = 0, + spring = 0, + summer = 0 + ) + else: + return PostSheepRequestSheepInnerEwesLambing( + autumn = 0, + winter = 0, + spring = 0, + summer = 0, + ) + """ + + def testPostSheepRequestSheepInnerEwesLambing(self): + """Test PostSheepRequestSheepInnerEwesLambing""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_seasonal_lambing.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_seasonal_lambing.py new file mode 100644 index 00000000..a6c163ed --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_seasonal_lambing.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheep_request_sheep_inner_seasonal_lambing import PostSheepRequestSheepInnerSeasonalLambing + +class TestPostSheepRequestSheepInnerSeasonalLambing(unittest.TestCase): + """PostSheepRequestSheepInnerSeasonalLambing unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepRequestSheepInnerSeasonalLambing: + """Test PostSheepRequestSheepInnerSeasonalLambing + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepRequestSheepInnerSeasonalLambing` + """ + model = PostSheepRequestSheepInnerSeasonalLambing() + if include_optional: + return PostSheepRequestSheepInnerSeasonalLambing( + autumn = 0, + winter = 0, + spring = 0, + summer = 0 + ) + else: + return PostSheepRequestSheepInnerSeasonalLambing( + autumn = 0, + winter = 0, + spring = 0, + summer = 0, + ) + """ + + def testPostSheepRequestSheepInnerSeasonalLambing(self): + """Test PostSheepRequestSheepInnerSeasonalLambing""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_sheep_request_vegetation_inner.py new file mode 100644 index 00000000..1cd26e14 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheep_request_vegetation_inner.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheep_request_vegetation_inner import PostSheepRequestVegetationInner + +class TestPostSheepRequestVegetationInner(unittest.TestCase): + """PostSheepRequestVegetationInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepRequestVegetationInner: + """Test PostSheepRequestVegetationInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepRequestVegetationInner` + """ + model = PostSheepRequestVegetationInner() + if include_optional: + return PostSheepRequestVegetationInner( + vegetation = { + 'key' : null + }, + sheep_proportion = [ + 1.337 + ] + ) + else: + return PostSheepRequestVegetationInner( + vegetation = { + 'key' : null + }, + sheep_proportion = [ + 1.337 + ], + ) + """ + + def testPostSheepRequestVegetationInner(self): + """Test PostSheepRequestVegetationInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response.py b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response.py new file mode 100644 index 00000000..3551a07d --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheepbeef200_response import PostSheepbeef200Response + +class TestPostSheepbeef200Response(unittest.TestCase): + """PostSheepbeef200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepbeef200Response: + """Test PostSheepbeef200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepbeef200Response` + """ + model = PostSheepbeef200Response() + if include_optional: + return PostSheepbeef200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = { + 'key' : null + }, + intermediate_beef = [ + { + 'key' : null + } + ], + intermediate_sheep = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = { + 'key' : null + } + ) + else: + return PostSheepbeef200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = { + 'key' : null + }, + intermediate_beef = [ + { + 'key' : null + } + ], + intermediate_sheep = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + ) + """ + + def testPostSheepbeef200Response(self): + """Test PostSheepbeef200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intensities.py new file mode 100644 index 00000000..78fe192e --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intensities.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheepbeef200_response_intensities import PostSheepbeef200ResponseIntensities + +class TestPostSheepbeef200ResponseIntensities(unittest.TestCase): + """PostSheepbeef200ResponseIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepbeef200ResponseIntensities: + """Test PostSheepbeef200ResponseIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepbeef200ResponseIntensities` + """ + model = PostSheepbeef200ResponseIntensities() + if include_optional: + return PostSheepbeef200ResponseIntensities( + beef_including_sequestration = 1.337, + beef_excluding_sequestration = 1.337, + liveweight_beef_produced_kg = 1.337, + wool_including_sequestration = 1.337, + wool_excluding_sequestration = 1.337, + sheep_meat_breeding_including_sequestration = 1.337, + sheep_meat_breeding_excluding_sequestration = 1.337, + wool_produced_kg = 1.337, + sheep_meat_produced_kg = 1.337 + ) + else: + return PostSheepbeef200ResponseIntensities( + beef_including_sequestration = 1.337, + beef_excluding_sequestration = 1.337, + liveweight_beef_produced_kg = 1.337, + wool_including_sequestration = 1.337, + wool_excluding_sequestration = 1.337, + sheep_meat_breeding_including_sequestration = 1.337, + sheep_meat_breeding_excluding_sequestration = 1.337, + wool_produced_kg = 1.337, + sheep_meat_produced_kg = 1.337, + ) + """ + + def testPostSheepbeef200ResponseIntensities(self): + """Test PostSheepbeef200ResponseIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate.py b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate.py new file mode 100644 index 00000000..9339ad89 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheepbeef200_response_intermediate import PostSheepbeef200ResponseIntermediate + +class TestPostSheepbeef200ResponseIntermediate(unittest.TestCase): + """PostSheepbeef200ResponseIntermediate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepbeef200ResponseIntermediate: + """Test PostSheepbeef200ResponseIntermediate + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepbeef200ResponseIntermediate` + """ + model = PostSheepbeef200ResponseIntermediate() + if include_optional: + return PostSheepbeef200ResponseIntermediate( + beef = { + 'key' : null + }, + sheep = { + 'key' : null + } + ) + else: + return PostSheepbeef200ResponseIntermediate( + beef = { + 'key' : null + }, + sheep = { + 'key' : null + }, + ) + """ + + def testPostSheepbeef200ResponseIntermediate(self): + """Test PostSheepbeef200ResponseIntermediate""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_beef.py b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_beef.py new file mode 100644 index 00000000..01c57f34 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_beef.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheepbeef200_response_intermediate_beef import PostSheepbeef200ResponseIntermediateBeef + +class TestPostSheepbeef200ResponseIntermediateBeef(unittest.TestCase): + """PostSheepbeef200ResponseIntermediateBeef unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepbeef200ResponseIntermediateBeef: + """Test PostSheepbeef200ResponseIntermediateBeef + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepbeef200ResponseIntermediateBeef` + """ + model = PostSheepbeef200ResponseIntermediateBeef() + if include_optional: + return PostSheepbeef200ResponseIntermediateBeef( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + net = { + 'key' : null + }, + intensities = { + 'key' : null + } + ) + else: + return PostSheepbeef200ResponseIntermediateBeef( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + ) + """ + + def testPostSheepbeef200ResponseIntermediateBeef(self): + """Test PostSheepbeef200ResponseIntermediateBeef""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_sheep.py b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_sheep.py new file mode 100644 index 00000000..4796f532 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_sheep.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheepbeef200_response_intermediate_sheep import PostSheepbeef200ResponseIntermediateSheep + +class TestPostSheepbeef200ResponseIntermediateSheep(unittest.TestCase): + """PostSheepbeef200ResponseIntermediateSheep unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepbeef200ResponseIntermediateSheep: + """Test PostSheepbeef200ResponseIntermediateSheep + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepbeef200ResponseIntermediateSheep` + """ + model = PostSheepbeef200ResponseIntermediateSheep() + if include_optional: + return PostSheepbeef200ResponseIntermediateSheep( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + net = { + 'key' : null + }, + intensities = { + 'key' : null + } + ) + else: + return PostSheepbeef200ResponseIntermediateSheep( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + ) + """ + + def testPostSheepbeef200ResponseIntermediateSheep(self): + """Test PostSheepbeef200ResponseIntermediateSheep""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_net.py b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_net.py new file mode 100644 index 00000000..3e6fcf84 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_net.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheepbeef200_response_net import PostSheepbeef200ResponseNet + +class TestPostSheepbeef200ResponseNet(unittest.TestCase): + """PostSheepbeef200ResponseNet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepbeef200ResponseNet: + """Test PostSheepbeef200ResponseNet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepbeef200ResponseNet` + """ + model = PostSheepbeef200ResponseNet() + if include_optional: + return PostSheepbeef200ResponseNet( + total = 1.337, + beef = 1.337, + sheep = 1.337 + ) + else: + return PostSheepbeef200ResponseNet( + total = 1.337, + beef = 1.337, + sheep = 1.337, + ) + """ + + def testPostSheepbeef200ResponseNet(self): + """Test PostSheepbeef200ResponseNet""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef_request.py b/examples/python-api-client/api-client/test/test_post_sheepbeef_request.py new file mode 100644 index 00000000..a303b836 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheepbeef_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheepbeef_request import PostSheepbeefRequest + +class TestPostSheepbeefRequest(unittest.TestCase): + """PostSheepbeefRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepbeefRequest: + """Test PostSheepbeefRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepbeefRequest` + """ + model = PostSheepbeefRequest() + if include_optional: + return PostSheepbeefRequest( + state = 'nsw', + north_of_tropic_of_capricorn = True, + rainfall_above600 = True, + beef = [ + { + 'key' : null + } + ], + sheep = [ + { + 'key' : null + } + ], + burning = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostSheepbeefRequest( + state = 'nsw', + north_of_tropic_of_capricorn = True, + rainfall_above600 = True, + beef = [ + { + 'key' : null + } + ], + sheep = [ + { + 'key' : null + } + ], + burning = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostSheepbeefRequest(self): + """Test PostSheepbeefRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_sheepbeef_request_vegetation_inner.py new file mode 100644 index 00000000..1f833ef5 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sheepbeef_request_vegetation_inner.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sheepbeef_request_vegetation_inner import PostSheepbeefRequestVegetationInner + +class TestPostSheepbeefRequestVegetationInner(unittest.TestCase): + """PostSheepbeefRequestVegetationInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSheepbeefRequestVegetationInner: + """Test PostSheepbeefRequestVegetationInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSheepbeefRequestVegetationInner` + """ + model = PostSheepbeefRequestVegetationInner() + if include_optional: + return PostSheepbeefRequestVegetationInner( + vegetation = { + 'key' : null + }, + beef_proportion = [ + 1.337 + ], + sheep_proportion = [ + 1.337 + ] + ) + else: + return PostSheepbeefRequestVegetationInner( + vegetation = { + 'key' : null + }, + beef_proportion = [ + 1.337 + ], + sheep_proportion = [ + 1.337 + ], + ) + """ + + def testPostSheepbeefRequestVegetationInner(self): + """Test PostSheepbeefRequestVegetationInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sugar200_response.py b/examples/python-api-client/api-client/test/test_post_sugar200_response.py new file mode 100644 index 00000000..9761ee1d --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sugar200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sugar200_response import PostSugar200Response + +class TestPostSugar200Response(unittest.TestCase): + """PostSugar200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSugar200Response: + """Test PostSugar200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSugar200Response` + """ + model = PostSugar200Response() + if include_optional: + return PostSugar200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = [ + { + 'key' : null + } + ] + ) + else: + return PostSugar200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = [ + { + 'key' : null + } + ], + ) + """ + + def testPostSugar200Response(self): + """Test PostSugar200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner.py new file mode 100644 index 00000000..759c4311 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sugar200_response_intermediate_inner import PostSugar200ResponseIntermediateInner + +class TestPostSugar200ResponseIntermediateInner(unittest.TestCase): + """PostSugar200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSugar200ResponseIntermediateInner: + """Test PostSugar200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSugar200ResponseIntermediateInner` + """ + model = PostSugar200ResponseIntermediateInner() + if include_optional: + return PostSugar200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + intensities = { + 'key' : null + }, + net = { + 'key' : null + } + ) + else: + return PostSugar200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + ) + """ + + def testPostSugar200ResponseIntermediateInner(self): + """Test PostSugar200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..74ba7a36 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner_intensities.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sugar200_response_intermediate_inner_intensities import PostSugar200ResponseIntermediateInnerIntensities + +class TestPostSugar200ResponseIntermediateInnerIntensities(unittest.TestCase): + """PostSugar200ResponseIntermediateInnerIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSugar200ResponseIntermediateInnerIntensities: + """Test PostSugar200ResponseIntermediateInnerIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSugar200ResponseIntermediateInnerIntensities` + """ + model = PostSugar200ResponseIntermediateInnerIntensities() + if include_optional: + return PostSugar200ResponseIntermediateInnerIntensities( + sugar_excluding_sequestration = 1.337, + sugar_including_sequestration = 1.337, + sugar_produced_kg = 1.337 + ) + else: + return PostSugar200ResponseIntermediateInnerIntensities( + sugar_excluding_sequestration = 1.337, + sugar_including_sequestration = 1.337, + sugar_produced_kg = 1.337, + ) + """ + + def testPostSugar200ResponseIntermediateInnerIntensities(self): + """Test PostSugar200ResponseIntermediateInnerIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sugar_request.py b/examples/python-api-client/api-client/test/test_post_sugar_request.py new file mode 100644 index 00000000..fbf5aeb3 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sugar_request.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sugar_request import PostSugarRequest + +class TestPostSugarRequest(unittest.TestCase): + """PostSugarRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSugarRequest: + """Test PostSugarRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSugarRequest` + """ + model = PostSugarRequest() + if include_optional: + return PostSugarRequest( + state = 'nsw', + crops = [ + { + 'key' : null + } + ], + electricity_renewable = 0, + electricity_use = 1.337, + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostSugarRequest( + state = 'nsw', + crops = [ + { + 'key' : null + } + ], + electricity_renewable = 0, + electricity_use = 1.337, + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostSugarRequest(self): + """Test PostSugarRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sugar_request_crops_inner.py b/examples/python-api-client/api-client/test/test_post_sugar_request_crops_inner.py new file mode 100644 index 00000000..e47335a7 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_sugar_request_crops_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_sugar_request_crops_inner import PostSugarRequestCropsInner + +class TestPostSugarRequestCropsInner(unittest.TestCase): + """PostSugarRequestCropsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostSugarRequestCropsInner: + """Test PostSugarRequestCropsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostSugarRequestCropsInner` + """ + model = PostSugarRequestCropsInner() + if include_optional: + return PostSugarRequestCropsInner( + id = '', + state = 'nsw', + production_system = 'Non-irrigated crop', + average_cane_yield = 1.337, + percent_milled_cane_yield = 1.337, + area_sown = 1.337, + non_urea_nitrogen = 1.337, + urea_application = 1.337, + urea_ammonium_nitrate = 1.337, + phosphorus_application = 1.337, + potassium_application = 1.337, + sulfur_application = 1.337, + rainfall_above600 = True, + fraction_of_annual_crop_burnt = 1.337, + herbicide_use = 1.337, + glyphosate_other_herbicide_use = 1.337, + electricity_allocation = 1.337, + limestone = 1.337, + limestone_fraction = 1.337, + diesel_use = 1.337, + petrol_use = 1.337, + lpg = 1.337 + ) + else: + return PostSugarRequestCropsInner( + state = 'nsw', + production_system = 'Non-irrigated crop', + average_cane_yield = 1.337, + area_sown = 1.337, + non_urea_nitrogen = 1.337, + urea_application = 1.337, + urea_ammonium_nitrate = 1.337, + phosphorus_application = 1.337, + potassium_application = 1.337, + sulfur_application = 1.337, + rainfall_above600 = True, + fraction_of_annual_crop_burnt = 1.337, + herbicide_use = 1.337, + glyphosate_other_herbicide_use = 1.337, + electricity_allocation = 1.337, + limestone = 1.337, + limestone_fraction = 1.337, + diesel_use = 1.337, + petrol_use = 1.337, + lpg = 1.337, + ) + """ + + def testPostSugarRequestCropsInner(self): + """Test PostSugarRequestCropsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard200_response.py b/examples/python-api-client/api-client/test/test_post_vineyard200_response.py new file mode 100644 index 00000000..6e3cb02e --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_vineyard200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_vineyard200_response import PostVineyard200Response + +class TestPostVineyard200Response(unittest.TestCase): + """PostVineyard200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostVineyard200Response: + """Test PostVineyard200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostVineyard200Response` + """ + model = PostVineyard200Response() + if include_optional: + return PostVineyard200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = [ + { + 'key' : null + } + ] + ) + else: + return PostVineyard200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = [ + { + 'key' : null + } + ], + ) + """ + + def testPostVineyard200Response(self): + """Test PostVineyard200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner.py new file mode 100644 index 00000000..1519eb31 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_vineyard200_response_intermediate_inner import PostVineyard200ResponseIntermediateInner + +class TestPostVineyard200ResponseIntermediateInner(unittest.TestCase): + """PostVineyard200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostVineyard200ResponseIntermediateInner: + """Test PostVineyard200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostVineyard200ResponseIntermediateInner` + """ + model = PostVineyard200ResponseIntermediateInner() + if include_optional: + return PostVineyard200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + intensities = { + 'key' : null + }, + net = { + 'key' : null + } + ) + else: + return PostVineyard200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + carbon_sequestration = 1.337, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + ) + """ + + def testPostVineyard200ResponseIntermediateInner(self): + """Test PostVineyard200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..b112a053 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner_intensities.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_vineyard200_response_intermediate_inner_intensities import PostVineyard200ResponseIntermediateInnerIntensities + +class TestPostVineyard200ResponseIntermediateInnerIntensities(unittest.TestCase): + """PostVineyard200ResponseIntermediateInnerIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostVineyard200ResponseIntermediateInnerIntensities: + """Test PostVineyard200ResponseIntermediateInnerIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostVineyard200ResponseIntermediateInnerIntensities` + """ + model = PostVineyard200ResponseIntermediateInnerIntensities() + if include_optional: + return PostVineyard200ResponseIntermediateInnerIntensities( + vineyards_excluding_sequestration = 1.337, + vineyards_including_sequestration = 1.337, + crop_produced_kg = 1.337 + ) + else: + return PostVineyard200ResponseIntermediateInnerIntensities( + vineyards_excluding_sequestration = 1.337, + vineyards_including_sequestration = 1.337, + crop_produced_kg = 1.337, + ) + """ + + def testPostVineyard200ResponseIntermediateInnerIntensities(self): + """Test PostVineyard200ResponseIntermediateInnerIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard200_response_net.py b/examples/python-api-client/api-client/test/test_post_vineyard200_response_net.py new file mode 100644 index 00000000..7a6a1a34 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_vineyard200_response_net.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_vineyard200_response_net import PostVineyard200ResponseNet + +class TestPostVineyard200ResponseNet(unittest.TestCase): + """PostVineyard200ResponseNet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostVineyard200ResponseNet: + """Test PostVineyard200ResponseNet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostVineyard200ResponseNet` + """ + model = PostVineyard200ResponseNet() + if include_optional: + return PostVineyard200ResponseNet( + total = 1.337, + vineyards = [ + 1.337 + ] + ) + else: + return PostVineyard200ResponseNet( + total = 1.337, + vineyards = [ + 1.337 + ], + ) + """ + + def testPostVineyard200ResponseNet(self): + """Test PostVineyard200ResponseNet""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_vineyard200_response_scope1.py new file mode 100644 index 00000000..b291fbb9 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_vineyard200_response_scope1.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_vineyard200_response_scope1 import PostVineyard200ResponseScope1 + +class TestPostVineyard200ResponseScope1(unittest.TestCase): + """PostVineyard200ResponseScope1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostVineyard200ResponseScope1: + """Test PostVineyard200ResponseScope1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostVineyard200ResponseScope1` + """ + model = PostVineyard200ResponseScope1() + if include_optional: + return PostVineyard200ResponseScope1( + fuel_co2 = 1.337, + lime_co2 = 1.337, + urea_co2 = 1.337, + waste_water_co2 = 1.337, + composted_solid_waste_co2 = 1.337, + fuel_ch4 = 1.337, + fertiliser_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + crop_residue_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + fuel_n2_o = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337 + ) + else: + return PostVineyard200ResponseScope1( + fuel_co2 = 1.337, + lime_co2 = 1.337, + urea_co2 = 1.337, + waste_water_co2 = 1.337, + composted_solid_waste_co2 = 1.337, + fuel_ch4 = 1.337, + fertiliser_n2_o = 1.337, + atmospheric_deposition_n2_o = 1.337, + crop_residue_n2_o = 1.337, + leaching_and_runoff_n2_o = 1.337, + fuel_n2_o = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total = 1.337, + ) + """ + + def testPostVineyard200ResponseScope1(self): + """Test PostVineyard200ResponseScope1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_vineyard200_response_scope3.py new file mode 100644 index 00000000..6c9699f5 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_vineyard200_response_scope3.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_vineyard200_response_scope3 import PostVineyard200ResponseScope3 + +class TestPostVineyard200ResponseScope3(unittest.TestCase): + """PostVineyard200ResponseScope3 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostVineyard200ResponseScope3: + """Test PostVineyard200ResponseScope3 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostVineyard200ResponseScope3` + """ + model = PostVineyard200ResponseScope3() + if include_optional: + return PostVineyard200ResponseScope3( + fertiliser = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + lime = 1.337, + commercial_flights = 1.337, + inbound_freight = 1.337, + solid_waste_sent_offsite = 1.337, + outbound_freight = 1.337, + total = 1.337 + ) + else: + return PostVineyard200ResponseScope3( + fertiliser = 1.337, + herbicide = 1.337, + electricity = 1.337, + fuel = 1.337, + lime = 1.337, + commercial_flights = 1.337, + inbound_freight = 1.337, + solid_waste_sent_offsite = 1.337, + outbound_freight = 1.337, + total = 1.337, + ) + """ + + def testPostVineyard200ResponseScope3(self): + """Test PostVineyard200ResponseScope3""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard_request.py b/examples/python-api-client/api-client/test/test_post_vineyard_request.py new file mode 100644 index 00000000..35a59bc3 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_vineyard_request.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_vineyard_request import PostVineyardRequest + +class TestPostVineyardRequest(unittest.TestCase): + """PostVineyardRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostVineyardRequest: + """Test PostVineyardRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostVineyardRequest` + """ + model = PostVineyardRequest() + if include_optional: + return PostVineyardRequest( + vineyards = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ] + ) + else: + return PostVineyardRequest( + vineyards = [ + { + 'key' : null + } + ], + vegetation = [ + { + 'key' : null + } + ], + ) + """ + + def testPostVineyardRequest(self): + """Test PostVineyardRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_vineyard_request_vegetation_inner.py new file mode 100644 index 00000000..2766f4a7 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_vineyard_request_vegetation_inner.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_vineyard_request_vegetation_inner import PostVineyardRequestVegetationInner + +class TestPostVineyardRequestVegetationInner(unittest.TestCase): + """PostVineyardRequestVegetationInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostVineyardRequestVegetationInner: + """Test PostVineyardRequestVegetationInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostVineyardRequestVegetationInner` + """ + model = PostVineyardRequestVegetationInner() + if include_optional: + return PostVineyardRequestVegetationInner( + vegetation = { + 'key' : null + }, + allocation_to_vineyards = [ + 1.337 + ] + ) + else: + return PostVineyardRequestVegetationInner( + vegetation = { + 'key' : null + }, + allocation_to_vineyards = [ + 1.337 + ], + ) + """ + + def testPostVineyardRequestVegetationInner(self): + """Test PostVineyardRequestVegetationInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard_request_vineyards_inner.py b/examples/python-api-client/api-client/test/test_post_vineyard_request_vineyards_inner.py new file mode 100644 index 00000000..399cc533 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_vineyard_request_vineyards_inner.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_vineyard_request_vineyards_inner import PostVineyardRequestVineyardsInner + +class TestPostVineyardRequestVineyardsInner(unittest.TestCase): + """PostVineyardRequestVineyardsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostVineyardRequestVineyardsInner: + """Test PostVineyardRequestVineyardsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostVineyardRequestVineyardsInner` + """ + model = PostVineyardRequestVineyardsInner() + if include_optional: + return PostVineyardRequestVineyardsInner( + id = '', + state = 'nsw', + rainfall_above600 = True, + irrigated = True, + area_planted = 1.337, + average_yield = 1.337, + non_urea_nitrogen = 1.337, + phosphorus_application = 1.337, + potassium_application = 1.337, + sulfur_application = 1.337, + urea_application = 1.337, + urea_ammonium_nitrate = 1.337, + limestone = 1.337, + limestone_fraction = 1.337, + herbicide_use = 1.337, + glyphosate_other_herbicide_use = 1.337, + electricity_renewable = 0, + electricity_use = 1.337, + electricity_source = 'State Grid', + fuel = { + 'key' : null + }, + fluid_waste = [ + { + 'key' : null + } + ], + solid_waste = { + 'key' : null + }, + inbound_freight = [ + { + 'key' : null + } + ], + outbound_freight = [ + { + 'key' : null + } + ], + total_commercial_flights_km = 1.337 + ) + else: + return PostVineyardRequestVineyardsInner( + state = 'nsw', + rainfall_above600 = True, + irrigated = True, + area_planted = 1.337, + average_yield = 1.337, + non_urea_nitrogen = 1.337, + phosphorus_application = 1.337, + potassium_application = 1.337, + sulfur_application = 1.337, + urea_application = 1.337, + urea_ammonium_nitrate = 1.337, + limestone = 1.337, + limestone_fraction = 1.337, + herbicide_use = 1.337, + glyphosate_other_herbicide_use = 1.337, + electricity_renewable = 0, + electricity_use = 1.337, + electricity_source = 'State Grid', + fuel = { + 'key' : null + }, + fluid_waste = [ + { + 'key' : null + } + ], + solid_waste = { + 'key' : null + }, + inbound_freight = [ + { + 'key' : null + } + ], + outbound_freight = [ + { + 'key' : null + } + ], + total_commercial_flights_km = 1.337, + ) + """ + + def testPostVineyardRequestVineyardsInner(self): + """Test PostVineyardRequestVineyardsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response.py b/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response.py new file mode 100644 index 00000000..704a589a --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildcatchfishery200_response import PostWildcatchfishery200Response + +class TestPostWildcatchfishery200Response(unittest.TestCase): + """PostWildcatchfishery200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildcatchfishery200Response: + """Test PostWildcatchfishery200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildcatchfishery200Response` + """ + model = PostWildcatchfishery200Response() + if include_optional: + return PostWildcatchfishery200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + purchased_offsets = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ] + ) + else: + return PostWildcatchfishery200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + purchased_offsets = { + 'key' : null + }, + net = { + 'key' : null + }, + intensities = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + ) + """ + + def testPostWildcatchfishery200Response(self): + """Test PostWildcatchfishery200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intensities.py new file mode 100644 index 00000000..11471467 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intensities.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildcatchfishery200_response_intensities import PostWildcatchfishery200ResponseIntensities + +class TestPostWildcatchfishery200ResponseIntensities(unittest.TestCase): + """PostWildcatchfishery200ResponseIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildcatchfishery200ResponseIntensities: + """Test PostWildcatchfishery200ResponseIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildcatchfishery200ResponseIntensities` + """ + model = PostWildcatchfishery200ResponseIntensities() + if include_optional: + return PostWildcatchfishery200ResponseIntensities( + total_harvest_weight_kg = 1.337, + wild_catch_fishery_excluding_carbon_offsets = 1.337, + wild_catch_fishery_including_carbon_offsets = 1.337 + ) + else: + return PostWildcatchfishery200ResponseIntensities( + total_harvest_weight_kg = 1.337, + wild_catch_fishery_excluding_carbon_offsets = 1.337, + wild_catch_fishery_including_carbon_offsets = 1.337, + ) + """ + + def testPostWildcatchfishery200ResponseIntensities(self): + """Test PostWildcatchfishery200ResponseIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intermediate_inner.py new file mode 100644 index 00000000..ccd2dcc5 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intermediate_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildcatchfishery200_response_intermediate_inner import PostWildcatchfishery200ResponseIntermediateInner + +class TestPostWildcatchfishery200ResponseIntermediateInner(unittest.TestCase): + """PostWildcatchfishery200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildcatchfishery200ResponseIntermediateInner: + """Test PostWildcatchfishery200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildcatchfishery200ResponseIntermediateInner` + """ + model = PostWildcatchfishery200ResponseIntermediateInner() + if include_optional: + return PostWildcatchfishery200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + } + ) + else: + return PostWildcatchfishery200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + carbon_sequestration = { + 'key' : null + }, + ) + """ + + def testPostWildcatchfishery200ResponseIntermediateInner(self): + """Test PostWildcatchfishery200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_scope1.py new file mode 100644 index 00000000..caf466ee --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_scope1.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildcatchfishery200_response_scope1 import PostWildcatchfishery200ResponseScope1 + +class TestPostWildcatchfishery200ResponseScope1(unittest.TestCase): + """PostWildcatchfishery200ResponseScope1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildcatchfishery200ResponseScope1: + """Test PostWildcatchfishery200ResponseScope1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildcatchfishery200ResponseScope1` + """ + model = PostWildcatchfishery200ResponseScope1() + if include_optional: + return PostWildcatchfishery200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + waste_water_co2 = 1.337, + composted_solid_waste_co2 = 1.337, + hfcs_refrigerant_leakage = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total_hfcs = 1.337, + total = 1.337 + ) + else: + return PostWildcatchfishery200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + waste_water_co2 = 1.337, + composted_solid_waste_co2 = 1.337, + hfcs_refrigerant_leakage = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total_hfcs = 1.337, + total = 1.337, + ) + """ + + def testPostWildcatchfishery200ResponseScope1(self): + """Test PostWildcatchfishery200ResponseScope1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request.py b/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request.py new file mode 100644 index 00000000..7f296876 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildcatchfishery_request import PostWildcatchfisheryRequest + +class TestPostWildcatchfisheryRequest(unittest.TestCase): + """PostWildcatchfisheryRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildcatchfisheryRequest: + """Test PostWildcatchfisheryRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildcatchfisheryRequest` + """ + model = PostWildcatchfisheryRequest() + if include_optional: + return PostWildcatchfisheryRequest( + enterprises = [ + { + 'key' : null + } + ] + ) + else: + return PostWildcatchfisheryRequest( + enterprises = [ + { + 'key' : null + } + ], + ) + """ + + def testPostWildcatchfisheryRequest(self): + """Test PostWildcatchfisheryRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner.py b/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner.py new file mode 100644 index 00000000..d32aad60 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildcatchfishery_request_enterprises_inner import PostWildcatchfisheryRequestEnterprisesInner + +class TestPostWildcatchfisheryRequestEnterprisesInner(unittest.TestCase): + """PostWildcatchfisheryRequestEnterprisesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildcatchfisheryRequestEnterprisesInner: + """Test PostWildcatchfisheryRequestEnterprisesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildcatchfisheryRequestEnterprisesInner` + """ + model = PostWildcatchfisheryRequestEnterprisesInner() + if include_optional: + return PostWildcatchfisheryRequestEnterprisesInner( + id = '', + state = 'nsw', + production_system = 'Abalone', + total_harvest_kg = 1.337, + refrigerants = [ + openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner.post_horticulture_request_crops_inner_refrigerants_inner( + refrigerant = 'HFC-23', + charge_size = 1.337, ) + ], + bait = [ + { + 'key' : null + } + ], + custom_bait = [ + { + 'key' : null + } + ], + inbound_freight = [ + { + 'key' : null + } + ], + outbound_freight = [ + { + 'key' : null + } + ], + total_commercial_flights_km = 1.337, + electricity_renewable = 0, + electricity_use = 1.337, + electricity_source = 'State Grid', + fuel = { + 'key' : null + }, + fluid_waste = [ + { + 'key' : null + } + ], + solid_waste = { + 'key' : null + }, + carbon_offsets = 1.337 + ) + else: + return PostWildcatchfisheryRequestEnterprisesInner( + state = 'nsw', + production_system = 'Abalone', + total_harvest_kg = 1.337, + refrigerants = [ + openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner.post_horticulture_request_crops_inner_refrigerants_inner( + refrigerant = 'HFC-23', + charge_size = 1.337, ) + ], + bait = [ + { + 'key' : null + } + ], + custom_bait = [ + { + 'key' : null + } + ], + inbound_freight = [ + { + 'key' : null + } + ], + outbound_freight = [ + { + 'key' : null + } + ], + total_commercial_flights_km = 1.337, + electricity_renewable = 0, + electricity_use = 1.337, + electricity_source = 'State Grid', + fuel = { + 'key' : null + }, + fluid_waste = [ + { + 'key' : null + } + ], + solid_waste = { + 'key' : null + }, + ) + """ + + def testPostWildcatchfisheryRequestEnterprisesInner(self): + """Test PostWildcatchfisheryRequestEnterprisesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner_bait_inner.py b/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner_bait_inner.py new file mode 100644 index 00000000..4ac835fc --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner_bait_inner.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildcatchfishery_request_enterprises_inner_bait_inner import PostWildcatchfisheryRequestEnterprisesInnerBaitInner + +class TestPostWildcatchfisheryRequestEnterprisesInnerBaitInner(unittest.TestCase): + """PostWildcatchfisheryRequestEnterprisesInnerBaitInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildcatchfisheryRequestEnterprisesInnerBaitInner: + """Test PostWildcatchfisheryRequestEnterprisesInnerBaitInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildcatchfisheryRequestEnterprisesInnerBaitInner` + """ + model = PostWildcatchfisheryRequestEnterprisesInnerBaitInner() + if include_optional: + return PostWildcatchfisheryRequestEnterprisesInnerBaitInner( + type = 'Fish Frames', + purchased_tonnes = 1.337, + additional_ingredients = 0, + emissions_intensity = 1.337 + ) + else: + return PostWildcatchfisheryRequestEnterprisesInnerBaitInner( + type = 'Fish Frames', + purchased_tonnes = 1.337, + additional_ingredients = 0, + emissions_intensity = 1.337, + ) + """ + + def testPostWildcatchfisheryRequestEnterprisesInnerBaitInner(self): + """Test PostWildcatchfisheryRequestEnterprisesInnerBaitInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response.py new file mode 100644 index 00000000..23a43d33 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildseafisheries200_response import PostWildseafisheries200Response + +class TestPostWildseafisheries200Response(unittest.TestCase): + """PostWildseafisheries200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildseafisheries200Response: + """Test PostWildseafisheries200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildseafisheries200Response` + """ + model = PostWildseafisheries200Response() + if include_optional: + return PostWildseafisheries200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + purchased_offsets = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = [ + { + 'key' : null + } + ] + ) + else: + return PostWildseafisheries200Response( + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + purchased_offsets = { + 'key' : null + }, + intermediate = [ + { + 'key' : null + } + ], + net = { + 'key' : null + }, + intensities = [ + { + 'key' : null + } + ], + ) + """ + + def testPostWildseafisheries200Response(self): + """Test PostWildseafisheries200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner.py new file mode 100644 index 00000000..99653bbc --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildseafisheries200_response_intermediate_inner import PostWildseafisheries200ResponseIntermediateInner + +class TestPostWildseafisheries200ResponseIntermediateInner(unittest.TestCase): + """PostWildseafisheries200ResponseIntermediateInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildseafisheries200ResponseIntermediateInner: + """Test PostWildseafisheries200ResponseIntermediateInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildseafisheries200ResponseIntermediateInner` + """ + model = PostWildseafisheries200ResponseIntermediateInner() + if include_optional: + return PostWildseafisheries200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + purchased_offsets = { + 'key' : null + }, + carbon_sequestration = 1.337, + intensities = { + 'key' : null + }, + net = { + 'key' : null + } + ) + else: + return PostWildseafisheries200ResponseIntermediateInner( + id = '', + scope1 = { + 'key' : null + }, + scope2 = { + 'key' : null + }, + scope3 = { + 'key' : null + }, + purchased_offsets = { + 'key' : null + }, + carbon_sequestration = 1.337, + intensities = { + 'key' : null + }, + net = { + 'key' : null + }, + ) + """ + + def testPostWildseafisheries200ResponseIntermediateInner(self): + """Test PostWildseafisheries200ResponseIntermediateInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner_intensities.py new file mode 100644 index 00000000..c0e3d807 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner_intensities.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildseafisheries200_response_intermediate_inner_intensities import PostWildseafisheries200ResponseIntermediateInnerIntensities + +class TestPostWildseafisheries200ResponseIntermediateInnerIntensities(unittest.TestCase): + """PostWildseafisheries200ResponseIntermediateInnerIntensities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildseafisheries200ResponseIntermediateInnerIntensities: + """Test PostWildseafisheries200ResponseIntermediateInnerIntensities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildseafisheries200ResponseIntermediateInnerIntensities` + """ + model = PostWildseafisheries200ResponseIntermediateInnerIntensities() + if include_optional: + return PostWildseafisheries200ResponseIntermediateInnerIntensities( + intensity_excluding_carbon_offset = 1.337, + intensity_including_carbon_offset = 1.337, + total_harvest_weight_tonnes = 1.337 + ) + else: + return PostWildseafisheries200ResponseIntermediateInnerIntensities( + intensity_excluding_carbon_offset = 1.337, + intensity_including_carbon_offset = 1.337, + total_harvest_weight_tonnes = 1.337, + ) + """ + + def testPostWildseafisheries200ResponseIntermediateInnerIntensities(self): + """Test PostWildseafisheries200ResponseIntermediateInnerIntensities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope1.py new file mode 100644 index 00000000..60e97208 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope1.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildseafisheries200_response_scope1 import PostWildseafisheries200ResponseScope1 + +class TestPostWildseafisheries200ResponseScope1(unittest.TestCase): + """PostWildseafisheries200ResponseScope1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildseafisheries200ResponseScope1: + """Test PostWildseafisheries200ResponseScope1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildseafisheries200ResponseScope1` + """ + model = PostWildseafisheries200ResponseScope1() + if include_optional: + return PostWildseafisheries200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + hfcs_refrigerant_leakage = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total_hfcs = 1.337, + total = 1.337 + ) + else: + return PostWildseafisheries200ResponseScope1( + fuel_co2 = 1.337, + fuel_ch4 = 1.337, + fuel_n2_o = 1.337, + hfcs_refrigerant_leakage = 1.337, + total_co2 = 1.337, + total_ch4 = 1.337, + total_n2_o = 1.337, + total_hfcs = 1.337, + total = 1.337, + ) + """ + + def testPostWildseafisheries200ResponseScope1(self): + """Test PostWildseafisheries200ResponseScope1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope3.py new file mode 100644 index 00000000..ac32474b --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope3.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildseafisheries200_response_scope3 import PostWildseafisheries200ResponseScope3 + +class TestPostWildseafisheries200ResponseScope3(unittest.TestCase): + """PostWildseafisheries200ResponseScope3 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildseafisheries200ResponseScope3: + """Test PostWildseafisheries200ResponseScope3 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildseafisheries200ResponseScope3` + """ + model = PostWildseafisheries200ResponseScope3() + if include_optional: + return PostWildseafisheries200ResponseScope3( + electricity = 1.337, + fuel = 1.337, + bait = 1.337, + total = 1.337 + ) + else: + return PostWildseafisheries200ResponseScope3( + electricity = 1.337, + fuel = 1.337, + bait = 1.337, + total = 1.337, + ) + """ + + def testPostWildseafisheries200ResponseScope3(self): + """Test PostWildseafisheries200ResponseScope3""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request.py new file mode 100644 index 00000000..514fdf63 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildseafisheries_request import PostWildseafisheriesRequest + +class TestPostWildseafisheriesRequest(unittest.TestCase): + """PostWildseafisheriesRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildseafisheriesRequest: + """Test PostWildseafisheriesRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildseafisheriesRequest` + """ + model = PostWildseafisheriesRequest() + if include_optional: + return PostWildseafisheriesRequest( + enterprises = [ + { + 'key' : null + } + ] + ) + else: + return PostWildseafisheriesRequest( + enterprises = [ + { + 'key' : null + } + ], + ) + """ + + def testPostWildseafisheriesRequest(self): + """Test PostWildseafisheriesRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner.py new file mode 100644 index 00000000..593a32d2 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildseafisheries_request_enterprises_inner import PostWildseafisheriesRequestEnterprisesInner + +class TestPostWildseafisheriesRequestEnterprisesInner(unittest.TestCase): + """PostWildseafisheriesRequestEnterprisesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildseafisheriesRequestEnterprisesInner: + """Test PostWildseafisheriesRequestEnterprisesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildseafisheriesRequestEnterprisesInner` + """ + model = PostWildseafisheriesRequestEnterprisesInner() + if include_optional: + return PostWildseafisheriesRequestEnterprisesInner( + id = '', + state = 'nsw', + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + total_whole_weight_caught = 1.337, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + refrigerants = [ + { + 'key' : null + } + ], + transports = [ + { + 'key' : null + } + ], + flights = [ + { + 'key' : null + } + ], + bait = [ + { + 'key' : null + } + ], + custombait = [ + { + 'key' : null + } + ], + carbon_offset = 1.337 + ) + else: + return PostWildseafisheriesRequestEnterprisesInner( + state = 'nsw', + electricity_source = 'State Grid', + electricity_renewable = 0, + electricity_use = 1.337, + total_whole_weight_caught = 1.337, + diesel = 1.337, + petrol = 1.337, + lpg = 1.337, + refrigerants = [ + { + 'key' : null + } + ], + transports = [ + { + 'key' : null + } + ], + flights = [ + { + 'key' : null + } + ], + bait = [ + { + 'key' : null + } + ], + custombait = [ + { + 'key' : null + } + ], + carbon_offset = 1.337, + ) + """ + + def testPostWildseafisheriesRequestEnterprisesInner(self): + """Test PostWildseafisheriesRequestEnterprisesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_bait_inner.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_bait_inner.py new file mode 100644 index 00000000..d7764a48 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_bait_inner.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_bait_inner import PostWildseafisheriesRequestEnterprisesInnerBaitInner + +class TestPostWildseafisheriesRequestEnterprisesInnerBaitInner(unittest.TestCase): + """PostWildseafisheriesRequestEnterprisesInnerBaitInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildseafisheriesRequestEnterprisesInnerBaitInner: + """Test PostWildseafisheriesRequestEnterprisesInnerBaitInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildseafisheriesRequestEnterprisesInnerBaitInner` + """ + model = PostWildseafisheriesRequestEnterprisesInnerBaitInner() + if include_optional: + return PostWildseafisheriesRequestEnterprisesInnerBaitInner( + type = 'Fish Frames', + purchased = 1.337, + additional_ingredient = 0, + emissions_intensity = 1.337 + ) + else: + return PostWildseafisheriesRequestEnterprisesInnerBaitInner( + type = 'Fish Frames', + purchased = 1.337, + additional_ingredient = 0, + emissions_intensity = 1.337, + ) + """ + + def testPostWildseafisheriesRequestEnterprisesInnerBaitInner(self): + """Test PostWildseafisheriesRequestEnterprisesInnerBaitInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_custombait_inner.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_custombait_inner.py new file mode 100644 index 00000000..0054eca5 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_custombait_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_custombait_inner import PostWildseafisheriesRequestEnterprisesInnerCustombaitInner + +class TestPostWildseafisheriesRequestEnterprisesInnerCustombaitInner(unittest.TestCase): + """PostWildseafisheriesRequestEnterprisesInnerCustombaitInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildseafisheriesRequestEnterprisesInnerCustombaitInner: + """Test PostWildseafisheriesRequestEnterprisesInnerCustombaitInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildseafisheriesRequestEnterprisesInnerCustombaitInner` + """ + model = PostWildseafisheriesRequestEnterprisesInnerCustombaitInner() + if include_optional: + return PostWildseafisheriesRequestEnterprisesInnerCustombaitInner( + purchased = 1.337, + emissions_intensity = 1.337 + ) + else: + return PostWildseafisheriesRequestEnterprisesInnerCustombaitInner( + purchased = 1.337, + emissions_intensity = 1.337, + ) + """ + + def testPostWildseafisheriesRequestEnterprisesInnerCustombaitInner(self): + """Test PostWildseafisheriesRequestEnterprisesInnerCustombaitInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_flights_inner.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_flights_inner.py new file mode 100644 index 00000000..054dd804 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_flights_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_flights_inner import PostWildseafisheriesRequestEnterprisesInnerFlightsInner + +class TestPostWildseafisheriesRequestEnterprisesInnerFlightsInner(unittest.TestCase): + """PostWildseafisheriesRequestEnterprisesInnerFlightsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildseafisheriesRequestEnterprisesInnerFlightsInner: + """Test PostWildseafisheriesRequestEnterprisesInnerFlightsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildseafisheriesRequestEnterprisesInnerFlightsInner` + """ + model = PostWildseafisheriesRequestEnterprisesInnerFlightsInner() + if include_optional: + return PostWildseafisheriesRequestEnterprisesInnerFlightsInner( + commercial_flight_passengers = 1.337, + total_flight_distance = 1.337 + ) + else: + return PostWildseafisheriesRequestEnterprisesInnerFlightsInner( + commercial_flight_passengers = 1.337, + total_flight_distance = 1.337, + ) + """ + + def testPostWildseafisheriesRequestEnterprisesInnerFlightsInner(self): + """Test PostWildseafisheriesRequestEnterprisesInnerFlightsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py new file mode 100644 index 00000000..f9137b1c --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_refrigerants_inner import PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner + +class TestPostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner(unittest.TestCase): + """PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner: + """Test PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner` + """ + model = PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner() + if include_optional: + return PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner( + refrigerant = 'HFC-23', + annual_recharge = 1.337 + ) + else: + return PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner( + refrigerant = 'HFC-23', + annual_recharge = 1.337, + ) + """ + + def testPostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner(self): + """Test PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_transports_inner.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_transports_inner.py new file mode 100644 index 00000000..b69b92a5 --- /dev/null +++ b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_transports_inner.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + AIA Calculator API + + Emissions Calculators for various farming activities + + The version of the OpenAPI document: 3.0.0 + Contact: contact@aginnovationaustralia.com.au + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.post_wildseafisheries_request_enterprises_inner_transports_inner import PostWildseafisheriesRequestEnterprisesInnerTransportsInner + +class TestPostWildseafisheriesRequestEnterprisesInnerTransportsInner(unittest.TestCase): + """PostWildseafisheriesRequestEnterprisesInnerTransportsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostWildseafisheriesRequestEnterprisesInnerTransportsInner: + """Test PostWildseafisheriesRequestEnterprisesInnerTransportsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostWildseafisheriesRequestEnterprisesInnerTransportsInner` + """ + model = PostWildseafisheriesRequestEnterprisesInnerTransportsInner() + if include_optional: + return PostWildseafisheriesRequestEnterprisesInnerTransportsInner( + type = 'None', + fuel = 'Gasoline', + distance = 1.337 + ) + else: + return PostWildseafisheriesRequestEnterprisesInnerTransportsInner( + type = 'None', + fuel = 'Gasoline', + distance = 1.337, + ) + """ + + def testPostWildseafisheriesRequestEnterprisesInnerTransportsInner(self): + """Test PostWildseafisheriesRequestEnterprisesInnerTransportsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/examples/python-api-client/api-client/test_api.py b/examples/python-api-client/api-client/test_api.py new file mode 100755 index 00000000..f61ec039 --- /dev/null +++ b/examples/python-api-client/api-client/test_api.py @@ -0,0 +1,114 @@ +#!/usr/bin/env python3 +""" +Test script for the AIA Calculator API client +This script demonstrates how to use the generated API client locally +""" + +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +def create_valid_beef_input(): + """Create a valid beef input using from_dict methods""" + + # Create sample data for a beef cattle operation + # This structure matches PostBeefRequest model requirements + beef_data = { + "state": "qld", # Queensland (must be valid enum: nsw, vic, qld, sa, wa_nw, wa_sw, tas, nt, act) + "northOfTropicOfCapricorn": True, + "rainfallAbove600": True, + "beef": [ + { + "id": "beef_cattle_001", + "classes": {}, # All optional fields - can be empty dict + "limestone": 10.0, + "limestoneFraction": 0.8, # Fraction between 0 and 1 + "fertiliser": { + "singleSuperphosphate": 5.0, + "pastureDryland": 10.0, + "pastureIrrigated": 2.0, + "cropsDryland": 8.0, + "cropsIrrigated": 1.0, + "otherDryland": None, + "otherIrrigated": None, + "otherType": None, + "otherFertilisers": None + }, + "diesel": 1000, + "petrol": 200, + "lpg": 100, + "mineralSupplementation": { + "mineralBlock": 2.0, + "mineralBlockUrea": 0.3, + "weanerBlock": 1.0, + "weanerBlockUrea": 0.2, + "drySeasonMix": 1.5, + "drySeasonMixUrea": 0.25 + }, + "electricitySource": "State Grid", # Must be 'State Grid' or 'Renewable' + "electricityRenewable": 0.2, # Fraction between 0 and 1 + "electricityUse": 5000, # kWh + "grainFeed": 10.0, # tonnes + "hayFeed": 5.0, + "cottonseedFeed": 2.0, + "herbicide": 50.0, # kg + "herbicideOther": 20.0, + "cowsCalving": { + "spring": 0.2, + "summer": 0.1, + "autumn": 0.5, + "winter": 0.2 + } + } + ], + "burning": [], # List of burning activities (optional) + "vegetation": [] # List of vegetation activities (optional) + } + + beef_input = openapi_client.PostBeefRequest.from_dict(beef_data) + return beef_input + +def test_beef_api(): + """Test the beef API endpoint with valid input""" + + configuration = openapi_client.Configuration( + host="https://emissionscalculator-mtls.staging.aiaapi.com/calculator/3.0.0", + cert_file="cert.pem", + key_file="key.pem", + ) + + # Create a valid beef input + beef_input = create_valid_beef_input() + + print("Created beef input:") + print("=" * 50) + pprint(beef_input.to_dict()) + print("=" * 50) + + with openapi_client.ApiClient(configuration) as api_client: + api_instance = openapi_client.GAFApi(api_client) + + try: + print("Calling beef API...") + api_response = api_instance.post_beef(beef_input) + print("The response of GAFApi->post_beef:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling GAFApi->post_beef: %s\n" % e) + print("This is expected if you don't have proper authentication configured") + +def main(): + """Main function to run API tests""" + print("Testing AIA Calculator API Client") + print("=" * 40) + + # Test beef endpoint + test_beef_api() + print("\n" + "=" * 40) + + print("API testing complete!") + print("\nNote: Authentication errors are expected if you haven't configured") + print("proper credentials for the production API endpoint.") + +if __name__ == "__main__": + main() diff --git a/examples/python-api-client/api-client/tox.ini b/examples/python-api-client/api-client/tox.ini new file mode 100644 index 00000000..1a9028b7 --- /dev/null +++ b/examples/python-api-client/api-client/tox.ini @@ -0,0 +1,9 @@ +[tox] +envlist = py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + pytest --cov=openapi_client diff --git a/examples/python-api-client/generate.sh b/examples/python-api-client/generate.sh index 50563a2b..ff49abeb 100755 --- a/examples/python-api-client/generate.sh +++ b/examples/python-api-client/generate.sh @@ -2,13 +2,13 @@ set -e API_CLIENT_DIR=api-client API_VERSION=3.0.0 -rm -rf $API_CLIENT_DIR +# rm -rf $API_CLIENT_DIR -npm -g install @openapitools/openapi-generator-cli -openapi-generator-cli generate \ - -i https://d2awla29kxgk7i.cloudfront.net/api/$API_VERSION/openapi.json \ - -g python \ - -o $API_CLIENT_DIR +# npm -g install @openapitools/openapi-generator-cli +# openapi-generator-cli generate \ +# -i https://d2awla29kxgk7i.cloudfront.net/api/$API_VERSION/openapi.json \ +# -g python \ +# -o $API_CLIENT_DIR cp resources/* $API_CLIENT_DIR/ diff --git a/examples/python-api-client/resources/test_api.py b/examples/python-api-client/resources/test_api.py index dfaa3836..f61ec039 100755 --- a/examples/python-api-client/resources/test_api.py +++ b/examples/python-api-client/resources/test_api.py @@ -8,163 +8,73 @@ from openapi_client.rest import ApiException from pprint import pprint -def create_valid_aquaculture_input(): - """Create a valid aquaculture input using from_dict methods""" - - # Create sample data for a salmon farming operation - enterprise_data = { - "id": "salmon_farm_001", - "state": "tas", # Tasmania - "productionSystem": "Offshore Caged Aquaculture", - "totalHarvestKg": 50000, # 50 tonnes - "refrigerants": [ - { - "refrigerant": "R-134a", - "chargeSize": 2.5 - } - ], - "bait": [ - { - "type": "High Animal Protein Formulated Feed", - "purchasedTonnes": 75.0, - "additionalIngredients": 0.1, - "emissionsIntensity": 2.5 - } - ], - "customBait": [], # Empty list - "inboundFreight": [], # Empty list - "outboundFreight": [], # Empty list - "totalCommercialFlightsKm": 0, - "electricityRenewable": 0.3, # 30% renewable - "electricityUse": 15000, # 15 MWh - "electricitySource": "State Grid", - "fuel": { - "transportFuel": [ - { - "type": "diesel", - "amountLitres": 500 - } - ], - "stationaryFuel": [ - { - "type": "diesel", - "amountLitres": 200 - } - ], - "naturalGas": 0 - }, - "fluidWaste": [], # Empty list - "solidWaste": { - "sentOffsiteTonnes": 5.0, - "onsiteCompostingTonnes": 2.0 - }, - "carbonOffsets": 10.0 # 10 tonnes CO2 offset - } - - # Create the enterprise input using from_dict - enterprise = openapi_client.AquacultureEnterpriseInput.from_dict(enterprise_data) - - # Create the main aquaculture input - aquaculture_data = { - "enterprises": [enterprise_data] # Pass the dict directly - } - - aquaculture_input = openapi_client.AquacultureInput.from_dict(aquaculture_data) - - return aquaculture_input - -def test_aquaculture_api(): - """Test the aquaculture API endpoint with valid input""" - - # Defining the host is optional and defaults to https://emissionscalculator-mtls.production.aiaapi.com/calculator/2.0.0 - # See configuration.py for a list of all supported configuration parameters. - configuration = openapi_client.Configuration( - host="https://emissionscalculator-mtls.staging.aiaapi.com/calculator/2.0.0", - cert_file="./cert.pem", - key_file="./key.pem" - ) - - # Create a valid aquaculture input - aquaculture_input = create_valid_aquaculture_input() - - print("Created aquaculture input:") - print("=" * 50) - pprint(aquaculture_input.to_dict()) - print("=" * 50) - - # Enter a context with an instance of the API client - with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - - try: - # Perform Aquaculture calculation - print("Calling aquaculture API...") - api_response = api_instance.post_aquaculture(aquaculture_input) - print("The response of GAFApi->post_aquaculture:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling GAFApi->post_aquaculture: %s\n" % e) - print("This is expected if you don't have proper authentication configured") - def create_valid_beef_input(): """Create a valid beef input using from_dict methods""" # Create sample data for a beef cattle operation + # This structure matches PostBeefRequest model requirements beef_data = { - "enterprises": [ + "state": "qld", # Queensland (must be valid enum: nsw, vic, qld, sa, wa_nw, wa_sw, tas, nt, act) + "northOfTropicOfCapricorn": True, + "rainfallAbove600": True, + "beef": [ { "id": "beef_cattle_001", - "state": "qld", # Queensland - "productionSystem": "Grass-fed", - "totalHarvestKg": 300000, # 300 tonnes - "refrigerants": [ - { - "refrigerant": "R-134a", - "chargeSize": 1.0 - } - ], - "bait": [], # Empty for beef - "customBait": [], - "inboundFreight": [], - "outboundFreight": [], - "totalCommercialFlightsKm": 0, - "electricityRenewable": 0.2, # 20% renewable - "electricityUse": 5000, # 5 MWh - "electricitySource": "State Grid", - "fuel": { - "transportFuel": [ - { - "type": "diesel", - "amountLitres": 1000 - } - ], - "stationaryFuel": [ - { - "type": "diesel", - "amountLitres": 500 - } - ], - "naturalGas": 0 + "classes": {}, # All optional fields - can be empty dict + "limestone": 10.0, + "limestoneFraction": 0.8, # Fraction between 0 and 1 + "fertiliser": { + "singleSuperphosphate": 5.0, + "pastureDryland": 10.0, + "pastureIrrigated": 2.0, + "cropsDryland": 8.0, + "cropsIrrigated": 1.0, + "otherDryland": None, + "otherIrrigated": None, + "otherType": None, + "otherFertilisers": None }, - "fluidWaste": [], - "solidWaste": { - "sentOffsiteTonnes": 10.0, - "onsiteCompostingTonnes": 5.0 + "diesel": 1000, + "petrol": 200, + "lpg": 100, + "mineralSupplementation": { + "mineralBlock": 2.0, + "mineralBlockUrea": 0.3, + "weanerBlock": 1.0, + "weanerBlockUrea": 0.2, + "drySeasonMix": 1.5, + "drySeasonMixUrea": 0.25 }, - "carbonOffsets": 5.0 + "electricitySource": "State Grid", # Must be 'State Grid' or 'Renewable' + "electricityRenewable": 0.2, # Fraction between 0 and 1 + "electricityUse": 5000, # kWh + "grainFeed": 10.0, # tonnes + "hayFeed": 5.0, + "cottonseedFeed": 2.0, + "herbicide": 50.0, # kg + "herbicideOther": 20.0, + "cowsCalving": { + "spring": 0.2, + "summer": 0.1, + "autumn": 0.5, + "winter": 0.2 + } } - ] + ], + "burning": [], # List of burning activities (optional) + "vegetation": [] # List of vegetation activities (optional) } - beef_input = openapi_client.BeefInput.from_dict(beef_data) + beef_input = openapi_client.PostBeefRequest.from_dict(beef_data) return beef_input def test_beef_api(): """Test the beef API endpoint with valid input""" configuration = openapi_client.Configuration( - host="https://emissionscalculator-mtls.production.aiaapi.com/calculator/2.0.0" + host="https://emissionscalculator-mtls.staging.aiaapi.com/calculator/3.0.0", + cert_file="cert.pem", + key_file="key.pem", ) # Create a valid beef input @@ -192,13 +102,9 @@ def main(): print("Testing AIA Calculator API Client") print("=" * 40) - # Test aquaculture endpoint - test_aquaculture_api() - print("\n" + "=" * 40) - # Test beef endpoint - # test_beef_api() - # print("\n" + "=" * 40) + test_beef_api() + print("\n" + "=" * 40) print("API testing complete!") print("\nNote: Authentication errors are expected if you haven't configured") From 0d3f03e98fbc21610c44618324dfeb24b09d9145 Mon Sep 17 00:00:00 2001 From: Eddie Sholl Date: Mon, 27 Oct 2025 13:39:29 +1100 Subject: [PATCH 5/8] Generated php client --- .gitignore | 3 +- examples/php-api-client/api-client/.gitignore | 15 + .../api-client/.openapi-generator-ignore | 23 + .../api-client/.openapi-generator/FILES | 890 +++ .../api-client/.openapi-generator/VERSION | 1 + .../api-client/.php-cs-fixer.dist.php | 29 + .../php-api-client/api-client/.travis.yml | 8 + examples/php-api-client/api-client/README.md | 412 ++ .../php-api-client/api-client/composer.json | 38 + .../php-api-client/api-client/composer.lock | 4940 +++++++++++++++ .../api-client/docs/Api/GAFApi.md | 1147 ++++ .../docs/Model/PostAquaculture200Response.md | 16 + ...uaculture200ResponseCarbonSequestration.md | 10 + .../PostAquaculture200ResponseIntensities.md | 11 + ...Aquaculture200ResponseIntermediateInner.md | 15 + ...nseIntermediateInnerCarbonSequestration.md | 9 + .../Model/PostAquaculture200ResponseNet.md | 9 + ...tAquaculture200ResponsePurchasedOffsets.md | 9 + .../Model/PostAquaculture200ResponseScope1.md | 19 + .../Model/PostAquaculture200ResponseScope2.md | 10 + .../Model/PostAquaculture200ResponseScope3.md | 16 + .../docs/Model/PostAquacultureRequest.md | 9 + .../PostAquacultureRequestEnterprisesInner.md | 25 + ...cultureRequestEnterprisesInnerBaitInner.md | 12 + ...eRequestEnterprisesInnerCustomBaitInner.md | 10 + ...eRequestEnterprisesInnerFluidWasteInner.md | 13 + ...tAquacultureRequestEnterprisesInnerFuel.md | 11 + ...EnterprisesInnerFuelStationaryFuelInner.md | 10 + ...tEnterprisesInnerFuelTransportFuelInner.md | 10 + ...uestEnterprisesInnerInboundFreightInner.md | 10 + ...equestEnterprisesInnerRefrigerantsInner.md | 10 + ...ultureRequestEnterprisesInnerSolidWaste.md | 10 + .../docs/Model/PostBeef200Response.md | 15 + .../PostBeef200ResponseIntermediateInner.md | 15 + ...200ResponseIntermediateInnerIntensities.md | 11 + .../docs/Model/PostBeef200ResponseNet.md | 10 + .../docs/Model/PostBeef200ResponseScope1.md | 25 + .../docs/Model/PostBeef200ResponseScope3.md | 17 + .../api-client/docs/Model/PostBeefRequest.md | 14 + .../docs/Model/PostBeefRequestBeefInner.md | 26 + .../Model/PostBeefRequestBeefInnerClasses.md | 24 + ...PostBeefRequestBeefInnerClassesBullsGt1.md | 18 + ...efRequestBeefInnerClassesBullsGt1Autumn.md | 13 + ...tBeefInnerClassesBullsGt1PurchasesInner.md | 11 + ...efRequestBeefInnerClassesBullsGt1Traded.md | 18 + .../PostBeefRequestBeefInnerClassesCowsGt2.md | 18 + ...eefRequestBeefInnerClassesCowsGt2Traded.md | 18 + ...tBeefRequestBeefInnerClassesHeifers1To2.md | 18 + ...equestBeefInnerClassesHeifers1To2Traded.md | 18 + ...stBeefRequestBeefInnerClassesHeifersGt2.md | 18 + ...RequestBeefInnerClassesHeifersGt2Traded.md | 18 + ...stBeefRequestBeefInnerClassesHeifersLt1.md | 18 + ...RequestBeefInnerClassesHeifersLt1Traded.md | 18 + ...stBeefRequestBeefInnerClassesSteers1To2.md | 18 + ...RequestBeefInnerClassesSteers1To2Traded.md | 18 + ...ostBeefRequestBeefInnerClassesSteersGt2.md | 18 + ...fRequestBeefInnerClassesSteersGt2Traded.md | 18 + ...ostBeefRequestBeefInnerClassesSteersLt1.md | 18 + ...fRequestBeefInnerClassesSteersLt1Traded.md | 18 + .../PostBeefRequestBeefInnerCowsCalving.md | 12 + .../PostBeefRequestBeefInnerFertiliser.md | 17 + ...eefInnerFertiliserOtherFertilisersInner.md | 11 + ...fRequestBeefInnerMineralSupplementation.md | 14 + .../docs/Model/PostBeefRequestBurningInner.md | 10 + .../PostBeefRequestBurningInnerBurning.md | 15 + .../Model/PostBeefRequestVegetationInner.md | 11 + ...ostBeefRequestVegetationInnerVegetation.md | 13 + .../docs/Model/PostBuffalo200Response.md | 15 + .../PostBuffalo200ResponseIntensities.md | 11 + ...PostBuffalo200ResponseIntermediateInner.md | 15 + .../docs/Model/PostBuffalo200ResponseNet.md | 9 + .../Model/PostBuffalo200ResponseScope1.md | 23 + .../Model/PostBuffalo200ResponseScope3.md | 16 + .../docs/Model/PostBuffaloRequest.md | 12 + .../Model/PostBuffaloRequestBuffalosInner.md | 25 + .../PostBuffaloRequestBuffalosInnerClasses.md | 16 + ...BuffaloRequestBuffalosInnerClassesBulls.md | 15 + ...oRequestBuffalosInnerClassesBullsAutumn.md | 9 + ...BuffalosInnerClassesBullsPurchasesInner.md | 10 + ...BuffaloRequestBuffalosInnerClassesCalfs.md | 15 + ...tBuffaloRequestBuffalosInnerClassesCows.md | 15 + ...uffaloRequestBuffalosInnerClassesSteers.md | 15 + ...loRequestBuffalosInnerClassesTradeBulls.md | 15 + ...loRequestBuffalosInnerClassesTradeCalfs.md | 15 + ...aloRequestBuffalosInnerClassesTradeCows.md | 15 + ...oRequestBuffalosInnerClassesTradeSteers.md | 15 + ...tBuffaloRequestBuffalosInnerCowsCalving.md | 12 + ...faloRequestBuffalosInnerSeasonalCalving.md | 12 + .../PostBuffaloRequestVegetationInner.md | 10 + .../docs/Model/PostCotton200Response.md | 15 + .../PostCotton200ResponseIntermediateInner.md | 15 + ...200ResponseIntermediateInnerIntensities.md | 22 + .../docs/Model/PostCotton200ResponseNet.md | 10 + .../docs/Model/PostCotton200ResponseScope1.md | 23 + .../docs/Model/PostCotton200ResponseScope3.md | 14 + .../docs/Model/PostCottonRequest.md | 13 + .../docs/Model/PostCottonRequestCropsInner.md | 35 + .../Model/PostCottonRequestVegetationInner.md | 10 + .../docs/Model/PostDairy200Response.md | 15 + .../Model/PostDairy200ResponseIntensities.md | 10 + .../PostDairy200ResponseIntermediateInner.md | 15 + .../docs/Model/PostDairy200ResponseNet.md | 9 + .../docs/Model/PostDairy200ResponseScope1.md | 28 + .../docs/Model/PostDairy200ResponseScope3.md | 15 + .../api-client/docs/Model/PostDairyRequest.md | 13 + .../docs/Model/PostDairyRequestDairyInner.md | 30 + .../Model/PostDairyRequestDairyInnerAreas.md | 12 + .../PostDairyRequestDairyInnerClasses.md | 13 + ...ryRequestDairyInnerClassesDairyBullsGt1.md | 12 + ...ryRequestDairyInnerClassesDairyBullsLt1.md | 12 + ...DairyRequestDairyInnerClassesHeifersGt1.md | 12 + ...DairyRequestDairyInnerClassesHeifersLt1.md | 12 + ...airyRequestDairyInnerClassesMilkingCows.md | 12 + ...questDairyInnerClassesMilkingCowsAutumn.md | 14 + ...stDairyInnerManureManagementMilkingCows.md | 13 + ...airyRequestDairyInnerSeasonalFertiliser.md | 12 + ...questDairyInnerSeasonalFertiliserAutumn.md | 12 + .../Model/PostDairyRequestVegetationInner.md | 10 + .../docs/Model/PostDeer200Response.md | 15 + .../Model/PostDeer200ResponseIntensities.md | 11 + .../PostDeer200ResponseIntermediateInner.md | 15 + .../docs/Model/PostDeer200ResponseNet.md | 9 + .../api-client/docs/Model/PostDeerRequest.md | 12 + .../docs/Model/PostDeerRequestDeersInner.md | 25 + .../Model/PostDeerRequestDeersInnerClasses.md | 16 + ...eerRequestDeersInnerClassesBreedingDoes.md | 15 + .../PostDeerRequestDeersInnerClassesBucks.md | 15 + .../PostDeerRequestDeersInnerClassesFawn.md | 15 + ...stDeerRequestDeersInnerClassesOtherDoes.md | 15 + ...tDeerRequestDeersInnerClassesTradeBucks.md | 15 + ...stDeerRequestDeersInnerClassesTradeDoes.md | 15 + ...stDeerRequestDeersInnerClassesTradeFawn.md | 15 + ...rRequestDeersInnerClassesTradeOtherDoes.md | 15 + .../PostDeerRequestDeersInnerDoesFawning.md | 12 + ...ostDeerRequestDeersInnerSeasonalFawning.md | 12 + .../Model/PostDeerRequestVegetationInner.md | 10 + .../docs/Model/PostFeedlot200Response.md | 15 + ...PostFeedlot200ResponseIntermediateInner.md | 15 + ...200ResponseIntermediateInnerIntensities.md | 11 + ...tFeedlot200ResponseIntermediateInnerNet.md | 9 + .../Model/PostFeedlot200ResponseScope1.md | 26 + .../Model/PostFeedlot200ResponseScope3.md | 16 + .../docs/Model/PostFeedlotRequest.md | 11 + .../Model/PostFeedlotRequestFeedlotsInner.md | 29 + ...tFeedlotRequestFeedlotsInnerGroupsInner.md | 9 + ...questFeedlotsInnerGroupsInnerStaysInner.md | 17 + ...ostFeedlotRequestFeedlotsInnerPurchases.md | 24 + ...uestFeedlotsInnerPurchasesBullsGt1Inner.md | 11 + .../PostFeedlotRequestFeedlotsInnerSales.md | 24 + ...tRequestFeedlotsInnerSalesBullsGt1Inner.md | 10 + .../PostFeedlotRequestVegetationInner.md | 10 + .../docs/Model/PostGoat200Response.md | 15 + .../Model/PostGoat200ResponseIntensities.md | 14 + .../PostGoat200ResponseIntermediateInner.md | 15 + .../docs/Model/PostGoat200ResponseNet.md | 9 + .../api-client/docs/Model/PostGoatRequest.md | 12 + .../docs/Model/PostGoatRequestGoatsInner.md | 24 + .../Model/PostGoatRequestGoatsInnerClasses.md | 21 + ...estGoatsInnerClassesBreedingDoesNannies.md | 20 + ...tGoatRequestGoatsInnerClassesBucksBilly.md | 20 + .../PostGoatRequestGoatsInnerClassesKids.md | 20 + ...tsInnerClassesMaidenBreedingDoesNannies.md | 20 + ...GoatsInnerClassesOtherDoesCulledFemales.md | 20 + ...atsInnerClassesTradeBreedingDoesNannies.md | 20 + ...tGoatRequestGoatsInnerClassesTradeBucks.md | 20 + ...stGoatRequestGoatsInnerClassesTradeDoes.md | 20 + ...stGoatRequestGoatsInnerClassesTradeKids.md | 20 + ...erClassesTradeMaidenBreedingDoesNannies.md | 20 + ...InnerClassesTradeOtherDoesCulledFemales.md | 20 + ...oatRequestGoatsInnerClassesTradeWethers.md | 20 + ...PostGoatRequestGoatsInnerClassesWethers.md | 20 + .../Model/PostGoatRequestVegetationInner.md | 10 + .../docs/Model/PostGrains200Response.md | 16 + .../PostGrains200ResponseIntermediateInner.md | 15 + ...ediateInnerIntensitiesWithSequestration.md | 11 + .../docs/Model/PostGrainsRequest.md | 13 + .../docs/Model/PostGrainsRequestCropsInner.md | 30 + .../docs/Model/PostHorticulture200Response.md | 15 + ...orticulture200ResponseIntermediateInner.md | 15 + ...ediateInnerIntensitiesWithSequestration.md | 11 + .../PostHorticulture200ResponseScope1.md | 25 + .../docs/Model/PostHorticultureRequest.md | 13 + .../PostHorticultureRequestCropsInner.md | 31 + ...ltureRequestCropsInnerRefrigerantsInner.md | 10 + .../docs/Model/PostPork200Response.md | 15 + .../Model/PostPork200ResponseIntensities.md | 11 + .../PostPork200ResponseIntermediateInner.md | 15 + .../docs/Model/PostPork200ResponseNet.md | 9 + .../docs/Model/PostPork200ResponseScope1.md | 25 + .../docs/Model/PostPork200ResponseScope3.md | 17 + .../api-client/docs/Model/PostPorkRequest.md | 13 + .../docs/Model/PostPorkRequestPorkInner.md | 23 + .../Model/PostPorkRequestPorkInnerClasses.md | 15 + .../PostPorkRequestPorkInnerClassesBoars.md | 18 + .../PostPorkRequestPorkInnerClassesGilts.md | 18 + .../PostPorkRequestPorkInnerClassesGrowers.md | 18 + ...orkRequestPorkInnerClassesSlaughterPigs.md | 18 + .../PostPorkRequestPorkInnerClassesSows.md | 18 + ...stPorkRequestPorkInnerClassesSowsManure.md | 12 + ...RequestPorkInnerClassesSowsManureSpring.md | 13 + .../PostPorkRequestPorkInnerClassesSuckers.md | 18 + .../PostPorkRequestPorkInnerClassesWeaners.md | 18 + ...stPorkRequestPorkInnerFeedProductsInner.md | 12 + ...stPorkInnerFeedProductsInnerIngredients.md | 20 + .../Model/PostPorkRequestVegetationInner.md | 10 + .../docs/Model/PostPoultry200Response.md | 16 + .../PostPoultry200ResponseIntensities.md | 14 + ...try200ResponseIntermediateBroilersInner.md | 15 + ...nseIntermediateBroilersInnerIntensities.md | 11 + ...ultry200ResponseIntermediateLayersInner.md | 15 + ...ponseIntermediateLayersInnerIntensities.md | 11 + .../docs/Model/PostPoultry200ResponseNet.md | 11 + .../Model/PostPoultry200ResponseScope1.md | 19 + .../Model/PostPoultry200ResponseScope3.md | 15 + .../docs/Model/PostPoultryRequest.md | 14 + .../Model/PostPoultryRequestBroilersInner.md | 28 + ...tPoultryRequestBroilersInnerGroupsInner.md | 14 + ...equestBroilersInnerGroupsInnerFeedInner.md | 12 + ...ersInnerGroupsInnerFeedInnerIngredients.md | 13 + ...ilersInnerGroupsInnerMeatChickenGrowers.md | 18 + ...roilersInnerMeatChickenGrowersPurchases.md | 10 + ...BroilersInnerMeatChickenLayersPurchases.md | 10 + ...yRequestBroilersInnerMeatOtherPurchases.md | 10 + ...stPoultryRequestBroilersInnerSalesInner.md | 11 + .../Model/PostPoultryRequestLayersInner.md | 32 + .../PostPoultryRequestLayersInnerLayers.md | 12 + ...tPoultryRequestLayersInnerLayersEggSale.md | 10 + ...oultryRequestLayersInnerLayersPurchases.md | 10 + ...ltryRequestLayersInnerMeatChickenLayers.md | 12 + ...uestLayersInnerMeatChickenLayersEggSale.md | 10 + .../PostPoultryRequestVegetationInner.md | 11 + .../docs/Model/PostProcessing200Response.md | 16 + ...stProcessing200ResponseIntensitiesInner.md | 12 + ...tProcessing200ResponseIntermediateInner.md | 15 + .../Model/PostProcessing200ResponseNet.md | 9 + .../Model/PostProcessing200ResponseScope1.md | 20 + .../Model/PostProcessing200ResponseScope3.md | 12 + .../docs/Model/PostProcessingRequest.md | 10 + .../PostProcessingRequestProductsInner.md | 19 + ...stProcessingRequestProductsInnerProduct.md | 10 + .../docs/Model/PostRice200Response.md | 15 + .../Model/PostRice200ResponseIntensities.md | 12 + .../PostRice200ResponseIntermediateInner.md | 15 + ...200ResponseIntermediateInnerIntensities.md | 12 + .../docs/Model/PostRice200ResponseScope1.md | 24 + .../api-client/docs/Model/PostRiceRequest.md | 13 + .../docs/Model/PostRiceRequestCropsInner.md | 31 + .../docs/Model/PostSheep200Response.md | 15 + .../PostSheep200ResponseIntermediateInner.md | 15 + ...200ResponseIntermediateInnerIntensities.md | 14 + .../docs/Model/PostSheep200ResponseNet.md | 10 + .../api-client/docs/Model/PostSheepRequest.md | 13 + .../docs/Model/PostSheepRequestSheepInner.md | 27 + .../PostSheepRequestSheepInnerClasses.md | 24 + .../PostSheepRequestSheepInnerClassesRams.md | 20 + ...SheepRequestSheepInnerClassesRamsAutumn.md | 14 + ...tSheepRequestSheepInnerClassesTradeEwes.md | 20 + ...stSheepInnerClassesTradeLambsAndHoggets.md | 20 + .../PostSheepRequestSheepInnerEwesLambing.md | 12 + ...stSheepRequestSheepInnerSeasonalLambing.md | 12 + .../Model/PostSheepRequestVegetationInner.md | 10 + .../docs/Model/PostSheepbeef200Response.md | 17 + .../PostSheepbeef200ResponseIntensities.md | 17 + .../PostSheepbeef200ResponseIntermediate.md | 10 + ...ostSheepbeef200ResponseIntermediateBeef.md | 14 + ...stSheepbeef200ResponseIntermediateSheep.md | 14 + .../docs/Model/PostSheepbeef200ResponseNet.md | 11 + .../docs/Model/PostSheepbeefRequest.md | 15 + .../PostSheepbeefRequestVegetationInner.md | 11 + .../docs/Model/PostSugar200Response.md | 15 + .../PostSugar200ResponseIntermediateInner.md | 15 + ...200ResponseIntermediateInnerIntensities.md | 11 + .../api-client/docs/Model/PostSugarRequest.md | 13 + .../docs/Model/PostSugarRequestCropsInner.md | 30 + .../docs/Model/PostVineyard200Response.md | 15 + ...ostVineyard200ResponseIntermediateInner.md | 15 + ...200ResponseIntermediateInnerIntensities.md | 11 + .../docs/Model/PostVineyard200ResponseNet.md | 10 + .../Model/PostVineyard200ResponseScope1.md | 23 + .../Model/PostVineyard200ResponseScope3.md | 18 + .../docs/Model/PostVineyardRequest.md | 10 + .../PostVineyardRequestVegetationInner.md | 10 + .../PostVineyardRequestVineyardsInner.md | 33 + .../Model/PostWildcatchfishery200Response.md | 16 + ...tWildcatchfishery200ResponseIntensities.md | 11 + ...atchfishery200ResponseIntermediateInner.md | 15 + .../PostWildcatchfishery200ResponseScope1.md | 19 + .../docs/Model/PostWildcatchfisheryRequest.md | 9 + ...WildcatchfisheryRequestEnterprisesInner.md | 25 + ...fisheryRequestEnterprisesInnerBaitInner.md | 12 + .../Model/PostWildseafisheries200Response.md | 15 + ...eafisheries200ResponseIntermediateInner.md | 16 + ...200ResponseIntermediateInnerIntensities.md | 11 + .../PostWildseafisheries200ResponseScope1.md | 17 + .../PostWildseafisheries200ResponseScope3.md | 12 + .../docs/Model/PostWildseafisheriesRequest.md | 9 + ...WildseafisheriesRequestEnterprisesInner.md | 23 + ...sheriesRequestEnterprisesInnerBaitInner.md | 12 + ...sRequestEnterprisesInnerCustombaitInner.md | 10 + ...riesRequestEnterprisesInnerFlightsInner.md | 10 + ...equestEnterprisesInnerRefrigerantsInner.md | 10 + ...sRequestEnterprisesInnerTransportsInner.md | 11 + .../php-api-client/api-client/example.php | 143 + .../php-api-client/api-client/git_push.sh | 57 + .../api-client/lib/Api/GAFApi.php | 5595 +++++++++++++++++ .../api-client/lib/ApiException.php | 120 + .../api-client/lib/Configuration.php | 589 ++ .../api-client/lib/FormDataProcessor.php | 247 + .../api-client/lib/HeaderSelector.php | 274 + .../api-client/lib/Model/ModelInterface.php | 112 + .../lib/Model/PostAquaculture200Response.php | 673 ++ ...aculture200ResponseCarbonSequestration.php | 451 ++ .../PostAquaculture200ResponseIntensities.php | 487 ++ ...quaculture200ResponseIntermediateInner.php | 636 ++ ...seIntermediateInnerCarbonSequestration.php | 414 ++ .../Model/PostAquaculture200ResponseNet.php | 414 ++ ...Aquaculture200ResponsePurchasedOffsets.php | 414 ++ .../PostAquaculture200ResponseScope1.php | 784 +++ .../PostAquaculture200ResponseScope2.php | 451 ++ .../PostAquaculture200ResponseScope3.php | 673 ++ .../lib/Model/PostAquacultureRequest.php | 414 ++ ...PostAquacultureRequestEnterprisesInner.php | 1148 ++++ ...ultureRequestEnterprisesInnerBaitInner.php | 582 ++ ...RequestEnterprisesInnerCustomBaitInner.php | 450 ++ ...RequestEnterprisesInnerFluidWasteInner.php | 601 ++ ...AquacultureRequestEnterprisesInnerFuel.php | 488 ++ ...nterprisesInnerFuelStationaryFuelInner.php | 496 ++ ...EnterprisesInnerFuelTransportFuelInner.php | 504 ++ ...estEnterprisesInnerInboundFreightInner.php | 492 ++ ...questEnterprisesInnerRefrigerantsInner.php | 666 ++ ...ltureRequestEnterprisesInnerSolidWaste.php | 451 ++ .../lib/Model/PostBeef200Response.php | 636 ++ .../PostBeef200ResponseIntermediateInner.php | 636 ++ ...00ResponseIntermediateInnerIntensities.php | 487 ++ .../lib/Model/PostBeef200ResponseNet.php | 450 ++ .../lib/Model/PostBeef200ResponseScope1.php | 1006 +++ .../lib/Model/PostBeef200ResponseScope3.php | 710 +++ .../api-client/lib/Model/PostBeefRequest.php | 647 ++ .../lib/Model/PostBeefRequestBeefInner.php | 1089 ++++ .../Model/PostBeefRequestBeefInnerClasses.php | 921 +++ ...ostBeefRequestBeefInnerClassesBullsGt1.php | 787 +++ ...fRequestBeefInnerClassesBullsGt1Autumn.php | 555 ++ ...BeefInnerClassesBullsGt1PurchasesInner.php | 534 ++ ...fRequestBeefInnerClassesBullsGt1Traded.php | 787 +++ ...PostBeefRequestBeefInnerClassesCowsGt2.php | 787 +++ ...efRequestBeefInnerClassesCowsGt2Traded.php | 787 +++ ...BeefRequestBeefInnerClassesHeifers1To2.php | 787 +++ ...questBeefInnerClassesHeifers1To2Traded.php | 787 +++ ...tBeefRequestBeefInnerClassesHeifersGt2.php | 787 +++ ...equestBeefInnerClassesHeifersGt2Traded.php | 787 +++ ...tBeefRequestBeefInnerClassesHeifersLt1.php | 787 +++ ...equestBeefInnerClassesHeifersLt1Traded.php | 787 +++ ...tBeefRequestBeefInnerClassesSteers1To2.php | 787 +++ ...equestBeefInnerClassesSteers1To2Traded.php | 787 +++ ...stBeefRequestBeefInnerClassesSteersGt2.php | 787 +++ ...RequestBeefInnerClassesSteersGt2Traded.php | 787 +++ ...stBeefRequestBeefInnerClassesSteersLt1.php | 787 +++ ...RequestBeefInnerClassesSteersLt1Traded.php | 787 +++ .../PostBeefRequestBeefInnerCowsCalving.php | 525 ++ .../PostBeefRequestBeefInnerFertiliser.php | 762 +++ ...efInnerFertiliserOtherFertilisersInner.php | 546 ++ ...RequestBeefInnerMineralSupplementation.php | 599 ++ .../lib/Model/PostBeefRequestBurningInner.php | 451 ++ .../PostBeefRequestBurningInnerBurning.php | 822 +++ .../Model/PostBeefRequestVegetationInner.php | 487 ++ ...stBeefRequestVegetationInnerVegetation.php | 850 +++ .../lib/Model/PostBuffalo200Response.php | 636 ++ .../PostBuffalo200ResponseIntensities.php | 487 ++ ...ostBuffalo200ResponseIntermediateInner.php | 636 ++ .../lib/Model/PostBuffalo200ResponseNet.php | 414 ++ .../Model/PostBuffalo200ResponseScope1.php | 932 +++ .../Model/PostBuffalo200ResponseScope3.php | 673 ++ .../lib/Model/PostBuffaloRequest.php | 573 ++ .../Model/PostBuffaloRequestBuffalosInner.php | 1052 ++++ ...PostBuffaloRequestBuffalosInnerClasses.php | 649 ++ ...uffaloRequestBuffalosInnerClassesBulls.php | 633 ++ ...RequestBuffalosInnerClassesBullsAutumn.php | 413 ++ ...uffalosInnerClassesBullsPurchasesInner.php | 450 ++ ...uffaloRequestBuffalosInnerClassesCalfs.php | 633 ++ ...BuffaloRequestBuffalosInnerClassesCows.php | 633 ++ ...ffaloRequestBuffalosInnerClassesSteers.php | 633 ++ ...oRequestBuffalosInnerClassesTradeBulls.php | 633 ++ ...oRequestBuffalosInnerClassesTradeCalfs.php | 633 ++ ...loRequestBuffalosInnerClassesTradeCows.php | 633 ++ ...RequestBuffalosInnerClassesTradeSteers.php | 633 ++ ...BuffaloRequestBuffalosInnerCowsCalving.php | 525 ++ ...aloRequestBuffalosInnerSeasonalCalving.php | 525 ++ .../PostBuffaloRequestVegetationInner.php | 451 ++ .../lib/Model/PostCotton200Response.php | 636 ++ ...PostCotton200ResponseIntermediateInner.php | 636 ++ ...00ResponseIntermediateInnerIntensities.php | 895 +++ .../lib/Model/PostCotton200ResponseNet.php | 451 ++ .../lib/Model/PostCotton200ResponseScope1.php | 932 +++ .../lib/Model/PostCotton200ResponseScope3.php | 599 ++ .../lib/Model/PostCottonRequest.php | 626 ++ .../lib/Model/PostCottonRequestCropsInner.php | 1479 +++++ .../PostCottonRequestVegetationInner.php | 450 ++ .../lib/Model/PostDairy200Response.php | 636 ++ .../Model/PostDairy200ResponseIntensities.php | 450 ++ .../PostDairy200ResponseIntermediateInner.php | 636 ++ .../lib/Model/PostDairy200ResponseNet.php | 413 ++ .../lib/Model/PostDairy200ResponseScope1.php | 1117 ++++ .../lib/Model/PostDairy200ResponseScope3.php | 636 ++ .../api-client/lib/Model/PostDairyRequest.php | 648 ++ .../lib/Model/PostDairyRequestDairyInner.php | 1255 ++++ .../Model/PostDairyRequestDairyInnerAreas.php | 525 ++ .../PostDairyRequestDairyInnerClasses.php | 562 ++ ...yRequestDairyInnerClassesDairyBullsGt1.php | 525 ++ ...yRequestDairyInnerClassesDairyBullsLt1.php | 525 ++ ...airyRequestDairyInnerClassesHeifersGt1.php | 525 ++ ...airyRequestDairyInnerClassesHeifersLt1.php | 525 ++ ...iryRequestDairyInnerClassesMilkingCows.php | 525 ++ ...uestDairyInnerClassesMilkingCowsAutumn.php | 589 ++ ...tDairyInnerManureManagementMilkingCows.php | 642 ++ ...iryRequestDairyInnerSeasonalFertiliser.php | 525 ++ ...uestDairyInnerSeasonalFertiliserAutumn.php | 525 ++ .../Model/PostDairyRequestVegetationInner.php | 451 ++ .../lib/Model/PostDeer200Response.php | 636 ++ .../Model/PostDeer200ResponseIntensities.php | 487 ++ .../PostDeer200ResponseIntermediateInner.php | 636 ++ .../lib/Model/PostDeer200ResponseNet.php | 414 ++ .../api-client/lib/Model/PostDeerRequest.php | 573 ++ .../lib/Model/PostDeerRequestDeersInner.php | 1052 ++++ .../PostDeerRequestDeersInnerClasses.php | 649 ++ ...erRequestDeersInnerClassesBreedingDoes.php | 633 ++ .../PostDeerRequestDeersInnerClassesBucks.php | 633 ++ .../PostDeerRequestDeersInnerClassesFawn.php | 633 ++ ...tDeerRequestDeersInnerClassesOtherDoes.php | 633 ++ ...DeerRequestDeersInnerClassesTradeBucks.php | 633 ++ ...tDeerRequestDeersInnerClassesTradeDoes.php | 633 ++ ...tDeerRequestDeersInnerClassesTradeFawn.php | 633 ++ ...RequestDeersInnerClassesTradeOtherDoes.php | 633 ++ .../PostDeerRequestDeersInnerDoesFawning.php | 525 ++ ...stDeerRequestDeersInnerSeasonalFawning.php | 525 ++ .../Model/PostDeerRequestVegetationInner.php | 451 ++ .../lib/Model/PostFeedlot200Response.php | 636 ++ ...ostFeedlot200ResponseIntermediateInner.php | 635 ++ ...00ResponseIntermediateInnerIntensities.php | 487 ++ ...Feedlot200ResponseIntermediateInnerNet.php | 414 ++ .../Model/PostFeedlot200ResponseScope1.php | 1043 +++ .../Model/PostFeedlot200ResponseScope3.php | 673 ++ .../lib/Model/PostFeedlotRequest.php | 536 ++ .../Model/PostFeedlotRequestFeedlotsInner.php | 1275 ++++ ...FeedlotRequestFeedlotsInnerGroupsInner.php | 413 ++ ...uestFeedlotsInnerGroupsInnerStaysInner.php | 710 +++ ...stFeedlotRequestFeedlotsInnerPurchases.php | 921 +++ ...estFeedlotsInnerPurchasesBullsGt1Inner.php | 535 ++ .../PostFeedlotRequestFeedlotsInnerSales.php | 969 +++ ...RequestFeedlotsInnerSalesBullsGt1Inner.php | 450 ++ .../PostFeedlotRequestVegetationInner.php | 450 ++ .../lib/Model/PostGoat200Response.php | 636 ++ .../Model/PostGoat200ResponseIntensities.php | 598 ++ .../PostGoat200ResponseIntermediateInner.php | 636 ++ .../lib/Model/PostGoat200ResponseNet.php | 414 ++ .../api-client/lib/Model/PostGoatRequest.php | 573 ++ .../lib/Model/PostGoatRequestGoatsInner.php | 1015 +++ .../PostGoatRequestGoatsInnerClasses.php | 821 +++ ...stGoatsInnerClassesBreedingDoesNannies.php | 816 +++ ...GoatRequestGoatsInnerClassesBucksBilly.php | 816 +++ .../PostGoatRequestGoatsInnerClassesKids.php | 816 +++ ...sInnerClassesMaidenBreedingDoesNannies.php | 816 +++ ...oatsInnerClassesOtherDoesCulledFemales.php | 816 +++ ...tsInnerClassesTradeBreedingDoesNannies.php | 816 +++ ...GoatRequestGoatsInnerClassesTradeBucks.php | 816 +++ ...tGoatRequestGoatsInnerClassesTradeDoes.php | 816 +++ ...tGoatRequestGoatsInnerClassesTradeKids.php | 816 +++ ...rClassesTradeMaidenBreedingDoesNannies.php | 816 +++ ...nnerClassesTradeOtherDoesCulledFemales.php | 816 +++ ...atRequestGoatsInnerClassesTradeWethers.php | 816 +++ ...ostGoatRequestGoatsInnerClassesWethers.php | 816 +++ .../Model/PostGoatRequestVegetationInner.php | 451 ++ .../lib/Model/PostGrains200Response.php | 673 ++ ...PostGrains200ResponseIntermediateInner.php | 636 ++ ...diateInnerIntensitiesWithSequestration.php | 487 ++ .../lib/Model/PostGrainsRequest.php | 626 ++ .../lib/Model/PostGrainsRequestCropsInner.php | 1347 ++++ .../lib/Model/PostHorticulture200Response.php | 636 ++ ...rticulture200ResponseIntermediateInner.php | 636 ++ ...diateInnerIntensitiesWithSequestration.php | 488 ++ .../PostHorticulture200ResponseScope1.php | 1006 +++ .../lib/Model/PostHorticultureRequest.php | 626 ++ .../PostHorticultureRequestCropsInner.php | 1264 ++++ ...tureRequestCropsInnerRefrigerantsInner.php | 666 ++ .../lib/Model/PostPork200Response.php | 636 ++ .../Model/PostPork200ResponseIntensities.php | 487 ++ .../PostPork200ResponseIntermediateInner.php | 635 ++ .../lib/Model/PostPork200ResponseNet.php | 414 ++ .../lib/Model/PostPork200ResponseScope1.php | 1006 +++ .../lib/Model/PostPork200ResponseScope3.php | 710 +++ .../api-client/lib/Model/PostPorkRequest.php | 612 ++ .../lib/Model/PostPorkRequestPorkInner.php | 978 +++ .../Model/PostPorkRequestPorkInnerClasses.php | 615 ++ .../PostPorkRequestPorkInnerClassesBoars.php | 742 +++ .../PostPorkRequestPorkInnerClassesGilts.php | 742 +++ ...PostPorkRequestPorkInnerClassesGrowers.php | 742 +++ ...rkRequestPorkInnerClassesSlaughterPigs.php | 742 +++ .../PostPorkRequestPorkInnerClassesSows.php | 742 +++ ...tPorkRequestPorkInnerClassesSowsManure.php | 524 ++ ...equestPorkInnerClassesSowsManureSpring.php | 546 ++ ...PostPorkRequestPorkInnerClassesSuckers.php | 742 +++ ...PostPorkRequestPorkInnerClassesWeaners.php | 742 +++ ...tPorkRequestPorkInnerFeedProductsInner.php | 541 ++ ...tPorkInnerFeedProductsInnerIngredients.php | 977 +++ .../Model/PostPorkRequestVegetationInner.php | 451 ++ .../lib/Model/PostPoultry200Response.php | 673 ++ .../PostPoultry200ResponseIntensities.php | 598 ++ ...ry200ResponseIntermediateBroilersInner.php | 635 ++ ...seIntermediateBroilersInnerIntensities.php | 487 ++ ...ltry200ResponseIntermediateLayersInner.php | 635 ++ ...onseIntermediateLayersInnerIntensities.php | 487 ++ .../lib/Model/PostPoultry200ResponseNet.php | 487 ++ .../Model/PostPoultry200ResponseScope1.php | 784 +++ .../Model/PostPoultry200ResponseScope3.php | 636 ++ .../lib/Model/PostPoultryRequest.php | 647 ++ .../Model/PostPoultryRequestBroilersInner.php | 1163 ++++ ...PoultryRequestBroilersInnerGroupsInner.php | 599 ++ ...questBroilersInnerGroupsInnerFeedInner.php | 525 ++ ...rsInnerGroupsInnerFeedInnerIngredients.php | 547 ++ ...lersInnerGroupsInnerMeatChickenGrowers.php | 732 +++ ...oilersInnerMeatChickenGrowersPurchases.php | 451 ++ ...roilersInnerMeatChickenLayersPurchases.php | 451 ++ ...RequestBroilersInnerMeatOtherPurchases.php | 451 ++ ...tPoultryRequestBroilersInnerSalesInner.php | 488 ++ .../Model/PostPoultryRequestLayersInner.php | 1311 ++++ .../PostPoultryRequestLayersInnerLayers.php | 525 ++ ...PoultryRequestLayersInnerLayersEggSale.php | 451 ++ ...ultryRequestLayersInnerLayersPurchases.php | 451 ++ ...tryRequestLayersInnerMeatChickenLayers.php | 525 ++ ...estLayersInnerMeatChickenLayersEggSale.php | 451 ++ .../PostPoultryRequestVegetationInner.php | 488 ++ .../lib/Model/PostProcessing200Response.php | 673 ++ ...tProcessing200ResponseIntensitiesInner.php | 564 ++ ...Processing200ResponseIntermediateInner.php | 635 ++ .../Model/PostProcessing200ResponseNet.php | 414 ++ .../Model/PostProcessing200ResponseScope1.php | 821 +++ .../Model/PostProcessing200ResponseScope3.php | 525 ++ .../lib/Model/PostProcessingRequest.php | 499 ++ .../PostProcessingRequestProductsInner.php | 828 +++ ...tProcessingRequestProductsInnerProduct.php | 491 ++ .../lib/Model/PostRice200Response.php | 636 ++ .../Model/PostRice200ResponseIntensities.php | 527 ++ .../PostRice200ResponseIntermediateInner.php | 636 ++ ...00ResponseIntermediateInnerIntensities.php | 526 ++ .../lib/Model/PostRice200ResponseScope1.php | 969 +++ .../api-client/lib/Model/PostRiceRequest.php | 626 ++ .../lib/Model/PostRiceRequestCropsInner.php | 1424 +++++ .../lib/Model/PostSheep200Response.php | 636 ++ .../PostSheep200ResponseIntermediateInner.php | 635 ++ ...00ResponseIntermediateInnerIntensities.php | 598 ++ .../lib/Model/PostSheep200ResponseNet.php | 450 ++ .../api-client/lib/Model/PostSheepRequest.php | 610 ++ .../lib/Model/PostSheepRequestSheepInner.php | 1126 ++++ .../PostSheepRequestSheepInnerClasses.php | 933 +++ .../PostSheepRequestSheepInnerClassesRams.php | 815 +++ ...heepRequestSheepInnerClassesRamsAutumn.php | 589 ++ ...SheepRequestSheepInnerClassesTradeEwes.php | 816 +++ ...tSheepInnerClassesTradeLambsAndHoggets.php | 816 +++ .../PostSheepRequestSheepInnerEwesLambing.php | 589 ++ ...tSheepRequestSheepInnerSeasonalLambing.php | 561 ++ .../Model/PostSheepRequestVegetationInner.php | 451 ++ .../lib/Model/PostSheepbeef200Response.php | 710 +++ .../PostSheepbeef200ResponseIntensities.php | 709 +++ .../PostSheepbeef200ResponseIntermediate.php | 451 ++ ...stSheepbeef200ResponseIntermediateBeef.php | 599 ++ ...tSheepbeef200ResponseIntermediateSheep.php | 599 ++ .../lib/Model/PostSheepbeef200ResponseNet.php | 487 ++ .../lib/Model/PostSheepbeefRequest.php | 684 ++ .../PostSheepbeefRequestVegetationInner.php | 488 ++ .../lib/Model/PostSugar200Response.php | 636 ++ .../PostSugar200ResponseIntermediateInner.php | 636 ++ ...00ResponseIntermediateInnerIntensities.php | 487 ++ .../api-client/lib/Model/PostSugarRequest.php | 626 ++ .../lib/Model/PostSugarRequestCropsInner.php | 1272 ++++ .../lib/Model/PostVineyard200Response.php | 636 ++ ...stVineyard200ResponseIntermediateInner.php | 636 ++ ...00ResponseIntermediateInnerIntensities.php | 487 ++ .../lib/Model/PostVineyard200ResponseNet.php | 451 ++ .../Model/PostVineyard200ResponseScope1.php | 932 +++ .../Model/PostVineyard200ResponseScope3.php | 747 +++ .../lib/Model/PostVineyardRequest.php | 451 ++ .../PostVineyardRequestVegetationInner.php | 450 ++ .../PostVineyardRequestVineyardsInner.php | 1396 ++++ .../Model/PostWildcatchfishery200Response.php | 673 ++ ...Wildcatchfishery200ResponseIntensities.php | 487 ++ ...tchfishery200ResponseIntermediateInner.php | 636 ++ .../PostWildcatchfishery200ResponseScope1.php | 784 +++ .../lib/Model/PostWildcatchfisheryRequest.php | 414 ++ ...ildcatchfisheryRequestEnterprisesInner.php | 1154 ++++ ...isheryRequestEnterprisesInnerBaitInner.php | 580 ++ .../Model/PostWildseafisheries200Response.php | 636 ++ ...afisheries200ResponseIntermediateInner.php | 673 ++ ...00ResponseIntermediateInnerIntensities.php | 487 ++ .../PostWildseafisheries200ResponseScope1.php | 710 +++ .../PostWildseafisheries200ResponseScope3.php | 525 ++ .../lib/Model/PostWildseafisheriesRequest.php | 414 ++ ...ildseafisheriesRequestEnterprisesInner.php | 1026 +++ ...heriesRequestEnterprisesInnerBaitInner.php | 580 ++ ...RequestEnterprisesInnerCustombaitInner.php | 450 ++ ...iesRequestEnterprisesInnerFlightsInner.php | 450 ++ ...questEnterprisesInnerRefrigerantsInner.php | 666 ++ ...RequestEnterprisesInnerTransportsInner.php | 585 ++ .../api-client/lib/ObjectSerializer.php | 600 ++ .../api-client/phpunit.xml.dist | 18 + .../php-api-client/api-client/run_test.sh | 1 + .../php-api-client/api-client/setup_local.sh | 1 + .../api-client/test/Api/GAFApiTest.php | 314 + ...ture200ResponseCarbonSequestrationTest.php | 100 + ...tAquaculture200ResponseIntensitiesTest.php | 109 + ...termediateInnerCarbonSequestrationTest.php | 91 + ...ulture200ResponseIntermediateInnerTest.php | 145 + .../PostAquaculture200ResponseNetTest.php | 91 + ...culture200ResponsePurchasedOffsetsTest.php | 91 + .../PostAquaculture200ResponseScope1Test.php | 181 + .../PostAquaculture200ResponseScope2Test.php | 100 + .../PostAquaculture200ResponseScope3Test.php | 154 + .../Model/PostAquaculture200ResponseTest.php | 154 + ...reRequestEnterprisesInnerBaitInnerTest.php | 118 + ...estEnterprisesInnerCustomBaitInnerTest.php | 100 + ...estEnterprisesInnerFluidWasteInnerTest.php | 127 + ...prisesInnerFuelStationaryFuelInnerTest.php | 100 + ...cultureRequestEnterprisesInnerFuelTest.php | 109 + ...rprisesInnerFuelTransportFuelInnerTest.php | 100 + ...nterprisesInnerInboundFreightInnerTest.php | 100 + ...tEnterprisesInnerRefrigerantsInnerTest.php | 100 + ...eRequestEnterprisesInnerSolidWasteTest.php | 100 + ...AquacultureRequestEnterprisesInnerTest.php | 235 + .../test/Model/PostAquacultureRequestTest.php | 91 + ...sponseIntermediateInnerIntensitiesTest.php | 109 + ...stBeef200ResponseIntermediateInnerTest.php | 145 + .../test/Model/PostBeef200ResponseNetTest.php | 100 + .../Model/PostBeef200ResponseScope1Test.php | 235 + .../Model/PostBeef200ResponseScope3Test.php | 163 + .../test/Model/PostBeef200ResponseTest.php | 145 + ...uestBeefInnerClassesBullsGt1AutumnTest.php | 127 + ...InnerClassesBullsGt1PurchasesInnerTest.php | 109 + ...eefRequestBeefInnerClassesBullsGt1Test.php | 172 + ...uestBeefInnerClassesBullsGt1TradedTest.php | 172 + ...BeefRequestBeefInnerClassesCowsGt2Test.php | 172 + ...questBeefInnerClassesCowsGt2TradedTest.php | 172 + ...RequestBeefInnerClassesHeifers1To2Test.php | 172 + ...tBeefInnerClassesHeifers1To2TradedTest.php | 172 + ...fRequestBeefInnerClassesHeifersGt2Test.php | 172 + ...stBeefInnerClassesHeifersGt2TradedTest.php | 172 + ...fRequestBeefInnerClassesHeifersLt1Test.php | 172 + ...stBeefInnerClassesHeifersLt1TradedTest.php | 172 + ...fRequestBeefInnerClassesSteers1To2Test.php | 172 + ...stBeefInnerClassesSteers1To2TradedTest.php | 172 + ...efRequestBeefInnerClassesSteersGt2Test.php | 172 + ...estBeefInnerClassesSteersGt2TradedTest.php | 172 + ...efRequestBeefInnerClassesSteersLt1Test.php | 172 + ...estBeefInnerClassesSteersLt1TradedTest.php | 172 + .../PostBeefRequestBeefInnerClassesTest.php | 226 + ...ostBeefRequestBeefInnerCowsCalvingTest.php | 118 + ...nerFertiliserOtherFertilisersInnerTest.php | 109 + ...PostBeefRequestBeefInnerFertiliserTest.php | 163 + ...estBeefInnerMineralSupplementationTest.php | 136 + .../Model/PostBeefRequestBeefInnerTest.php | 244 + ...PostBeefRequestBurningInnerBurningTest.php | 145 + .../Model/PostBeefRequestBurningInnerTest.php | 100 + .../test/Model/PostBeefRequestTest.php | 136 + .../PostBeefRequestVegetationInnerTest.php | 109 + ...efRequestVegetationInnerVegetationTest.php | 127 + .../PostBuffalo200ResponseIntensitiesTest.php | 109 + ...uffalo200ResponseIntermediateInnerTest.php | 145 + .../Model/PostBuffalo200ResponseNetTest.php | 91 + .../PostBuffalo200ResponseScope1Test.php | 217 + .../PostBuffalo200ResponseScope3Test.php | 154 + .../test/Model/PostBuffalo200ResponseTest.php | 145 + ...estBuffalosInnerClassesBullsAutumnTest.php | 91 + ...losInnerClassesBullsPurchasesInnerTest.php | 100 + ...loRequestBuffalosInnerClassesBullsTest.php | 145 + ...loRequestBuffalosInnerClassesCalfsTest.php | 145 + ...aloRequestBuffalosInnerClassesCowsTest.php | 145 + ...oRequestBuffalosInnerClassesSteersTest.php | 145 + ...BuffaloRequestBuffalosInnerClassesTest.php | 154 + ...uestBuffalosInnerClassesTradeBullsTest.php | 145 + ...uestBuffalosInnerClassesTradeCalfsTest.php | 145 + ...questBuffalosInnerClassesTradeCowsTest.php | 145 + ...estBuffalosInnerClassesTradeSteersTest.php | 145 + ...aloRequestBuffalosInnerCowsCalvingTest.php | 118 + ...equestBuffalosInnerSeasonalCalvingTest.php | 118 + .../PostBuffaloRequestBuffalosInnerTest.php | 235 + .../test/Model/PostBuffaloRequestTest.php | 118 + .../PostBuffaloRequestVegetationInnerTest.php | 100 + ...sponseIntermediateInnerIntensitiesTest.php | 208 + ...Cotton200ResponseIntermediateInnerTest.php | 145 + .../Model/PostCotton200ResponseNetTest.php | 100 + .../Model/PostCotton200ResponseScope1Test.php | 217 + .../Model/PostCotton200ResponseScope3Test.php | 136 + .../test/Model/PostCotton200ResponseTest.php | 145 + .../Model/PostCottonRequestCropsInnerTest.php | 325 + .../test/Model/PostCottonRequestTest.php | 127 + .../PostCottonRequestVegetationInnerTest.php | 100 + .../PostDairy200ResponseIntensitiesTest.php | 100 + ...tDairy200ResponseIntermediateInnerTest.php | 145 + .../Model/PostDairy200ResponseNetTest.php | 91 + .../Model/PostDairy200ResponseScope1Test.php | 262 + .../Model/PostDairy200ResponseScope3Test.php | 145 + .../test/Model/PostDairy200ResponseTest.php | 145 + .../PostDairyRequestDairyInnerAreasTest.php | 118 + ...uestDairyInnerClassesDairyBullsGt1Test.php | 118 + ...uestDairyInnerClassesDairyBullsLt1Test.php | 118 + ...RequestDairyInnerClassesHeifersGt1Test.php | 118 + ...RequestDairyInnerClassesHeifersLt1Test.php | 118 + ...DairyInnerClassesMilkingCowsAutumnTest.php | 136 + ...equestDairyInnerClassesMilkingCowsTest.php | 118 + .../PostDairyRequestDairyInnerClassesTest.php | 127 + ...ryInnerManureManagementMilkingCowsTest.php | 127 + ...DairyInnerSeasonalFertiliserAutumnTest.php | 118 + ...equestDairyInnerSeasonalFertiliserTest.php | 118 + .../Model/PostDairyRequestDairyInnerTest.php | 280 + .../test/Model/PostDairyRequestTest.php | 127 + .../PostDairyRequestVegetationInnerTest.php | 100 + .../PostDeer200ResponseIntensitiesTest.php | 109 + ...stDeer200ResponseIntermediateInnerTest.php | 145 + .../test/Model/PostDeer200ResponseNetTest.php | 91 + .../test/Model/PostDeer200ResponseTest.php | 145 + ...questDeersInnerClassesBreedingDoesTest.php | 145 + ...tDeerRequestDeersInnerClassesBucksTest.php | 145 + ...stDeerRequestDeersInnerClassesFawnTest.php | 145 + ...rRequestDeersInnerClassesOtherDoesTest.php | 145 + .../PostDeerRequestDeersInnerClassesTest.php | 154 + ...RequestDeersInnerClassesTradeBucksTest.php | 145 + ...rRequestDeersInnerClassesTradeDoesTest.php | 145 + ...rRequestDeersInnerClassesTradeFawnTest.php | 145 + ...estDeersInnerClassesTradeOtherDoesTest.php | 145 + ...stDeerRequestDeersInnerDoesFawningTest.php | 118 + ...erRequestDeersInnerSeasonalFawningTest.php | 118 + .../Model/PostDeerRequestDeersInnerTest.php | 235 + .../test/Model/PostDeerRequestTest.php | 118 + .../PostDeerRequestVegetationInnerTest.php | 100 + ...sponseIntermediateInnerIntensitiesTest.php | 109 + ...lot200ResponseIntermediateInnerNetTest.php | 91 + ...eedlot200ResponseIntermediateInnerTest.php | 145 + .../PostFeedlot200ResponseScope1Test.php | 244 + .../PostFeedlot200ResponseScope3Test.php | 154 + .../test/Model/PostFeedlot200ResponseTest.php | 145 + ...FeedlotsInnerGroupsInnerStaysInnerTest.php | 163 + ...lotRequestFeedlotsInnerGroupsInnerTest.php | 91 + ...eedlotsInnerPurchasesBullsGt1InnerTest.php | 109 + ...edlotRequestFeedlotsInnerPurchasesTest.php | 226 + ...estFeedlotsInnerSalesBullsGt1InnerTest.php | 100 + ...stFeedlotRequestFeedlotsInnerSalesTest.php | 226 + .../PostFeedlotRequestFeedlotsInnerTest.php | 271 + .../test/Model/PostFeedlotRequestTest.php | 109 + .../PostFeedlotRequestVegetationInnerTest.php | 100 + .../PostGoat200ResponseIntensitiesTest.php | 136 + ...stGoat200ResponseIntermediateInnerTest.php | 145 + .../test/Model/PostGoat200ResponseNetTest.php | 91 + .../test/Model/PostGoat200ResponseTest.php | 145 + ...atsInnerClassesBreedingDoesNanniesTest.php | 190 + ...RequestGoatsInnerClassesBucksBillyTest.php | 190 + ...stGoatRequestGoatsInnerClassesKidsTest.php | 190 + ...erClassesMaidenBreedingDoesNanniesTest.php | 190 + ...InnerClassesOtherDoesCulledFemalesTest.php | 190 + .../PostGoatRequestGoatsInnerClassesTest.php | 199 + ...nerClassesTradeBreedingDoesNanniesTest.php | 190 + ...RequestGoatsInnerClassesTradeBucksTest.php | 190 + ...tRequestGoatsInnerClassesTradeDoesTest.php | 190 + ...tRequestGoatsInnerClassesTradeKidsTest.php | 190 + ...ssesTradeMaidenBreedingDoesNanniesTest.php | 190 + ...ClassesTradeOtherDoesCulledFemalesTest.php | 190 + ...questGoatsInnerClassesTradeWethersTest.php | 190 + ...oatRequestGoatsInnerClassesWethersTest.php | 190 + .../Model/PostGoatRequestGoatsInnerTest.php | 226 + .../test/Model/PostGoatRequestTest.php | 118 + .../PostGoatRequestVegetationInnerTest.php | 100 + ...eInnerIntensitiesWithSequestrationTest.php | 109 + ...Grains200ResponseIntermediateInnerTest.php | 145 + .../test/Model/PostGrains200ResponseTest.php | 154 + .../Model/PostGrainsRequestCropsInnerTest.php | 280 + .../test/Model/PostGrainsRequestTest.php | 127 + ...eInnerIntensitiesWithSequestrationTest.php | 109 + ...ulture200ResponseIntermediateInnerTest.php | 145 + .../PostHorticulture200ResponseScope1Test.php | 235 + .../Model/PostHorticulture200ResponseTest.php | 145 + ...RequestCropsInnerRefrigerantsInnerTest.php | 100 + .../PostHorticultureRequestCropsInnerTest.php | 289 + .../Model/PostHorticultureRequestTest.php | 127 + .../PostPork200ResponseIntensitiesTest.php | 109 + ...stPork200ResponseIntermediateInnerTest.php | 145 + .../test/Model/PostPork200ResponseNetTest.php | 91 + .../Model/PostPork200ResponseScope1Test.php | 235 + .../Model/PostPork200ResponseScope3Test.php | 163 + .../test/Model/PostPork200ResponseTest.php | 145 + ...stPorkRequestPorkInnerClassesBoarsTest.php | 172 + ...stPorkRequestPorkInnerClassesGiltsTest.php | 172 + ...PorkRequestPorkInnerClassesGrowersTest.php | 172 + ...questPorkInnerClassesSlaughterPigsTest.php | 172 + ...stPorkInnerClassesSowsManureSpringTest.php | 127 + ...kRequestPorkInnerClassesSowsManureTest.php | 118 + ...ostPorkRequestPorkInnerClassesSowsTest.php | 172 + ...PorkRequestPorkInnerClassesSuckersTest.php | 172 + .../PostPorkRequestPorkInnerClassesTest.php | 145 + ...PorkRequestPorkInnerClassesWeanersTest.php | 172 + ...kInnerFeedProductsInnerIngredientsTest.php | 190 + ...kRequestPorkInnerFeedProductsInnerTest.php | 118 + .../Model/PostPorkRequestPorkInnerTest.php | 217 + .../test/Model/PostPorkRequestTest.php | 127 + .../PostPorkRequestVegetationInnerTest.php | 100 + .../PostPoultry200ResponseIntensitiesTest.php | 136 + ...termediateBroilersInnerIntensitiesTest.php | 109 + ...0ResponseIntermediateBroilersInnerTest.php | 145 + ...IntermediateLayersInnerIntensitiesTest.php | 109 + ...200ResponseIntermediateLayersInnerTest.php | 145 + .../Model/PostPoultry200ResponseNetTest.php | 109 + .../PostPoultry200ResponseScope1Test.php | 181 + .../PostPoultry200ResponseScope3Test.php | 145 + .../test/Model/PostPoultry200ResponseTest.php | 154 + ...nerGroupsInnerFeedInnerIngredientsTest.php | 127 + ...tBroilersInnerGroupsInnerFeedInnerTest.php | 118 + ...InnerGroupsInnerMeatChickenGrowersTest.php | 172 + ...tryRequestBroilersInnerGroupsInnerTest.php | 136 + ...rsInnerMeatChickenGrowersPurchasesTest.php | 100 + ...ersInnerMeatChickenLayersPurchasesTest.php | 100 + ...estBroilersInnerMeatOtherPurchasesTest.php | 100 + ...ltryRequestBroilersInnerSalesInnerTest.php | 109 + .../PostPoultryRequestBroilersInnerTest.php | 262 + ...tryRequestLayersInnerLayersEggSaleTest.php | 100 + ...yRequestLayersInnerLayersPurchasesTest.php | 100 + ...ostPoultryRequestLayersInnerLayersTest.php | 118 + ...ayersInnerMeatChickenLayersEggSaleTest.php | 100 + ...equestLayersInnerMeatChickenLayersTest.php | 118 + .../PostPoultryRequestLayersInnerTest.php | 298 + .../test/Model/PostPoultryRequestTest.php | 136 + .../PostPoultryRequestVegetationInnerTest.php | 109 + ...cessing200ResponseIntensitiesInnerTest.php | 118 + ...essing200ResponseIntermediateInnerTest.php | 145 + .../PostProcessing200ResponseNetTest.php | 91 + .../PostProcessing200ResponseScope1Test.php | 190 + .../PostProcessing200ResponseScope3Test.php | 118 + .../Model/PostProcessing200ResponseTest.php | 154 + ...cessingRequestProductsInnerProductTest.php | 100 + ...PostProcessingRequestProductsInnerTest.php | 181 + .../test/Model/PostProcessingRequestTest.php | 100 + .../PostRice200ResponseIntensitiesTest.php | 118 + ...sponseIntermediateInnerIntensitiesTest.php | 118 + ...stRice200ResponseIntermediateInnerTest.php | 145 + .../Model/PostRice200ResponseScope1Test.php | 226 + .../test/Model/PostRice200ResponseTest.php | 145 + .../Model/PostRiceRequestCropsInnerTest.php | 289 + .../test/Model/PostRiceRequestTest.php | 127 + ...sponseIntermediateInnerIntensitiesTest.php | 136 + ...tSheep200ResponseIntermediateInnerTest.php | 145 + .../Model/PostSheep200ResponseNetTest.php | 100 + .../test/Model/PostSheep200ResponseTest.php | 145 + ...RequestSheepInnerClassesRamsAutumnTest.php | 136 + ...tSheepRequestSheepInnerClassesRamsTest.php | 190 + .../PostSheepRequestSheepInnerClassesTest.php | 226 + ...pRequestSheepInnerClassesTradeEwesTest.php | 190 + ...epInnerClassesTradeLambsAndHoggetsTest.php | 190 + ...tSheepRequestSheepInnerEwesLambingTest.php | 118 + ...epRequestSheepInnerSeasonalLambingTest.php | 118 + .../Model/PostSheepRequestSheepInnerTest.php | 253 + .../test/Model/PostSheepRequestTest.php | 127 + .../PostSheepRequestVegetationInnerTest.php | 100 + ...ostSheepbeef200ResponseIntensitiesTest.php | 163 + ...eepbeef200ResponseIntermediateBeefTest.php | 136 + ...epbeef200ResponseIntermediateSheepTest.php | 136 + ...stSheepbeef200ResponseIntermediateTest.php | 100 + .../Model/PostSheepbeef200ResponseNetTest.php | 109 + .../Model/PostSheepbeef200ResponseTest.php | 163 + .../test/Model/PostSheepbeefRequestTest.php | 145 + ...ostSheepbeefRequestVegetationInnerTest.php | 109 + ...sponseIntermediateInnerIntensitiesTest.php | 109 + ...tSugar200ResponseIntermediateInnerTest.php | 145 + .../test/Model/PostSugar200ResponseTest.php | 145 + .../Model/PostSugarRequestCropsInnerTest.php | 280 + .../test/Model/PostSugarRequestTest.php | 127 + ...sponseIntermediateInnerIntensitiesTest.php | 109 + ...neyard200ResponseIntermediateInnerTest.php | 145 + .../Model/PostVineyard200ResponseNetTest.php | 100 + .../PostVineyard200ResponseScope1Test.php | 217 + .../PostVineyard200ResponseScope3Test.php | 172 + .../Model/PostVineyard200ResponseTest.php | 145 + .../test/Model/PostVineyardRequestTest.php | 100 + ...PostVineyardRequestVegetationInnerTest.php | 100 + .../PostVineyardRequestVineyardsInnerTest.php | 307 + ...catchfishery200ResponseIntensitiesTest.php | 109 + ...ishery200ResponseIntermediateInnerTest.php | 145 + ...tWildcatchfishery200ResponseScope1Test.php | 181 + .../PostWildcatchfishery200ResponseTest.php | 154 + ...ryRequestEnterprisesInnerBaitInnerTest.php | 118 + ...atchfisheryRequestEnterprisesInnerTest.php | 235 + .../Model/PostWildcatchfisheryRequestTest.php | 91 + ...sponseIntermediateInnerIntensitiesTest.php | 109 + ...heries200ResponseIntermediateInnerTest.php | 154 + ...tWildseafisheries200ResponseScope1Test.php | 163 + ...tWildseafisheries200ResponseScope3Test.php | 118 + .../PostWildseafisheries200ResponseTest.php | 145 + ...esRequestEnterprisesInnerBaitInnerTest.php | 118 + ...estEnterprisesInnerCustombaitInnerTest.php | 100 + ...equestEnterprisesInnerFlightsInnerTest.php | 100 + ...tEnterprisesInnerRefrigerantsInnerTest.php | 100 + ...eafisheriesRequestEnterprisesInnerTest.php | 217 + ...estEnterprisesInnerTransportsInnerTest.php | 109 + .../Model/PostWildseafisheriesRequestTest.php | 91 + examples/php-api-client/generate.sh | 12 +- examples/php-api-client/resources/example.php | 127 +- .../python-api-client/api-client/test_api.py | 40 +- .../python-api-client/resources/test_api.py | 40 +- 901 files changed, 255325 insertions(+), 19 deletions(-) create mode 100644 examples/php-api-client/api-client/.gitignore create mode 100644 examples/php-api-client/api-client/.openapi-generator-ignore create mode 100644 examples/php-api-client/api-client/.openapi-generator/FILES create mode 100644 examples/php-api-client/api-client/.openapi-generator/VERSION create mode 100644 examples/php-api-client/api-client/.php-cs-fixer.dist.php create mode 100644 examples/php-api-client/api-client/.travis.yml create mode 100644 examples/php-api-client/api-client/README.md create mode 100644 examples/php-api-client/api-client/composer.json create mode 100644 examples/php-api-client/api-client/composer.lock create mode 100644 examples/php-api-client/api-client/docs/Api/GAFApi.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseCarbonSequestration.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseNet.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponsePurchasedOffsets.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope2.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope3.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerBaitInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuel.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeef200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInnerIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeef200ResponseNet.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope3.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClasses.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerCowsCalving.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliser.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerMineralSupplementation.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInnerBurning.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInnerVegetation.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffalo200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseNet.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope3.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClasses.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBulls.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCows.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesSteers.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerCowsCalving.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestVegetationInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostCotton200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInnerIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostCotton200ResponseNet.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope3.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostCottonRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostCottonRequestCropsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostCottonRequestVegetationInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairy200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairy200ResponseNet.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope3.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerAreas.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClasses.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersGt1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersLt1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCows.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliser.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestVegetationInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeer200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeer200ResponseNet.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClasses.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBreedingDoes.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBucks.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesFawn.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesOtherDoes.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeBucks.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeDoes.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeFawn.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerDoesFawning.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerSeasonalFawning.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestVegetationInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlot200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerNet.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope3.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchases.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSales.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestVegetationInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoat200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoat200ResponseNet.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClasses.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBucksBilly.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesKids.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBucks.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeDoes.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeKids.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeWethers.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesWethers.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestVegetationInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGrains200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGrainsRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostGrainsRequestCropsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostHorticulture200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseScope1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostHorticultureRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPork200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPork200ResponseNet.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope3.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClasses.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesBoars.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGilts.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGrowers.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSows.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManure.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSuckers.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesWeaners.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestVegetationInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseNet.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope3.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerSalesInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayers.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersEggSale.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersPurchases.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayers.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestVegetationInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessing200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntensitiesInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseNet.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope3.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessingRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInnerProduct.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostRice200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInnerIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostRice200ResponseScope1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostRiceRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostRiceRequestCropsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheep200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInnerIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheep200ResponseNet.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClasses.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRams.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRamsAutumn.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeEwes.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerEwesLambing.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerSeasonalLambing.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestVegetationInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeef200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediate.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateBeef.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateSheep.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseNet.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeefRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeefRequestVegetationInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSugar200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInnerIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSugarRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostSugarRequestCropsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyard200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInnerIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseNet.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope3.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyardRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyardRequestVegetationInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyardRequestVineyardsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseScope1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheries200Response.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope1.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope3.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequest.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md create mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md create mode 100644 examples/php-api-client/api-client/example.php create mode 100644 examples/php-api-client/api-client/git_push.sh create mode 100644 examples/php-api-client/api-client/lib/Api/GAFApi.php create mode 100644 examples/php-api-client/api-client/lib/ApiException.php create mode 100644 examples/php-api-client/api-client/lib/Configuration.php create mode 100644 examples/php-api-client/api-client/lib/FormDataProcessor.php create mode 100644 examples/php-api-client/api-client/lib/HeaderSelector.php create mode 100644 examples/php-api-client/api-client/lib/Model/ModelInterface.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquaculture200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseCarbonSequestration.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseNet.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponsePurchasedOffsets.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseScope1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseScope2.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseScope3.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquacultureRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerBaitInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFuel.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeef200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeef200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeef200ResponseIntermediateInnerIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeef200ResponseNet.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeef200ResponseScope1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeef200ResponseScope3.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClasses.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesCowsGt2.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifers1To2.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersGt2.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersLt1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteers1To2.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersGt2.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersLt1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerCowsCalving.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerFertiliser.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerMineralSupplementation.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBurningInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestBurningInnerBurning.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestVegetationInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBeefRequestVegetationInnerVegetation.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffalo200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseNet.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseScope1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseScope3.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClasses.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesBulls.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesCows.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesSteers.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerCowsCalving.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostBuffaloRequestVegetationInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostCotton200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostCotton200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostCotton200ResponseIntermediateInnerIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostCotton200ResponseNet.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostCotton200ResponseScope1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostCotton200ResponseScope3.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostCottonRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostCottonRequestCropsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostCottonRequestVegetationInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairy200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairy200ResponseIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairy200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairy200ResponseNet.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairy200ResponseScope1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairy200ResponseScope3.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairyRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerAreas.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClasses.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesHeifersGt1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesHeifersLt1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesMilkingCows.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerSeasonalFertiliser.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDairyRequestVegetationInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeer200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeer200ResponseIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeer200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeer200ResponseNet.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeerRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClasses.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesBreedingDoes.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesBucks.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesFawn.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesOtherDoes.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeBucks.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeDoes.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeFawn.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerDoesFawning.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerSeasonalFawning.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostDeerRequestVegetationInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlot200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseIntermediateInnerIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseIntermediateInnerNet.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseScope1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseScope3.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlotRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerPurchases.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerSales.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostFeedlotRequestVegetationInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoat200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoat200ResponseIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoat200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoat200ResponseNet.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClasses.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesBucksBilly.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesKids.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeBucks.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeDoes.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeKids.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeWethers.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesWethers.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGoatRequestVegetationInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGrains200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGrains200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGrainsRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostGrainsRequestCropsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostHorticulture200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostHorticulture200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostHorticulture200ResponseScope1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostHorticultureRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostHorticultureRequestCropsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPork200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPork200ResponseIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPork200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPork200ResponseNet.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPork200ResponseScope1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPork200ResponseScope3.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClasses.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesBoars.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesGilts.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesGrowers.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSows.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSowsManure.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSuckers.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesWeaners.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerFeedProductsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPorkRequestVegetationInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultry200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateBroilersInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateLayersInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseNet.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseScope1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseScope3.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerSalesInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerLayers.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerLayersEggSale.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerLayersPurchases.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerMeatChickenLayers.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostPoultryRequestVegetationInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostProcessing200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseIntensitiesInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseNet.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseScope1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseScope3.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostProcessingRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostProcessingRequestProductsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostProcessingRequestProductsInnerProduct.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostRice200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostRice200ResponseIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostRice200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostRice200ResponseIntermediateInnerIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostRice200ResponseScope1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostRiceRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostRiceRequestCropsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheep200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheep200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheep200ResponseIntermediateInnerIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheep200ResponseNet.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClasses.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesRams.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesRamsAutumn.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesTradeEwes.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerEwesLambing.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerSeasonalLambing.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepRequestVegetationInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepbeef200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntermediate.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntermediateBeef.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntermediateSheep.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseNet.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepbeefRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSheepbeefRequestVegetationInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSugar200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSugar200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSugar200ResponseIntermediateInnerIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSugarRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostSugarRequestCropsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostVineyard200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseIntermediateInnerIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseNet.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseScope1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseScope3.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostVineyardRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostVineyardRequestVegetationInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostVineyardRequestVineyardsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200ResponseIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200ResponseScope1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildcatchfisheryRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildcatchfisheryRequestEnterprisesInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildseafisheries200Response.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseIntermediateInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseScope1.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseScope3.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequest.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.php create mode 100644 examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.php create mode 100644 examples/php-api-client/api-client/lib/ObjectSerializer.php create mode 100644 examples/php-api-client/api-client/phpunit.xml.dist create mode 100755 examples/php-api-client/api-client/run_test.sh create mode 100755 examples/php-api-client/api-client/setup_local.sh create mode 100644 examples/php-api-client/api-client/test/Api/GAFApiTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseCarbonSequestrationTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestrationTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseNetTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponsePurchasedOffsetsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseScope1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseScope2Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseScope3Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerBaitInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerFuelTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerSolidWasteTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeef200ResponseIntermediateInnerIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeef200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeef200ResponseNetTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeef200ResponseScope1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeef200ResponseScope3Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeef200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesBullsGt1AutumnTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesBullsGt1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesBullsGt1TradedTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesCowsGt2Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesCowsGt2TradedTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesHeifers1To2Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesHeifers1To2TradedTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesHeifersGt2Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesHeifersGt2TradedTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesHeifersLt1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesHeifersLt1TradedTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesSteers1To2Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesSteers1To2TradedTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesSteersGt2Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesSteersGt2TradedTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesSteersLt1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesSteersLt1TradedTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerCowsCalvingTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerFertiliserTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerMineralSupplementationTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBurningInnerBurningTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBurningInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestVegetationInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestVegetationInnerVegetationTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffalo200ResponseIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffalo200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffalo200ResponseNetTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffalo200ResponseScope1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffalo200ResponseScope3Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffalo200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumnTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesBullsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesCalfsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesCowsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesSteersTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesTradeBullsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesTradeCowsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteersTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerCowsCalvingTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerSeasonalCalvingTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestVegetationInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostCotton200ResponseIntermediateInnerIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostCotton200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostCotton200ResponseNetTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostCotton200ResponseScope1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostCotton200ResponseScope3Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostCotton200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostCottonRequestCropsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostCottonRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostCottonRequestVegetationInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairy200ResponseIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairy200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairy200ResponseNetTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairy200ResponseScope1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairy200ResponseScope3Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairy200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerAreasTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerClassesHeifersGt1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerClassesHeifersLt1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumnTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerClassesMilkingCowsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerClassesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerManureManagementMilkingCowsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumnTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerSeasonalFertiliserTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestVegetationInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeer200ResponseIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeer200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeer200ResponseNetTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeer200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesBreedingDoesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesBucksTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesFawnTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesOtherDoesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesTradeBucksTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesTradeDoesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesTradeFawnTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesTradeOtherDoesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerDoesFawningTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerSeasonalFawningTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestVegetationInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlot200ResponseIntermediateInnerIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlot200ResponseIntermediateInnerNetTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlot200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlot200ResponseScope1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlot200ResponseScope3Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlot200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1InnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestFeedlotsInnerPurchasesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1InnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestFeedlotsInnerSalesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestFeedlotsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestVegetationInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoat200ResponseIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoat200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoat200ResponseNetTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoat200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNanniesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesBucksBillyTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesKidsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNanniesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemalesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNanniesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTradeBucksTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTradeDoesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTradeKidsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNanniesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemalesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTradeWethersTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesWethersTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestVegetationInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestrationTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGrains200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGrains200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGrainsRequestCropsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostGrainsRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestrationTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostHorticulture200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostHorticulture200ResponseScope1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostHorticulture200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostHorticultureRequestCropsInnerRefrigerantsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostHorticultureRequestCropsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostHorticultureRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPork200ResponseIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPork200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPork200ResponseNetTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPork200ResponseScope1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPork200ResponseScope3Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPork200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesBoarsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesGiltsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesGrowersTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesSlaughterPigsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesSowsManureSpringTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesSowsManureTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesSowsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesSuckersTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesWeanersTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredientsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerFeedProductsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestVegetationInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseIntermediateBroilersInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseIntermediateLayersInnerIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseIntermediateLayersInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseNetTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseScope1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseScope3Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredientsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowersTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerGroupsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchasesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchasesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerMeatOtherPurchasesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerSalesInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestLayersInnerLayersEggSaleTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestLayersInnerLayersPurchasesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestLayersInnerLayersTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSaleTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestLayersInnerMeatChickenLayersTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestLayersInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestVegetationInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostProcessing200ResponseIntensitiesInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostProcessing200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostProcessing200ResponseNetTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostProcessing200ResponseScope1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostProcessing200ResponseScope3Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostProcessing200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostProcessingRequestProductsInnerProductTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostProcessingRequestProductsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostProcessingRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostRice200ResponseIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostRice200ResponseIntermediateInnerIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostRice200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostRice200ResponseScope1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostRice200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostRiceRequestCropsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostRiceRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheep200ResponseIntermediateInnerIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheep200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheep200ResponseNetTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheep200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerClassesRamsAutumnTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerClassesRamsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerClassesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerClassesTradeEwesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggetsTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerEwesLambingTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerSeasonalLambingTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestVegetationInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeef200ResponseIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeef200ResponseIntermediateBeefTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeef200ResponseIntermediateSheepTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeef200ResponseIntermediateTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeef200ResponseNetTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeef200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeefRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeefRequestVegetationInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSugar200ResponseIntermediateInnerIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSugar200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSugar200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSugarRequestCropsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostSugarRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostVineyard200ResponseIntermediateInnerIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostVineyard200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostVineyard200ResponseNetTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostVineyard200ResponseScope1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostVineyard200ResponseScope3Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostVineyard200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostVineyardRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostVineyardRequestVegetationInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostVineyardRequestVineyardsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildcatchfishery200ResponseIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildcatchfishery200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildcatchfishery200ResponseScope1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildcatchfishery200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildcatchfisheryRequestEnterprisesInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildcatchfisheryRequestTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheries200ResponseIntermediateInnerIntensitiesTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheries200ResponseIntermediateInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheries200ResponseScope1Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheries200ResponseScope3Test.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheries200ResponseTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheriesRequestEnterprisesInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInnerTest.php create mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheriesRequestTest.php diff --git a/.gitignore b/.gitignore index d28101f9..111d5663 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ **/node_modules **/dist .turbo -.npmrc \ No newline at end of file +.npmrc +*.pem \ No newline at end of file diff --git a/examples/php-api-client/api-client/.gitignore b/examples/php-api-client/api-client/.gitignore new file mode 100644 index 00000000..9f1681c2 --- /dev/null +++ b/examples/php-api-client/api-client/.gitignore @@ -0,0 +1,15 @@ +# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore + +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +# composer.lock + +# php-cs-fixer cache +.php_cs.cache +.php-cs-fixer.cache + +# PHPUnit cache +.phpunit.result.cache diff --git a/examples/php-api-client/api-client/.openapi-generator-ignore b/examples/php-api-client/api-client/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/examples/php-api-client/api-client/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/examples/php-api-client/api-client/.openapi-generator/FILES b/examples/php-api-client/api-client/.openapi-generator/FILES new file mode 100644 index 00000000..d8d279f2 --- /dev/null +++ b/examples/php-api-client/api-client/.openapi-generator/FILES @@ -0,0 +1,890 @@ +.gitignore +.openapi-generator-ignore +.php-cs-fixer.dist.php +.travis.yml +README.md +composer.json +docs/Api/GAFApi.md +docs/Model/PostAquaculture200Response.md +docs/Model/PostAquaculture200ResponseCarbonSequestration.md +docs/Model/PostAquaculture200ResponseIntensities.md +docs/Model/PostAquaculture200ResponseIntermediateInner.md +docs/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md +docs/Model/PostAquaculture200ResponseNet.md +docs/Model/PostAquaculture200ResponsePurchasedOffsets.md +docs/Model/PostAquaculture200ResponseScope1.md +docs/Model/PostAquaculture200ResponseScope2.md +docs/Model/PostAquaculture200ResponseScope3.md +docs/Model/PostAquacultureRequest.md +docs/Model/PostAquacultureRequestEnterprisesInner.md +docs/Model/PostAquacultureRequestEnterprisesInnerBaitInner.md +docs/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md +docs/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md +docs/Model/PostAquacultureRequestEnterprisesInnerFuel.md +docs/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md +docs/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md +docs/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md +docs/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md +docs/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.md +docs/Model/PostBeef200Response.md +docs/Model/PostBeef200ResponseIntermediateInner.md +docs/Model/PostBeef200ResponseIntermediateInnerIntensities.md +docs/Model/PostBeef200ResponseNet.md +docs/Model/PostBeef200ResponseScope1.md +docs/Model/PostBeef200ResponseScope3.md +docs/Model/PostBeefRequest.md +docs/Model/PostBeefRequestBeefInner.md +docs/Model/PostBeefRequestBeefInnerClasses.md +docs/Model/PostBeefRequestBeefInnerClassesBullsGt1.md +docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md +docs/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md +docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.md +docs/Model/PostBeefRequestBeefInnerClassesCowsGt2.md +docs/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.md +docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2.md +docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md +docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2.md +docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md +docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1.md +docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md +docs/Model/PostBeefRequestBeefInnerClassesSteers1To2.md +docs/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.md +docs/Model/PostBeefRequestBeefInnerClassesSteersGt2.md +docs/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.md +docs/Model/PostBeefRequestBeefInnerClassesSteersLt1.md +docs/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.md +docs/Model/PostBeefRequestBeefInnerCowsCalving.md +docs/Model/PostBeefRequestBeefInnerFertiliser.md +docs/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md +docs/Model/PostBeefRequestBeefInnerMineralSupplementation.md +docs/Model/PostBeefRequestBurningInner.md +docs/Model/PostBeefRequestBurningInnerBurning.md +docs/Model/PostBeefRequestVegetationInner.md +docs/Model/PostBeefRequestVegetationInnerVegetation.md +docs/Model/PostBuffalo200Response.md +docs/Model/PostBuffalo200ResponseIntensities.md +docs/Model/PostBuffalo200ResponseIntermediateInner.md +docs/Model/PostBuffalo200ResponseNet.md +docs/Model/PostBuffalo200ResponseScope1.md +docs/Model/PostBuffalo200ResponseScope3.md +docs/Model/PostBuffaloRequest.md +docs/Model/PostBuffaloRequestBuffalosInner.md +docs/Model/PostBuffaloRequestBuffalosInnerClasses.md +docs/Model/PostBuffaloRequestBuffalosInnerClassesBulls.md +docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md +docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md +docs/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.md +docs/Model/PostBuffaloRequestBuffalosInnerClassesCows.md +docs/Model/PostBuffaloRequestBuffalosInnerClassesSteers.md +docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md +docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md +docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.md +docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md +docs/Model/PostBuffaloRequestBuffalosInnerCowsCalving.md +docs/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.md +docs/Model/PostBuffaloRequestVegetationInner.md +docs/Model/PostCotton200Response.md +docs/Model/PostCotton200ResponseIntermediateInner.md +docs/Model/PostCotton200ResponseIntermediateInnerIntensities.md +docs/Model/PostCotton200ResponseNet.md +docs/Model/PostCotton200ResponseScope1.md +docs/Model/PostCotton200ResponseScope3.md +docs/Model/PostCottonRequest.md +docs/Model/PostCottonRequestCropsInner.md +docs/Model/PostCottonRequestVegetationInner.md +docs/Model/PostDairy200Response.md +docs/Model/PostDairy200ResponseIntensities.md +docs/Model/PostDairy200ResponseIntermediateInner.md +docs/Model/PostDairy200ResponseNet.md +docs/Model/PostDairy200ResponseScope1.md +docs/Model/PostDairy200ResponseScope3.md +docs/Model/PostDairyRequest.md +docs/Model/PostDairyRequestDairyInner.md +docs/Model/PostDairyRequestDairyInnerAreas.md +docs/Model/PostDairyRequestDairyInnerClasses.md +docs/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.md +docs/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.md +docs/Model/PostDairyRequestDairyInnerClassesHeifersGt1.md +docs/Model/PostDairyRequestDairyInnerClassesHeifersLt1.md +docs/Model/PostDairyRequestDairyInnerClassesMilkingCows.md +docs/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md +docs/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.md +docs/Model/PostDairyRequestDairyInnerSeasonalFertiliser.md +docs/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md +docs/Model/PostDairyRequestVegetationInner.md +docs/Model/PostDeer200Response.md +docs/Model/PostDeer200ResponseIntensities.md +docs/Model/PostDeer200ResponseIntermediateInner.md +docs/Model/PostDeer200ResponseNet.md +docs/Model/PostDeerRequest.md +docs/Model/PostDeerRequestDeersInner.md +docs/Model/PostDeerRequestDeersInnerClasses.md +docs/Model/PostDeerRequestDeersInnerClassesBreedingDoes.md +docs/Model/PostDeerRequestDeersInnerClassesBucks.md +docs/Model/PostDeerRequestDeersInnerClassesFawn.md +docs/Model/PostDeerRequestDeersInnerClassesOtherDoes.md +docs/Model/PostDeerRequestDeersInnerClassesTradeBucks.md +docs/Model/PostDeerRequestDeersInnerClassesTradeDoes.md +docs/Model/PostDeerRequestDeersInnerClassesTradeFawn.md +docs/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.md +docs/Model/PostDeerRequestDeersInnerDoesFawning.md +docs/Model/PostDeerRequestDeersInnerSeasonalFawning.md +docs/Model/PostDeerRequestVegetationInner.md +docs/Model/PostFeedlot200Response.md +docs/Model/PostFeedlot200ResponseIntermediateInner.md +docs/Model/PostFeedlot200ResponseIntermediateInnerIntensities.md +docs/Model/PostFeedlot200ResponseIntermediateInnerNet.md +docs/Model/PostFeedlot200ResponseScope1.md +docs/Model/PostFeedlot200ResponseScope3.md +docs/Model/PostFeedlotRequest.md +docs/Model/PostFeedlotRequestFeedlotsInner.md +docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.md +docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md +docs/Model/PostFeedlotRequestFeedlotsInnerPurchases.md +docs/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md +docs/Model/PostFeedlotRequestFeedlotsInnerSales.md +docs/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md +docs/Model/PostFeedlotRequestVegetationInner.md +docs/Model/PostGoat200Response.md +docs/Model/PostGoat200ResponseIntensities.md +docs/Model/PostGoat200ResponseIntermediateInner.md +docs/Model/PostGoat200ResponseNet.md +docs/Model/PostGoatRequest.md +docs/Model/PostGoatRequestGoatsInner.md +docs/Model/PostGoatRequestGoatsInnerClasses.md +docs/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md +docs/Model/PostGoatRequestGoatsInnerClassesBucksBilly.md +docs/Model/PostGoatRequestGoatsInnerClassesKids.md +docs/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md +docs/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md +docs/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md +docs/Model/PostGoatRequestGoatsInnerClassesTradeBucks.md +docs/Model/PostGoatRequestGoatsInnerClassesTradeDoes.md +docs/Model/PostGoatRequestGoatsInnerClassesTradeKids.md +docs/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md +docs/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md +docs/Model/PostGoatRequestGoatsInnerClassesTradeWethers.md +docs/Model/PostGoatRequestGoatsInnerClassesWethers.md +docs/Model/PostGoatRequestVegetationInner.md +docs/Model/PostGrains200Response.md +docs/Model/PostGrains200ResponseIntermediateInner.md +docs/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md +docs/Model/PostGrainsRequest.md +docs/Model/PostGrainsRequestCropsInner.md +docs/Model/PostHorticulture200Response.md +docs/Model/PostHorticulture200ResponseIntermediateInner.md +docs/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md +docs/Model/PostHorticulture200ResponseScope1.md +docs/Model/PostHorticultureRequest.md +docs/Model/PostHorticultureRequestCropsInner.md +docs/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.md +docs/Model/PostPork200Response.md +docs/Model/PostPork200ResponseIntensities.md +docs/Model/PostPork200ResponseIntermediateInner.md +docs/Model/PostPork200ResponseNet.md +docs/Model/PostPork200ResponseScope1.md +docs/Model/PostPork200ResponseScope3.md +docs/Model/PostPorkRequest.md +docs/Model/PostPorkRequestPorkInner.md +docs/Model/PostPorkRequestPorkInnerClasses.md +docs/Model/PostPorkRequestPorkInnerClassesBoars.md +docs/Model/PostPorkRequestPorkInnerClassesGilts.md +docs/Model/PostPorkRequestPorkInnerClassesGrowers.md +docs/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.md +docs/Model/PostPorkRequestPorkInnerClassesSows.md +docs/Model/PostPorkRequestPorkInnerClassesSowsManure.md +docs/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.md +docs/Model/PostPorkRequestPorkInnerClassesSuckers.md +docs/Model/PostPorkRequestPorkInnerClassesWeaners.md +docs/Model/PostPorkRequestPorkInnerFeedProductsInner.md +docs/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md +docs/Model/PostPorkRequestVegetationInner.md +docs/Model/PostPoultry200Response.md +docs/Model/PostPoultry200ResponseIntensities.md +docs/Model/PostPoultry200ResponseIntermediateBroilersInner.md +docs/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md +docs/Model/PostPoultry200ResponseIntermediateLayersInner.md +docs/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.md +docs/Model/PostPoultry200ResponseNet.md +docs/Model/PostPoultry200ResponseScope1.md +docs/Model/PostPoultry200ResponseScope3.md +docs/Model/PostPoultryRequest.md +docs/Model/PostPoultryRequestBroilersInner.md +docs/Model/PostPoultryRequestBroilersInnerGroupsInner.md +docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md +docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md +docs/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md +docs/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md +docs/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md +docs/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.md +docs/Model/PostPoultryRequestBroilersInnerSalesInner.md +docs/Model/PostPoultryRequestLayersInner.md +docs/Model/PostPoultryRequestLayersInnerLayers.md +docs/Model/PostPoultryRequestLayersInnerLayersEggSale.md +docs/Model/PostPoultryRequestLayersInnerLayersPurchases.md +docs/Model/PostPoultryRequestLayersInnerMeatChickenLayers.md +docs/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md +docs/Model/PostPoultryRequestVegetationInner.md +docs/Model/PostProcessing200Response.md +docs/Model/PostProcessing200ResponseIntensitiesInner.md +docs/Model/PostProcessing200ResponseIntermediateInner.md +docs/Model/PostProcessing200ResponseNet.md +docs/Model/PostProcessing200ResponseScope1.md +docs/Model/PostProcessing200ResponseScope3.md +docs/Model/PostProcessingRequest.md +docs/Model/PostProcessingRequestProductsInner.md +docs/Model/PostProcessingRequestProductsInnerProduct.md +docs/Model/PostRice200Response.md +docs/Model/PostRice200ResponseIntensities.md +docs/Model/PostRice200ResponseIntermediateInner.md +docs/Model/PostRice200ResponseIntermediateInnerIntensities.md +docs/Model/PostRice200ResponseScope1.md +docs/Model/PostRiceRequest.md +docs/Model/PostRiceRequestCropsInner.md +docs/Model/PostSheep200Response.md +docs/Model/PostSheep200ResponseIntermediateInner.md +docs/Model/PostSheep200ResponseIntermediateInnerIntensities.md +docs/Model/PostSheep200ResponseNet.md +docs/Model/PostSheepRequest.md +docs/Model/PostSheepRequestSheepInner.md +docs/Model/PostSheepRequestSheepInnerClasses.md +docs/Model/PostSheepRequestSheepInnerClassesRams.md +docs/Model/PostSheepRequestSheepInnerClassesRamsAutumn.md +docs/Model/PostSheepRequestSheepInnerClassesTradeEwes.md +docs/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md +docs/Model/PostSheepRequestSheepInnerEwesLambing.md +docs/Model/PostSheepRequestSheepInnerSeasonalLambing.md +docs/Model/PostSheepRequestVegetationInner.md +docs/Model/PostSheepbeef200Response.md +docs/Model/PostSheepbeef200ResponseIntensities.md +docs/Model/PostSheepbeef200ResponseIntermediate.md +docs/Model/PostSheepbeef200ResponseIntermediateBeef.md +docs/Model/PostSheepbeef200ResponseIntermediateSheep.md +docs/Model/PostSheepbeef200ResponseNet.md +docs/Model/PostSheepbeefRequest.md +docs/Model/PostSheepbeefRequestVegetationInner.md +docs/Model/PostSugar200Response.md +docs/Model/PostSugar200ResponseIntermediateInner.md +docs/Model/PostSugar200ResponseIntermediateInnerIntensities.md +docs/Model/PostSugarRequest.md +docs/Model/PostSugarRequestCropsInner.md +docs/Model/PostVineyard200Response.md +docs/Model/PostVineyard200ResponseIntermediateInner.md +docs/Model/PostVineyard200ResponseIntermediateInnerIntensities.md +docs/Model/PostVineyard200ResponseNet.md +docs/Model/PostVineyard200ResponseScope1.md +docs/Model/PostVineyard200ResponseScope3.md +docs/Model/PostVineyardRequest.md +docs/Model/PostVineyardRequestVegetationInner.md +docs/Model/PostVineyardRequestVineyardsInner.md +docs/Model/PostWildcatchfishery200Response.md +docs/Model/PostWildcatchfishery200ResponseIntensities.md +docs/Model/PostWildcatchfishery200ResponseIntermediateInner.md +docs/Model/PostWildcatchfishery200ResponseScope1.md +docs/Model/PostWildcatchfisheryRequest.md +docs/Model/PostWildcatchfisheryRequestEnterprisesInner.md +docs/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md +docs/Model/PostWildseafisheries200Response.md +docs/Model/PostWildseafisheries200ResponseIntermediateInner.md +docs/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.md +docs/Model/PostWildseafisheries200ResponseScope1.md +docs/Model/PostWildseafisheries200ResponseScope3.md +docs/Model/PostWildseafisheriesRequest.md +docs/Model/PostWildseafisheriesRequestEnterprisesInner.md +docs/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md +docs/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md +docs/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md +docs/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md +docs/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md +git_push.sh +lib/Api/GAFApi.php +lib/ApiException.php +lib/Configuration.php +lib/FormDataProcessor.php +lib/HeaderSelector.php +lib/Model/ModelInterface.php +lib/Model/PostAquaculture200Response.php +lib/Model/PostAquaculture200ResponseCarbonSequestration.php +lib/Model/PostAquaculture200ResponseIntensities.php +lib/Model/PostAquaculture200ResponseIntermediateInner.php +lib/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.php +lib/Model/PostAquaculture200ResponseNet.php +lib/Model/PostAquaculture200ResponsePurchasedOffsets.php +lib/Model/PostAquaculture200ResponseScope1.php +lib/Model/PostAquaculture200ResponseScope2.php +lib/Model/PostAquaculture200ResponseScope3.php +lib/Model/PostAquacultureRequest.php +lib/Model/PostAquacultureRequestEnterprisesInner.php +lib/Model/PostAquacultureRequestEnterprisesInnerBaitInner.php +lib/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.php +lib/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.php +lib/Model/PostAquacultureRequestEnterprisesInnerFuel.php +lib/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.php +lib/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.php +lib/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.php +lib/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.php +lib/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.php +lib/Model/PostBeef200Response.php +lib/Model/PostBeef200ResponseIntermediateInner.php +lib/Model/PostBeef200ResponseIntermediateInnerIntensities.php +lib/Model/PostBeef200ResponseNet.php +lib/Model/PostBeef200ResponseScope1.php +lib/Model/PostBeef200ResponseScope3.php +lib/Model/PostBeefRequest.php +lib/Model/PostBeefRequestBeefInner.php +lib/Model/PostBeefRequestBeefInnerClasses.php +lib/Model/PostBeefRequestBeefInnerClassesBullsGt1.php +lib/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.php +lib/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.php +lib/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.php +lib/Model/PostBeefRequestBeefInnerClassesCowsGt2.php +lib/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.php +lib/Model/PostBeefRequestBeefInnerClassesHeifers1To2.php +lib/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.php +lib/Model/PostBeefRequestBeefInnerClassesHeifersGt2.php +lib/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.php +lib/Model/PostBeefRequestBeefInnerClassesHeifersLt1.php +lib/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.php +lib/Model/PostBeefRequestBeefInnerClassesSteers1To2.php +lib/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.php +lib/Model/PostBeefRequestBeefInnerClassesSteersGt2.php +lib/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.php +lib/Model/PostBeefRequestBeefInnerClassesSteersLt1.php +lib/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.php +lib/Model/PostBeefRequestBeefInnerCowsCalving.php +lib/Model/PostBeefRequestBeefInnerFertiliser.php +lib/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.php +lib/Model/PostBeefRequestBeefInnerMineralSupplementation.php +lib/Model/PostBeefRequestBurningInner.php +lib/Model/PostBeefRequestBurningInnerBurning.php +lib/Model/PostBeefRequestVegetationInner.php +lib/Model/PostBeefRequestVegetationInnerVegetation.php +lib/Model/PostBuffalo200Response.php +lib/Model/PostBuffalo200ResponseIntensities.php +lib/Model/PostBuffalo200ResponseIntermediateInner.php +lib/Model/PostBuffalo200ResponseNet.php +lib/Model/PostBuffalo200ResponseScope1.php +lib/Model/PostBuffalo200ResponseScope3.php +lib/Model/PostBuffaloRequest.php +lib/Model/PostBuffaloRequestBuffalosInner.php +lib/Model/PostBuffaloRequestBuffalosInnerClasses.php +lib/Model/PostBuffaloRequestBuffalosInnerClassesBulls.php +lib/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.php +lib/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.php +lib/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.php +lib/Model/PostBuffaloRequestBuffalosInnerClassesCows.php +lib/Model/PostBuffaloRequestBuffalosInnerClassesSteers.php +lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.php +lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.php +lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.php +lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.php +lib/Model/PostBuffaloRequestBuffalosInnerCowsCalving.php +lib/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.php +lib/Model/PostBuffaloRequestVegetationInner.php +lib/Model/PostCotton200Response.php +lib/Model/PostCotton200ResponseIntermediateInner.php +lib/Model/PostCotton200ResponseIntermediateInnerIntensities.php +lib/Model/PostCotton200ResponseNet.php +lib/Model/PostCotton200ResponseScope1.php +lib/Model/PostCotton200ResponseScope3.php +lib/Model/PostCottonRequest.php +lib/Model/PostCottonRequestCropsInner.php +lib/Model/PostCottonRequestVegetationInner.php +lib/Model/PostDairy200Response.php +lib/Model/PostDairy200ResponseIntensities.php +lib/Model/PostDairy200ResponseIntermediateInner.php +lib/Model/PostDairy200ResponseNet.php +lib/Model/PostDairy200ResponseScope1.php +lib/Model/PostDairy200ResponseScope3.php +lib/Model/PostDairyRequest.php +lib/Model/PostDairyRequestDairyInner.php +lib/Model/PostDairyRequestDairyInnerAreas.php +lib/Model/PostDairyRequestDairyInnerClasses.php +lib/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.php +lib/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.php +lib/Model/PostDairyRequestDairyInnerClassesHeifersGt1.php +lib/Model/PostDairyRequestDairyInnerClassesHeifersLt1.php +lib/Model/PostDairyRequestDairyInnerClassesMilkingCows.php +lib/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.php +lib/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.php +lib/Model/PostDairyRequestDairyInnerSeasonalFertiliser.php +lib/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.php +lib/Model/PostDairyRequestVegetationInner.php +lib/Model/PostDeer200Response.php +lib/Model/PostDeer200ResponseIntensities.php +lib/Model/PostDeer200ResponseIntermediateInner.php +lib/Model/PostDeer200ResponseNet.php +lib/Model/PostDeerRequest.php +lib/Model/PostDeerRequestDeersInner.php +lib/Model/PostDeerRequestDeersInnerClasses.php +lib/Model/PostDeerRequestDeersInnerClassesBreedingDoes.php +lib/Model/PostDeerRequestDeersInnerClassesBucks.php +lib/Model/PostDeerRequestDeersInnerClassesFawn.php +lib/Model/PostDeerRequestDeersInnerClassesOtherDoes.php +lib/Model/PostDeerRequestDeersInnerClassesTradeBucks.php +lib/Model/PostDeerRequestDeersInnerClassesTradeDoes.php +lib/Model/PostDeerRequestDeersInnerClassesTradeFawn.php +lib/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.php +lib/Model/PostDeerRequestDeersInnerDoesFawning.php +lib/Model/PostDeerRequestDeersInnerSeasonalFawning.php +lib/Model/PostDeerRequestVegetationInner.php +lib/Model/PostFeedlot200Response.php +lib/Model/PostFeedlot200ResponseIntermediateInner.php +lib/Model/PostFeedlot200ResponseIntermediateInnerIntensities.php +lib/Model/PostFeedlot200ResponseIntermediateInnerNet.php +lib/Model/PostFeedlot200ResponseScope1.php +lib/Model/PostFeedlot200ResponseScope3.php +lib/Model/PostFeedlotRequest.php +lib/Model/PostFeedlotRequestFeedlotsInner.php +lib/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.php +lib/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.php +lib/Model/PostFeedlotRequestFeedlotsInnerPurchases.php +lib/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.php +lib/Model/PostFeedlotRequestFeedlotsInnerSales.php +lib/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.php +lib/Model/PostFeedlotRequestVegetationInner.php +lib/Model/PostGoat200Response.php +lib/Model/PostGoat200ResponseIntensities.php +lib/Model/PostGoat200ResponseIntermediateInner.php +lib/Model/PostGoat200ResponseNet.php +lib/Model/PostGoatRequest.php +lib/Model/PostGoatRequestGoatsInner.php +lib/Model/PostGoatRequestGoatsInnerClasses.php +lib/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.php +lib/Model/PostGoatRequestGoatsInnerClassesBucksBilly.php +lib/Model/PostGoatRequestGoatsInnerClassesKids.php +lib/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.php +lib/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.php +lib/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.php +lib/Model/PostGoatRequestGoatsInnerClassesTradeBucks.php +lib/Model/PostGoatRequestGoatsInnerClassesTradeDoes.php +lib/Model/PostGoatRequestGoatsInnerClassesTradeKids.php +lib/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.php +lib/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.php +lib/Model/PostGoatRequestGoatsInnerClassesTradeWethers.php +lib/Model/PostGoatRequestGoatsInnerClassesWethers.php +lib/Model/PostGoatRequestVegetationInner.php +lib/Model/PostGrains200Response.php +lib/Model/PostGrains200ResponseIntermediateInner.php +lib/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.php +lib/Model/PostGrainsRequest.php +lib/Model/PostGrainsRequestCropsInner.php +lib/Model/PostHorticulture200Response.php +lib/Model/PostHorticulture200ResponseIntermediateInner.php +lib/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.php +lib/Model/PostHorticulture200ResponseScope1.php +lib/Model/PostHorticultureRequest.php +lib/Model/PostHorticultureRequestCropsInner.php +lib/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.php +lib/Model/PostPork200Response.php +lib/Model/PostPork200ResponseIntensities.php +lib/Model/PostPork200ResponseIntermediateInner.php +lib/Model/PostPork200ResponseNet.php +lib/Model/PostPork200ResponseScope1.php +lib/Model/PostPork200ResponseScope3.php +lib/Model/PostPorkRequest.php +lib/Model/PostPorkRequestPorkInner.php +lib/Model/PostPorkRequestPorkInnerClasses.php +lib/Model/PostPorkRequestPorkInnerClassesBoars.php +lib/Model/PostPorkRequestPorkInnerClassesGilts.php +lib/Model/PostPorkRequestPorkInnerClassesGrowers.php +lib/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.php +lib/Model/PostPorkRequestPorkInnerClassesSows.php +lib/Model/PostPorkRequestPorkInnerClassesSowsManure.php +lib/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.php +lib/Model/PostPorkRequestPorkInnerClassesSuckers.php +lib/Model/PostPorkRequestPorkInnerClassesWeaners.php +lib/Model/PostPorkRequestPorkInnerFeedProductsInner.php +lib/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.php +lib/Model/PostPorkRequestVegetationInner.php +lib/Model/PostPoultry200Response.php +lib/Model/PostPoultry200ResponseIntensities.php +lib/Model/PostPoultry200ResponseIntermediateBroilersInner.php +lib/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.php +lib/Model/PostPoultry200ResponseIntermediateLayersInner.php +lib/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.php +lib/Model/PostPoultry200ResponseNet.php +lib/Model/PostPoultry200ResponseScope1.php +lib/Model/PostPoultry200ResponseScope3.php +lib/Model/PostPoultryRequest.php +lib/Model/PostPoultryRequestBroilersInner.php +lib/Model/PostPoultryRequestBroilersInnerGroupsInner.php +lib/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.php +lib/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.php +lib/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.php +lib/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.php +lib/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.php +lib/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.php +lib/Model/PostPoultryRequestBroilersInnerSalesInner.php +lib/Model/PostPoultryRequestLayersInner.php +lib/Model/PostPoultryRequestLayersInnerLayers.php +lib/Model/PostPoultryRequestLayersInnerLayersEggSale.php +lib/Model/PostPoultryRequestLayersInnerLayersPurchases.php +lib/Model/PostPoultryRequestLayersInnerMeatChickenLayers.php +lib/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.php +lib/Model/PostPoultryRequestVegetationInner.php +lib/Model/PostProcessing200Response.php +lib/Model/PostProcessing200ResponseIntensitiesInner.php +lib/Model/PostProcessing200ResponseIntermediateInner.php +lib/Model/PostProcessing200ResponseNet.php +lib/Model/PostProcessing200ResponseScope1.php +lib/Model/PostProcessing200ResponseScope3.php +lib/Model/PostProcessingRequest.php +lib/Model/PostProcessingRequestProductsInner.php +lib/Model/PostProcessingRequestProductsInnerProduct.php +lib/Model/PostRice200Response.php +lib/Model/PostRice200ResponseIntensities.php +lib/Model/PostRice200ResponseIntermediateInner.php +lib/Model/PostRice200ResponseIntermediateInnerIntensities.php +lib/Model/PostRice200ResponseScope1.php +lib/Model/PostRiceRequest.php +lib/Model/PostRiceRequestCropsInner.php +lib/Model/PostSheep200Response.php +lib/Model/PostSheep200ResponseIntermediateInner.php +lib/Model/PostSheep200ResponseIntermediateInnerIntensities.php +lib/Model/PostSheep200ResponseNet.php +lib/Model/PostSheepRequest.php +lib/Model/PostSheepRequestSheepInner.php +lib/Model/PostSheepRequestSheepInnerClasses.php +lib/Model/PostSheepRequestSheepInnerClassesRams.php +lib/Model/PostSheepRequestSheepInnerClassesRamsAutumn.php +lib/Model/PostSheepRequestSheepInnerClassesTradeEwes.php +lib/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.php +lib/Model/PostSheepRequestSheepInnerEwesLambing.php +lib/Model/PostSheepRequestSheepInnerSeasonalLambing.php +lib/Model/PostSheepRequestVegetationInner.php +lib/Model/PostSheepbeef200Response.php +lib/Model/PostSheepbeef200ResponseIntensities.php +lib/Model/PostSheepbeef200ResponseIntermediate.php +lib/Model/PostSheepbeef200ResponseIntermediateBeef.php +lib/Model/PostSheepbeef200ResponseIntermediateSheep.php +lib/Model/PostSheepbeef200ResponseNet.php +lib/Model/PostSheepbeefRequest.php +lib/Model/PostSheepbeefRequestVegetationInner.php +lib/Model/PostSugar200Response.php +lib/Model/PostSugar200ResponseIntermediateInner.php +lib/Model/PostSugar200ResponseIntermediateInnerIntensities.php +lib/Model/PostSugarRequest.php +lib/Model/PostSugarRequestCropsInner.php +lib/Model/PostVineyard200Response.php +lib/Model/PostVineyard200ResponseIntermediateInner.php +lib/Model/PostVineyard200ResponseIntermediateInnerIntensities.php +lib/Model/PostVineyard200ResponseNet.php +lib/Model/PostVineyard200ResponseScope1.php +lib/Model/PostVineyard200ResponseScope3.php +lib/Model/PostVineyardRequest.php +lib/Model/PostVineyardRequestVegetationInner.php +lib/Model/PostVineyardRequestVineyardsInner.php +lib/Model/PostWildcatchfishery200Response.php +lib/Model/PostWildcatchfishery200ResponseIntensities.php +lib/Model/PostWildcatchfishery200ResponseIntermediateInner.php +lib/Model/PostWildcatchfishery200ResponseScope1.php +lib/Model/PostWildcatchfisheryRequest.php +lib/Model/PostWildcatchfisheryRequestEnterprisesInner.php +lib/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.php +lib/Model/PostWildseafisheries200Response.php +lib/Model/PostWildseafisheries200ResponseIntermediateInner.php +lib/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.php +lib/Model/PostWildseafisheries200ResponseScope1.php +lib/Model/PostWildseafisheries200ResponseScope3.php +lib/Model/PostWildseafisheriesRequest.php +lib/Model/PostWildseafisheriesRequestEnterprisesInner.php +lib/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.php +lib/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.php +lib/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.php +lib/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.php +lib/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.php +lib/ObjectSerializer.php +phpunit.xml.dist +test/Api/GAFApiTest.php +test/Model/PostAquaculture200ResponseCarbonSequestrationTest.php +test/Model/PostAquaculture200ResponseIntensitiesTest.php +test/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestrationTest.php +test/Model/PostAquaculture200ResponseIntermediateInnerTest.php +test/Model/PostAquaculture200ResponseNetTest.php +test/Model/PostAquaculture200ResponsePurchasedOffsetsTest.php +test/Model/PostAquaculture200ResponseScope1Test.php +test/Model/PostAquaculture200ResponseScope2Test.php +test/Model/PostAquaculture200ResponseScope3Test.php +test/Model/PostAquaculture200ResponseTest.php +test/Model/PostAquacultureRequestEnterprisesInnerBaitInnerTest.php +test/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInnerTest.php +test/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInnerTest.php +test/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInnerTest.php +test/Model/PostAquacultureRequestEnterprisesInnerFuelTest.php +test/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInnerTest.php +test/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInnerTest.php +test/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInnerTest.php +test/Model/PostAquacultureRequestEnterprisesInnerSolidWasteTest.php +test/Model/PostAquacultureRequestEnterprisesInnerTest.php +test/Model/PostAquacultureRequestTest.php +test/Model/PostBeef200ResponseIntermediateInnerIntensitiesTest.php +test/Model/PostBeef200ResponseIntermediateInnerTest.php +test/Model/PostBeef200ResponseNetTest.php +test/Model/PostBeef200ResponseScope1Test.php +test/Model/PostBeef200ResponseScope3Test.php +test/Model/PostBeef200ResponseTest.php +test/Model/PostBeefRequestBeefInnerClassesBullsGt1AutumnTest.php +test/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInnerTest.php +test/Model/PostBeefRequestBeefInnerClassesBullsGt1Test.php +test/Model/PostBeefRequestBeefInnerClassesBullsGt1TradedTest.php +test/Model/PostBeefRequestBeefInnerClassesCowsGt2Test.php +test/Model/PostBeefRequestBeefInnerClassesCowsGt2TradedTest.php +test/Model/PostBeefRequestBeefInnerClassesHeifers1To2Test.php +test/Model/PostBeefRequestBeefInnerClassesHeifers1To2TradedTest.php +test/Model/PostBeefRequestBeefInnerClassesHeifersGt2Test.php +test/Model/PostBeefRequestBeefInnerClassesHeifersGt2TradedTest.php +test/Model/PostBeefRequestBeefInnerClassesHeifersLt1Test.php +test/Model/PostBeefRequestBeefInnerClassesHeifersLt1TradedTest.php +test/Model/PostBeefRequestBeefInnerClassesSteers1To2Test.php +test/Model/PostBeefRequestBeefInnerClassesSteers1To2TradedTest.php +test/Model/PostBeefRequestBeefInnerClassesSteersGt2Test.php +test/Model/PostBeefRequestBeefInnerClassesSteersGt2TradedTest.php +test/Model/PostBeefRequestBeefInnerClassesSteersLt1Test.php +test/Model/PostBeefRequestBeefInnerClassesSteersLt1TradedTest.php +test/Model/PostBeefRequestBeefInnerClassesTest.php +test/Model/PostBeefRequestBeefInnerCowsCalvingTest.php +test/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInnerTest.php +test/Model/PostBeefRequestBeefInnerFertiliserTest.php +test/Model/PostBeefRequestBeefInnerMineralSupplementationTest.php +test/Model/PostBeefRequestBeefInnerTest.php +test/Model/PostBeefRequestBurningInnerBurningTest.php +test/Model/PostBeefRequestBurningInnerTest.php +test/Model/PostBeefRequestTest.php +test/Model/PostBeefRequestVegetationInnerTest.php +test/Model/PostBeefRequestVegetationInnerVegetationTest.php +test/Model/PostBuffalo200ResponseIntensitiesTest.php +test/Model/PostBuffalo200ResponseIntermediateInnerTest.php +test/Model/PostBuffalo200ResponseNetTest.php +test/Model/PostBuffalo200ResponseScope1Test.php +test/Model/PostBuffalo200ResponseScope3Test.php +test/Model/PostBuffalo200ResponseTest.php +test/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumnTest.php +test/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInnerTest.php +test/Model/PostBuffaloRequestBuffalosInnerClassesBullsTest.php +test/Model/PostBuffaloRequestBuffalosInnerClassesCalfsTest.php +test/Model/PostBuffaloRequestBuffalosInnerClassesCowsTest.php +test/Model/PostBuffaloRequestBuffalosInnerClassesSteersTest.php +test/Model/PostBuffaloRequestBuffalosInnerClassesTest.php +test/Model/PostBuffaloRequestBuffalosInnerClassesTradeBullsTest.php +test/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfsTest.php +test/Model/PostBuffaloRequestBuffalosInnerClassesTradeCowsTest.php +test/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteersTest.php +test/Model/PostBuffaloRequestBuffalosInnerCowsCalvingTest.php +test/Model/PostBuffaloRequestBuffalosInnerSeasonalCalvingTest.php +test/Model/PostBuffaloRequestBuffalosInnerTest.php +test/Model/PostBuffaloRequestTest.php +test/Model/PostBuffaloRequestVegetationInnerTest.php +test/Model/PostCotton200ResponseIntermediateInnerIntensitiesTest.php +test/Model/PostCotton200ResponseIntermediateInnerTest.php +test/Model/PostCotton200ResponseNetTest.php +test/Model/PostCotton200ResponseScope1Test.php +test/Model/PostCotton200ResponseScope3Test.php +test/Model/PostCotton200ResponseTest.php +test/Model/PostCottonRequestCropsInnerTest.php +test/Model/PostCottonRequestTest.php +test/Model/PostCottonRequestVegetationInnerTest.php +test/Model/PostDairy200ResponseIntensitiesTest.php +test/Model/PostDairy200ResponseIntermediateInnerTest.php +test/Model/PostDairy200ResponseNetTest.php +test/Model/PostDairy200ResponseScope1Test.php +test/Model/PostDairy200ResponseScope3Test.php +test/Model/PostDairy200ResponseTest.php +test/Model/PostDairyRequestDairyInnerAreasTest.php +test/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1Test.php +test/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1Test.php +test/Model/PostDairyRequestDairyInnerClassesHeifersGt1Test.php +test/Model/PostDairyRequestDairyInnerClassesHeifersLt1Test.php +test/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumnTest.php +test/Model/PostDairyRequestDairyInnerClassesMilkingCowsTest.php +test/Model/PostDairyRequestDairyInnerClassesTest.php +test/Model/PostDairyRequestDairyInnerManureManagementMilkingCowsTest.php +test/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumnTest.php +test/Model/PostDairyRequestDairyInnerSeasonalFertiliserTest.php +test/Model/PostDairyRequestDairyInnerTest.php +test/Model/PostDairyRequestTest.php +test/Model/PostDairyRequestVegetationInnerTest.php +test/Model/PostDeer200ResponseIntensitiesTest.php +test/Model/PostDeer200ResponseIntermediateInnerTest.php +test/Model/PostDeer200ResponseNetTest.php +test/Model/PostDeer200ResponseTest.php +test/Model/PostDeerRequestDeersInnerClassesBreedingDoesTest.php +test/Model/PostDeerRequestDeersInnerClassesBucksTest.php +test/Model/PostDeerRequestDeersInnerClassesFawnTest.php +test/Model/PostDeerRequestDeersInnerClassesOtherDoesTest.php +test/Model/PostDeerRequestDeersInnerClassesTest.php +test/Model/PostDeerRequestDeersInnerClassesTradeBucksTest.php +test/Model/PostDeerRequestDeersInnerClassesTradeDoesTest.php +test/Model/PostDeerRequestDeersInnerClassesTradeFawnTest.php +test/Model/PostDeerRequestDeersInnerClassesTradeOtherDoesTest.php +test/Model/PostDeerRequestDeersInnerDoesFawningTest.php +test/Model/PostDeerRequestDeersInnerSeasonalFawningTest.php +test/Model/PostDeerRequestDeersInnerTest.php +test/Model/PostDeerRequestTest.php +test/Model/PostDeerRequestVegetationInnerTest.php +test/Model/PostFeedlot200ResponseIntermediateInnerIntensitiesTest.php +test/Model/PostFeedlot200ResponseIntermediateInnerNetTest.php +test/Model/PostFeedlot200ResponseIntermediateInnerTest.php +test/Model/PostFeedlot200ResponseScope1Test.php +test/Model/PostFeedlot200ResponseScope3Test.php +test/Model/PostFeedlot200ResponseTest.php +test/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInnerTest.php +test/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerTest.php +test/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1InnerTest.php +test/Model/PostFeedlotRequestFeedlotsInnerPurchasesTest.php +test/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1InnerTest.php +test/Model/PostFeedlotRequestFeedlotsInnerSalesTest.php +test/Model/PostFeedlotRequestFeedlotsInnerTest.php +test/Model/PostFeedlotRequestTest.php +test/Model/PostFeedlotRequestVegetationInnerTest.php +test/Model/PostGoat200ResponseIntensitiesTest.php +test/Model/PostGoat200ResponseIntermediateInnerTest.php +test/Model/PostGoat200ResponseNetTest.php +test/Model/PostGoat200ResponseTest.php +test/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNanniesTest.php +test/Model/PostGoatRequestGoatsInnerClassesBucksBillyTest.php +test/Model/PostGoatRequestGoatsInnerClassesKidsTest.php +test/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNanniesTest.php +test/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemalesTest.php +test/Model/PostGoatRequestGoatsInnerClassesTest.php +test/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNanniesTest.php +test/Model/PostGoatRequestGoatsInnerClassesTradeBucksTest.php +test/Model/PostGoatRequestGoatsInnerClassesTradeDoesTest.php +test/Model/PostGoatRequestGoatsInnerClassesTradeKidsTest.php +test/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNanniesTest.php +test/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemalesTest.php +test/Model/PostGoatRequestGoatsInnerClassesTradeWethersTest.php +test/Model/PostGoatRequestGoatsInnerClassesWethersTest.php +test/Model/PostGoatRequestGoatsInnerTest.php +test/Model/PostGoatRequestTest.php +test/Model/PostGoatRequestVegetationInnerTest.php +test/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestrationTest.php +test/Model/PostGrains200ResponseIntermediateInnerTest.php +test/Model/PostGrains200ResponseTest.php +test/Model/PostGrainsRequestCropsInnerTest.php +test/Model/PostGrainsRequestTest.php +test/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestrationTest.php +test/Model/PostHorticulture200ResponseIntermediateInnerTest.php +test/Model/PostHorticulture200ResponseScope1Test.php +test/Model/PostHorticulture200ResponseTest.php +test/Model/PostHorticultureRequestCropsInnerRefrigerantsInnerTest.php +test/Model/PostHorticultureRequestCropsInnerTest.php +test/Model/PostHorticultureRequestTest.php +test/Model/PostPork200ResponseIntensitiesTest.php +test/Model/PostPork200ResponseIntermediateInnerTest.php +test/Model/PostPork200ResponseNetTest.php +test/Model/PostPork200ResponseScope1Test.php +test/Model/PostPork200ResponseScope3Test.php +test/Model/PostPork200ResponseTest.php +test/Model/PostPorkRequestPorkInnerClassesBoarsTest.php +test/Model/PostPorkRequestPorkInnerClassesGiltsTest.php +test/Model/PostPorkRequestPorkInnerClassesGrowersTest.php +test/Model/PostPorkRequestPorkInnerClassesSlaughterPigsTest.php +test/Model/PostPorkRequestPorkInnerClassesSowsManureSpringTest.php +test/Model/PostPorkRequestPorkInnerClassesSowsManureTest.php +test/Model/PostPorkRequestPorkInnerClassesSowsTest.php +test/Model/PostPorkRequestPorkInnerClassesSuckersTest.php +test/Model/PostPorkRequestPorkInnerClassesTest.php +test/Model/PostPorkRequestPorkInnerClassesWeanersTest.php +test/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredientsTest.php +test/Model/PostPorkRequestPorkInnerFeedProductsInnerTest.php +test/Model/PostPorkRequestPorkInnerTest.php +test/Model/PostPorkRequestTest.php +test/Model/PostPorkRequestVegetationInnerTest.php +test/Model/PostPoultry200ResponseIntensitiesTest.php +test/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensitiesTest.php +test/Model/PostPoultry200ResponseIntermediateBroilersInnerTest.php +test/Model/PostPoultry200ResponseIntermediateLayersInnerIntensitiesTest.php +test/Model/PostPoultry200ResponseIntermediateLayersInnerTest.php +test/Model/PostPoultry200ResponseNetTest.php +test/Model/PostPoultry200ResponseScope1Test.php +test/Model/PostPoultry200ResponseScope3Test.php +test/Model/PostPoultry200ResponseTest.php +test/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredientsTest.php +test/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerTest.php +test/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowersTest.php +test/Model/PostPoultryRequestBroilersInnerGroupsInnerTest.php +test/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchasesTest.php +test/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchasesTest.php +test/Model/PostPoultryRequestBroilersInnerMeatOtherPurchasesTest.php +test/Model/PostPoultryRequestBroilersInnerSalesInnerTest.php +test/Model/PostPoultryRequestBroilersInnerTest.php +test/Model/PostPoultryRequestLayersInnerLayersEggSaleTest.php +test/Model/PostPoultryRequestLayersInnerLayersPurchasesTest.php +test/Model/PostPoultryRequestLayersInnerLayersTest.php +test/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSaleTest.php +test/Model/PostPoultryRequestLayersInnerMeatChickenLayersTest.php +test/Model/PostPoultryRequestLayersInnerTest.php +test/Model/PostPoultryRequestTest.php +test/Model/PostPoultryRequestVegetationInnerTest.php +test/Model/PostProcessing200ResponseIntensitiesInnerTest.php +test/Model/PostProcessing200ResponseIntermediateInnerTest.php +test/Model/PostProcessing200ResponseNetTest.php +test/Model/PostProcessing200ResponseScope1Test.php +test/Model/PostProcessing200ResponseScope3Test.php +test/Model/PostProcessing200ResponseTest.php +test/Model/PostProcessingRequestProductsInnerProductTest.php +test/Model/PostProcessingRequestProductsInnerTest.php +test/Model/PostProcessingRequestTest.php +test/Model/PostRice200ResponseIntensitiesTest.php +test/Model/PostRice200ResponseIntermediateInnerIntensitiesTest.php +test/Model/PostRice200ResponseIntermediateInnerTest.php +test/Model/PostRice200ResponseScope1Test.php +test/Model/PostRice200ResponseTest.php +test/Model/PostRiceRequestCropsInnerTest.php +test/Model/PostRiceRequestTest.php +test/Model/PostSheep200ResponseIntermediateInnerIntensitiesTest.php +test/Model/PostSheep200ResponseIntermediateInnerTest.php +test/Model/PostSheep200ResponseNetTest.php +test/Model/PostSheep200ResponseTest.php +test/Model/PostSheepRequestSheepInnerClassesRamsAutumnTest.php +test/Model/PostSheepRequestSheepInnerClassesRamsTest.php +test/Model/PostSheepRequestSheepInnerClassesTest.php +test/Model/PostSheepRequestSheepInnerClassesTradeEwesTest.php +test/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggetsTest.php +test/Model/PostSheepRequestSheepInnerEwesLambingTest.php +test/Model/PostSheepRequestSheepInnerSeasonalLambingTest.php +test/Model/PostSheepRequestSheepInnerTest.php +test/Model/PostSheepRequestTest.php +test/Model/PostSheepRequestVegetationInnerTest.php +test/Model/PostSheepbeef200ResponseIntensitiesTest.php +test/Model/PostSheepbeef200ResponseIntermediateBeefTest.php +test/Model/PostSheepbeef200ResponseIntermediateSheepTest.php +test/Model/PostSheepbeef200ResponseIntermediateTest.php +test/Model/PostSheepbeef200ResponseNetTest.php +test/Model/PostSheepbeef200ResponseTest.php +test/Model/PostSheepbeefRequestTest.php +test/Model/PostSheepbeefRequestVegetationInnerTest.php +test/Model/PostSugar200ResponseIntermediateInnerIntensitiesTest.php +test/Model/PostSugar200ResponseIntermediateInnerTest.php +test/Model/PostSugar200ResponseTest.php +test/Model/PostSugarRequestCropsInnerTest.php +test/Model/PostSugarRequestTest.php +test/Model/PostVineyard200ResponseIntermediateInnerIntensitiesTest.php +test/Model/PostVineyard200ResponseIntermediateInnerTest.php +test/Model/PostVineyard200ResponseNetTest.php +test/Model/PostVineyard200ResponseScope1Test.php +test/Model/PostVineyard200ResponseScope3Test.php +test/Model/PostVineyard200ResponseTest.php +test/Model/PostVineyardRequestTest.php +test/Model/PostVineyardRequestVegetationInnerTest.php +test/Model/PostVineyardRequestVineyardsInnerTest.php +test/Model/PostWildcatchfishery200ResponseIntensitiesTest.php +test/Model/PostWildcatchfishery200ResponseIntermediateInnerTest.php +test/Model/PostWildcatchfishery200ResponseScope1Test.php +test/Model/PostWildcatchfishery200ResponseTest.php +test/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInnerTest.php +test/Model/PostWildcatchfisheryRequestEnterprisesInnerTest.php +test/Model/PostWildcatchfisheryRequestTest.php +test/Model/PostWildseafisheries200ResponseIntermediateInnerIntensitiesTest.php +test/Model/PostWildseafisheries200ResponseIntermediateInnerTest.php +test/Model/PostWildseafisheries200ResponseScope1Test.php +test/Model/PostWildseafisheries200ResponseScope3Test.php +test/Model/PostWildseafisheries200ResponseTest.php +test/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInnerTest.php +test/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInnerTest.php +test/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInnerTest.php +test/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInnerTest.php +test/Model/PostWildseafisheriesRequestEnterprisesInnerTest.php +test/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInnerTest.php +test/Model/PostWildseafisheriesRequestTest.php diff --git a/examples/php-api-client/api-client/.openapi-generator/VERSION b/examples/php-api-client/api-client/.openapi-generator/VERSION new file mode 100644 index 00000000..971ecb25 --- /dev/null +++ b/examples/php-api-client/api-client/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.16.0 diff --git a/examples/php-api-client/api-client/.php-cs-fixer.dist.php b/examples/php-api-client/api-client/.php-cs-fixer.dist.php new file mode 100644 index 00000000..af9cf39f --- /dev/null +++ b/examples/php-api-client/api-client/.php-cs-fixer.dist.php @@ -0,0 +1,29 @@ +in(__DIR__) + ->exclude('vendor') + ->exclude('test') + ->exclude('tests') +; + +$config = new PhpCsFixer\Config(); +return $config->setRules([ + '@PSR12' => true, + 'phpdoc_order' => true, + 'array_syntax' => [ 'syntax' => 'short' ], + 'strict_comparison' => true, + 'strict_param' => true, + 'no_trailing_whitespace' => false, + 'no_trailing_whitespace_in_comment' => false, + 'braces' => false, + 'single_blank_line_at_eof' => false, + 'blank_line_after_namespace' => false, + 'no_leading_import_slash' => false, + ]) + ->setFinder($finder) +; diff --git a/examples/php-api-client/api-client/.travis.yml b/examples/php-api-client/api-client/.travis.yml new file mode 100644 index 00000000..667b8156 --- /dev/null +++ b/examples/php-api-client/api-client/.travis.yml @@ -0,0 +1,8 @@ +language: php +# Bionic environment has preinstalled PHP from 7.1 to 7.4 +# https://docs.travis-ci.com/user/reference/bionic/#php-support +dist: bionic +php: + - 7.4 +before_install: "composer install" +script: "vendor/bin/phpunit" diff --git a/examples/php-api-client/api-client/README.md b/examples/php-api-client/api-client/README.md new file mode 100644 index 00000000..9d9b32f2 --- /dev/null +++ b/examples/php-api-client/api-client/README.md @@ -0,0 +1,412 @@ +# OpenAPIClient-php + +Emissions Calculators for various farming activities + +For more information, please visit [https://aginnovationaustralia.com.au/contact-us/](https://aginnovationaustralia.com.au/contact-us/). + +## Installation & Usage + +### Requirements + +PHP 8.1 and later. + +### Composer + +To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`: + +```json +{ + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + } + ], + "require": { + "GIT_USER_ID/GIT_REPO_ID": "*@dev" + } +} +``` + +Then run `composer install` + +### Manual Installation + +Download the files and include `autoload.php`: + +```php +postAquaculture($post_aquaculture_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postAquaculture: ', $e->getMessage(), PHP_EOL; +} + +``` + +## API Endpoints + +All URIs are relative to *https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*GAFApi* | [**postAquaculture**](docs/Api/GAFApi.md#postaquaculture) | **POST** /aquaculture | Perform aquaculture calculation +*GAFApi* | [**postBeef**](docs/Api/GAFApi.md#postbeef) | **POST** /beef | Perform beef calculation +*GAFApi* | [**postBuffalo**](docs/Api/GAFApi.md#postbuffalo) | **POST** /buffalo | Perform buffalo calculation +*GAFApi* | [**postCotton**](docs/Api/GAFApi.md#postcotton) | **POST** /cotton | Perform cotton calculation +*GAFApi* | [**postDairy**](docs/Api/GAFApi.md#postdairy) | **POST** /dairy | Perform dairy calculation +*GAFApi* | [**postDeer**](docs/Api/GAFApi.md#postdeer) | **POST** /deer | Perform deer calculation +*GAFApi* | [**postFeedlot**](docs/Api/GAFApi.md#postfeedlot) | **POST** /feedlot | Perform feedlot calculation +*GAFApi* | [**postGoat**](docs/Api/GAFApi.md#postgoat) | **POST** /goat | Perform goat calculation +*GAFApi* | [**postGrains**](docs/Api/GAFApi.md#postgrains) | **POST** /grains | Perform grains calculation +*GAFApi* | [**postHorticulture**](docs/Api/GAFApi.md#posthorticulture) | **POST** /horticulture | Perform horticulture calculation +*GAFApi* | [**postPork**](docs/Api/GAFApi.md#postpork) | **POST** /pork | Perform pork calculation +*GAFApi* | [**postPoultry**](docs/Api/GAFApi.md#postpoultry) | **POST** /poultry | Perform poultry calculation +*GAFApi* | [**postProcessing**](docs/Api/GAFApi.md#postprocessing) | **POST** /processing | Perform processing calculation +*GAFApi* | [**postRice**](docs/Api/GAFApi.md#postrice) | **POST** /rice | Perform rice calculation +*GAFApi* | [**postSheep**](docs/Api/GAFApi.md#postsheep) | **POST** /sheep | Perform sheep calculation +*GAFApi* | [**postSheepbeef**](docs/Api/GAFApi.md#postsheepbeef) | **POST** /sheepbeef | Perform sheepbeef calculation +*GAFApi* | [**postSugar**](docs/Api/GAFApi.md#postsugar) | **POST** /sugar | Perform sugar calculation +*GAFApi* | [**postVineyard**](docs/Api/GAFApi.md#postvineyard) | **POST** /vineyard | Perform vineyard calculation +*GAFApi* | [**postWildcatchfishery**](docs/Api/GAFApi.md#postwildcatchfishery) | **POST** /wildcatchfishery | Perform wildcatchfishery calculation +*GAFApi* | [**postWildseafisheries**](docs/Api/GAFApi.md#postwildseafisheries) | **POST** /wildseafisheries | Perform wildseafisheries calculation + +## Models + +- [PostAquaculture200Response](docs/Model/PostAquaculture200Response.md) +- [PostAquaculture200ResponseCarbonSequestration](docs/Model/PostAquaculture200ResponseCarbonSequestration.md) +- [PostAquaculture200ResponseIntensities](docs/Model/PostAquaculture200ResponseIntensities.md) +- [PostAquaculture200ResponseIntermediateInner](docs/Model/PostAquaculture200ResponseIntermediateInner.md) +- [PostAquaculture200ResponseIntermediateInnerCarbonSequestration](docs/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) +- [PostAquaculture200ResponseNet](docs/Model/PostAquaculture200ResponseNet.md) +- [PostAquaculture200ResponsePurchasedOffsets](docs/Model/PostAquaculture200ResponsePurchasedOffsets.md) +- [PostAquaculture200ResponseScope1](docs/Model/PostAquaculture200ResponseScope1.md) +- [PostAquaculture200ResponseScope2](docs/Model/PostAquaculture200ResponseScope2.md) +- [PostAquaculture200ResponseScope3](docs/Model/PostAquaculture200ResponseScope3.md) +- [PostAquacultureRequest](docs/Model/PostAquacultureRequest.md) +- [PostAquacultureRequestEnterprisesInner](docs/Model/PostAquacultureRequestEnterprisesInner.md) +- [PostAquacultureRequestEnterprisesInnerBaitInner](docs/Model/PostAquacultureRequestEnterprisesInnerBaitInner.md) +- [PostAquacultureRequestEnterprisesInnerCustomBaitInner](docs/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md) +- [PostAquacultureRequestEnterprisesInnerFluidWasteInner](docs/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) +- [PostAquacultureRequestEnterprisesInnerFuel](docs/Model/PostAquacultureRequestEnterprisesInnerFuel.md) +- [PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner](docs/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md) +- [PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner](docs/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md) +- [PostAquacultureRequestEnterprisesInnerInboundFreightInner](docs/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) +- [PostAquacultureRequestEnterprisesInnerRefrigerantsInner](docs/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md) +- [PostAquacultureRequestEnterprisesInnerSolidWaste](docs/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.md) +- [PostBeef200Response](docs/Model/PostBeef200Response.md) +- [PostBeef200ResponseIntermediateInner](docs/Model/PostBeef200ResponseIntermediateInner.md) +- [PostBeef200ResponseIntermediateInnerIntensities](docs/Model/PostBeef200ResponseIntermediateInnerIntensities.md) +- [PostBeef200ResponseNet](docs/Model/PostBeef200ResponseNet.md) +- [PostBeef200ResponseScope1](docs/Model/PostBeef200ResponseScope1.md) +- [PostBeef200ResponseScope3](docs/Model/PostBeef200ResponseScope3.md) +- [PostBeefRequest](docs/Model/PostBeefRequest.md) +- [PostBeefRequestBeefInner](docs/Model/PostBeefRequestBeefInner.md) +- [PostBeefRequestBeefInnerClasses](docs/Model/PostBeefRequestBeefInnerClasses.md) +- [PostBeefRequestBeefInnerClassesBullsGt1](docs/Model/PostBeefRequestBeefInnerClassesBullsGt1.md) +- [PostBeefRequestBeefInnerClassesBullsGt1Autumn](docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) +- [PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner](docs/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) +- [PostBeefRequestBeefInnerClassesBullsGt1Traded](docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.md) +- [PostBeefRequestBeefInnerClassesCowsGt2](docs/Model/PostBeefRequestBeefInnerClassesCowsGt2.md) +- [PostBeefRequestBeefInnerClassesCowsGt2Traded](docs/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.md) +- [PostBeefRequestBeefInnerClassesHeifers1To2](docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2.md) +- [PostBeefRequestBeefInnerClassesHeifers1To2Traded](docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md) +- [PostBeefRequestBeefInnerClassesHeifersGt2](docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2.md) +- [PostBeefRequestBeefInnerClassesHeifersGt2Traded](docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md) +- [PostBeefRequestBeefInnerClassesHeifersLt1](docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1.md) +- [PostBeefRequestBeefInnerClassesHeifersLt1Traded](docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md) +- [PostBeefRequestBeefInnerClassesSteers1To2](docs/Model/PostBeefRequestBeefInnerClassesSteers1To2.md) +- [PostBeefRequestBeefInnerClassesSteers1To2Traded](docs/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.md) +- [PostBeefRequestBeefInnerClassesSteersGt2](docs/Model/PostBeefRequestBeefInnerClassesSteersGt2.md) +- [PostBeefRequestBeefInnerClassesSteersGt2Traded](docs/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.md) +- [PostBeefRequestBeefInnerClassesSteersLt1](docs/Model/PostBeefRequestBeefInnerClassesSteersLt1.md) +- [PostBeefRequestBeefInnerClassesSteersLt1Traded](docs/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.md) +- [PostBeefRequestBeefInnerCowsCalving](docs/Model/PostBeefRequestBeefInnerCowsCalving.md) +- [PostBeefRequestBeefInnerFertiliser](docs/Model/PostBeefRequestBeefInnerFertiliser.md) +- [PostBeefRequestBeefInnerFertiliserOtherFertilisersInner](docs/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md) +- [PostBeefRequestBeefInnerMineralSupplementation](docs/Model/PostBeefRequestBeefInnerMineralSupplementation.md) +- [PostBeefRequestBurningInner](docs/Model/PostBeefRequestBurningInner.md) +- [PostBeefRequestBurningInnerBurning](docs/Model/PostBeefRequestBurningInnerBurning.md) +- [PostBeefRequestVegetationInner](docs/Model/PostBeefRequestVegetationInner.md) +- [PostBeefRequestVegetationInnerVegetation](docs/Model/PostBeefRequestVegetationInnerVegetation.md) +- [PostBuffalo200Response](docs/Model/PostBuffalo200Response.md) +- [PostBuffalo200ResponseIntensities](docs/Model/PostBuffalo200ResponseIntensities.md) +- [PostBuffalo200ResponseIntermediateInner](docs/Model/PostBuffalo200ResponseIntermediateInner.md) +- [PostBuffalo200ResponseNet](docs/Model/PostBuffalo200ResponseNet.md) +- [PostBuffalo200ResponseScope1](docs/Model/PostBuffalo200ResponseScope1.md) +- [PostBuffalo200ResponseScope3](docs/Model/PostBuffalo200ResponseScope3.md) +- [PostBuffaloRequest](docs/Model/PostBuffaloRequest.md) +- [PostBuffaloRequestBuffalosInner](docs/Model/PostBuffaloRequestBuffalosInner.md) +- [PostBuffaloRequestBuffalosInnerClasses](docs/Model/PostBuffaloRequestBuffalosInnerClasses.md) +- [PostBuffaloRequestBuffalosInnerClassesBulls](docs/Model/PostBuffaloRequestBuffalosInnerClassesBulls.md) +- [PostBuffaloRequestBuffalosInnerClassesBullsAutumn](docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) +- [PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner](docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) +- [PostBuffaloRequestBuffalosInnerClassesCalfs](docs/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.md) +- [PostBuffaloRequestBuffalosInnerClassesCows](docs/Model/PostBuffaloRequestBuffalosInnerClassesCows.md) +- [PostBuffaloRequestBuffalosInnerClassesSteers](docs/Model/PostBuffaloRequestBuffalosInnerClassesSteers.md) +- [PostBuffaloRequestBuffalosInnerClassesTradeBulls](docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md) +- [PostBuffaloRequestBuffalosInnerClassesTradeCalfs](docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md) +- [PostBuffaloRequestBuffalosInnerClassesTradeCows](docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.md) +- [PostBuffaloRequestBuffalosInnerClassesTradeSteers](docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md) +- [PostBuffaloRequestBuffalosInnerCowsCalving](docs/Model/PostBuffaloRequestBuffalosInnerCowsCalving.md) +- [PostBuffaloRequestBuffalosInnerSeasonalCalving](docs/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.md) +- [PostBuffaloRequestVegetationInner](docs/Model/PostBuffaloRequestVegetationInner.md) +- [PostCotton200Response](docs/Model/PostCotton200Response.md) +- [PostCotton200ResponseIntermediateInner](docs/Model/PostCotton200ResponseIntermediateInner.md) +- [PostCotton200ResponseIntermediateInnerIntensities](docs/Model/PostCotton200ResponseIntermediateInnerIntensities.md) +- [PostCotton200ResponseNet](docs/Model/PostCotton200ResponseNet.md) +- [PostCotton200ResponseScope1](docs/Model/PostCotton200ResponseScope1.md) +- [PostCotton200ResponseScope3](docs/Model/PostCotton200ResponseScope3.md) +- [PostCottonRequest](docs/Model/PostCottonRequest.md) +- [PostCottonRequestCropsInner](docs/Model/PostCottonRequestCropsInner.md) +- [PostCottonRequestVegetationInner](docs/Model/PostCottonRequestVegetationInner.md) +- [PostDairy200Response](docs/Model/PostDairy200Response.md) +- [PostDairy200ResponseIntensities](docs/Model/PostDairy200ResponseIntensities.md) +- [PostDairy200ResponseIntermediateInner](docs/Model/PostDairy200ResponseIntermediateInner.md) +- [PostDairy200ResponseNet](docs/Model/PostDairy200ResponseNet.md) +- [PostDairy200ResponseScope1](docs/Model/PostDairy200ResponseScope1.md) +- [PostDairy200ResponseScope3](docs/Model/PostDairy200ResponseScope3.md) +- [PostDairyRequest](docs/Model/PostDairyRequest.md) +- [PostDairyRequestDairyInner](docs/Model/PostDairyRequestDairyInner.md) +- [PostDairyRequestDairyInnerAreas](docs/Model/PostDairyRequestDairyInnerAreas.md) +- [PostDairyRequestDairyInnerClasses](docs/Model/PostDairyRequestDairyInnerClasses.md) +- [PostDairyRequestDairyInnerClassesDairyBullsGt1](docs/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.md) +- [PostDairyRequestDairyInnerClassesDairyBullsLt1](docs/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.md) +- [PostDairyRequestDairyInnerClassesHeifersGt1](docs/Model/PostDairyRequestDairyInnerClassesHeifersGt1.md) +- [PostDairyRequestDairyInnerClassesHeifersLt1](docs/Model/PostDairyRequestDairyInnerClassesHeifersLt1.md) +- [PostDairyRequestDairyInnerClassesMilkingCows](docs/Model/PostDairyRequestDairyInnerClassesMilkingCows.md) +- [PostDairyRequestDairyInnerClassesMilkingCowsAutumn](docs/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) +- [PostDairyRequestDairyInnerManureManagementMilkingCows](docs/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.md) +- [PostDairyRequestDairyInnerSeasonalFertiliser](docs/Model/PostDairyRequestDairyInnerSeasonalFertiliser.md) +- [PostDairyRequestDairyInnerSeasonalFertiliserAutumn](docs/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) +- [PostDairyRequestVegetationInner](docs/Model/PostDairyRequestVegetationInner.md) +- [PostDeer200Response](docs/Model/PostDeer200Response.md) +- [PostDeer200ResponseIntensities](docs/Model/PostDeer200ResponseIntensities.md) +- [PostDeer200ResponseIntermediateInner](docs/Model/PostDeer200ResponseIntermediateInner.md) +- [PostDeer200ResponseNet](docs/Model/PostDeer200ResponseNet.md) +- [PostDeerRequest](docs/Model/PostDeerRequest.md) +- [PostDeerRequestDeersInner](docs/Model/PostDeerRequestDeersInner.md) +- [PostDeerRequestDeersInnerClasses](docs/Model/PostDeerRequestDeersInnerClasses.md) +- [PostDeerRequestDeersInnerClassesBreedingDoes](docs/Model/PostDeerRequestDeersInnerClassesBreedingDoes.md) +- [PostDeerRequestDeersInnerClassesBucks](docs/Model/PostDeerRequestDeersInnerClassesBucks.md) +- [PostDeerRequestDeersInnerClassesFawn](docs/Model/PostDeerRequestDeersInnerClassesFawn.md) +- [PostDeerRequestDeersInnerClassesOtherDoes](docs/Model/PostDeerRequestDeersInnerClassesOtherDoes.md) +- [PostDeerRequestDeersInnerClassesTradeBucks](docs/Model/PostDeerRequestDeersInnerClassesTradeBucks.md) +- [PostDeerRequestDeersInnerClassesTradeDoes](docs/Model/PostDeerRequestDeersInnerClassesTradeDoes.md) +- [PostDeerRequestDeersInnerClassesTradeFawn](docs/Model/PostDeerRequestDeersInnerClassesTradeFawn.md) +- [PostDeerRequestDeersInnerClassesTradeOtherDoes](docs/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.md) +- [PostDeerRequestDeersInnerDoesFawning](docs/Model/PostDeerRequestDeersInnerDoesFawning.md) +- [PostDeerRequestDeersInnerSeasonalFawning](docs/Model/PostDeerRequestDeersInnerSeasonalFawning.md) +- [PostDeerRequestVegetationInner](docs/Model/PostDeerRequestVegetationInner.md) +- [PostFeedlot200Response](docs/Model/PostFeedlot200Response.md) +- [PostFeedlot200ResponseIntermediateInner](docs/Model/PostFeedlot200ResponseIntermediateInner.md) +- [PostFeedlot200ResponseIntermediateInnerIntensities](docs/Model/PostFeedlot200ResponseIntermediateInnerIntensities.md) +- [PostFeedlot200ResponseIntermediateInnerNet](docs/Model/PostFeedlot200ResponseIntermediateInnerNet.md) +- [PostFeedlot200ResponseScope1](docs/Model/PostFeedlot200ResponseScope1.md) +- [PostFeedlot200ResponseScope3](docs/Model/PostFeedlot200ResponseScope3.md) +- [PostFeedlotRequest](docs/Model/PostFeedlotRequest.md) +- [PostFeedlotRequestFeedlotsInner](docs/Model/PostFeedlotRequestFeedlotsInner.md) +- [PostFeedlotRequestFeedlotsInnerGroupsInner](docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.md) +- [PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner](docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md) +- [PostFeedlotRequestFeedlotsInnerPurchases](docs/Model/PostFeedlotRequestFeedlotsInnerPurchases.md) +- [PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner](docs/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) +- [PostFeedlotRequestFeedlotsInnerSales](docs/Model/PostFeedlotRequestFeedlotsInnerSales.md) +- [PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner](docs/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) +- [PostFeedlotRequestVegetationInner](docs/Model/PostFeedlotRequestVegetationInner.md) +- [PostGoat200Response](docs/Model/PostGoat200Response.md) +- [PostGoat200ResponseIntensities](docs/Model/PostGoat200ResponseIntensities.md) +- [PostGoat200ResponseIntermediateInner](docs/Model/PostGoat200ResponseIntermediateInner.md) +- [PostGoat200ResponseNet](docs/Model/PostGoat200ResponseNet.md) +- [PostGoatRequest](docs/Model/PostGoatRequest.md) +- [PostGoatRequestGoatsInner](docs/Model/PostGoatRequestGoatsInner.md) +- [PostGoatRequestGoatsInnerClasses](docs/Model/PostGoatRequestGoatsInnerClasses.md) +- [PostGoatRequestGoatsInnerClassesBreedingDoesNannies](docs/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md) +- [PostGoatRequestGoatsInnerClassesBucksBilly](docs/Model/PostGoatRequestGoatsInnerClassesBucksBilly.md) +- [PostGoatRequestGoatsInnerClassesKids](docs/Model/PostGoatRequestGoatsInnerClassesKids.md) +- [PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies](docs/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md) +- [PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales](docs/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md) +- [PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies](docs/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md) +- [PostGoatRequestGoatsInnerClassesTradeBucks](docs/Model/PostGoatRequestGoatsInnerClassesTradeBucks.md) +- [PostGoatRequestGoatsInnerClassesTradeDoes](docs/Model/PostGoatRequestGoatsInnerClassesTradeDoes.md) +- [PostGoatRequestGoatsInnerClassesTradeKids](docs/Model/PostGoatRequestGoatsInnerClassesTradeKids.md) +- [PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies](docs/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md) +- [PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales](docs/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md) +- [PostGoatRequestGoatsInnerClassesTradeWethers](docs/Model/PostGoatRequestGoatsInnerClassesTradeWethers.md) +- [PostGoatRequestGoatsInnerClassesWethers](docs/Model/PostGoatRequestGoatsInnerClassesWethers.md) +- [PostGoatRequestVegetationInner](docs/Model/PostGoatRequestVegetationInner.md) +- [PostGrains200Response](docs/Model/PostGrains200Response.md) +- [PostGrains200ResponseIntermediateInner](docs/Model/PostGrains200ResponseIntermediateInner.md) +- [PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration](docs/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md) +- [PostGrainsRequest](docs/Model/PostGrainsRequest.md) +- [PostGrainsRequestCropsInner](docs/Model/PostGrainsRequestCropsInner.md) +- [PostHorticulture200Response](docs/Model/PostHorticulture200Response.md) +- [PostHorticulture200ResponseIntermediateInner](docs/Model/PostHorticulture200ResponseIntermediateInner.md) +- [PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration](docs/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md) +- [PostHorticulture200ResponseScope1](docs/Model/PostHorticulture200ResponseScope1.md) +- [PostHorticultureRequest](docs/Model/PostHorticultureRequest.md) +- [PostHorticultureRequestCropsInner](docs/Model/PostHorticultureRequestCropsInner.md) +- [PostHorticultureRequestCropsInnerRefrigerantsInner](docs/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.md) +- [PostPork200Response](docs/Model/PostPork200Response.md) +- [PostPork200ResponseIntensities](docs/Model/PostPork200ResponseIntensities.md) +- [PostPork200ResponseIntermediateInner](docs/Model/PostPork200ResponseIntermediateInner.md) +- [PostPork200ResponseNet](docs/Model/PostPork200ResponseNet.md) +- [PostPork200ResponseScope1](docs/Model/PostPork200ResponseScope1.md) +- [PostPork200ResponseScope3](docs/Model/PostPork200ResponseScope3.md) +- [PostPorkRequest](docs/Model/PostPorkRequest.md) +- [PostPorkRequestPorkInner](docs/Model/PostPorkRequestPorkInner.md) +- [PostPorkRequestPorkInnerClasses](docs/Model/PostPorkRequestPorkInnerClasses.md) +- [PostPorkRequestPorkInnerClassesBoars](docs/Model/PostPorkRequestPorkInnerClassesBoars.md) +- [PostPorkRequestPorkInnerClassesGilts](docs/Model/PostPorkRequestPorkInnerClassesGilts.md) +- [PostPorkRequestPorkInnerClassesGrowers](docs/Model/PostPorkRequestPorkInnerClassesGrowers.md) +- [PostPorkRequestPorkInnerClassesSlaughterPigs](docs/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.md) +- [PostPorkRequestPorkInnerClassesSows](docs/Model/PostPorkRequestPorkInnerClassesSows.md) +- [PostPorkRequestPorkInnerClassesSowsManure](docs/Model/PostPorkRequestPorkInnerClassesSowsManure.md) +- [PostPorkRequestPorkInnerClassesSowsManureSpring](docs/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.md) +- [PostPorkRequestPorkInnerClassesSuckers](docs/Model/PostPorkRequestPorkInnerClassesSuckers.md) +- [PostPorkRequestPorkInnerClassesWeaners](docs/Model/PostPorkRequestPorkInnerClassesWeaners.md) +- [PostPorkRequestPorkInnerFeedProductsInner](docs/Model/PostPorkRequestPorkInnerFeedProductsInner.md) +- [PostPorkRequestPorkInnerFeedProductsInnerIngredients](docs/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md) +- [PostPorkRequestVegetationInner](docs/Model/PostPorkRequestVegetationInner.md) +- [PostPoultry200Response](docs/Model/PostPoultry200Response.md) +- [PostPoultry200ResponseIntensities](docs/Model/PostPoultry200ResponseIntensities.md) +- [PostPoultry200ResponseIntermediateBroilersInner](docs/Model/PostPoultry200ResponseIntermediateBroilersInner.md) +- [PostPoultry200ResponseIntermediateBroilersInnerIntensities](docs/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md) +- [PostPoultry200ResponseIntermediateLayersInner](docs/Model/PostPoultry200ResponseIntermediateLayersInner.md) +- [PostPoultry200ResponseIntermediateLayersInnerIntensities](docs/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.md) +- [PostPoultry200ResponseNet](docs/Model/PostPoultry200ResponseNet.md) +- [PostPoultry200ResponseScope1](docs/Model/PostPoultry200ResponseScope1.md) +- [PostPoultry200ResponseScope3](docs/Model/PostPoultry200ResponseScope3.md) +- [PostPoultryRequest](docs/Model/PostPoultryRequest.md) +- [PostPoultryRequestBroilersInner](docs/Model/PostPoultryRequestBroilersInner.md) +- [PostPoultryRequestBroilersInnerGroupsInner](docs/Model/PostPoultryRequestBroilersInnerGroupsInner.md) +- [PostPoultryRequestBroilersInnerGroupsInnerFeedInner](docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md) +- [PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients](docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md) +- [PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers](docs/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md) +- [PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases](docs/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md) +- [PostPoultryRequestBroilersInnerMeatChickenLayersPurchases](docs/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md) +- [PostPoultryRequestBroilersInnerMeatOtherPurchases](docs/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.md) +- [PostPoultryRequestBroilersInnerSalesInner](docs/Model/PostPoultryRequestBroilersInnerSalesInner.md) +- [PostPoultryRequestLayersInner](docs/Model/PostPoultryRequestLayersInner.md) +- [PostPoultryRequestLayersInnerLayers](docs/Model/PostPoultryRequestLayersInnerLayers.md) +- [PostPoultryRequestLayersInnerLayersEggSale](docs/Model/PostPoultryRequestLayersInnerLayersEggSale.md) +- [PostPoultryRequestLayersInnerLayersPurchases](docs/Model/PostPoultryRequestLayersInnerLayersPurchases.md) +- [PostPoultryRequestLayersInnerMeatChickenLayers](docs/Model/PostPoultryRequestLayersInnerMeatChickenLayers.md) +- [PostPoultryRequestLayersInnerMeatChickenLayersEggSale](docs/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md) +- [PostPoultryRequestVegetationInner](docs/Model/PostPoultryRequestVegetationInner.md) +- [PostProcessing200Response](docs/Model/PostProcessing200Response.md) +- [PostProcessing200ResponseIntensitiesInner](docs/Model/PostProcessing200ResponseIntensitiesInner.md) +- [PostProcessing200ResponseIntermediateInner](docs/Model/PostProcessing200ResponseIntermediateInner.md) +- [PostProcessing200ResponseNet](docs/Model/PostProcessing200ResponseNet.md) +- [PostProcessing200ResponseScope1](docs/Model/PostProcessing200ResponseScope1.md) +- [PostProcessing200ResponseScope3](docs/Model/PostProcessing200ResponseScope3.md) +- [PostProcessingRequest](docs/Model/PostProcessingRequest.md) +- [PostProcessingRequestProductsInner](docs/Model/PostProcessingRequestProductsInner.md) +- [PostProcessingRequestProductsInnerProduct](docs/Model/PostProcessingRequestProductsInnerProduct.md) +- [PostRice200Response](docs/Model/PostRice200Response.md) +- [PostRice200ResponseIntensities](docs/Model/PostRice200ResponseIntensities.md) +- [PostRice200ResponseIntermediateInner](docs/Model/PostRice200ResponseIntermediateInner.md) +- [PostRice200ResponseIntermediateInnerIntensities](docs/Model/PostRice200ResponseIntermediateInnerIntensities.md) +- [PostRice200ResponseScope1](docs/Model/PostRice200ResponseScope1.md) +- [PostRiceRequest](docs/Model/PostRiceRequest.md) +- [PostRiceRequestCropsInner](docs/Model/PostRiceRequestCropsInner.md) +- [PostSheep200Response](docs/Model/PostSheep200Response.md) +- [PostSheep200ResponseIntermediateInner](docs/Model/PostSheep200ResponseIntermediateInner.md) +- [PostSheep200ResponseIntermediateInnerIntensities](docs/Model/PostSheep200ResponseIntermediateInnerIntensities.md) +- [PostSheep200ResponseNet](docs/Model/PostSheep200ResponseNet.md) +- [PostSheepRequest](docs/Model/PostSheepRequest.md) +- [PostSheepRequestSheepInner](docs/Model/PostSheepRequestSheepInner.md) +- [PostSheepRequestSheepInnerClasses](docs/Model/PostSheepRequestSheepInnerClasses.md) +- [PostSheepRequestSheepInnerClassesRams](docs/Model/PostSheepRequestSheepInnerClassesRams.md) +- [PostSheepRequestSheepInnerClassesRamsAutumn](docs/Model/PostSheepRequestSheepInnerClassesRamsAutumn.md) +- [PostSheepRequestSheepInnerClassesTradeEwes](docs/Model/PostSheepRequestSheepInnerClassesTradeEwes.md) +- [PostSheepRequestSheepInnerClassesTradeLambsAndHoggets](docs/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md) +- [PostSheepRequestSheepInnerEwesLambing](docs/Model/PostSheepRequestSheepInnerEwesLambing.md) +- [PostSheepRequestSheepInnerSeasonalLambing](docs/Model/PostSheepRequestSheepInnerSeasonalLambing.md) +- [PostSheepRequestVegetationInner](docs/Model/PostSheepRequestVegetationInner.md) +- [PostSheepbeef200Response](docs/Model/PostSheepbeef200Response.md) +- [PostSheepbeef200ResponseIntensities](docs/Model/PostSheepbeef200ResponseIntensities.md) +- [PostSheepbeef200ResponseIntermediate](docs/Model/PostSheepbeef200ResponseIntermediate.md) +- [PostSheepbeef200ResponseIntermediateBeef](docs/Model/PostSheepbeef200ResponseIntermediateBeef.md) +- [PostSheepbeef200ResponseIntermediateSheep](docs/Model/PostSheepbeef200ResponseIntermediateSheep.md) +- [PostSheepbeef200ResponseNet](docs/Model/PostSheepbeef200ResponseNet.md) +- [PostSheepbeefRequest](docs/Model/PostSheepbeefRequest.md) +- [PostSheepbeefRequestVegetationInner](docs/Model/PostSheepbeefRequestVegetationInner.md) +- [PostSugar200Response](docs/Model/PostSugar200Response.md) +- [PostSugar200ResponseIntermediateInner](docs/Model/PostSugar200ResponseIntermediateInner.md) +- [PostSugar200ResponseIntermediateInnerIntensities](docs/Model/PostSugar200ResponseIntermediateInnerIntensities.md) +- [PostSugarRequest](docs/Model/PostSugarRequest.md) +- [PostSugarRequestCropsInner](docs/Model/PostSugarRequestCropsInner.md) +- [PostVineyard200Response](docs/Model/PostVineyard200Response.md) +- [PostVineyard200ResponseIntermediateInner](docs/Model/PostVineyard200ResponseIntermediateInner.md) +- [PostVineyard200ResponseIntermediateInnerIntensities](docs/Model/PostVineyard200ResponseIntermediateInnerIntensities.md) +- [PostVineyard200ResponseNet](docs/Model/PostVineyard200ResponseNet.md) +- [PostVineyard200ResponseScope1](docs/Model/PostVineyard200ResponseScope1.md) +- [PostVineyard200ResponseScope3](docs/Model/PostVineyard200ResponseScope3.md) +- [PostVineyardRequest](docs/Model/PostVineyardRequest.md) +- [PostVineyardRequestVegetationInner](docs/Model/PostVineyardRequestVegetationInner.md) +- [PostVineyardRequestVineyardsInner](docs/Model/PostVineyardRequestVineyardsInner.md) +- [PostWildcatchfishery200Response](docs/Model/PostWildcatchfishery200Response.md) +- [PostWildcatchfishery200ResponseIntensities](docs/Model/PostWildcatchfishery200ResponseIntensities.md) +- [PostWildcatchfishery200ResponseIntermediateInner](docs/Model/PostWildcatchfishery200ResponseIntermediateInner.md) +- [PostWildcatchfishery200ResponseScope1](docs/Model/PostWildcatchfishery200ResponseScope1.md) +- [PostWildcatchfisheryRequest](docs/Model/PostWildcatchfisheryRequest.md) +- [PostWildcatchfisheryRequestEnterprisesInner](docs/Model/PostWildcatchfisheryRequestEnterprisesInner.md) +- [PostWildcatchfisheryRequestEnterprisesInnerBaitInner](docs/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md) +- [PostWildseafisheries200Response](docs/Model/PostWildseafisheries200Response.md) +- [PostWildseafisheries200ResponseIntermediateInner](docs/Model/PostWildseafisheries200ResponseIntermediateInner.md) +- [PostWildseafisheries200ResponseIntermediateInnerIntensities](docs/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.md) +- [PostWildseafisheries200ResponseScope1](docs/Model/PostWildseafisheries200ResponseScope1.md) +- [PostWildseafisheries200ResponseScope3](docs/Model/PostWildseafisheries200ResponseScope3.md) +- [PostWildseafisheriesRequest](docs/Model/PostWildseafisheriesRequest.md) +- [PostWildseafisheriesRequestEnterprisesInner](docs/Model/PostWildseafisheriesRequestEnterprisesInner.md) +- [PostWildseafisheriesRequestEnterprisesInnerBaitInner](docs/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md) +- [PostWildseafisheriesRequestEnterprisesInnerCustombaitInner](docs/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md) +- [PostWildseafisheriesRequestEnterprisesInnerFlightsInner](docs/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md) +- [PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner](docs/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md) +- [PostWildseafisheriesRequestEnterprisesInnerTransportsInner](docs/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md) + +## Authorization +Endpoints do not require authorization. + +## Tests + +To run the tests, use: + +```bash +composer install +vendor/bin/phpunit +``` + +## Author + +contact@aginnovationaustralia.com.au + +## About this package + +This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: `3.0.0` + - Generator version: `7.16.0` +- Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/examples/php-api-client/api-client/composer.json b/examples/php-api-client/api-client/composer.json new file mode 100644 index 00000000..afc9ecd4 --- /dev/null +++ b/examples/php-api-client/api-client/composer.json @@ -0,0 +1,38 @@ +{ + "description": "Emissions Calculators for various farming activities", + "keywords": [ + "openapitools", + "openapi-generator", + "openapi", + "php", + "sdk", + "rest", + "api" + ], + "homepage": "https://openapi-generator.tech", + "license": "unlicense", + "authors": [ + { + "name": "OpenAPI", + "homepage": "https://openapi-generator.tech" + } + ], + "require": { + "php": "^8.1", + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/guzzle": "^7.3", + "guzzlehttp/psr7": "^1.7 || ^2.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.0 || ^9.0", + "friendsofphp/php-cs-fixer": "^3.5" + }, + "autoload": { + "psr-4": { "OpenAPI\\Client\\" : "lib/" } + }, + "autoload-dev": { + "psr-4": { "OpenAPI\\Client\\Test\\" : "test/" } + } +} diff --git a/examples/php-api-client/api-client/composer.lock b/examples/php-api-client/api-client/composer.lock new file mode 100644 index 00000000..df2fce19 --- /dev/null +++ b/examples/php-api-client/api-client/composer.lock @@ -0,0 +1,4940 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "3d156d10b574f52a2dfd9a5ced1e76a6", + "packages": [ + { + "name": "guzzlehttp/guzzle", + "version": "7.10.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4", + "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^2.3", + "guzzlehttp/psr7": "^2.8", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.10.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2025-08-23T22:36:01+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "481557b130ef3790cf82b713667b43030dc9c957" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957", + "reference": "481557b130ef3790cf82b713667b43030dc9c957", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.44 || ^9.6.25" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.3.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2025-08-22T14:34:08+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.8.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "21dc724a0583619cd1652f673303492272778051" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051", + "reference": "21dc724a0583619cd1652f673303492272778051", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.44 || ^9.6.25" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.8.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2025-08-23T21:21:41+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:21:43+00:00" + } + ], + "packages-dev": [ + { + "name": "clue/ndjson-react", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/clue/reactphp-ndjson.git", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "react/event-loop": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\NDJson\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + } + ], + "description": "Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.", + "homepage": "https://github.com/clue/reactphp-ndjson", + "keywords": [ + "NDJSON", + "json", + "jsonlines", + "newline", + "reactphp", + "streaming" + ], + "support": { + "issues": "https://github.com/clue/reactphp-ndjson/issues", + "source": "https://github.com/clue/reactphp-ndjson/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-12-23T10:58:28+00:00" + }, + { + "name": "composer/pcre", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<1.11.10" + }, + "require-dev": { + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", + "phpunit/phpunit": "^8 || ^9" + }, + "type": "library", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + }, + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-11-12T16:29:46+00:00" + }, + { + "name": "composer/semver", + "version": "3.4.4", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95", + "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.4" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + } + ], + "time": "2025-08-20T19:15:30+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-05-06T16:37:16+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:23:10+00:00" + }, + { + "name": "evenement/evenement", + "version": "v3.0.2", + "source": { + "type": "git", + "url": "https://github.com/igorw/evenement.git", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^9 || ^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Evenement\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + } + ], + "description": "Événement is a very simple event dispatching library for PHP", + "keywords": [ + "event-dispatcher", + "event-emitter" + ], + "support": { + "issues": "https://github.com/igorw/evenement/issues", + "source": "https://github.com/igorw/evenement/tree/v3.0.2" + }, + "time": "2023-08-08T05:53:35+00:00" + }, + { + "name": "fidry/cpu-core-counter", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "db9508f7b1474469d9d3c53b86f817e344732678" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/db9508f7b1474469d9d3c53b86f817e344732678", + "reference": "db9508f7b1474469d9d3c53b86f817e344732678", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-deprecation-rules": "^2.0.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", + "webmozarts/strict-phpunit": "^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Fidry\\CpuCoreCounter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" + } + ], + "description": "Tiny utility to get the number of CPU cores.", + "keywords": [ + "CPU", + "core" + ], + "support": { + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.3.0" + }, + "funding": [ + { + "url": "https://github.com/theofidry", + "type": "github" + } + ], + "time": "2025-08-14T07:29:31+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v3.89.1", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "f34967da2866ace090a2b447de1f357356474573" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/f34967da2866ace090a2b447de1f357356474573", + "reference": "f34967da2866ace090a2b447de1f357356474573", + "shasum": "" + }, + "require": { + "clue/ndjson-react": "^1.3", + "composer/semver": "^3.4", + "composer/xdebug-handler": "^3.0.5", + "ext-filter": "*", + "ext-hash": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "fidry/cpu-core-counter": "^1.3", + "php": "^7.4 || ^8.0", + "react/child-process": "^0.6.6", + "react/event-loop": "^1.5", + "react/socket": "^1.16", + "react/stream": "^1.4", + "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0", + "symfony/console": "^5.4.47 || ^6.4.24 || ^7.0", + "symfony/event-dispatcher": "^5.4.45 || ^6.4.24 || ^7.0", + "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0", + "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.0", + "symfony/options-resolver": "^5.4.45 || ^6.4.24 || ^7.0", + "symfony/polyfill-mbstring": "^1.33", + "symfony/polyfill-php80": "^1.33", + "symfony/polyfill-php81": "^1.33", + "symfony/polyfill-php84": "^1.33", + "symfony/process": "^5.4.47 || ^6.4.24 || ^7.2", + "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0" + }, + "require-dev": { + "facile-it/paraunit": "^1.3.1 || ^2.7", + "infection/infection": "^0.31.0", + "justinrainbow/json-schema": "^6.5", + "keradus/cli-executor": "^2.2", + "mikey179/vfsstream": "^1.6.12", + "php-coveralls/php-coveralls": "^2.8", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", + "phpunit/phpunit": "^9.6.25 || ^10.5.53 || ^11.5.34", + "symfony/var-dumper": "^5.4.48 || ^6.4.24 || ^7.3.2", + "symfony/yaml": "^5.4.45 || ^6.4.24 || ^7.3.2" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + }, + "exclude-from-classmap": [ + "src/Fixer/Internal/*" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.89.1" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2025-10-24T12:05:10+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.13.4", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2025-08-01T08:46:24+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.6.2", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "3a454ca033b9e06b63282ce19562e892747449bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb", + "reference": "3a454ca033b9e06b63282ce19562e892747449bb", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.2" + }, + "time": "2025-10-21T19:32:17+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.32", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.19.1 || ^5.1.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.6" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "9.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-08-22T04:23:01+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.6.29", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9ecfec57835a5581bc888ea7e13b51eb55ab9dd3", + "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.5.0 || ^2", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.13.4", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.32", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", + "sebastian/comparator": "^4.0.9", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.8", + "sebastian/global-state": "^5.0.8", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.6-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.29" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2025-09-24T06:29:11+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.2" + }, + "time": "2024-09-11T13:17:53+00:00" + }, + { + "name": "react/cache", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/cache.git", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/promise": "^3.0 || ^2.0 || ^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async, Promise-based cache interface for ReactPHP", + "keywords": [ + "cache", + "caching", + "promise", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/cache/issues", + "source": "https://github.com/reactphp/cache/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2022-11-30T15:59:55+00:00" + }, + { + "name": "react/child-process", + "version": "v0.6.6", + "source": { + "type": "git", + "url": "https://github.com/reactphp/child-process.git", + "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/1721e2b93d89b745664353b9cfc8f155ba8a6159", + "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/event-loop": "^1.2", + "react/stream": "^1.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/socket": "^1.16", + "sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\ChildProcess\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Event-driven library for executing child processes with ReactPHP.", + "keywords": [ + "event-driven", + "process", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/child-process/issues", + "source": "https://github.com/reactphp/child-process/tree/v0.6.6" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2025-01-01T16:37:48+00:00" + }, + { + "name": "react/dns", + "version": "v1.13.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/dns.git", + "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/dns/zipball/eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", + "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/cache": "^1.0 || ^0.6 || ^0.5", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.7 || ^1.2.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4.3 || ^3 || ^2", + "react/promise-timer": "^1.11" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Dns\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async DNS resolver for ReactPHP", + "keywords": [ + "async", + "dns", + "dns-resolver", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/dns/issues", + "source": "https://github.com/reactphp/dns/tree/v1.13.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-06-13T14:18:03+00:00" + }, + { + "name": "react/event-loop", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/event-loop.git", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "suggest": { + "ext-pcntl": "For signal handling support when using the StreamSelectLoop" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\EventLoop\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", + "keywords": [ + "asynchronous", + "event-loop" + ], + "support": { + "issues": "https://github.com/reactphp/event-loop/issues", + "source": "https://github.com/reactphp/event-loop/tree/v1.5.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-11-13T13:48:05+00:00" + }, + { + "name": "react/promise", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "23444f53a813a3296c1368bb104793ce8d88f04a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/23444f53a813a3296c1368bb104793ce8d88f04a", + "reference": "23444f53a813a3296c1368bb104793ce8d88f04a", + "shasum": "" + }, + "require": { + "php": ">=7.1.0" + }, + "require-dev": { + "phpstan/phpstan": "1.12.28 || 1.4.10", + "phpunit/phpunit": "^9.6 || ^7.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "React\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "keywords": [ + "promise", + "promises" + ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v3.3.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2025-08-19T18:57:03+00:00" + }, + { + "name": "react/socket", + "version": "v1.16.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/socket.git", + "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", + "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/dns": "^1.13", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.6 || ^1.2.1", + "react/stream": "^1.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4.3 || ^3.3 || ^2", + "react/promise-stream": "^1.4", + "react/promise-timer": "^1.11" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Socket\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", + "keywords": [ + "Connection", + "Socket", + "async", + "reactphp", + "stream" + ], + "support": { + "issues": "https://github.com/reactphp/socket/issues", + "source": "https://github.com/reactphp/socket/tree/v1.16.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-07-26T10:38:09+00:00" + }, + { + "name": "react/stream", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/stream.git", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18d", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.8", + "react/event-loop": "^1.2" + }, + "require-dev": { + "clue/stream-filter": "~1.2", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Stream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", + "keywords": [ + "event-driven", + "io", + "non-blocking", + "pipe", + "reactphp", + "readable", + "stream", + "writable" + ], + "support": { + "issues": "https://github.com/reactphp/stream/issues", + "source": "https://github.com/reactphp/stream/tree/v1.4.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-06-11T12:45:25+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:27:43+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "67a2df3a62639eab2cc5906065e9805d4fd5dfc5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/67a2df3a62639eab2cc5906065e9805d4fd5dfc5", + "reference": "67a2df3a62639eab2cc5906065e9805d4fd5dfc5", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.9" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", + "type": "tidelift" + } + ], + "time": "2025-08-10T06:51:50+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:19:30+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:30:58+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/14c6ba52f95a36c3d27c835d65efc7123c446e8c", + "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" + } + ], + "time": "2025-09-24T06:03:27+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/b6781316bdcd28260904e7cc18ec983d0d2ef4f6", + "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/global-state", + "type": "tidelift" + } + ], + "time": "2025-08-10T07:10:35+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:20:34+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "539c6691e0623af6dc6f9c20384c120f963465a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/539c6691e0623af6dc6f9c20384c120f963465a0", + "reference": "539c6691e0623af6dc6f9c20384c120f963465a0", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", + "type": "tidelift" + } + ], + "time": "2025-08-10T06:57:39+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-14T16:00:52+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:13:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "symfony/console", + "version": "v7.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "2b9c5fafbac0399a20a2e82429e2bd735dcfb7db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/2b9c5fafbac0399a20a2e82429e2bd735dcfb7db", + "reference": "2b9c5fafbac0399a20a2e82429e2bd735dcfb7db", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^7.2" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v7.3.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-09-22T15:31:00+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v7.3.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b7dc69e71de420ac04bc9ab830cf3ffebba48191", + "reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/event-dispatcher-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v7.3.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-08-13T11:49:31+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "59eb412e93815df44f05f342958efa9f46b1e586" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586", + "reference": "59eb412e93815df44f05f342958efa9f46b1e586", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:21:43+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v7.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v7.3.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-07-07T08:17:47+00:00" + }, + { + "name": "symfony/finder", + "version": "v7.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "symfony/filesystem": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v7.3.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-07-15T13:41:35+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v7.3.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/0ff2f5c3df08a395232bbc3c2eb7e84912df911d", + "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v7.3.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-08-05T10:16:07+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-06-27T09:58:17+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "3833d7255cc303546435cb650316bff708a1c75c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-12-23T08:48:59+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-01-02T08:10:11+00:00" + }, + { + "name": "symfony/polyfill-php81", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-php84", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php84.git", + "reference": "d8ced4d875142b6a7426000426b8abc631d6b191" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/d8ced4d875142b6a7426000426b8abc631d6b191", + "reference": "d8ced4d875142b6a7426000426b8abc631d6b191", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php84\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.4+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php84/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-06-24T13:30:11+00:00" + }, + { + "name": "symfony/process", + "version": "v7.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/f24f8f316367b30810810d4eb30c543d7003ff3b", + "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v7.3.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-09-11T10:12:26+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-04-25T09:37:31+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v7.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd", + "reference": "5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/service-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v7.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-02-24T10:49:57+00:00" + }, + { + "name": "symfony/string", + "version": "v7.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "f96476035142921000338bad71e5247fbc138872" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/f96476035142921000338bad71e5247fbc138872", + "reference": "f96476035142921000338bad71e5247fbc138872", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/emoji": "^7.1", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v7.3.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-09-11T14:36:48+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:36:25+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "^8.1", + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*" + }, + "platform-dev": {}, + "plugin-api-version": "2.6.0" +} diff --git a/examples/php-api-client/api-client/docs/Api/GAFApi.md b/examples/php-api-client/api-client/docs/Api/GAFApi.md new file mode 100644 index 00000000..9e3d94fb --- /dev/null +++ b/examples/php-api-client/api-client/docs/Api/GAFApi.md @@ -0,0 +1,1147 @@ +# OpenAPI\Client\GAFApi + +All URIs are relative to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**postAquaculture()**](GAFApi.md#postAquaculture) | **POST** /aquaculture | Perform aquaculture calculation | +| [**postBeef()**](GAFApi.md#postBeef) | **POST** /beef | Perform beef calculation | +| [**postBuffalo()**](GAFApi.md#postBuffalo) | **POST** /buffalo | Perform buffalo calculation | +| [**postCotton()**](GAFApi.md#postCotton) | **POST** /cotton | Perform cotton calculation | +| [**postDairy()**](GAFApi.md#postDairy) | **POST** /dairy | Perform dairy calculation | +| [**postDeer()**](GAFApi.md#postDeer) | **POST** /deer | Perform deer calculation | +| [**postFeedlot()**](GAFApi.md#postFeedlot) | **POST** /feedlot | Perform feedlot calculation | +| [**postGoat()**](GAFApi.md#postGoat) | **POST** /goat | Perform goat calculation | +| [**postGrains()**](GAFApi.md#postGrains) | **POST** /grains | Perform grains calculation | +| [**postHorticulture()**](GAFApi.md#postHorticulture) | **POST** /horticulture | Perform horticulture calculation | +| [**postPork()**](GAFApi.md#postPork) | **POST** /pork | Perform pork calculation | +| [**postPoultry()**](GAFApi.md#postPoultry) | **POST** /poultry | Perform poultry calculation | +| [**postProcessing()**](GAFApi.md#postProcessing) | **POST** /processing | Perform processing calculation | +| [**postRice()**](GAFApi.md#postRice) | **POST** /rice | Perform rice calculation | +| [**postSheep()**](GAFApi.md#postSheep) | **POST** /sheep | Perform sheep calculation | +| [**postSheepbeef()**](GAFApi.md#postSheepbeef) | **POST** /sheepbeef | Perform sheepbeef calculation | +| [**postSugar()**](GAFApi.md#postSugar) | **POST** /sugar | Perform sugar calculation | +| [**postVineyard()**](GAFApi.md#postVineyard) | **POST** /vineyard | Perform vineyard calculation | +| [**postWildcatchfishery()**](GAFApi.md#postWildcatchfishery) | **POST** /wildcatchfishery | Perform wildcatchfishery calculation | +| [**postWildseafisheries()**](GAFApi.md#postWildseafisheries) | **POST** /wildseafisheries | Perform wildseafisheries calculation | + + +## `postAquaculture()` + +```php +postAquaculture($post_aquaculture_request): \OpenAPI\Client\Model\PostAquaculture200Response +``` + +Perform aquaculture calculation + +Retrieve a simple JSON response + +### Example + +```php +postAquaculture($post_aquaculture_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postAquaculture: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_aquaculture_request** | [**\OpenAPI\Client\Model\PostAquacultureRequest**](../Model/PostAquacultureRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostAquaculture200Response**](../Model/PostAquaculture200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postBeef()` + +```php +postBeef($post_beef_request): \OpenAPI\Client\Model\PostBeef200Response +``` + +Perform beef calculation + +Retrieve a simple JSON response + +### Example + +```php +postBeef($post_beef_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postBeef: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_beef_request** | [**\OpenAPI\Client\Model\PostBeefRequest**](../Model/PostBeefRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostBeef200Response**](../Model/PostBeef200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postBuffalo()` + +```php +postBuffalo($post_buffalo_request): \OpenAPI\Client\Model\PostBuffalo200Response +``` + +Perform buffalo calculation + +Retrieve a simple JSON response + +### Example + +```php +postBuffalo($post_buffalo_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postBuffalo: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_buffalo_request** | [**\OpenAPI\Client\Model\PostBuffaloRequest**](../Model/PostBuffaloRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostBuffalo200Response**](../Model/PostBuffalo200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postCotton()` + +```php +postCotton($post_cotton_request): \OpenAPI\Client\Model\PostCotton200Response +``` + +Perform cotton calculation + +Retrieve a simple JSON response + +### Example + +```php +postCotton($post_cotton_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postCotton: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_cotton_request** | [**\OpenAPI\Client\Model\PostCottonRequest**](../Model/PostCottonRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostCotton200Response**](../Model/PostCotton200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postDairy()` + +```php +postDairy($post_dairy_request): \OpenAPI\Client\Model\PostDairy200Response +``` + +Perform dairy calculation + +Retrieve a simple JSON response + +### Example + +```php +postDairy($post_dairy_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postDairy: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_dairy_request** | [**\OpenAPI\Client\Model\PostDairyRequest**](../Model/PostDairyRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostDairy200Response**](../Model/PostDairy200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postDeer()` + +```php +postDeer($post_deer_request): \OpenAPI\Client\Model\PostDeer200Response +``` + +Perform deer calculation + +Retrieve a simple JSON response + +### Example + +```php +postDeer($post_deer_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postDeer: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_deer_request** | [**\OpenAPI\Client\Model\PostDeerRequest**](../Model/PostDeerRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostDeer200Response**](../Model/PostDeer200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postFeedlot()` + +```php +postFeedlot($post_feedlot_request): \OpenAPI\Client\Model\PostFeedlot200Response +``` + +Perform feedlot calculation + +Retrieve a simple JSON response + +### Example + +```php +postFeedlot($post_feedlot_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postFeedlot: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_feedlot_request** | [**\OpenAPI\Client\Model\PostFeedlotRequest**](../Model/PostFeedlotRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostFeedlot200Response**](../Model/PostFeedlot200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postGoat()` + +```php +postGoat($post_goat_request): \OpenAPI\Client\Model\PostGoat200Response +``` + +Perform goat calculation + +Retrieve a simple JSON response + +### Example + +```php +postGoat($post_goat_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postGoat: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_goat_request** | [**\OpenAPI\Client\Model\PostGoatRequest**](../Model/PostGoatRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostGoat200Response**](../Model/PostGoat200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postGrains()` + +```php +postGrains($post_grains_request): \OpenAPI\Client\Model\PostGrains200Response +``` + +Perform grains calculation + +Retrieve a simple JSON response + +### Example + +```php +postGrains($post_grains_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postGrains: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_grains_request** | [**\OpenAPI\Client\Model\PostGrainsRequest**](../Model/PostGrainsRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostGrains200Response**](../Model/PostGrains200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postHorticulture()` + +```php +postHorticulture($post_horticulture_request): \OpenAPI\Client\Model\PostHorticulture200Response +``` + +Perform horticulture calculation + +Retrieve a simple JSON response + +### Example + +```php +postHorticulture($post_horticulture_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postHorticulture: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_horticulture_request** | [**\OpenAPI\Client\Model\PostHorticultureRequest**](../Model/PostHorticultureRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostHorticulture200Response**](../Model/PostHorticulture200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postPork()` + +```php +postPork($post_pork_request): \OpenAPI\Client\Model\PostPork200Response +``` + +Perform pork calculation + +Retrieve a simple JSON response + +### Example + +```php +postPork($post_pork_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postPork: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_pork_request** | [**\OpenAPI\Client\Model\PostPorkRequest**](../Model/PostPorkRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostPork200Response**](../Model/PostPork200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postPoultry()` + +```php +postPoultry($post_poultry_request): \OpenAPI\Client\Model\PostPoultry200Response +``` + +Perform poultry calculation + +Retrieve a simple JSON response + +### Example + +```php +postPoultry($post_poultry_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postPoultry: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_poultry_request** | [**\OpenAPI\Client\Model\PostPoultryRequest**](../Model/PostPoultryRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostPoultry200Response**](../Model/PostPoultry200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postProcessing()` + +```php +postProcessing($post_processing_request): \OpenAPI\Client\Model\PostProcessing200Response +``` + +Perform processing calculation + +Retrieve a simple JSON response + +### Example + +```php +postProcessing($post_processing_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postProcessing: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_processing_request** | [**\OpenAPI\Client\Model\PostProcessingRequest**](../Model/PostProcessingRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostProcessing200Response**](../Model/PostProcessing200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postRice()` + +```php +postRice($post_rice_request): \OpenAPI\Client\Model\PostRice200Response +``` + +Perform rice calculation + +Retrieve a simple JSON response + +### Example + +```php +postRice($post_rice_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postRice: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_rice_request** | [**\OpenAPI\Client\Model\PostRiceRequest**](../Model/PostRiceRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostRice200Response**](../Model/PostRice200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postSheep()` + +```php +postSheep($post_sheep_request): \OpenAPI\Client\Model\PostSheep200Response +``` + +Perform sheep calculation + +Retrieve a simple JSON response + +### Example + +```php +postSheep($post_sheep_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postSheep: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_sheep_request** | [**\OpenAPI\Client\Model\PostSheepRequest**](../Model/PostSheepRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostSheep200Response**](../Model/PostSheep200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postSheepbeef()` + +```php +postSheepbeef($post_sheepbeef_request): \OpenAPI\Client\Model\PostSheepbeef200Response +``` + +Perform sheepbeef calculation + +Retrieve a simple JSON response + +### Example + +```php +postSheepbeef($post_sheepbeef_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postSheepbeef: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_sheepbeef_request** | [**\OpenAPI\Client\Model\PostSheepbeefRequest**](../Model/PostSheepbeefRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostSheepbeef200Response**](../Model/PostSheepbeef200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postSugar()` + +```php +postSugar($post_sugar_request): \OpenAPI\Client\Model\PostSugar200Response +``` + +Perform sugar calculation + +Retrieve a simple JSON response + +### Example + +```php +postSugar($post_sugar_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postSugar: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_sugar_request** | [**\OpenAPI\Client\Model\PostSugarRequest**](../Model/PostSugarRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostSugar200Response**](../Model/PostSugar200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postVineyard()` + +```php +postVineyard($post_vineyard_request): \OpenAPI\Client\Model\PostVineyard200Response +``` + +Perform vineyard calculation + +Retrieve a simple JSON response + +### Example + +```php +postVineyard($post_vineyard_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postVineyard: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_vineyard_request** | [**\OpenAPI\Client\Model\PostVineyardRequest**](../Model/PostVineyardRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostVineyard200Response**](../Model/PostVineyard200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postWildcatchfishery()` + +```php +postWildcatchfishery($post_wildcatchfishery_request): \OpenAPI\Client\Model\PostWildcatchfishery200Response +``` + +Perform wildcatchfishery calculation + +Retrieve a simple JSON response + +### Example + +```php +postWildcatchfishery($post_wildcatchfishery_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postWildcatchfishery: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_wildcatchfishery_request** | [**\OpenAPI\Client\Model\PostWildcatchfisheryRequest**](../Model/PostWildcatchfisheryRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostWildcatchfishery200Response**](../Model/PostWildcatchfishery200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postWildseafisheries()` + +```php +postWildseafisheries($post_wildseafisheries_request): \OpenAPI\Client\Model\PostWildseafisheries200Response +``` + +Perform wildseafisheries calculation + +Retrieve a simple JSON response + +### Example + +```php +postWildseafisheries($post_wildseafisheries_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling GAFApi->postWildseafisheries: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **post_wildseafisheries_request** | [**\OpenAPI\Client\Model\PostWildseafisheriesRequest**](../Model/PostWildseafisheriesRequest.md)| | | + +### Return type + +[**\OpenAPI\Client\Model\PostWildseafisheries200Response**](../Model/PostWildseafisheries200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200Response.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200Response.md new file mode 100644 index 00000000..1234262d --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquaculture200Response.md @@ -0,0 +1,16 @@ +# # PostAquaculture200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope1**](PostAquaculture200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | +**purchased_offsets** | [**\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntensities**](PostAquaculture200ResponseIntensities.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInner[]**](PostAquaculture200ResponseIntermediateInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseCarbonSequestration.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseCarbonSequestration.md new file mode 100644 index 00000000..795878e3 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseCarbonSequestration.md @@ -0,0 +1,10 @@ +# # PostAquaculture200ResponseCarbonSequestration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Annual amount of carbon sequestered, in tonnes-CO2e | +**intermediate** | **float[]** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntensities.md new file mode 100644 index 00000000..e03b3471 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntensities.md @@ -0,0 +1,11 @@ +# # PostAquaculture200ResponseIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_harvest_weight_kg** | **float** | Total harvest weight in kg | +**aquaculture_excluding_carbon_offsets** | **float** | Aquaculture emissions intensity excluding sequestration, in kg-CO2e/kg | +**aquaculture_including_carbon_offsets** | **float** | Aquaculture emissions intensity including sequestration, in kg-CO2e/kg | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInner.md new file mode 100644 index 00000000..595d8cfc --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostAquaculture200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope1**](PostAquaculture200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntensities**](PostAquaculture200ResponseIntensities.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md new file mode 100644 index 00000000..e8327981 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md @@ -0,0 +1,9 @@ +# # PostAquaculture200ResponseIntermediateInnerCarbonSequestration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Annual amount of carbon sequestered, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseNet.md new file mode 100644 index 00000000..811f9e80 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseNet.md @@ -0,0 +1,9 @@ +# # PostAquaculture200ResponseNet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponsePurchasedOffsets.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponsePurchasedOffsets.md new file mode 100644 index 00000000..89247204 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponsePurchasedOffsets.md @@ -0,0 +1,9 @@ +# # PostAquaculture200ResponsePurchasedOffsets + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Annual amount of carbon sequestered, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope1.md new file mode 100644 index 00000000..fca5c80a --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope1.md @@ -0,0 +1,19 @@ +# # PostAquaculture200ResponseScope1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | +**waste_water_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | +**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope2.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope2.md new file mode 100644 index 00000000..c8193a0e --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope2.md @@ -0,0 +1,10 @@ +# # PostAquaculture200ResponseScope2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**total** | **float** | Total scope 2 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope3.md new file mode 100644 index 00000000..c0d1082b --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope3.md @@ -0,0 +1,16 @@ +# # PostAquaculture200ResponseScope3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purchased_bait** | **float** | Emissions from purchased bait, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**commercial_flights** | **float** | Emissions from commercial flights, in tonnes-CO2e | +**inbound_freight** | **float** | Emissions from inbound freight, in tonnes-CO2e | +**outbound_freight** | **float** | Emissions from outbound freight, in tonnes-CO2e | +**solid_waste_sent_offsite** | **float** | Emissions from solid waste sent offsite, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequest.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequest.md new file mode 100644 index 00000000..a1f164c0 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequest.md @@ -0,0 +1,9 @@ +# # PostAquacultureRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enterprises** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInner[]**](PostAquacultureRequestEnterprisesInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInner.md new file mode 100644 index 00000000..0046a900 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInner.md @@ -0,0 +1,25 @@ +# # PostAquacultureRequestEnterprisesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**production_system** | **string** | Production system of the aquaculture enterprise | +**total_harvest_kg** | **float** | Total harvest in kg | +**refrigerants** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerRefrigerantsInner[]**](PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md) | Refrigerant type | +**bait** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerBaitInner[]**](PostAquacultureRequestEnterprisesInnerBaitInner.md) | Bait purchases | +**custom_bait** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerCustomBaitInner[]**](PostAquacultureRequestEnterprisesInnerCustomBaitInner.md) | Custom bait purchases | +**inbound_freight** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods to the enterprise | +**outbound_freight** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods from the enterprise | +**total_commercial_flights_km** | **float** | Total distance of commercial flights, in km (kilometers) | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**electricity_source** | **string** | Source of electricity | +**fuel** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | +**fluid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | +**solid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | +**carbon_offsets** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerBaitInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerBaitInner.md new file mode 100644 index 00000000..96410166 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerBaitInner.md @@ -0,0 +1,12 @@ +# # PostAquacultureRequestEnterprisesInnerBaitInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | Bait product type | +**purchased_tonnes** | **float** | Purchased product in tonnes | +**additional_ingredients** | **float** | Additional ingredient fraction, from 0 to 1 | +**emissions_intensity** | **float** | Emissions intensity of additional ingredients, in kg CO2e/kg bait (default 0) | [default to 0] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md new file mode 100644 index 00000000..1f5ee2e2 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md @@ -0,0 +1,10 @@ +# # PostAquacultureRequestEnterprisesInnerCustomBaitInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purchased_tonnes** | **float** | Purchased product in tonnes | +**emissions_intensity** | **float** | Emissions intensity of product, in kg CO2e/kg bait | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md new file mode 100644 index 00000000..229287e6 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md @@ -0,0 +1,13 @@ +# # PostAquacultureRequestEnterprisesInnerFluidWasteInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fluid_waste_kl** | **float** | Amount of fluid waste, in kL (kilolitres) | +**fluid_waste_treatment_type** | **string** | Type of fluid waste treatment | +**average_inlet_cod** | **float** | Average inlet COD (mg per litre) | +**average_outlet_cod** | **float** | Average outlet COD (mg per litre) | +**flared_combusted_fraction** | **float** | Fraction of waste flared or combusted, between 0 and 1 | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuel.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuel.md new file mode 100644 index 00000000..6d18fa59 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuel.md @@ -0,0 +1,11 @@ +# # PostAquacultureRequestEnterprisesInnerFuel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transport_fuel** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner[]**](PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md) | A list of fuels used in transportation and vehicles | +**stationary_fuel** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner[]**](PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md) | A list of fuels used in stationary applications | +**natural_gas** | **float** | Amount of natural gas consumed in Mj (megajoules) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md new file mode 100644 index 00000000..fad44f00 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md @@ -0,0 +1,10 @@ +# # PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | Type of fuel | +**amount_litres** | **float** | Amount of fuel consumed (litres) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md new file mode 100644 index 00000000..e9c8cab3 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md @@ -0,0 +1,10 @@ +# # PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | Type of fuel | +**amount_litres** | **float** | Amount of fuel consumed (litres) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md new file mode 100644 index 00000000..3bc9d3df --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md @@ -0,0 +1,10 @@ +# # PostAquacultureRequestEnterprisesInnerInboundFreightInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | Type of freight used | +**total_km_tonnes** | **float** | Total distance of freight, in kilometre tonnes | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md new file mode 100644 index 00000000..e92dec8c --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md @@ -0,0 +1,10 @@ +# # PostAquacultureRequestEnterprisesInnerRefrigerantsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**refrigerant** | **string** | Refrigerant type | +**charge_size** | **float** | Amount of refrigerant contained in the appliance, in kg | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.md new file mode 100644 index 00000000..c7bcf5b9 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.md @@ -0,0 +1,10 @@ +# # PostAquacultureRequestEnterprisesInnerSolidWaste + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sent_offsite_tonnes** | **float** | Amount of solid waste sent offsite to landfill, in tonnes | +**onsite_composting_tonnes** | **float** | Amount of solid waste composted on site, in tonnes | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeef200Response.md b/examples/php-api-client/api-client/docs/Model/PostBeef200Response.md new file mode 100644 index 00000000..80f1070a --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeef200Response.md @@ -0,0 +1,15 @@ +# # PostBeef200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInner[]**](PostBeef200ResponseIntermediateInner.md) | | +**net** | [**\OpenAPI\Client\Model\PostBeef200ResponseNet**](PostBeef200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities**](PostBeef200ResponseIntermediateInnerIntensities.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInner.md new file mode 100644 index 00000000..c514ee93 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostBeef200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**intensities** | [**\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities**](PostBeef200ResponseIntermediateInnerIntensities.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..c17f23b3 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,11 @@ +# # PostBeef200ResponseIntermediateInnerIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**liveweight_beef_produced_kg** | **float** | Amount of beef produced in kg liveweight | +**beef_excluding_sequestration** | **float** | Beef excluding sequestration, in kg-CO2e/kg liveweight | +**beef_including_sequestration** | **float** | Beef including sequestration, in kg-CO2e/kg liveweight | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseNet.md new file mode 100644 index 00000000..a700c0dd --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseNet.md @@ -0,0 +1,10 @@ +# # PostBeef200ResponseNet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | +**beef** | **float** | Net emissions of beef, in tonnes-CO2e/year | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope1.md new file mode 100644 index 00000000..761abcfe --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope1.md @@ -0,0 +1,25 @@ +# # PostBeef200ResponseScope1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | +**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | +**urine_and_dung_n2_o** | **float** | N2O emissions from urine and dung, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**savannah_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | +**savannah_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope3.md new file mode 100644 index 00000000..d398c3ca --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope3.md @@ -0,0 +1,17 @@ +# # PostBeef200ResponseScope3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | +**purchased_mineral_supplementation** | **float** | Emissions from purchased mineral supplementation, in tonnes-CO2e | +**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**lime** | **float** | Emissions from lime, in tonnes-CO2e | +**purchased_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequest.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequest.md new file mode 100644 index 00000000..0eded94a --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequest.md @@ -0,0 +1,14 @@ +# # PostBeefRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**beef** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInner[]**](PostBeefRequestBeefInner.md) | | +**burning** | [**\OpenAPI\Client\Model\PostBeefRequestBurningInner[]**](PostBeefRequestBurningInner.md) | | +**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInner[]**](PostBeefRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInner.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInner.md new file mode 100644 index 00000000..0f7294c4 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInner.md @@ -0,0 +1,26 @@ +# # PostBeefRequestBeefInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**classes** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClasses**](PostBeefRequestBeefInnerClasses.md) | | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**mineral_supplementation** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation**](PostBeefRequestBeefInnerMineralSupplementation.md) | | +**electricity_source** | **string** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | +**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | +**cottonseed_feed** | **float** | Cotton seed purchased for cattle feed in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**cows_calving** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerCowsCalving**](PostBeefRequestBeefInnerCowsCalving.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClasses.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClasses.md new file mode 100644 index 00000000..0aacda7a --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClasses.md @@ -0,0 +1,24 @@ +# # PostBeefRequestBeefInnerClasses + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bulls_gt1** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1**](PostBeefRequestBeefInnerClassesBullsGt1.md) | | [optional] +**bulls_gt1_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Traded**](PostBeefRequestBeefInnerClassesBullsGt1Traded.md) | | [optional] +**steers_lt1** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersLt1**](PostBeefRequestBeefInnerClassesSteersLt1.md) | | [optional] +**steers_lt1_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersLt1Traded**](PostBeefRequestBeefInnerClassesSteersLt1Traded.md) | | [optional] +**steers1_to2** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteers1To2**](PostBeefRequestBeefInnerClassesSteers1To2.md) | | [optional] +**steers1_to2_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteers1To2Traded**](PostBeefRequestBeefInnerClassesSteers1To2Traded.md) | | [optional] +**steers_gt2** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersGt2**](PostBeefRequestBeefInnerClassesSteersGt2.md) | | [optional] +**steers_gt2_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersGt2Traded**](PostBeefRequestBeefInnerClassesSteersGt2Traded.md) | | [optional] +**cows_gt2** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesCowsGt2**](PostBeefRequestBeefInnerClassesCowsGt2.md) | | [optional] +**cows_gt2_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesCowsGt2Traded**](PostBeefRequestBeefInnerClassesCowsGt2Traded.md) | | [optional] +**heifers_lt1** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersLt1**](PostBeefRequestBeefInnerClassesHeifersLt1.md) | | [optional] +**heifers_lt1_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersLt1Traded**](PostBeefRequestBeefInnerClassesHeifersLt1Traded.md) | | [optional] +**heifers1_to2** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifers1To2**](PostBeefRequestBeefInnerClassesHeifers1To2.md) | | [optional] +**heifers1_to2_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifers1To2Traded**](PostBeefRequestBeefInnerClassesHeifers1To2Traded.md) | | [optional] +**heifers_gt2** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersGt2**](PostBeefRequestBeefInnerClassesHeifersGt2.md) | | [optional] +**heifers_gt2_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersGt2Traded**](PostBeefRequestBeefInnerClassesHeifersGt2Traded.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1.md new file mode 100644 index 00000000..303ab2c5 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesBullsGt1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md new file mode 100644 index 00000000..3c190732 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md @@ -0,0 +1,13 @@ +# # PostBeefRequestBeefInnerClassesBullsGt1Autumn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals (head) | +**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | +**liveweight_gain** | **float** | Average liveweight gain in kg/day (kilogram per day) | +**crude_protein** | **float** | Crude protein percent, between 0 and 100 | [optional] +**dry_matter_digestibility** | **float** | Dry matter digestibility percent, between 0 and 100 | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md new file mode 100644 index 00000000..17e135c7 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md @@ -0,0 +1,11 @@ +# # PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals purchased (head) | +**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | +**purchase_source** | **string** | Source location of livestock purchase | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.md new file mode 100644 index 00000000..e4cbf4ff --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesBullsGt1Traded + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2.md new file mode 100644 index 00000000..cc78984f --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesCowsGt2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.md new file mode 100644 index 00000000..11f6f1d6 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesCowsGt2Traded + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2.md new file mode 100644 index 00000000..3ccb1e03 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesHeifers1To2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md new file mode 100644 index 00000000..5ab0e46d --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesHeifers1To2Traded + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2.md new file mode 100644 index 00000000..c29fabda --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesHeifersGt2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md new file mode 100644 index 00000000..1778a28d --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesHeifersGt2Traded + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1.md new file mode 100644 index 00000000..e20d7f3b --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesHeifersLt1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md new file mode 100644 index 00000000..1fc1faa5 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesHeifersLt1Traded + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2.md new file mode 100644 index 00000000..ff832ce0 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesSteers1To2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.md new file mode 100644 index 00000000..42339287 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesSteers1To2Traded + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2.md new file mode 100644 index 00000000..a53080cd --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesSteersGt2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.md new file mode 100644 index 00000000..152909b3 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesSteersGt2Traded + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1.md new file mode 100644 index 00000000..d6432c63 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesSteersLt1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.md new file mode 100644 index 00000000..35b1f9a8 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.md @@ -0,0 +1,18 @@ +# # PostBeefRequestBeefInnerClassesSteersLt1Traded + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] +**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerCowsCalving.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerCowsCalving.md new file mode 100644 index 00000000..1dc4d37a --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerCowsCalving.md @@ -0,0 +1,12 @@ +# # PostBeefRequestBeefInnerCowsCalving + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spring** | **float** | | +**summer** | **float** | | +**autumn** | **float** | | +**winter** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliser.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliser.md new file mode 100644 index 00000000..feb3381b --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliser.md @@ -0,0 +1,17 @@ +# # PostBeefRequestBeefInnerFertiliser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**single_superphosphate** | **float** | Single superphosphate usage in tonnes | +**other_type** | **string** | Other N fertiliser type. Deprecation note: Use `otherFertilisers` instead | [optional] +**pasture_dryland** | **float** | Urea fertiliser used for dryland pasture, in tonnes Urea | +**pasture_irrigated** | **float** | Urea fertiliser used for irrigated pasture, in tonnes Urea | +**crops_dryland** | **float** | Urea fertiliser used for dryland crops, in tonnes Urea | +**crops_irrigated** | **float** | Urea fertiliser used for irrigated crops, in tonnes Urea | +**other_dryland** | **float** | Other N fertiliser used for dryland. Deprecation note: Use `otherFertilisers` instead | [optional] +**other_irrigated** | **float** | Other N fertiliser used for irrigated. Deprecation note: Use `otherFertilisers` instead | [optional] +**other_fertilisers** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliserOtherFertilisersInner[]**](PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md) | Array of Other N fertiliser. Version note: If this field is set and has a length > 0, the `other` fields within this object are ignored, and this array is used instead | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md new file mode 100644 index 00000000..653852a4 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md @@ -0,0 +1,11 @@ +# # PostBeefRequestBeefInnerFertiliserOtherFertilisersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**other_type** | **string** | Other N fertiliser type | +**other_dryland** | **float** | Other N fertiliser used for dryland. From v1.1.0, supply tonnes of product. For earlier versions, supply tonnes of N | +**other_irrigated** | **float** | Other N fertiliser used for irrigated. From v1.1.0, supply tonnes of product. For earlier versions, supply tonnes of N | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerMineralSupplementation.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerMineralSupplementation.md new file mode 100644 index 00000000..640b474a --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerMineralSupplementation.md @@ -0,0 +1,14 @@ +# # PostBeefRequestBeefInnerMineralSupplementation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mineral_block** | **float** | Mineral block product used, in tonnes | [default to 0] +**mineral_block_urea** | **float** | Fraction of urea content, between 0 and 1 | [default to 0] +**weaner_block** | **float** | Weaner block product used, in tonnes | [default to 0] +**weaner_block_urea** | **float** | Fraction of urea content, between 0 and 1 | [default to 0] +**dry_season_mix** | **float** | Dry season mix product used, in tonnes | [default to 0] +**dry_season_mix_urea** | **float** | Fraction of urea content, between 0 and 1 | [default to 0] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInner.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInner.md new file mode 100644 index 00000000..e14e0789 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInner.md @@ -0,0 +1,10 @@ +# # PostBeefRequestBurningInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**burning** | [**\OpenAPI\Client\Model\PostBeefRequestBurningInnerBurning**](PostBeefRequestBurningInnerBurning.md) | | +**allocation_to_beef** | **float[]** | The proportion of the burning that is allocated to each beef | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInnerBurning.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInnerBurning.md new file mode 100644 index 00000000..03a4164d --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInnerBurning.md @@ -0,0 +1,15 @@ +# # PostBeefRequestBurningInnerBurning + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel** | **string** | The fuel class size that was burnt | [default to 'coarse'] +**season** | **string** | The time relative to the fire season in which the burning took place | [default to 'early dry season'] +**patchiness** | **string** | The patchiness of the savannah/vegetation that was burnt | [default to 'high'] +**rainfall_zone** | **string** | The rainfall zone in which the burning took place | [default to 'low'] +**years_since_last_fire** | **float** | Time since the last fire, in years | [default to 0] +**fire_scar_area** | **float** | The total area of the fire scar, in ha (hectares) | [default to 0] +**vegetation** | **string** | The vegetation class that was burnt | [default to 'Melaleuca woodland'] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInner.md new file mode 100644 index 00000000..a30b4b01 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInner.md @@ -0,0 +1,11 @@ +# # PostBeefRequestVegetationInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**beef_proportion** | **float** | The proportion of the sequestration that is allocated to beef. Deprecation note: Please use `allocationToBeef` instead | [optional] +**allocation_to_beef** | **float[]** | The proportion of the sequestration that is allocated to each beef | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInnerVegetation.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInnerVegetation.md new file mode 100644 index 00000000..910d817a --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInnerVegetation.md @@ -0,0 +1,13 @@ +# # PostBeefRequestVegetationInnerVegetation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**region** | **string** | The rainfall region that the vegetation is in | +**tree_species** | **string** | The species of tree | +**soil** | **string** | The soil type the tree is in | +**area** | **float** | The area of trees, in ha (hectares) | +**age** | **float** | The age of the trees, in years | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffalo200Response.md b/examples/php-api-client/api-client/docs/Model/PostBuffalo200Response.md new file mode 100644 index 00000000..0fe3db4f --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffalo200Response.md @@ -0,0 +1,15 @@ +# # PostBuffalo200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**net** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseNet**](PostBuffalo200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseIntensities**](PostBuffalo200ResponseIntensities.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseIntermediateInner[]**](PostBuffalo200ResponseIntermediateInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntensities.md new file mode 100644 index 00000000..ca5ae1f6 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntensities.md @@ -0,0 +1,11 @@ +# # PostBuffalo200ResponseIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**liveweight_produced_kg** | **float** | Amount of buffalo meat produced in kg liveweight | +**buffalo_meat_excluding_sequestration** | **float** | Buffalo meat (breeding herd) excluding sequestration, in kg-CO2e/kg liveweight | +**buffalo_meat_including_sequestration** | **float** | Buffalo meat (breeding herd) including sequestration, in kg-CO2e/kg liveweight | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntermediateInner.md new file mode 100644 index 00000000..d28e6927 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostBuffalo200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | +**net** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseNet**](PostBuffalo200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseIntensities**](PostBuffalo200ResponseIntensities.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseNet.md new file mode 100644 index 00000000..5ce8d53c --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseNet.md @@ -0,0 +1,9 @@ +# # PostBuffalo200ResponseNet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope1.md new file mode 100644 index 00000000..8e32ce84 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope1.md @@ -0,0 +1,23 @@ +# # PostBuffalo200ResponseScope1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | +**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | +**urine_and_dung_n2_o** | **float** | N2O emissions from urine and dung, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope3.md new file mode 100644 index 00000000..6c768769 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope3.md @@ -0,0 +1,16 @@ +# # PostBuffalo200ResponseScope3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | +**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**lime** | **float** | Emissions from lime, in tonnes-CO2e | +**purchased_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequest.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequest.md new file mode 100644 index 00000000..7901c800 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequest.md @@ -0,0 +1,12 @@ +# # PostBuffaloRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**buffalos** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInner[]**](PostBuffaloRequestBuffalosInner.md) | | +**vegetation** | [**\OpenAPI\Client\Model\PostBuffaloRequestVegetationInner[]**](PostBuffaloRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInner.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInner.md new file mode 100644 index 00000000..b2b8c4f9 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInner.md @@ -0,0 +1,25 @@ +# # PostBuffaloRequestBuffalosInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**classes** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClasses**](PostBuffaloRequestBuffalosInnerClasses.md) | | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**electricity_source** | **string** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | +**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**cows_calving** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerCowsCalving**](PostBuffaloRequestBuffalosInnerCowsCalving.md) | | +**seasonal_calving** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerSeasonalCalving**](PostBuffaloRequestBuffalosInnerSeasonalCalving.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClasses.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClasses.md new file mode 100644 index 00000000..155c9989 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClasses.md @@ -0,0 +1,16 @@ +# # PostBuffaloRequestBuffalosInnerClasses + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bulls** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBulls**](PostBuffaloRequestBuffalosInnerClassesBulls.md) | | [optional] +**trade_bulls** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeBulls**](PostBuffaloRequestBuffalosInnerClassesTradeBulls.md) | | [optional] +**cows** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesCows**](PostBuffaloRequestBuffalosInnerClassesCows.md) | | [optional] +**trade_cows** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeCows**](PostBuffaloRequestBuffalosInnerClassesTradeCows.md) | | [optional] +**steers** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesSteers**](PostBuffaloRequestBuffalosInnerClassesSteers.md) | | [optional] +**trade_steers** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeSteers**](PostBuffaloRequestBuffalosInnerClassesTradeSteers.md) | | [optional] +**calfs** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesCalfs**](PostBuffaloRequestBuffalosInnerClassesCalfs.md) | | [optional] +**trade_calfs** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeCalfs**](PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBulls.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBulls.md new file mode 100644 index 00000000..5de730c5 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBulls.md @@ -0,0 +1,15 @@ +# # PostBuffaloRequestBuffalosInnerClassesBulls + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md new file mode 100644 index 00000000..4caffb32 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md @@ -0,0 +1,9 @@ +# # PostBuffaloRequestBuffalosInnerClassesBullsAutumn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals (head) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md new file mode 100644 index 00000000..491aaea3 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md @@ -0,0 +1,10 @@ +# # PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals purchased (head) | +**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.md new file mode 100644 index 00000000..525402ce --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.md @@ -0,0 +1,15 @@ +# # PostBuffaloRequestBuffalosInnerClassesCalfs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCows.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCows.md new file mode 100644 index 00000000..5dde32b7 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCows.md @@ -0,0 +1,15 @@ +# # PostBuffaloRequestBuffalosInnerClassesCows + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesSteers.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesSteers.md new file mode 100644 index 00000000..6302440a --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesSteers.md @@ -0,0 +1,15 @@ +# # PostBuffaloRequestBuffalosInnerClassesSteers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md new file mode 100644 index 00000000..268424ed --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md @@ -0,0 +1,15 @@ +# # PostBuffaloRequestBuffalosInnerClassesTradeBulls + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md new file mode 100644 index 00000000..f0498fd0 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md @@ -0,0 +1,15 @@ +# # PostBuffaloRequestBuffalosInnerClassesTradeCalfs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.md new file mode 100644 index 00000000..405cbbcb --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.md @@ -0,0 +1,15 @@ +# # PostBuffaloRequestBuffalosInnerClassesTradeCows + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md new file mode 100644 index 00000000..d1022c08 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md @@ -0,0 +1,15 @@ +# # PostBuffaloRequestBuffalosInnerClassesTradeSteers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerCowsCalving.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerCowsCalving.md new file mode 100644 index 00000000..d3c17def --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerCowsCalving.md @@ -0,0 +1,12 @@ +# # PostBuffaloRequestBuffalosInnerCowsCalving + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spring** | **float** | | +**summer** | **float** | | +**autumn** | **float** | | +**winter** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.md new file mode 100644 index 00000000..2072acac --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.md @@ -0,0 +1,12 @@ +# # PostBuffaloRequestBuffalosInnerSeasonalCalving + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spring** | **float** | | +**summer** | **float** | | +**autumn** | **float** | | +**winter** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestVegetationInner.md new file mode 100644 index 00000000..190a07cb --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestVegetationInner.md @@ -0,0 +1,10 @@ +# # PostBuffaloRequestVegetationInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**buffalo_proportion** | **float[]** | The proportion of the sequestration that is allocated to Buffalo | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCotton200Response.md b/examples/php-api-client/api-client/docs/Model/PostCotton200Response.md new file mode 100644 index 00000000..4dc0e54b --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostCotton200Response.md @@ -0,0 +1,15 @@ +# # PostCotton200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostCotton200ResponseIntermediateInner[]**](PostCotton200ResponseIntermediateInner.md) | | +**net** | [**\OpenAPI\Client\Model\PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostCotton200ResponseIntermediateInnerIntensities[]**](PostCotton200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each crop (in order) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInner.md new file mode 100644 index 00000000..d382e94e --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostCotton200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostCotton200ResponseIntermediateInnerIntensities**](PostCotton200ResponseIntermediateInnerIntensities.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..9190fdf9 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,22 @@ +# # PostCotton200ResponseIntermediateInnerIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cotton_yield_produced_tonnes** | **float** | Cotton yield produced in tonnes | +**bales_produced** | **float** | Number of bales produced | +**lint_produced_tonnes** | **float** | Cotton lint produced in tonnes | +**seed_produced_tonnes** | **float** | Cotton seed produced in tonnes | +**tonnes_crop_excluding_sequestration** | **float** | Emissions intensity excluding sequestration, in t-CO2e/t crop | +**tonnes_crop_including_sequestration** | **float** | Emissions intensity including sequestration, in t-CO2e/t crop | +**bales_excluding_sequestration** | **float** | Emissions intensity excluding sequestration, in t-CO2e/bale | +**bales_including_sequestration** | **float** | Emissions intensity including sequestration, in t-CO2e/bale | +**lint_including_sequestration** | **float** | Emissions intensity of lint including sequestration, in t-CO2e/kg | +**lint_excluding_sequestration** | **float** | Emissions intensity of lint excluding sequestration, in t-CO2e/kg | +**seed_including_sequestration** | **float** | Emissions intensity of seed including sequestration, in t-CO2e/kg | +**seed_excluding_sequestration** | **float** | Emissions intensity of seed excluding sequestration, in t-CO2e/kg | +**lint_economic_allocation** | **float** | Emissions intensity of lint using economic allocation, in t-CO2e/kg | +**seed_economic_allocation** | **float** | Emissions intensity of seed using economic allocation, in t-CO2e/kg | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseNet.md new file mode 100644 index 00000000..0a9f41c9 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseNet.md @@ -0,0 +1,10 @@ +# # PostCotton200ResponseNet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | +**crops** | **float[]** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope1.md new file mode 100644 index 00000000..6f91c650 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope1.md @@ -0,0 +1,23 @@ +# # PostCotton200ResponseScope1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | +**field_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | +**field_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope3.md new file mode 100644 index 00000000..51b6d663 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope3.md @@ -0,0 +1,14 @@ +# # PostCotton200ResponseScope3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**lime** | **float** | Emissions from lime, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCottonRequest.md b/examples/php-api-client/api-client/docs/Model/PostCottonRequest.md new file mode 100644 index 00000000..7c68fecf --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostCottonRequest.md @@ -0,0 +1,13 @@ +# # PostCottonRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**crops** | [**\OpenAPI\Client\Model\PostCottonRequestCropsInner[]**](PostCottonRequestCropsInner.md) | | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**vegetation** | [**\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]**](PostCottonRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCottonRequestCropsInner.md b/examples/php-api-client/api-client/docs/Model/PostCottonRequestCropsInner.md new file mode 100644 index 00000000..53d8fad9 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostCottonRequestCropsInner.md @@ -0,0 +1,35 @@ +# # PostCottonRequestCropsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**average_cotton_yield** | **float** | Average cotton yield, in t/ha (tonnes per hectare) | +**area_sown** | **float** | Area sown, in ha (hectares) | +**average_weight_per_bale_kg** | **float** | Average weight of unprocessed cotton per bale, in kg | +**cotton_lint_per_bale_kg** | **float** | Average weight of cotton lint per bale, in kg | +**cotton_seed_per_bale_kg** | **float** | Average weight of cotton seed produced per bale, in kg | +**waste_per_bale_kg** | **float** | Average weight of cotton waste produced per bale, in kg | +**urea_application** | **float** | Urea application, in kg Urea/ha (kilograms of urea per hectare) | +**other_fertiliser_type** | **string** | Other N fertiliser type | [optional] +**other_fertiliser_application** | **float** | Other N fertiliser application, in kg/ha (kilograms per hectare) | +**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | [default to 0] +**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | [default to 0] +**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | [default to 0] +**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | [default to 0] +**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | [default to 0] +**single_super_phosphate** | **float** | Single superphosphate use, in kg/ha (kilograms per hectare) | +**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | +**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt. If included, this should only ever be 0 for cotton | [default to 0] +**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | +**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | +**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**diesel_use** | **float** | Diesel usage in L (litres) | +**petrol_use** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCottonRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostCottonRequestVegetationInner.md new file mode 100644 index 00000000..838981d0 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostCottonRequestVegetationInner.md @@ -0,0 +1,10 @@ +# # PostCottonRequestVegetationInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**allocation_to_crops** | **float[]** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairy200Response.md b/examples/php-api-client/api-client/docs/Model/PostDairy200Response.md new file mode 100644 index 00000000..102a48e1 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairy200Response.md @@ -0,0 +1,15 @@ +# # PostDairy200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostDairy200ResponseScope1**](PostDairy200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostDairy200ResponseScope3**](PostDairy200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**net** | [**\OpenAPI\Client\Model\PostDairy200ResponseNet**](PostDairy200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostDairy200ResponseIntensities**](PostDairy200ResponseIntensities.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostDairy200ResponseIntermediateInner[]**](PostDairy200ResponseIntermediateInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntensities.md new file mode 100644 index 00000000..622ba663 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntensities.md @@ -0,0 +1,10 @@ +# # PostDairy200ResponseIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**milk_solids_produced_tonnes** | **float** | Milk solids produced in tonnes | +**intensity** | **float** | Dairy intensities including carbon sequestration, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntermediateInner.md new file mode 100644 index 00000000..cb885d44 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostDairy200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostDairy200ResponseScope1**](PostDairy200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostDairy200ResponseScope3**](PostDairy200ResponseScope3.md) | | +**net** | [**\OpenAPI\Client\Model\PostDairy200ResponseNet**](PostDairy200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostDairy200ResponseIntensities**](PostDairy200ResponseIntensities.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseNet.md new file mode 100644 index 00000000..4953587e --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseNet.md @@ -0,0 +1,9 @@ +# # PostDairy200ResponseNet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope1.md new file mode 100644 index 00000000..2d03e3c2 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope1.md @@ -0,0 +1,28 @@ +# # PostDairy200ResponseScope1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | +**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | +**manure_management_n2_o** | **float** | N2O emissions from manure management, in tonnes-CO2e | +**animal_waste_n2_o** | **float** | N2O emissions from animal waste, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**urine_and_dung_n2_o** | **float** | N2O emissions from urine and dung, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**transport_n2_o** | **float** | N2O emissions from transport, in tonnes-CO2e | +**transport_ch4** | **float** | CH4 emissions from transport, in tonnes-CO2e | +**transport_co2** | **float** | CO2 emissions from transport, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope3.md new file mode 100644 index 00000000..0ad53a22 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope3.md @@ -0,0 +1,15 @@ +# # PostDairy200ResponseScope3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | +**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**lime** | **float** | Emissions from lime, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequest.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequest.md new file mode 100644 index 00000000..69a584a3 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairyRequest.md @@ -0,0 +1,13 @@ +# # PostDairyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**production_system** | **string** | Production system | +**dairy** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInner[]**](PostDairyRequestDairyInner.md) | | +**vegetation** | [**\OpenAPI\Client\Model\PostDairyRequestVegetationInner[]**](PostDairyRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInner.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInner.md new file mode 100644 index 00000000..7f755959 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInner.md @@ -0,0 +1,30 @@ +# # PostDairyRequestDairyInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**classes** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClasses**](PostDairyRequestDairyInnerClasses.md) | | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**seasonal_fertiliser** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliser**](PostDairyRequestDairyInnerSeasonalFertiliser.md) | | +**areas** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerAreas**](PostDairyRequestDairyInnerAreas.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | +**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | +**cottonseed_feed** | **float** | Cotton seed purchased for cattle feed in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**manure_management_milking_cows** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerManureManagementMilkingCows**](PostDairyRequestDairyInnerManureManagementMilkingCows.md) | | +**manure_management_other_dairy_cows** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerManureManagementMilkingCows**](PostDairyRequestDairyInnerManureManagementMilkingCows.md) | | +**emissions_allocation_to_red_meat_production** | **float** | Allocation as a fraction, from 0 to 1 | +**truck_type** | **string** | Type of truck used for cattle transport | +**distance_cattle_transported** | **float** | Distance cattle are transported between farms, in km (kilometres) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerAreas.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerAreas.md new file mode 100644 index 00000000..203c6644 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerAreas.md @@ -0,0 +1,12 @@ +# # PostDairyRequestDairyInnerAreas + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cropped_dryland** | **float** | | [default to 0] +**cropped_irrigated** | **float** | | [default to 0] +**improved_pasture_dryland** | **float** | | [default to 0] +**improved_pasture_irrigated** | **float** | | [default to 0] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClasses.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClasses.md new file mode 100644 index 00000000..90e01f4f --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClasses.md @@ -0,0 +1,13 @@ +# # PostDairyRequestDairyInnerClasses + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**milking_cows** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCows**](PostDairyRequestDairyInnerClassesMilkingCows.md) | | +**heifers_lt1** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesHeifersLt1**](PostDairyRequestDairyInnerClassesHeifersLt1.md) | | +**heifers_gt1** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesHeifersGt1**](PostDairyRequestDairyInnerClassesHeifersGt1.md) | | +**dairy_bulls_lt1** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesDairyBullsLt1**](PostDairyRequestDairyInnerClassesDairyBullsLt1.md) | | +**dairy_bulls_gt1** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesDairyBullsGt1**](PostDairyRequestDairyInnerClassesDairyBullsGt1.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.md new file mode 100644 index 00000000..ccb7c86d --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.md @@ -0,0 +1,12 @@ +# # PostDairyRequestDairyInnerClassesDairyBullsGt1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.md new file mode 100644 index 00000000..15503545 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.md @@ -0,0 +1,12 @@ +# # PostDairyRequestDairyInnerClassesDairyBullsLt1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersGt1.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersGt1.md new file mode 100644 index 00000000..891c80c0 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersGt1.md @@ -0,0 +1,12 @@ +# # PostDairyRequestDairyInnerClassesHeifersGt1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersLt1.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersLt1.md new file mode 100644 index 00000000..974702d9 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersLt1.md @@ -0,0 +1,12 @@ +# # PostDairyRequestDairyInnerClassesHeifersLt1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCows.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCows.md new file mode 100644 index 00000000..aca55608 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCows.md @@ -0,0 +1,12 @@ +# # PostDairyRequestDairyInnerClassesMilkingCows + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md new file mode 100644 index 00000000..2719aaae --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md @@ -0,0 +1,14 @@ +# # PostDairyRequestDairyInnerClassesMilkingCowsAutumn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals (head) | +**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | +**liveweight_gain** | **float** | Average liveweight gain in kg/day (kilogram per day) | +**crude_protein** | **float** | Crude protein percent, between 0 and 100. Note: If no value is provided, zero will be assumed. This will result in large, negative output values. This input will become mandatory in a future version. | [optional] +**dry_matter_digestibility** | **float** | Dry matter digestibility percent, between 0 and 100. Note: If no value is provided, zero will be assumed. This will result in large, negative output values. This input will become mandatory in a future version. | [optional] +**milk_production** | **float** | Milk produced in L/day/head (litres per day per head) | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.md new file mode 100644 index 00000000..0a6efa46 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.md @@ -0,0 +1,13 @@ +# # PostDairyRequestDairyInnerManureManagementMilkingCows + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pasture** | **float** | | +**anaerobic_lagoon** | **float** | | +**sump_and_dispersal** | **float** | | +**drain_to_paddocks** | **float** | | +**soild_storage** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliser.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliser.md new file mode 100644 index 00000000..4846274c --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliser.md @@ -0,0 +1,12 @@ +# # PostDairyRequestDairyInnerSeasonalFertiliser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md new file mode 100644 index 00000000..c7bb1442 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md @@ -0,0 +1,12 @@ +# # PostDairyRequestDairyInnerSeasonalFertiliserAutumn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**crops_irrigated** | **float** | | +**crops_dryland** | **float** | | +**pasture_irrigated** | **float** | | +**pasture_dryland** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestVegetationInner.md new file mode 100644 index 00000000..e541d3a2 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDairyRequestVegetationInner.md @@ -0,0 +1,10 @@ +# # PostDairyRequestVegetationInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**dairy_proportion** | **float[]** | The proportion of the sequestration that is allocated to dairy | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeer200Response.md b/examples/php-api-client/api-client/docs/Model/PostDeer200Response.md new file mode 100644 index 00000000..1c60bf4d --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeer200Response.md @@ -0,0 +1,15 @@ +# # PostDeer200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**net** | [**\OpenAPI\Client\Model\PostDeer200ResponseNet**](PostDeer200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostDeer200ResponseIntensities**](PostDeer200ResponseIntensities.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostDeer200ResponseIntermediateInner[]**](PostDeer200ResponseIntermediateInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntensities.md new file mode 100644 index 00000000..eab17eb1 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntensities.md @@ -0,0 +1,11 @@ +# # PostDeer200ResponseIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**liveweight_produced_kg** | **float** | Deer meat produced in kg liveweight | +**deer_meat_excluding_sequestration** | **float** | Deer meat (breeding herd) excluding sequestration, in kg-CO2e/kg liveweight | +**deer_meat_including_sequestration** | **float** | Deer meat (breeding herd) including sequestration, in kg-CO2e/kg liveweight | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntermediateInner.md new file mode 100644 index 00000000..dd7727fe --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostDeer200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | +**net** | [**\OpenAPI\Client\Model\PostDeer200ResponseNet**](PostDeer200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostDeer200ResponseIntensities**](PostDeer200ResponseIntensities.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseNet.md new file mode 100644 index 00000000..94de1430 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseNet.md @@ -0,0 +1,9 @@ +# # PostDeer200ResponseNet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequest.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequest.md new file mode 100644 index 00000000..1aa11dea --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeerRequest.md @@ -0,0 +1,12 @@ +# # PostDeerRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**deers** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInner[]**](PostDeerRequestDeersInner.md) | | +**vegetation** | [**\OpenAPI\Client\Model\PostDeerRequestVegetationInner[]**](PostDeerRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInner.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInner.md new file mode 100644 index 00000000..efeb4a97 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInner.md @@ -0,0 +1,25 @@ +# # PostDeerRequestDeersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**classes** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClasses**](PostDeerRequestDeersInnerClasses.md) | | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**electricity_source** | **string** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | +**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**does_fawning** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerDoesFawning**](PostDeerRequestDeersInnerDoesFawning.md) | | +**seasonal_fawning** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerSeasonalFawning**](PostDeerRequestDeersInnerSeasonalFawning.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClasses.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClasses.md new file mode 100644 index 00000000..47e6f623 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClasses.md @@ -0,0 +1,16 @@ +# # PostDeerRequestDeersInnerClasses + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bucks** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesBucks**](PostDeerRequestDeersInnerClassesBucks.md) | | [optional] +**trade_bucks** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeBucks**](PostDeerRequestDeersInnerClassesTradeBucks.md) | | [optional] +**breeding_does** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesBreedingDoes**](PostDeerRequestDeersInnerClassesBreedingDoes.md) | | [optional] +**trade_does** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeDoes**](PostDeerRequestDeersInnerClassesTradeDoes.md) | | [optional] +**other_does** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesOtherDoes**](PostDeerRequestDeersInnerClassesOtherDoes.md) | | [optional] +**trade_other_does** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeOtherDoes**](PostDeerRequestDeersInnerClassesTradeOtherDoes.md) | | [optional] +**fawn** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesFawn**](PostDeerRequestDeersInnerClassesFawn.md) | | [optional] +**trade_fawn** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeFawn**](PostDeerRequestDeersInnerClassesTradeFawn.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBreedingDoes.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBreedingDoes.md new file mode 100644 index 00000000..01b863c4 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBreedingDoes.md @@ -0,0 +1,15 @@ +# # PostDeerRequestDeersInnerClassesBreedingDoes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBucks.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBucks.md new file mode 100644 index 00000000..ee0b7f5c --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBucks.md @@ -0,0 +1,15 @@ +# # PostDeerRequestDeersInnerClassesBucks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesFawn.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesFawn.md new file mode 100644 index 00000000..b81dc144 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesFawn.md @@ -0,0 +1,15 @@ +# # PostDeerRequestDeersInnerClassesFawn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesOtherDoes.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesOtherDoes.md new file mode 100644 index 00000000..7e847f20 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesOtherDoes.md @@ -0,0 +1,15 @@ +# # PostDeerRequestDeersInnerClassesOtherDoes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeBucks.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeBucks.md new file mode 100644 index 00000000..5ef65877 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeBucks.md @@ -0,0 +1,15 @@ +# # PostDeerRequestDeersInnerClassesTradeBucks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeDoes.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeDoes.md new file mode 100644 index 00000000..444a1704 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeDoes.md @@ -0,0 +1,15 @@ +# # PostDeerRequestDeersInnerClassesTradeDoes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeFawn.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeFawn.md new file mode 100644 index 00000000..9becf67a --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeFawn.md @@ -0,0 +1,15 @@ +# # PostDeerRequestDeersInnerClassesTradeFawn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.md new file mode 100644 index 00000000..b5fe5525 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.md @@ -0,0 +1,15 @@ +# # PostDeerRequestDeersInnerClassesTradeOtherDoes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerDoesFawning.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerDoesFawning.md new file mode 100644 index 00000000..b2fdf0f0 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerDoesFawning.md @@ -0,0 +1,12 @@ +# # PostDeerRequestDeersInnerDoesFawning + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spring** | **float** | | +**summer** | **float** | | +**autumn** | **float** | | +**winter** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerSeasonalFawning.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerSeasonalFawning.md new file mode 100644 index 00000000..7eaa6934 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerSeasonalFawning.md @@ -0,0 +1,12 @@ +# # PostDeerRequestDeersInnerSeasonalFawning + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spring** | **float** | | +**summer** | **float** | | +**autumn** | **float** | | +**winter** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestVegetationInner.md new file mode 100644 index 00000000..93720aa5 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostDeerRequestVegetationInner.md @@ -0,0 +1,10 @@ +# # PostDeerRequestVegetationInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**deer_proportion** | **float[]** | The proportion of the sequestration that is allocated to deer | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlot200Response.md b/examples/php-api-client/api-client/docs/Model/PostFeedlot200Response.md new file mode 100644 index 00000000..29b7478b --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlot200Response.md @@ -0,0 +1,15 @@ +# # PostFeedlot200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseScope1**](PostFeedlot200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseScope3**](PostFeedlot200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInner[]**](PostFeedlot200ResponseIntermediateInner.md) | | +**net** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerNet**](PostFeedlot200ResponseIntermediateInnerNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerIntensities**](PostFeedlot200ResponseIntermediateInnerIntensities.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInner.md new file mode 100644 index 00000000..1046148d --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostFeedlot200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseScope1**](PostFeedlot200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseScope3**](PostFeedlot200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | +**net** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerNet**](PostFeedlot200ResponseIntermediateInnerNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerIntensities**](PostFeedlot200ResponseIntermediateInnerIntensities.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..60e1bac1 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,11 @@ +# # PostFeedlot200ResponseIntermediateInnerIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**liveweight_produced_kg** | **float** | Amount of meat produced in kg liveweight | +**beef_including_sequestration** | **float** | Beef including carbon sequestration, in kg-CO2e/kg liveweight | +**beef_excluding_sequestration** | **float** | Beef excluding carbon sequestration, in kg-CO2e/kg liveweight | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerNet.md b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerNet.md new file mode 100644 index 00000000..d38b1f3c --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerNet.md @@ -0,0 +1,9 @@ +# # PostFeedlot200ResponseIntermediateInnerNet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope1.md new file mode 100644 index 00000000..4bfd8c06 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope1.md @@ -0,0 +1,26 @@ +# # PostFeedlot200ResponseScope1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**transport_co2** | **float** | CO2 emissions from transport, in tonnes-CO2e | +**transport_ch4** | **float** | CH4 emissions from transport, in tonnes-CO2e | +**transport_n2_o** | **float** | N2O emissions from transport, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**manure_direct_n2_o** | **float** | CH4 emissions from manure management (direct), in tonnes-CO2e | +**manure_indirect_n2_o** | **float** | CH4 emissions from manure management (indirect), in tonnes-CO2e | +**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | +**manure_applied_to_soil_n2_o** | **float** | CH4 emissions from manure applied to soil, in tonnes-CO2e | +**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope3.md new file mode 100644 index 00000000..3dc66d1c --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope3.md @@ -0,0 +1,16 @@ +# # PostFeedlot200ResponseScope3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**lime** | **float** | Emissions from lime, in tonnes-CO2e | +**feed** | **float** | Emissions from feed, in tonnes-CO2e | +**purchase_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequest.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequest.md new file mode 100644 index 00000000..8d2025d0 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequest.md @@ -0,0 +1,11 @@ +# # PostFeedlotRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**feedlots** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInner[]**](PostFeedlotRequestFeedlotsInner.md) | | +**vegetation** | [**\OpenAPI\Client\Model\PostFeedlotRequestVegetationInner[]**](PostFeedlotRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInner.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInner.md new file mode 100644 index 00000000..5bc7f085 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInner.md @@ -0,0 +1,29 @@ +# # PostFeedlotRequestFeedlotsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for the feedlot enterprise | [optional] +**system** | **string** | Type of feedlot/production system | +**groups** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerGroupsInner[]**](PostFeedlotRequestFeedlotsInnerGroupsInner.md) | | +**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**purchases** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchases**](PostFeedlotRequestFeedlotsInnerPurchases.md) | | +**sales** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSales**](PostFeedlotRequestFeedlotsInnerSales.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**electricity_source** | **string** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | +**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | +**cottonseed_feed** | **float** | Cotton seed purchased for cattle feed in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**distance_cattle_transported** | **float** | Distance cattle are transported to farm, in km (kilometres) | +**truck_type** | **string** | Type of truck used for cattle transport | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.md new file mode 100644 index 00000000..734890a3 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.md @@ -0,0 +1,9 @@ +# # PostFeedlotRequestFeedlotsInnerGroupsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stays** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner[]**](PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md new file mode 100644 index 00000000..c4d36914 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md @@ -0,0 +1,17 @@ +# # PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**livestock** | **float** | Number of animals (head) | +**stay_average_duration** | **float** | Average stay length in feedlot, in days | +**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | +**dry_matter_digestibility** | **float** | Percent dry matter digestibility of the feed eaten, from 0 to 100 | +**crude_protein** | **float** | Percent crude protein of the whole diet, from 0 to 100 | +**nitrogen_retention** | **float** | Percent nitrogen retention of intake, from 0 to 100 | +**daily_intake** | **float** | Daily intake of dry matter in kilograms per head per day | +**ndf** | **float** | Percent Neutral detergent fibre (NDF) of intake, from 0 to 100 | +**ether_extract** | **float** | Percent ether extract of intake, from 0 to 100 | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchases.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchases.md new file mode 100644 index 00000000..7c66c8f7 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchases.md @@ -0,0 +1,24 @@ +# # PostFeedlotRequestFeedlotsInnerPurchases + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bulls_gt1** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for bulls whose age is greater than 1 year old | [optional] +**bulls_gt1_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded bulls whose age is greater than 1 year old | [optional] +**steers_lt1** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Steers whose age is less than 1 year old | [optional] +**steers_lt1_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Steers whose age is less than 1 year old | [optional] +**steers1_to2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Steers whose age is between 1 and 2 years old | [optional] +**steers1_to2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Steers whose age is between 1 and 2 years old | [optional] +**steers_gt2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Steers whose age is greater than 2 years old | [optional] +**steers_gt2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Steers whose age is greater than 2 years old | [optional] +**cows_gt2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Cows whose age is greater than 2 years old | [optional] +**cows_gt2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Cows whose age is greater than 2 years old | [optional] +**heifers_lt1** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Heifers whose age is less than 1 year old | [optional] +**heifers_lt1_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Heifers whose age is less than 1 year old | [optional] +**heifers1_to2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Heifers whose age is between 1 and 2 years old | [optional] +**heifers1_to2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Heifers whose age is between 1 and 2 years old | [optional] +**heifers_gt2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Heifers whose age is greater than 2 years old | [optional] +**heifers_gt2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Heifers whose age is greater than 2 years old | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md new file mode 100644 index 00000000..f36bed58 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md @@ -0,0 +1,11 @@ +# # PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals purchased (head) | +**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | +**purchase_source** | **string** | Source location of trading cattle purchases | [default to 'sth NSW/VIC/sth SA'] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSales.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSales.md new file mode 100644 index 00000000..de196817 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSales.md @@ -0,0 +1,24 @@ +# # PostFeedlotRequestFeedlotsInnerSales + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bulls_gt1** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for bulls whose age is greater than 1 year old | +**bulls_gt1_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded bulls whose age is greater than 1 year old | +**steers_lt1** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Steers whose age is less than 1 year old | +**steers_lt1_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Steers whose age is less than 1 year old | +**steers1_to2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Steers whose age is between 1 and 2 years old | +**steers1_to2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Steers whose age is between 1 and 2 years old | +**steers_gt2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Steers whose age is greater than 2 years old | +**steers_gt2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Steers whose age is greater than 2 years old | +**cows_gt2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Cows whose age is greater than 2 years old | +**cows_gt2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Cows whose age is greater than 2 years old | +**heifers_lt1** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Heifers whose age is less than 1 year old | +**heifers_lt1_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Heifers whose age is less than 1 year old | +**heifers1_to2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Heifers whose age is between 1 and 2 years old | +**heifers1_to2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Heifers whose age is between 1 and 2 years old | +**heifers_gt2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Heifers whose age is greater than 2 years old | +**heifers_gt2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Heifers whose age is greater than 2 years old | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md new file mode 100644 index 00000000..e20fd85d --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md @@ -0,0 +1,10 @@ +# # PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestVegetationInner.md new file mode 100644 index 00000000..219015b4 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestVegetationInner.md @@ -0,0 +1,10 @@ +# # PostFeedlotRequestVegetationInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**feedlot_proportion** | **float[]** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoat200Response.md b/examples/php-api-client/api-client/docs/Model/PostGoat200Response.md new file mode 100644 index 00000000..2e387b36 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoat200Response.md @@ -0,0 +1,15 @@ +# # PostGoat200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**net** | [**\OpenAPI\Client\Model\PostGoat200ResponseNet**](PostGoat200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostGoat200ResponseIntensities**](PostGoat200ResponseIntensities.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostGoat200ResponseIntermediateInner[]**](PostGoat200ResponseIntermediateInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntensities.md new file mode 100644 index 00000000..fc89a9ea --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntensities.md @@ -0,0 +1,14 @@ +# # PostGoat200ResponseIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount_meat_produced** | **float** | Amount of goat meat produced in kg liveweight | +**amount_wool_produced** | **float** | Amount of wool produced in kg greasy | +**goat_meat_breeding_including_sequestration** | **float** | Goat meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight | +**goat_meat_breeding_excluding_sequestration** | **float** | Goat meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight | +**wool_including_sequestration** | **float** | Wool production including carbon sequestration, in kg-CO2e/kg greasy | +**wool_excluding_sequestration** | **float** | Wool production excluding carbon sequestration, in kg-CO2e/kg greasy | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntermediateInner.md new file mode 100644 index 00000000..420e12d0 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostGoat200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**net** | [**\OpenAPI\Client\Model\PostGoat200ResponseNet**](PostGoat200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostGoat200ResponseIntensities**](PostGoat200ResponseIntensities.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseNet.md new file mode 100644 index 00000000..4c485851 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseNet.md @@ -0,0 +1,9 @@ +# # PostGoat200ResponseNet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequest.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequest.md new file mode 100644 index 00000000..c2ee7b94 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequest.md @@ -0,0 +1,12 @@ +# # PostGoatRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**goats** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInner[]**](PostGoatRequestGoatsInner.md) | | +**vegetation** | [**\OpenAPI\Client\Model\PostGoatRequestVegetationInner[]**](PostGoatRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInner.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInner.md new file mode 100644 index 00000000..cc6cf69a --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInner.md @@ -0,0 +1,24 @@ +# # PostGoatRequestGoatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**classes** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClasses**](PostGoatRequestGoatsInnerClasses.md) | | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**mineral_supplementation** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation**](PostBeefRequestBeefInnerMineralSupplementation.md) | | +**electricity_source** | **string** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | +**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClasses.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClasses.md new file mode 100644 index 00000000..91e3f6c5 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClasses.md @@ -0,0 +1,21 @@ +# # PostGoatRequestGoatsInnerClasses + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bucks_billy** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesBucksBilly**](PostGoatRequestGoatsInnerClassesBucksBilly.md) | | [optional] +**trade_bucks** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeBucks**](PostGoatRequestGoatsInnerClassesTradeBucks.md) | | [optional] +**wethers** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesWethers**](PostGoatRequestGoatsInnerClassesWethers.md) | | [optional] +**trade_wethers** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeWethers**](PostGoatRequestGoatsInnerClassesTradeWethers.md) | | [optional] +**maiden_breeding_does_nannies** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md) | | [optional] +**trade_maiden_breeding_does_nannies** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md) | | [optional] +**breeding_does_nannies** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md) | | [optional] +**trade_breeding_does_nannies** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md) | | [optional] +**other_does_culled_females** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales**](PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md) | | [optional] +**trade_other_does_culled_females** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales**](PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md) | | [optional] +**kids** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesKids**](PostGoatRequestGoatsInnerClassesKids.md) | | [optional] +**trade_kids** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeKids**](PostGoatRequestGoatsInnerClassesTradeKids.md) | | [optional] +**trade_does** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeDoes**](PostGoatRequestGoatsInnerClassesTradeDoes.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md new file mode 100644 index 00000000..87cbf948 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md @@ -0,0 +1,20 @@ +# # PostGoatRequestGoatsInnerClassesBreedingDoesNannies + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBucksBilly.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBucksBilly.md new file mode 100644 index 00000000..efcfd2ef --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBucksBilly.md @@ -0,0 +1,20 @@ +# # PostGoatRequestGoatsInnerClassesBucksBilly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesKids.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesKids.md new file mode 100644 index 00000000..f72b4ac8 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesKids.md @@ -0,0 +1,20 @@ +# # PostGoatRequestGoatsInnerClassesKids + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md new file mode 100644 index 00000000..2ca3dfb0 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md @@ -0,0 +1,20 @@ +# # PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md new file mode 100644 index 00000000..aa1ed5a0 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md @@ -0,0 +1,20 @@ +# # PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md new file mode 100644 index 00000000..7af83652 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md @@ -0,0 +1,20 @@ +# # PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBucks.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBucks.md new file mode 100644 index 00000000..4529872c --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBucks.md @@ -0,0 +1,20 @@ +# # PostGoatRequestGoatsInnerClassesTradeBucks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeDoes.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeDoes.md new file mode 100644 index 00000000..2bdfebd0 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeDoes.md @@ -0,0 +1,20 @@ +# # PostGoatRequestGoatsInnerClassesTradeDoes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeKids.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeKids.md new file mode 100644 index 00000000..2714cfad --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeKids.md @@ -0,0 +1,20 @@ +# # PostGoatRequestGoatsInnerClassesTradeKids + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md new file mode 100644 index 00000000..a7b8561b --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md @@ -0,0 +1,20 @@ +# # PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md new file mode 100644 index 00000000..d72b278d --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md @@ -0,0 +1,20 @@ +# # PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeWethers.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeWethers.md new file mode 100644 index 00000000..4140cbc6 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeWethers.md @@ -0,0 +1,20 @@ +# # PostGoatRequestGoatsInnerClassesTradeWethers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesWethers.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesWethers.md new file mode 100644 index 00000000..582ebfae --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesWethers.md @@ -0,0 +1,20 @@ +# # PostGoatRequestGoatsInnerClassesWethers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**head_shorn** | **float** | Number of goat shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestVegetationInner.md new file mode 100644 index 00000000..9bd68ee7 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGoatRequestVegetationInner.md @@ -0,0 +1,10 @@ +# # PostGoatRequestVegetationInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**goat_proportion** | **float[]** | The proportion of the sequestration that is allocated to goat | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGrains200Response.md b/examples/php-api-client/api-client/docs/Model/PostGrains200Response.md new file mode 100644 index 00000000..15c561a5 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGrains200Response.md @@ -0,0 +1,16 @@ +# # PostGrains200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostGrains200ResponseIntermediateInner[]**](PostGrains200ResponseIntermediateInner.md) | | +**net** | [**\OpenAPI\Client\Model\PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | +**intensities_with_sequestration** | [**\OpenAPI\Client\Model\PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration[]**](PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md) | Emissions intensity for each crop (in order), in t-CO2e/t crop | +**intensities** | **float[]** | Emissions intensity for each crop (in order), in t-CO2e/t crop | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInner.md new file mode 100644 index 00000000..af78bbda --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostGrains200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**intensities_with_sequestration** | [**\OpenAPI\Client\Model\PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration**](PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md b/examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md new file mode 100644 index 00000000..9257c913 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md @@ -0,0 +1,11 @@ +# # PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**grain_produced_tonnes** | **float** | Grain produced in tonnes | +**grains_excluding_sequestration** | **float** | Grains excluding sequestration, in t-CO2e/t grain | +**grains_including_sequestration** | **float** | Grains including sequestration, in t-CO2e/t grain | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGrainsRequest.md b/examples/php-api-client/api-client/docs/Model/PostGrainsRequest.md new file mode 100644 index 00000000..e871c236 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGrainsRequest.md @@ -0,0 +1,13 @@ +# # PostGrainsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**crops** | [**\OpenAPI\Client\Model\PostGrainsRequestCropsInner[]**](PostGrainsRequestCropsInner.md) | | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**vegetation** | [**\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]**](PostCottonRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGrainsRequestCropsInner.md b/examples/php-api-client/api-client/docs/Model/PostGrainsRequestCropsInner.md new file mode 100644 index 00000000..15f93699 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostGrainsRequestCropsInner.md @@ -0,0 +1,30 @@ +# # PostGrainsRequestCropsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**type** | **string** | Crop type. Note that the following crop types are now deprecated, the relevant full calculator should be used instead: 'Cotton', 'Rice', 'Sugar Cane' | +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**production_system** | **string** | Production system of this crop. Note that the following production systems are now deprecated, the relevant full calculator should be used instead: 'Cotton', 'Rice', 'Sugar cane' | +**average_grain_yield** | **float** | Average grain yield, in t/ha (tonnes per hectare) | +**area_sown** | **float** | Area sown, in ha (hectares) | +**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | +**urea_application** | **float** | Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) | +**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | +**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | +**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | +**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | +**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | +**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | +**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | +**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | +**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**diesel_use** | **float** | Diesel usage in L (litres) | +**petrol_use** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostHorticulture200Response.md b/examples/php-api-client/api-client/docs/Model/PostHorticulture200Response.md new file mode 100644 index 00000000..aebbcb90 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostHorticulture200Response.md @@ -0,0 +1,15 @@ +# # PostHorticulture200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostHorticulture200ResponseScope1**](PostHorticulture200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInner[]**](PostHorticulture200ResponseIntermediateInner.md) | | +**net** | [**\OpenAPI\Client\Model\PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration[]**](PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md) | Emissions intensity for each crop (in order) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInner.md new file mode 100644 index 00000000..096ad905 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostHorticulture200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostHorticulture200ResponseScope1**](PostHorticulture200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**intensities_with_sequestration** | [**\OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration**](PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md b/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md new file mode 100644 index 00000000..eb75ac53 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md @@ -0,0 +1,11 @@ +# # PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**crop_produced_tonnes** | **float** | Horticultural crop produced in tonnes | +**tonnes_crop_excluding_sequestration** | **float** | Emissions intensity excluding sequestration, in t-CO2e/t crop | +**tonnes_crop_including_sequestration** | **float** | Emissions intensity including sequestration, in t-CO2e/t crop | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseScope1.md new file mode 100644 index 00000000..571168c2 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseScope1.md @@ -0,0 +1,25 @@ +# # PostHorticulture200ResponseScope1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | +**field_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | +**field_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | +**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostHorticultureRequest.md b/examples/php-api-client/api-client/docs/Model/PostHorticultureRequest.md new file mode 100644 index 00000000..e278b6e1 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostHorticultureRequest.md @@ -0,0 +1,13 @@ +# # PostHorticultureRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**crops** | [**\OpenAPI\Client\Model\PostHorticultureRequestCropsInner[]**](PostHorticultureRequestCropsInner.md) | | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**vegetation** | [**\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]**](PostCottonRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInner.md b/examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInner.md new file mode 100644 index 00000000..6ae5b2e6 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInner.md @@ -0,0 +1,31 @@ +# # PostHorticultureRequestCropsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**type** | **string** | Crop type | +**average_yield** | **float** | Average crop yield, in t/ha (tonnes per hectare) | +**area_sown** | **float** | Area sown, in ha (hectares) | +**urea_application** | **float** | Urea application, in kg Urea/ha (kilograms of urea per hectare) | +**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | +**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | +**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | +**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | +**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | +**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | +**urease_inhibitor_used** | **bool** | Urease inhibitor used. Deprecation note: No longer used (since v1.1.0) | [optional] +**nitrification_inhibitor_used** | **bool** | Nitrification inhibitor used. Deprecation note: No longer used (since v1.1.0) | [optional] +**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | +**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | +**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | +**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**diesel_use** | **float** | Diesel usage in L (litres) | +**petrol_use** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**refrigerants** | [**\OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[]**](PostHorticultureRequestCropsInnerRefrigerantsInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.md b/examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.md new file mode 100644 index 00000000..f464aa72 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.md @@ -0,0 +1,10 @@ +# # PostHorticultureRequestCropsInnerRefrigerantsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**refrigerant** | **string** | Refrigerant type | +**charge_size** | **float** | Amount of refrigerant contained in the appliance, in kg | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPork200Response.md b/examples/php-api-client/api-client/docs/Model/PostPork200Response.md new file mode 100644 index 00000000..cb318058 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPork200Response.md @@ -0,0 +1,15 @@ +# # PostPork200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostPork200ResponseScope1**](PostPork200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostPork200ResponseScope3**](PostPork200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**net** | [**\OpenAPI\Client\Model\PostPork200ResponseNet**](PostPork200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostPork200ResponseIntensities**](PostPork200ResponseIntensities.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostPork200ResponseIntermediateInner[]**](PostPork200ResponseIntermediateInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntensities.md new file mode 100644 index 00000000..c35b335f --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntensities.md @@ -0,0 +1,11 @@ +# # PostPork200ResponseIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pork_meat_including_sequestration** | **float** | Pork meat including carbon sequestration, in kg-CO2e/kg liveweight | +**pork_meat_excluding_sequestration** | **float** | Pork meat excluding carbon sequestration, in kg-CO2e/kg liveweight | +**liveweight_produced_kg** | **float** | Pork meat produced in kg liveweight | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntermediateInner.md new file mode 100644 index 00000000..ff07d8a3 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostPork200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | +**scope1** | [**\OpenAPI\Client\Model\PostPork200ResponseScope1**](PostPork200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostPork200ResponseScope3**](PostPork200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**net** | [**\OpenAPI\Client\Model\PostPork200ResponseNet**](PostPork200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostPork200ResponseIntensities**](PostPork200ResponseIntensities.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseNet.md new file mode 100644 index 00000000..46d3b1e6 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseNet.md @@ -0,0 +1,9 @@ +# # PostPork200ResponseNet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope1.md new file mode 100644 index 00000000..d78ad3a3 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope1.md @@ -0,0 +1,25 @@ +# # PostPork200ResponseScope1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | +**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | +**manure_management_direct_n2_o** | **float** | CH4 emissions from manure management (direct), in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**atmospheric_deposition_indirect_n2_o** | **float** | N2O emissions from atmospheric deposition indirect, in tonnes-CO2e | +**leaching_and_runoff_soil_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**leaching_and_runoff_mmsn2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope3.md new file mode 100644 index 00000000..275eb124 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope3.md @@ -0,0 +1,17 @@ +# # PostPork200ResponseScope3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | +**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**lime** | **float** | Emissions from lime, in tonnes-CO2e | +**purchased_livestock** | **float** | Emissions from purchased pigs, in tonnes-CO2e | +**bedding** | **float** | Emissions from purchased bedding, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequest.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequest.md new file mode 100644 index 00000000..73bd9edc --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequest.md @@ -0,0 +1,13 @@ +# # PostPorkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude. Deprecation note: This field is deprecated | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**pork** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInner[]**](PostPorkRequestPorkInner.md) | | +**vegetation** | [**\OpenAPI\Client\Model\PostPorkRequestVegetationInner[]**](PostPorkRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInner.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInner.md new file mode 100644 index 00000000..03ccfd62 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInner.md @@ -0,0 +1,23 @@ +# # PostPorkRequestPorkInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**classes** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClasses**](PostPorkRequestPorkInnerClasses.md) | | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**electricity_source** | **string** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**bedding_hay_barley_straw** | **float** | Hay, barley, straw, etc. purchased for pig bedding, in tonnes | +**feed_products** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerFeedProductsInner[]**](PostPorkRequestPorkInnerFeedProductsInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClasses.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClasses.md new file mode 100644 index 00000000..ca87738a --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClasses.md @@ -0,0 +1,15 @@ +# # PostPorkRequestPorkInnerClasses + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sows** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSows**](PostPorkRequestPorkInnerClassesSows.md) | | [optional] +**boars** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesBoars**](PostPorkRequestPorkInnerClassesBoars.md) | | [optional] +**gilts** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesGilts**](PostPorkRequestPorkInnerClassesGilts.md) | | [optional] +**suckers** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSuckers**](PostPorkRequestPorkInnerClassesSuckers.md) | | [optional] +**weaners** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesWeaners**](PostPorkRequestPorkInnerClassesWeaners.md) | | [optional] +**growers** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesGrowers**](PostPorkRequestPorkInnerClassesGrowers.md) | | [optional] +**slaughter_pigs** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSlaughterPigs**](PostPorkRequestPorkInnerClassesSlaughterPigs.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesBoars.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesBoars.md new file mode 100644 index 00000000..42028afb --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesBoars.md @@ -0,0 +1,18 @@ +# # PostPorkRequestPorkInnerClassesBoars + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Pig numbers in autumn | +**winter** | **float** | Pig numbers in winter | +**spring** | **float** | Pig numbers in spring | +**summer** | **float** | Pig numbers in summer | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] +**manure** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGilts.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGilts.md new file mode 100644 index 00000000..dfeade54 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGilts.md @@ -0,0 +1,18 @@ +# # PostPorkRequestPorkInnerClassesGilts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Pig numbers in autumn | +**winter** | **float** | Pig numbers in winter | +**spring** | **float** | Pig numbers in spring | +**summer** | **float** | Pig numbers in summer | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] +**manure** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGrowers.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGrowers.md new file mode 100644 index 00000000..818d6946 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGrowers.md @@ -0,0 +1,18 @@ +# # PostPorkRequestPorkInnerClassesGrowers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Pig numbers in autumn | +**winter** | **float** | Pig numbers in winter | +**spring** | **float** | Pig numbers in spring | +**summer** | **float** | Pig numbers in summer | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] +**manure** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.md new file mode 100644 index 00000000..fa3b3b30 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.md @@ -0,0 +1,18 @@ +# # PostPorkRequestPorkInnerClassesSlaughterPigs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Pig numbers in autumn | +**winter** | **float** | Pig numbers in winter | +**spring** | **float** | Pig numbers in spring | +**summer** | **float** | Pig numbers in summer | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] +**manure** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSows.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSows.md new file mode 100644 index 00000000..14383569 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSows.md @@ -0,0 +1,18 @@ +# # PostPorkRequestPorkInnerClassesSows + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Pig numbers in autumn | +**winter** | **float** | Pig numbers in winter | +**spring** | **float** | Pig numbers in spring | +**summer** | **float** | Pig numbers in summer | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] +**manure** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManure.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManure.md new file mode 100644 index 00000000..9c957cbb --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManure.md @@ -0,0 +1,12 @@ +# # PostPorkRequestPorkInnerClassesSowsManure + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spring** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | +**summer** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | +**autumn** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | +**winter** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.md new file mode 100644 index 00000000..772b029e --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.md @@ -0,0 +1,13 @@ +# # PostPorkRequestPorkInnerClassesSowsManureSpring + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**outdoor_systems** | **float** | Amount of volatile solids sent to outoor systems in t (tonnes) | [optional] +**covered_anaerobic_pond** | **float** | Amount of volatile solids sent to covered anaerobic pond in t (tonnes) | [optional] +**uncovered_anaerobic_pond** | **float** | Amount of volatile solids sent to uncovered anaerobic pond in t (tonnes) | [optional] +**deep_litter** | **float** | Amount of volatile solids sent to deep litter in t (tonnes) | [optional] +**undefined_system** | **float** | Amount of volatile solids where manure management system is not known or defined, in t (tonnes) | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSuckers.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSuckers.md new file mode 100644 index 00000000..624b7cc5 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSuckers.md @@ -0,0 +1,18 @@ +# # PostPorkRequestPorkInnerClassesSuckers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Pig numbers in autumn | +**winter** | **float** | Pig numbers in winter | +**spring** | **float** | Pig numbers in spring | +**summer** | **float** | Pig numbers in summer | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] +**manure** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesWeaners.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesWeaners.md new file mode 100644 index 00000000..a8cd9476 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesWeaners.md @@ -0,0 +1,18 @@ +# # PostPorkRequestPorkInnerClassesWeaners + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Pig numbers in autumn | +**winter** | **float** | Pig numbers in winter | +**spring** | **float** | Pig numbers in spring | +**summer** | **float** | Pig numbers in summer | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] +**manure** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInner.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInner.md new file mode 100644 index 00000000..dce99f7f --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInner.md @@ -0,0 +1,12 @@ +# # PostPorkRequestPorkInnerFeedProductsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feed_purchased** | **float** | Pig feed purchased, in tonnes | +**additional_ingredients** | **float** | Fraction of additional ingredient in feed mix, from 0 to 1 | +**emissions_intensity** | **float** | Emissions intensity of feed product in GHG (kg CO2-e/kg input) | +**ingredients** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerFeedProductsInnerIngredients**](PostPorkRequestPorkInnerFeedProductsInnerIngredients.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md new file mode 100644 index 00000000..5f9bf55c --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md @@ -0,0 +1,20 @@ +# # PostPorkRequestPorkInnerFeedProductsInnerIngredients + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**wheat** | **float** | | [optional] +**barley** | **float** | | [optional] +**whey_powder** | **float** | | [optional] +**canola_meal** | **float** | | [optional] +**soybean_meal** | **float** | | [optional] +**meat_meal** | **float** | | [optional] +**blood_meal** | **float** | | [optional] +**fishmeal** | **float** | | [optional] +**tallow** | **float** | | [optional] +**wheat_bran** | **float** | | [optional] +**beet_pulp** | **float** | | [optional] +**mill_mix** | **float** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestVegetationInner.md new file mode 100644 index 00000000..7ea772c7 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPorkRequestVegetationInner.md @@ -0,0 +1,10 @@ +# # PostPorkRequestVegetationInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**allocated_proportion** | **float[]** | The proportion of the sequestration that is allocated to the activity | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200Response.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200Response.md new file mode 100644 index 00000000..492edffb --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultry200Response.md @@ -0,0 +1,16 @@ +# # PostPoultry200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostPoultry200ResponseScope1**](PostPoultry200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostPoultry200ResponseScope3**](PostPoultry200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate_broilers** | [**\OpenAPI\Client\Model\PostPoultry200ResponseIntermediateBroilersInner[]**](PostPoultry200ResponseIntermediateBroilersInner.md) | | +**intermediate_layers** | [**\OpenAPI\Client\Model\PostPoultry200ResponseIntermediateLayersInner[]**](PostPoultry200ResponseIntermediateLayersInner.md) | | +**net** | [**\OpenAPI\Client\Model\PostPoultry200ResponseNet**](PostPoultry200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostPoultry200ResponseIntensities**](PostPoultry200ResponseIntensities.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntensities.md new file mode 100644 index 00000000..079c536e --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntensities.md @@ -0,0 +1,14 @@ +# # PostPoultry200ResponseIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**poultry_meat_including_sequestration** | **float** | Poultry meat including carbon sequestration, in kg-CO2e/kg liveweight | +**poultry_meat_excluding_sequestration** | **float** | Poultry meat excluding carbon sequestration, in kg-CO2e/kg liveweight | +**poultry_eggs_including_sequestration** | **float** | Poultry eggs including carbon sequestration, in kg-CO2e/kg liveweight | +**poultry_eggs_excluding_sequestration** | **float** | Poultry eggs excluding carbon sequestration, in kg-CO2e/kg liveweight | +**meat_produced_kg** | **float** | Poultry meat produced in kg | +**eggs_produced_kg** | **float** | Amount of eggs produced, in kg | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInner.md new file mode 100644 index 00000000..29847d18 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInner.md @@ -0,0 +1,15 @@ +# # PostPoultry200ResponseIntermediateBroilersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | +**scope1** | [**\OpenAPI\Client\Model\PostPoultry200ResponseScope1**](PostPoultry200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostPoultry200ResponseScope3**](PostPoultry200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostPoultry200ResponseIntermediateBroilersInnerIntensities**](PostPoultry200ResponseIntermediateBroilersInnerIntensities.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md new file mode 100644 index 00000000..addd767d --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md @@ -0,0 +1,11 @@ +# # PostPoultry200ResponseIntermediateBroilersInnerIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**poultry_meat_including_sequestration** | **float** | Poultry meat including carbon sequestration, in kg-CO2e/kg liveweight | +**poultry_meat_excluding_sequestration** | **float** | Poultry meat excluding carbon sequestration, in kg-CO2e/kg liveweight | +**meat_produced_kg** | **float** | Poultry meat produced in kg liveweight | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInner.md new file mode 100644 index 00000000..1f036c55 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInner.md @@ -0,0 +1,15 @@ +# # PostPoultry200ResponseIntermediateLayersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | +**scope1** | [**\OpenAPI\Client\Model\PostPoultry200ResponseScope1**](PostPoultry200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostPoultry200ResponseScope3**](PostPoultry200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostPoultry200ResponseIntermediateLayersInnerIntensities**](PostPoultry200ResponseIntermediateLayersInnerIntensities.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.md new file mode 100644 index 00000000..b9528fb9 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.md @@ -0,0 +1,11 @@ +# # PostPoultry200ResponseIntermediateLayersInnerIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**poultry_eggs_including_sequestration** | **float** | Poultry eggs including carbon sequestration, in kg-CO2e/kg eggs | +**poultry_eggs_excluding_sequestration** | **float** | Poultry eggs excluding carbon sequestration, in kg-CO2e/kg eggs | +**eggs_produced_kg** | **float** | Poultry eggs produced in kg | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseNet.md new file mode 100644 index 00000000..c23b8efd --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseNet.md @@ -0,0 +1,11 @@ +# # PostPoultry200ResponseNet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | +**broilers** | **float** | Net emissions of broilers, in tonnes-CO2e/year | +**layers** | **float** | Net emissions of layers, in tonnes-CO2e/year | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope1.md new file mode 100644 index 00000000..4540c8ac --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope1.md @@ -0,0 +1,19 @@ +# # PostPoultry200ResponseScope1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | +**manure_management_n2_o** | **float** | N2O emissions from manure management, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope3.md new file mode 100644 index 00000000..9c5012ca --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope3.md @@ -0,0 +1,15 @@ +# # PostPoultry200ResponseScope3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | +**purchased_hay** | **float** | Emissions from purchased hay, in tonnes-CO2e | +**purchased_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequest.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequest.md new file mode 100644 index 00000000..ca9e7009 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequest.md @@ -0,0 +1,14 @@ +# # PostPoultryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**broilers** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInner[]**](PostPoultryRequestBroilersInner.md) | | +**layers** | [**\OpenAPI\Client\Model\PostPoultryRequestLayersInner[]**](PostPoultryRequestLayersInner.md) | | +**vegetation** | [**\OpenAPI\Client\Model\PostPoultryRequestVegetationInner[]**](PostPoultryRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInner.md new file mode 100644 index 00000000..b97f28fa --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInner.md @@ -0,0 +1,28 @@ +# # PostPoultryRequestBroilersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**groups** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInner[]**](PostPoultryRequestBroilersInnerGroupsInner.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**electricity_source** | **string** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**hay** | **float** | Hay purchased in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**manure_waste_allocation** | **float** | Fraction allocation of manure waste, from 0 to 1. Note: only for pasture range, paddock and free range systems | +**waste_handled_drylot_or_storage** | **float** | Fraction of waste handled through dryland and solid storage, from 0 to 1 | +**litter_recycled** | **float** | Fraction of litter recycled, from 0 to 1 | +**litter_recycle_frequency** | **float** | Number of litter cycles per year | +**purchased_free_range** | **float** | Fraction of chickens purchased that are free range. Note: fraction of chickens purchased that are conventional is `1 - purchasedFreeRange` | +**meat_chicken_growers_purchases** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases**](PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md) | | +**meat_chicken_layers_purchases** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenLayersPurchases**](PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md) | | +**meat_other_purchases** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatOtherPurchases**](PostPoultryRequestBroilersInnerMeatOtherPurchases.md) | | +**sales** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerSalesInner[]**](PostPoultryRequestBroilersInnerSalesInner.md) | Broiler sales | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInner.md new file mode 100644 index 00000000..8ed49a52 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInner.md @@ -0,0 +1,14 @@ +# # PostPoultryRequestBroilersInnerGroupsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meat_chicken_growers** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers**](PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md) | | +**meat_chicken_layers** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers**](PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md) | | +**meat_other** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers**](PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md) | | +**feed** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInner[]**](PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md) | | +**custom_feed_purchased** | **float** | Custom feed purchased, in tonnes | +**custom_feed_emission_intensity** | **float** | Emissions intensity of custom feed in GHG (kg CO2-e/kg input) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md new file mode 100644 index 00000000..65874343 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md @@ -0,0 +1,12 @@ +# # PostPoultryRequestBroilersInnerGroupsInnerFeedInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ingredients** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients**](PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md) | | +**feed_purchased** | **float** | Feed purchased, in tonnes | +**additional_ingredient** | **float** | Fraction of additional ingredients in feed mix, from 0 to 1 | +**emission_intensity** | **float** | Emissions intensity of feed product in GHG (kg CO2-e/kg input) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md new file mode 100644 index 00000000..2e944c48 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md @@ -0,0 +1,13 @@ +# # PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**wheat** | **float** | | [optional] +**barley** | **float** | | [optional] +**sorghum** | **float** | | [optional] +**soybean** | **float** | | [optional] +**millrun** | **float** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md new file mode 100644 index 00000000..f696d318 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md @@ -0,0 +1,18 @@ +# # PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**birds** | **float** | Total number of birds/head | +**average_stay_length50** | **float** | Average length of stay until 50% of the flock is depleted, in days | +**liveweight50** | **float** | Average liveweight during the 50% depletion period, in kg | +**average_stay_length100** | **float** | Average length of stay until 100% of the flock is depleted, in days | +**liveweight100** | **float** | Average liveweight during the 100% depletion period, in kg | +**dry_matter_intake** | **float** | Dry matter intake, in kg/head/day | [optional] +**dry_matter_digestibility** | **float** | Dry matter digestibility fraction, from 0 to 1 | [optional] +**crude_protein** | **float** | Crude protein fraction, from 0 to 1 | [optional] +**manure_ash** | **float** | Manure ash fraction, from 0 to 1 | [optional] +**nitrogen_retention_rate** | **float** | Nitrogen retention rate fraction, from 0 to 1 | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md new file mode 100644 index 00000000..17b52954 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md @@ -0,0 +1,10 @@ +# # PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals purchased (head) | +**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md new file mode 100644 index 00000000..fcb32906 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md @@ -0,0 +1,10 @@ +# # PostPoultryRequestBroilersInnerMeatChickenLayersPurchases + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals purchased (head) | +**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.md new file mode 100644 index 00000000..1f365730 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.md @@ -0,0 +1,10 @@ +# # PostPoultryRequestBroilersInnerMeatOtherPurchases + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals purchased (head) | +**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerSalesInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerSalesInner.md new file mode 100644 index 00000000..93892364 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerSalesInner.md @@ -0,0 +1,11 @@ +# # PostPoultryRequestBroilersInnerSalesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meat_chicken_growers_sales** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | | +**meat_chicken_layers** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | | +**meat_other** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInner.md new file mode 100644 index 00000000..35f8a59f --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInner.md @@ -0,0 +1,32 @@ +# # PostPoultryRequestLayersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**layers** | [**\OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayers**](PostPoultryRequestLayersInnerLayers.md) | | +**meat_chicken_layers** | [**\OpenAPI\Client\Model\PostPoultryRequestLayersInnerMeatChickenLayers**](PostPoultryRequestLayersInnerMeatChickenLayers.md) | | +**feed** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInner[]**](PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md) | | +**purchased_free_range** | **float** | Fraction of chickens purchased that are free range. Note: fraction of chickens purchased that are conventional is `1 - purchasedFreeRange` | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**electricity_source** | **string** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**hay** | **float** | Hay purchased in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**manure_waste_allocation** | **float** | Fraction allocation of manure waste, from 0 to 1. Note: only for pasture range, paddock and free range systems | +**waste_handled_drylot_or_storage** | **float** | Fraction of waste handled through dryland and solid storage, from 0 to 1 | +**litter_recycled** | **float** | Fraction of litter recycled, from 0 to 1 | +**litter_recycle_frequency** | **float** | Number of litter cycles per year | +**meat_chicken_layers_purchases** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenLayersPurchases**](PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md) | | +**layers_purchases** | [**\OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayersPurchases**](PostPoultryRequestLayersInnerLayersPurchases.md) | | +**custom_feed_purchased** | **float** | Custom feed purchased, in tonnes | +**custom_feed_emission_intensity** | **float** | Emissions intensity of custom feed in GHG (kg CO2-e/kg input) | +**meat_chicken_layers_egg_sale** | [**\OpenAPI\Client\Model\PostPoultryRequestLayersInnerMeatChickenLayersEggSale**](PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md) | | +**layers_egg_sale** | [**\OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayersEggSale**](PostPoultryRequestLayersInnerLayersEggSale.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayers.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayers.md new file mode 100644 index 00000000..1c596016 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayers.md @@ -0,0 +1,12 @@ +# # PostPoultryRequestLayersInnerLayers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Flock numbers in autumn | +**winter** | **float** | Flock numbers in winter | +**spring** | **float** | Flock numbers in spring | +**summer** | **float** | Flock numbers in summer | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersEggSale.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersEggSale.md new file mode 100644 index 00000000..6ccb62a0 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersEggSale.md @@ -0,0 +1,10 @@ +# # PostPoultryRequestLayersInnerLayersEggSale + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eggs_produced** | **float** | Number of eggs produced in a year per bird | +**average_weight** | **float** | Average egg weight in grams | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersPurchases.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersPurchases.md new file mode 100644 index 00000000..9d075b08 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersPurchases.md @@ -0,0 +1,10 @@ +# # PostPoultryRequestLayersInnerLayersPurchases + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals purchased (head) | +**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayers.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayers.md new file mode 100644 index 00000000..d963ae22 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayers.md @@ -0,0 +1,12 @@ +# # PostPoultryRequestLayersInnerMeatChickenLayers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | Flock numbers in autumn | +**winter** | **float** | Flock numbers in winter | +**spring** | **float** | Flock numbers in spring | +**summer** | **float** | Flock numbers in summer | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md new file mode 100644 index 00000000..baceb65e --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md @@ -0,0 +1,10 @@ +# # PostPoultryRequestLayersInnerMeatChickenLayersEggSale + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eggs_produced** | **float** | Number of eggs produced in a year per bird | +**average_weight** | **float** | Average egg weight in grams | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestVegetationInner.md new file mode 100644 index 00000000..75fd2985 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestVegetationInner.md @@ -0,0 +1,11 @@ +# # PostPoultryRequestVegetationInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**broilers_proportion** | **float[]** | The proportion of the sequestration that is allocated to broilers | +**layers_proportion** | **float[]** | The proportion of the sequestration that is allocated to layers | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessing200Response.md b/examples/php-api-client/api-client/docs/Model/PostProcessing200Response.md new file mode 100644 index 00000000..f7105354 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostProcessing200Response.md @@ -0,0 +1,16 @@ +# # PostProcessing200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostProcessing200ResponseScope1**](PostProcessing200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostProcessing200ResponseScope3**](PostProcessing200ResponseScope3.md) | | +**purchased_offsets** | [**\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | +**net** | [**\OpenAPI\Client\Model\PostProcessing200ResponseNet**](PostProcessing200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostProcessing200ResponseIntensitiesInner[]**](PostProcessing200ResponseIntensitiesInner.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostProcessing200ResponseIntermediateInner[]**](PostProcessing200ResponseIntermediateInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntensitiesInner.md b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntensitiesInner.md new file mode 100644 index 00000000..f3649eaa --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntensitiesInner.md @@ -0,0 +1,12 @@ +# # PostProcessing200ResponseIntensitiesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units_produced** | **float** | Number of processed product units produced | +**unit_of_product** | **string** | Unit type of the product being produced (used by \"unitsProduced\") | +**processing_excluding_carbon_offsets** | **float** | Processing emissions intensity excluding carbon offsets, in kg-CO2e/number of units produced | +**processing_including_carbon_offsets** | **float** | Processing emissions intensity including carbon offsets, in kg-CO2e/number of units produced | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntermediateInner.md new file mode 100644 index 00000000..e64a5dfd --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostProcessing200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostProcessing200ResponseScope1**](PostProcessing200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostProcessing200ResponseScope3**](PostProcessing200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostProcessing200ResponseIntensitiesInner**](PostProcessing200ResponseIntensitiesInner.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseNet.md new file mode 100644 index 00000000..25b57eaf --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseNet.md @@ -0,0 +1,9 @@ +# # PostProcessing200ResponseNet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope1.md new file mode 100644 index 00000000..2637a607 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope1.md @@ -0,0 +1,20 @@ +# # PostProcessing200ResponseScope1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | +**purchased_co2** | **float** | Emissions from purchased CO2, in tonnes-CO2e | +**wastewater_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | +**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope3.md new file mode 100644 index 00000000..677c73c1 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope3.md @@ -0,0 +1,12 @@ +# # PostProcessing200ResponseScope3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**solid_waste_sent_offsite** | **float** | Emissions from solid waste sent offsite, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessingRequest.md b/examples/php-api-client/api-client/docs/Model/PostProcessingRequest.md new file mode 100644 index 00000000..5d57748f --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostProcessingRequest.md @@ -0,0 +1,10 @@ +# # PostProcessingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**products** | [**\OpenAPI\Client\Model\PostProcessingRequestProductsInner[]**](PostProcessingRequestProductsInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInner.md b/examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInner.md new file mode 100644 index 00000000..65d4f871 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInner.md @@ -0,0 +1,19 @@ +# # PostProcessingRequestProductsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**product** | [**\OpenAPI\Client\Model\PostProcessingRequestProductsInnerProduct**](PostProcessingRequestProductsInnerProduct.md) | | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**electricity_source** | **string** | Source of electricity | +**fuel** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | +**refrigerants** | [**\OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[]**](PostHorticultureRequestCropsInnerRefrigerantsInner.md) | Refrigerant type | +**fluid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | +**solid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | +**purchased_co2** | **float** | Quantity of CO2 purchased, in kg CO2 | +**carbon_offsets** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInnerProduct.md b/examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInnerProduct.md new file mode 100644 index 00000000..47be86f7 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInnerProduct.md @@ -0,0 +1,10 @@ +# # PostProcessingRequestProductsInnerProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit** | **string** | | +**amount_made_per_year** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostRice200Response.md b/examples/php-api-client/api-client/docs/Model/PostRice200Response.md new file mode 100644 index 00000000..7e48e11a --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostRice200Response.md @@ -0,0 +1,15 @@ +# # PostRice200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostRice200ResponseScope1**](PostRice200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostRice200ResponseIntermediateInner[]**](PostRice200ResponseIntermediateInner.md) | | +**net** | [**\OpenAPI\Client\Model\PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostRice200ResponseIntensities**](PostRice200ResponseIntensities.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntensities.md new file mode 100644 index 00000000..bf834b51 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntensities.md @@ -0,0 +1,12 @@ +# # PostRice200ResponseIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rice_produced_tonnes** | **float** | Rice produced in tonnes | +**rice_excluding_sequestration** | **float** | Rice excluding sequestration, in t-CO2e/t rice | +**rice_including_sequestration** | **float** | Rice including sequestration, in t-CO2e/t rice | +**intensity** | **float** | Emissions intensity of rice production. Deprecation note: Use `riceIncludingSequestration` instead | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInner.md new file mode 100644 index 00000000..e7774490 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostRice200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostRice200ResponseScope1**](PostRice200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**intensities** | [**\OpenAPI\Client\Model\PostRice200ResponseIntermediateInnerIntensities**](PostRice200ResponseIntermediateInnerIntensities.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..cdc1a824 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,12 @@ +# # PostRice200ResponseIntermediateInnerIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rice_produced_tonnes** | **float** | Rice produced in tonnes | +**rice_excluding_sequestration** | **float** | Rice excluding sequestration, in t-CO2e/t rice | +**rice_including_sequestration** | **float** | Rice including sequestration, in t-CO2e/t rice | +**intensity** | **float** | Emissions intensity of rice production. Deprecation note: Use `riceIncludingSequestration` instead | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostRice200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostRice200ResponseScope1.md new file mode 100644 index 00000000..e5b4095f --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostRice200ResponseScope1.md @@ -0,0 +1,24 @@ +# # PostRice200ResponseScope1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**field_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | +**rice_cultivation_ch4** | **float** | CH4 emissions from rice cultivation, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**field_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | +**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostRiceRequest.md b/examples/php-api-client/api-client/docs/Model/PostRiceRequest.md new file mode 100644 index 00000000..d5b7df5e --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostRiceRequest.md @@ -0,0 +1,13 @@ +# # PostRiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**crops** | [**\OpenAPI\Client\Model\PostRiceRequestCropsInner[]**](PostRiceRequestCropsInner.md) | | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**vegetation** | [**\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]**](PostCottonRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostRiceRequestCropsInner.md b/examples/php-api-client/api-client/docs/Model/PostRiceRequestCropsInner.md new file mode 100644 index 00000000..05912466 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostRiceRequestCropsInner.md @@ -0,0 +1,31 @@ +# # PostRiceRequestCropsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**average_rice_yield** | **float** | Average rice yield, in t/ha (tonnes per hectare) | +**area_sown** | **float** | Area sown, in ha (hectares) | +**growing_season_days** | **float** | The length of the growing season for this crop, in days | +**water_regime_type** | **string** | | +**water_regime_sub_type** | **string** | | +**rice_preseason_flooding_period** | **string** | | +**urea_application** | **float** | Urea application, in kg Urea/ha (kilograms of urea per hectare) | +**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | +**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | +**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | +**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | +**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | +**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | +**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | +**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | +**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**diesel_use** | **float** | Diesel usage in L (litres) | +**petrol_use** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheep200Response.md b/examples/php-api-client/api-client/docs/Model/PostSheep200Response.md new file mode 100644 index 00000000..bc3fd526 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheep200Response.md @@ -0,0 +1,15 @@ +# # PostSheep200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInner[]**](PostSheep200ResponseIntermediateInner.md) | | +**net** | [**\OpenAPI\Client\Model\PostSheep200ResponseNet**](PostSheep200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities**](PostSheep200ResponseIntermediateInnerIntensities.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInner.md new file mode 100644 index 00000000..20461aaf --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostSheep200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**intensities** | [**\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities**](PostSheep200ResponseIntermediateInnerIntensities.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..a86735a0 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,14 @@ +# # PostSheep200ResponseIntermediateInnerIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**wool_produced_kg** | **float** | Greasy wool produced in kg | +**sheep_meat_produced_kg** | **float** | Sheep meat produced in kg liveweight | +**wool_including_sequestration** | **float** | Wool production including carbon sequestration, in kg-CO2e/kg greasy | +**wool_excluding_sequestration** | **float** | Wool production excluding carbon sequestration, in kg-CO2e/kg greasy | +**sheep_meat_breeding_including_sequestration** | **float** | Sheep meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight | +**sheep_meat_breeding_excluding_sequestration** | **float** | Sheep meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseNet.md new file mode 100644 index 00000000..dc966891 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseNet.md @@ -0,0 +1,10 @@ +# # PostSheep200ResponseNet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | +**sheep** | **float** | Net emissions of sheep, in tonnes-CO2e/year | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequest.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequest.md new file mode 100644 index 00000000..310d015e --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepRequest.md @@ -0,0 +1,13 @@ +# # PostSheepRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**sheep** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInner[]**](PostSheepRequestSheepInner.md) | | +**vegetation** | [**\OpenAPI\Client\Model\PostSheepRequestVegetationInner[]**](PostSheepRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInner.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInner.md new file mode 100644 index 00000000..d9676494 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInner.md @@ -0,0 +1,27 @@ +# # PostSheepRequestSheepInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**classes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClasses**](PostSheepRequestSheepInnerClasses.md) | | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**mineral_supplementation** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation**](PostBeefRequestBeefInnerMineralSupplementation.md) | | +**electricity_source** | **string** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | +**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | +**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | +**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | +**merino_percent** | **float** | Percent of sheep purchases that are of type Merino, from 0 to 100 | +**ewes_lambing** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerEwesLambing**](PostSheepRequestSheepInnerEwesLambing.md) | | +**seasonal_lambing** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerSeasonalLambing**](PostSheepRequestSheepInnerSeasonalLambing.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClasses.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClasses.md new file mode 100644 index 00000000..214d3bbb --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClasses.md @@ -0,0 +1,24 @@ +# # PostSheepRequestSheepInnerClasses + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rams** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**trade_rams** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**wethers** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**trade_wethers** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**maiden_breeding_ewes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**trade_maiden_breeding_ewes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**breeding_ewes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | +**trade_breeding_ewes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**other_ewes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**trade_other_ewes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**ewe_lambs** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | +**trade_ewe_lambs** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**wether_lambs** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | +**trade_wether_lambs** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] +**trade_ewes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesTradeEwes**](PostSheepRequestSheepInnerClassesTradeEwes.md) | | [optional] +**trade_lambs_and_hoggets** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesTradeLambsAndHoggets**](PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRams.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRams.md new file mode 100644 index 00000000..fe7b582d --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRams.md @@ -0,0 +1,20 @@ +# # PostSheepRequestSheepInnerClassesRams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**head_shorn** | **float** | Number of sheep shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRamsAutumn.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRamsAutumn.md new file mode 100644 index 00000000..db154478 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRamsAutumn.md @@ -0,0 +1,14 @@ +# # PostSheepRequestSheepInnerClassesRamsAutumn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**head** | **float** | Number of animals (head) | +**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | +**liveweight_gain** | **float** | Average liveweight gain in kg/day (kilogram per day) | +**crude_protein** | **float** | Crude protein percent, between 0 and 100 | [optional] +**dry_matter_digestibility** | **float** | Dry matter digestibility percent, between 0 and 100 | [optional] +**feed_availability** | **float** | Feed availability, in t/ha (tonnes per hectare) | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeEwes.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeEwes.md new file mode 100644 index 00000000..479bcfdf --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeEwes.md @@ -0,0 +1,20 @@ +# # PostSheepRequestSheepInnerClassesTradeEwes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**head_shorn** | **float** | Number of sheep shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md new file mode 100644 index 00000000..b22a1795 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md @@ -0,0 +1,20 @@ +# # PostSheepRequestSheepInnerClassesTradeLambsAndHoggets + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**winter** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**spring** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**summer** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | +**head_shorn** | **float** | Number of sheep shorn, in head | +**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | +**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | +**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] +**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] +**head_sold** | **float** | Number of animals sold (head) | +**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | +**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerEwesLambing.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerEwesLambing.md new file mode 100644 index 00000000..7fd48350 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerEwesLambing.md @@ -0,0 +1,12 @@ +# # PostSheepRequestSheepInnerEwesLambing + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | | +**winter** | **float** | | +**spring** | **float** | | +**summer** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerSeasonalLambing.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerSeasonalLambing.md new file mode 100644 index 00000000..55f62adb --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerSeasonalLambing.md @@ -0,0 +1,12 @@ +# # PostSheepRequestSheepInnerSeasonalLambing + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autumn** | **float** | | +**winter** | **float** | | +**spring** | **float** | | +**summer** | **float** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestVegetationInner.md new file mode 100644 index 00000000..89747bee --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepRequestVegetationInner.md @@ -0,0 +1,10 @@ +# # PostSheepRequestVegetationInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**sheep_proportion** | **float[]** | The proportion of the sequestration that is allocated to sheep | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200Response.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200Response.md new file mode 100644 index 00000000..edbb7fe4 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200Response.md @@ -0,0 +1,17 @@ +# # PostSheepbeef200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediate**](PostSheepbeef200ResponseIntermediate.md) | | +**intermediate_beef** | [**\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInner[]**](PostBeef200ResponseIntermediateInner.md) | | +**intermediate_sheep** | [**\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInner[]**](PostSheep200ResponseIntermediateInner.md) | | +**net** | [**\OpenAPI\Client\Model\PostSheepbeef200ResponseNet**](PostSheepbeef200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostSheepbeef200ResponseIntensities**](PostSheepbeef200ResponseIntensities.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntensities.md new file mode 100644 index 00000000..6000ee2c --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntensities.md @@ -0,0 +1,17 @@ +# # PostSheepbeef200ResponseIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**beef_including_sequestration** | **float** | Beef including carbon sequestration, in kg-CO2e/kg liveweight | +**beef_excluding_sequestration** | **float** | Beef excluding carbon sequestration, in kg-CO2e/kg liveweight | +**liveweight_beef_produced_kg** | **float** | Liveweight produced in kg | +**wool_including_sequestration** | **float** | Wool production including carbon sequestration, in kg-CO2e/kg greasy | +**wool_excluding_sequestration** | **float** | Wool production excluding carbon sequestration, in kg-CO2e/kg greasy | +**sheep_meat_breeding_including_sequestration** | **float** | Sheep meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight | +**sheep_meat_breeding_excluding_sequestration** | **float** | Sheep meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight | +**wool_produced_kg** | **float** | Greasy wool produced in kg | +**sheep_meat_produced_kg** | **float** | Sheep meat produced in kg liveweight | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediate.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediate.md new file mode 100644 index 00000000..821fde80 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediate.md @@ -0,0 +1,10 @@ +# # PostSheepbeef200ResponseIntermediate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**beef** | [**\OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediateBeef**](PostSheepbeef200ResponseIntermediateBeef.md) | | +**sheep** | [**\OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediateSheep**](PostSheepbeef200ResponseIntermediateSheep.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateBeef.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateBeef.md new file mode 100644 index 00000000..6bf1feb2 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateBeef.md @@ -0,0 +1,14 @@ +# # PostSheepbeef200ResponseIntermediateBeef + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities**](PostBeef200ResponseIntermediateInnerIntensities.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateSheep.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateSheep.md new file mode 100644 index 00000000..f702a129 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateSheep.md @@ -0,0 +1,14 @@ +# # PostSheepbeef200ResponseIntermediateSheep + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities**](PostSheep200ResponseIntermediateInnerIntensities.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseNet.md new file mode 100644 index 00000000..ac50a44a --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseNet.md @@ -0,0 +1,11 @@ +# # PostSheepbeef200ResponseNet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | +**beef** | **float** | Net emissions of beef, in tonnes-CO2e/year | +**sheep** | **float** | Net emissions of sheep, in tonnes-CO2e/year | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeefRequest.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeefRequest.md new file mode 100644 index 00000000..99a18a09 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepbeefRequest.md @@ -0,0 +1,15 @@ +# # PostSheepbeefRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | +**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | +**beef** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInner[]**](PostBeefRequestBeefInner.md) | | +**sheep** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInner[]**](PostSheepRequestSheepInner.md) | | +**burning** | [**\OpenAPI\Client\Model\PostBeefRequestBurningInnerBurning[]**](PostBeefRequestBurningInnerBurning.md) | | +**vegetation** | [**\OpenAPI\Client\Model\PostSheepbeefRequestVegetationInner[]**](PostSheepbeefRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeefRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeefRequestVegetationInner.md new file mode 100644 index 00000000..98781e7d --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSheepbeefRequestVegetationInner.md @@ -0,0 +1,11 @@ +# # PostSheepbeefRequestVegetationInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**beef_proportion** | **float[]** | The proportion of the sequestration that is allocated to beef | +**sheep_proportion** | **float[]** | The proportion of the sequestration that is allocated to sheep | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSugar200Response.md b/examples/php-api-client/api-client/docs/Model/PostSugar200Response.md new file mode 100644 index 00000000..42d9f3ee --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSugar200Response.md @@ -0,0 +1,15 @@ +# # PostSugar200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostSugar200ResponseIntermediateInner[]**](PostSugar200ResponseIntermediateInner.md) | | +**net** | [**\OpenAPI\Client\Model\PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostSugar200ResponseIntermediateInnerIntensities[]**](PostSugar200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each crop (in order), in t-CO2e/t crop | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInner.md new file mode 100644 index 00000000..872dd05e --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostSugar200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**intensities** | [**\OpenAPI\Client\Model\PostSugar200ResponseIntermediateInnerIntensities**](PostSugar200ResponseIntermediateInnerIntensities.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..181d2c30 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,11 @@ +# # PostSugar200ResponseIntermediateInnerIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sugar_excluding_sequestration** | **float** | Sugar emissions intensity excluding sequestration, in kg-CO2e/kg sugar | +**sugar_including_sequestration** | **float** | Sugar emissions intensity including sequestration, in kg-CO2e/kg sugar | +**sugar_produced_kg** | **float** | Sugar produced in kg | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSugarRequest.md b/examples/php-api-client/api-client/docs/Model/PostSugarRequest.md new file mode 100644 index 00000000..a41ef1a2 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSugarRequest.md @@ -0,0 +1,13 @@ +# # PostSugarRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**crops** | [**\OpenAPI\Client\Model\PostSugarRequestCropsInner[]**](PostSugarRequestCropsInner.md) | | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**vegetation** | [**\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]**](PostCottonRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSugarRequestCropsInner.md b/examples/php-api-client/api-client/docs/Model/PostSugarRequestCropsInner.md new file mode 100644 index 00000000..f5626421 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostSugarRequestCropsInner.md @@ -0,0 +1,30 @@ +# # PostSugarRequestCropsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**production_system** | **string** | Production system of this crop | +**average_cane_yield** | **float** | Average cane/crop yield, in t/ha (tonnes per hectare) | +**percent_milled_cane_yield** | **float** | Percentage of cane yield that becomes milled sugar, from 0 to 1 | [optional] +**area_sown** | **float** | Area sown, in ha (hectares) | +**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | +**urea_application** | **float** | Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) | +**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | +**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | +**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | +**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | +**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | +**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | +**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | +**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | +**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**diesel_use** | **float** | Diesel usage in L (litres) | +**petrol_use** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyard200Response.md b/examples/php-api-client/api-client/docs/Model/PostVineyard200Response.md new file mode 100644 index 00000000..63c0c52a --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostVineyard200Response.md @@ -0,0 +1,15 @@ +# # PostVineyard200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostVineyard200ResponseScope1**](PostVineyard200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostVineyard200ResponseScope3**](PostVineyard200ResponseScope3.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInner[]**](PostVineyard200ResponseIntermediateInner.md) | | +**net** | [**\OpenAPI\Client\Model\PostVineyard200ResponseNet**](PostVineyard200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInnerIntensities[]**](PostVineyard200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each vineyard (in order), in t-CO2e/t yield | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInner.md new file mode 100644 index 00000000..75d569eb --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostVineyard200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostVineyard200ResponseScope1**](PostVineyard200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostVineyard200ResponseScope3**](PostVineyard200ResponseScope3.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**intensities** | [**\OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInnerIntensities**](PostVineyard200ResponseIntermediateInnerIntensities.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..f3ab6178 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,11 @@ +# # PostVineyard200ResponseIntermediateInnerIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vineyards_excluding_sequestration** | **float** | Vineyard emissions intensity excluding sequestration, in kg-CO2e/kg crop | +**vineyards_including_sequestration** | **float** | Vineyard emissions intensity including sequestration, in kg-CO2e/kg crop | +**crop_produced_kg** | **float** | Vineyard crop produced in kg | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseNet.md new file mode 100644 index 00000000..5b6cd6d0 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseNet.md @@ -0,0 +1,10 @@ +# # PostVineyard200ResponseNet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | +**vineyards** | **float[]** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope1.md new file mode 100644 index 00000000..38709d9d --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope1.md @@ -0,0 +1,23 @@ +# # PostVineyard200ResponseScope1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | +**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | +**waste_water_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | +**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | +**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | +**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | +**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope3.md new file mode 100644 index 00000000..9a7169b7 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope3.md @@ -0,0 +1,18 @@ +# # PostVineyard200ResponseScope3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | +**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**lime** | **float** | Emissions from lime, in tonnes-CO2e | +**commercial_flights** | **float** | Emissions from commercial flights, in tonnes-CO2e | +**inbound_freight** | **float** | Emissions from inbound freight, in tonnes-CO2e | +**solid_waste_sent_offsite** | **float** | Emissions from solid waste sent offsite, in tonnes-CO2e | +**outbound_freight** | **float** | Emissions from outbound freight, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyardRequest.md b/examples/php-api-client/api-client/docs/Model/PostVineyardRequest.md new file mode 100644 index 00000000..099ac6a8 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostVineyardRequest.md @@ -0,0 +1,10 @@ +# # PostVineyardRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vineyards** | [**\OpenAPI\Client\Model\PostVineyardRequestVineyardsInner[]**](PostVineyardRequestVineyardsInner.md) | | +**vegetation** | [**\OpenAPI\Client\Model\PostVineyardRequestVegetationInner[]**](PostVineyardRequestVegetationInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyardRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostVineyardRequestVegetationInner.md new file mode 100644 index 00000000..b0fbd8b7 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostVineyardRequestVegetationInner.md @@ -0,0 +1,10 @@ +# # PostVineyardRequestVegetationInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | +**allocation_to_vineyards** | **float[]** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyardRequestVineyardsInner.md b/examples/php-api-client/api-client/docs/Model/PostVineyardRequestVineyardsInner.md new file mode 100644 index 00000000..1ee01729 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostVineyardRequestVineyardsInner.md @@ -0,0 +1,33 @@ +# # PostVineyardRequestVineyardsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | +**irrigated** | **bool** | Is the crop irrigated? | +**area_planted** | **float** | Area planted, in ha (hectares) | +**average_yield** | **float** | Average yield, in t/ha (tonnes per hectare) | +**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | +**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | +**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | +**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | +**urea_application** | **float** | Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) | +**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | +**limestone** | **float** | Lime applied in tonnes | +**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | +**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | +**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**electricity_source** | **string** | Source of electricity | +**fuel** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | +**fluid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | +**solid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | +**inbound_freight** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods to the enterprise | +**outbound_freight** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods from the enterprise | +**total_commercial_flights_km** | **float** | Total distance of commercial flights, in km (kilometers) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200Response.md b/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200Response.md new file mode 100644 index 00000000..6b3fa928 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200Response.md @@ -0,0 +1,16 @@ +# # PostWildcatchfishery200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostWildcatchfishery200ResponseScope1**](PostWildcatchfishery200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | +**purchased_offsets** | [**\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntensities**](PostWildcatchfishery200ResponseIntensities.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntermediateInner[]**](PostWildcatchfishery200ResponseIntermediateInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntensities.md new file mode 100644 index 00000000..86e490b1 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntensities.md @@ -0,0 +1,11 @@ +# # PostWildcatchfishery200ResponseIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_harvest_weight_kg** | **float** | Total harvest weight in kg | +**wild_catch_fishery_excluding_carbon_offsets** | **float** | Wild catch fishery emissions intensity excluding sequestration, in kg-CO2e/kg harvest weight | +**wild_catch_fishery_including_carbon_offsets** | **float** | Wild catch fishery emissions intensity including sequestration, in kg-CO2e/kg harvest weight | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntermediateInner.md new file mode 100644 index 00000000..9d116b98 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntermediateInner.md @@ -0,0 +1,15 @@ +# # PostWildcatchfishery200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostWildcatchfishery200ResponseScope1**](PostWildcatchfishery200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntensities**](PostWildcatchfishery200ResponseIntensities.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseScope1.md new file mode 100644 index 00000000..36f6ce4b --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseScope1.md @@ -0,0 +1,19 @@ +# # PostWildcatchfishery200ResponseScope1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**waste_water_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | +**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | +**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequest.md b/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequest.md new file mode 100644 index 00000000..3e88b5b8 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequest.md @@ -0,0 +1,9 @@ +# # PostWildcatchfisheryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enterprises** | [**\OpenAPI\Client\Model\PostWildcatchfisheryRequestEnterprisesInner[]**](PostWildcatchfisheryRequestEnterprisesInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInner.md b/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInner.md new file mode 100644 index 00000000..17487984 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInner.md @@ -0,0 +1,25 @@ +# # PostWildcatchfisheryRequestEnterprisesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**production_system** | **string** | Production system of the wild catch fishery enterprise | +**total_harvest_kg** | **float** | Total harvest in kg | +**refrigerants** | [**\OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[]**](PostHorticultureRequestCropsInnerRefrigerantsInner.md) | Refrigerant type | +**bait** | [**\OpenAPI\Client\Model\PostWildcatchfisheryRequestEnterprisesInnerBaitInner[]**](PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md) | Bait purchases | +**custom_bait** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerCustomBaitInner[]**](PostAquacultureRequestEnterprisesInnerCustomBaitInner.md) | Custom bait purchases | +**inbound_freight** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods to the enterprise | +**outbound_freight** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods from the enterprise | +**total_commercial_flights_km** | **float** | Total distance of commercial flights, in km (kilometers) | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**electricity_source** | **string** | Source of electricity | +**fuel** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | +**fluid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | +**solid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | +**carbon_offsets** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md b/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md new file mode 100644 index 00000000..a4f3a4e6 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md @@ -0,0 +1,12 @@ +# # PostWildcatchfisheryRequestEnterprisesInnerBaitInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | Bait product type | +**purchased_tonnes** | **float** | Purchased product in tonnes | +**additional_ingredients** | **float** | Additional ingredient fraction, from 0 to 1 | +**emissions_intensity** | **float** | Emissions intensity of additional ingredients, in kg CO2e/kg bait (default 0) | [default to 0] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200Response.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200Response.md new file mode 100644 index 00000000..9e98bb8c --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200Response.md @@ -0,0 +1,15 @@ +# # PostWildseafisheries200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope1** | [**\OpenAPI\Client\Model\PostWildseafisheries200ResponseScope1**](PostWildseafisheries200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostWildseafisheries200ResponseScope3**](PostWildseafisheries200ResponseScope3.md) | | +**purchased_offsets** | [**\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | +**intermediate** | [**\OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInner[]**](PostWildseafisheries200ResponseIntermediateInner.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | +**intensities** | [**\OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInnerIntensities[]**](PostWildseafisheries200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each enterprise (in order), in t-CO2e/t product caught | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInner.md new file mode 100644 index 00000000..f32a9fe8 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInner.md @@ -0,0 +1,16 @@ +# # PostWildseafisheries200ResponseIntermediateInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | +**scope1** | [**\OpenAPI\Client\Model\PostWildseafisheries200ResponseScope1**](PostWildseafisheries200ResponseScope1.md) | | +**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | +**scope3** | [**\OpenAPI\Client\Model\PostWildseafisheries200ResponseScope3**](PostWildseafisheries200ResponseScope3.md) | | +**purchased_offsets** | [**\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | +**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | +**intensities** | [**\OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInnerIntensities**](PostWildseafisheries200ResponseIntermediateInnerIntensities.md) | | +**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.md new file mode 100644 index 00000000..ee2ab1b9 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.md @@ -0,0 +1,11 @@ +# # PostWildseafisheries200ResponseIntermediateInnerIntensities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**intensity_excluding_carbon_offset** | **float** | Wild sea fisheries emissions intensity excluding carbon offsets, in kg-CO2e/kg | +**intensity_including_carbon_offset** | **float** | Wild sea fisheries emissions intensity including carbon offsets, in kg-CO2e/kg | +**total_harvest_weight_tonnes** | **float** | Total harvest weight in tonnes | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope1.md new file mode 100644 index 00000000..ce74038e --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope1.md @@ -0,0 +1,17 @@ +# # PostWildseafisheries200ResponseScope1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | +**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | +**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | +**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | +**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | +**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | +**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | +**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | +**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope3.md new file mode 100644 index 00000000..a26caea9 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope3.md @@ -0,0 +1,12 @@ +# # PostWildseafisheries200ResponseScope3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | +**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | +**bait** | **float** | Emissions from purchased bait, in tonnes-CO2e | +**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequest.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequest.md new file mode 100644 index 00000000..4f9f5473 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequest.md @@ -0,0 +1,9 @@ +# # PostWildseafisheriesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enterprises** | [**\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInner[]**](PostWildseafisheriesRequestEnterprisesInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInner.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInner.md new file mode 100644 index 00000000..a589e745 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInner.md @@ -0,0 +1,23 @@ +# # PostWildseafisheriesRequestEnterprisesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for this activity | [optional] +**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | +**electricity_source** | **string** | Source of electricity | +**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | +**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | +**total_whole_weight_caught** | **float** | Total whole weight caught in kg | +**diesel** | **float** | Diesel usage in L (litres) | +**petrol** | **float** | Petrol usage in L (litres) | +**lpg** | **float** | LPG Fuel usage in L (litres) | +**refrigerants** | [**\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner[]**](PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md) | | +**transports** | [**\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerTransportsInner[]**](PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md) | Transportation | +**flights** | [**\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerFlightsInner[]**](PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md) | CommercialFlight | +**bait** | [**\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerBaitInner[]**](PostWildseafisheriesRequestEnterprisesInnerBaitInner.md) | Bait | +**custombait** | [**\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerCustombaitInner[]**](PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md) | Custom bait | +**carbon_offset** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md new file mode 100644 index 00000000..4e68e47d --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md @@ -0,0 +1,12 @@ +# # PostWildseafisheriesRequestEnterprisesInnerBaitInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | Bait product type | +**purchased** | **float** | Purchased product in tonnes | +**additional_ingredient** | **float** | Additional ingredient fraction, from 0 to 1 | +**emissions_intensity** | **float** | Emissions intensity of product, in kg CO2e/kg | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md new file mode 100644 index 00000000..18bd2859 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md @@ -0,0 +1,10 @@ +# # PostWildseafisheriesRequestEnterprisesInnerCustombaitInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purchased** | **float** | Purchased product in tonnes | +**emissions_intensity** | **float** | Emissions intensity of product, in kg CO2e/kg | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md new file mode 100644 index 00000000..5b494762 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md @@ -0,0 +1,10 @@ +# # PostWildseafisheriesRequestEnterprisesInnerFlightsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commercial_flight_passengers** | **float** | Commercial flight passengers per year | +**total_flight_distance** | **float** | Total commercial flight distance in km | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md new file mode 100644 index 00000000..e89a19b3 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md @@ -0,0 +1,10 @@ +# # PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**refrigerant** | **string** | Refrigerant type | +**annual_recharge** | **float** | Amount of refrigerant annually recharged, kg product/year | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md new file mode 100644 index 00000000..9a72b262 --- /dev/null +++ b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md @@ -0,0 +1,11 @@ +# # PostWildseafisheriesRequestEnterprisesInnerTransportsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | Transport type | +**fuel** | **string** | Fuel type | +**distance** | **float** | Distance in km | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/example.php b/examples/php-api-client/api-client/example.php new file mode 100644 index 00000000..f4946acb --- /dev/null +++ b/examples/php-api-client/api-client/example.php @@ -0,0 +1,143 @@ + 50, + 'liveweight' => 450, + 'liveweight_gain' => 0.5 + ]); + + $summerSeason = new PostBeefRequestBeefInnerClassesBullsGt1Autumn([ + 'head' => 50, + 'liveweight' => 440, + 'liveweight_gain' => 0.3 + ]); + + $autumnSeason = new PostBeefRequestBeefInnerClassesBullsGt1Autumn([ + 'head' => 50, + 'liveweight' => 460, + 'liveweight_gain' => 0.4 + ]); + + $winterSeason = new PostBeefRequestBeefInnerClassesBullsGt1Autumn([ + 'head' => 50, + 'liveweight' => 450, + 'liveweight_gain' => 0.4 + ]); + + // Create cows class (greater than 2 years old) + $cowsGt2 = new PostBeefRequestBeefInnerClassesCowsGt2([ + 'spring' => $springSeason, + 'summer' => $summerSeason, + 'autumn' => $autumnSeason, + 'winter' => $winterSeason, + 'head_sold' => 25, + 'sale_weight' => 500 + ]); + + // Create classes object with cows + $classes = new PostBeefRequestBeefInnerClasses([ + 'cows_gt2' => $cowsGt2 + ]); + + // Create fertiliser object + $fertiliser = new PostBeefRequestBeefInnerFertiliser([ + 'single_superphosphate' => 5.0, + 'pasture_dryland' => 10.0, + 'pasture_irrigated' => 2.0, + 'crops_dryland' => 8.0, + 'crops_irrigated' => 1.0 + ]); + + // Create mineral supplementation object + $mineralSupplementation = new PostBeefRequestBeefInnerMineralSupplementation([ + 'mineral_block' => 2.0, + 'mineral_block_urea' => 0.3, + 'weaner_block' => 1.0, + 'weaner_block_urea' => 0.2, + 'dry_season_mix' => 1.5, + 'dry_season_mix_urea' => 0.25 + ]); + + // Create cows calving object + $cowsCalving = new PostBeefRequestBeefInnerCowsCalving([ + 'spring' => 0.2, + 'summer' => 0.1, + 'autumn' => 0.5, + 'winter' => 0.2 + ]); + + // Create beef inner object + $beefInner = new PostBeefRequestBeefInner([ + 'id' => 'beef_cattle_001', + 'classes' => $classes, + 'limestone' => 10.0, + 'limestone_fraction' => 0.8, + 'fertiliser' => $fertiliser, + 'diesel' => 1000, + 'petrol' => 200, + 'lpg' => 100, + 'mineral_supplementation' => $mineralSupplementation, + 'electricity_source' => 'State Grid', + 'electricity_renewable' => 0.2, + 'electricity_use' => 5000, + 'grain_feed' => 10.0, + 'hay_feed' => 5.0, + 'cottonseed_feed' => 2.0, + 'herbicide' => 50.0, + 'herbicide_other' => 20.0, + 'cows_calving' => $cowsCalving + ]); + + // Create main request object + $request = new PostBeefRequest([ + 'state' => 'qld', + 'north_of_tropic_of_capricorn' => true, + 'rainfall_above600' => true, + 'beef' => [$beefInner], + 'burning' => [], + 'vegetation' => [] + ]); + + // Configure API + $config = Configuration::getDefaultConfiguration(); + $config->setHost('https://emissionscalculator-mtls.staging.aiaapi.com/calculator/3.0.0'); + $config->setCertFile(__DIR__ . '/cert.pem'); + $config->setKeyFile(__DIR__ . '/key.pem'); + + // Initialize API + $api = new GAFApi(new Client(), $config); + + echo "Calling beef API...\n"; + echo "================================\n"; + + // Make the API call + $result = $api->postBeef($request); + + // Print the result + echo "Success! API call completed.\n\n"; + echo "Response:\n"; + print_r($result); + + echo "\n================================\n"; + echo "API call complete!\n"; + +} catch (Exception $e) { + echo "Error: " . $e->getMessage() . "\n"; + echo "File: " . $e->getFile() . "\n"; + echo "Line: " . $e->getLine() . "\n"; +} \ No newline at end of file diff --git a/examples/php-api-client/api-client/git_push.sh b/examples/php-api-client/api-client/git_push.sh new file mode 100644 index 00000000..f53a75d4 --- /dev/null +++ b/examples/php-api-client/api-client/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/examples/php-api-client/api-client/lib/Api/GAFApi.php b/examples/php-api-client/api-client/lib/Api/GAFApi.php new file mode 100644 index 00000000..a07d9e6f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Api/GAFApi.php @@ -0,0 +1,5595 @@ + [ + 'application/json', + ], + 'postBeef' => [ + 'application/json', + ], + 'postBuffalo' => [ + 'application/json', + ], + 'postCotton' => [ + 'application/json', + ], + 'postDairy' => [ + 'application/json', + ], + 'postDeer' => [ + 'application/json', + ], + 'postFeedlot' => [ + 'application/json', + ], + 'postGoat' => [ + 'application/json', + ], + 'postGrains' => [ + 'application/json', + ], + 'postHorticulture' => [ + 'application/json', + ], + 'postPork' => [ + 'application/json', + ], + 'postPoultry' => [ + 'application/json', + ], + 'postProcessing' => [ + 'application/json', + ], + 'postRice' => [ + 'application/json', + ], + 'postSheep' => [ + 'application/json', + ], + 'postSheepbeef' => [ + 'application/json', + ], + 'postSugar' => [ + 'application/json', + ], + 'postVineyard' => [ + 'application/json', + ], + 'postWildcatchfishery' => [ + 'application/json', + ], + 'postWildseafisheries' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation postAquaculture + * + * Perform aquaculture calculation + * + * @param \OpenAPI\Client\Model\PostAquacultureRequest $post_aquaculture_request post_aquaculture_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAquaculture'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostAquaculture200Response + */ + public function postAquaculture($post_aquaculture_request, string $contentType = self::contentTypes['postAquaculture'][0]) + { + list($response) = $this->postAquacultureWithHttpInfo($post_aquaculture_request, $contentType); + return $response; + } + + /** + * Operation postAquacultureWithHttpInfo + * + * Perform aquaculture calculation + * + * @param \OpenAPI\Client\Model\PostAquacultureRequest $post_aquaculture_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAquaculture'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostAquaculture200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postAquacultureWithHttpInfo($post_aquaculture_request, string $contentType = self::contentTypes['postAquaculture'][0]) + { + $request = $this->postAquacultureRequest($post_aquaculture_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostAquaculture200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostAquaculture200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostAquaculture200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postAquacultureAsync + * + * Perform aquaculture calculation + * + * @param \OpenAPI\Client\Model\PostAquacultureRequest $post_aquaculture_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAquaculture'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postAquacultureAsync($post_aquaculture_request, string $contentType = self::contentTypes['postAquaculture'][0]) + { + return $this->postAquacultureAsyncWithHttpInfo($post_aquaculture_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postAquacultureAsyncWithHttpInfo + * + * Perform aquaculture calculation + * + * @param \OpenAPI\Client\Model\PostAquacultureRequest $post_aquaculture_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAquaculture'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postAquacultureAsyncWithHttpInfo($post_aquaculture_request, string $contentType = self::contentTypes['postAquaculture'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostAquaculture200Response'; + $request = $this->postAquacultureRequest($post_aquaculture_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postAquaculture' + * + * @param \OpenAPI\Client\Model\PostAquacultureRequest $post_aquaculture_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAquaculture'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postAquacultureRequest($post_aquaculture_request, string $contentType = self::contentTypes['postAquaculture'][0]) + { + + // verify the required parameter 'post_aquaculture_request' is set + if ($post_aquaculture_request === null || (is_array($post_aquaculture_request) && count($post_aquaculture_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_aquaculture_request when calling postAquaculture' + ); + } + + + $resourcePath = '/aquaculture'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_aquaculture_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_aquaculture_request)); + } else { + $httpBody = $post_aquaculture_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postBeef + * + * Perform beef calculation + * + * @param \OpenAPI\Client\Model\PostBeefRequest $post_beef_request post_beef_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBeef'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostBeef200Response + */ + public function postBeef($post_beef_request, string $contentType = self::contentTypes['postBeef'][0]) + { + list($response) = $this->postBeefWithHttpInfo($post_beef_request, $contentType); + return $response; + } + + /** + * Operation postBeefWithHttpInfo + * + * Perform beef calculation + * + * @param \OpenAPI\Client\Model\PostBeefRequest $post_beef_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBeef'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostBeef200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postBeefWithHttpInfo($post_beef_request, string $contentType = self::contentTypes['postBeef'][0]) + { + $request = $this->postBeefRequest($post_beef_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostBeef200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostBeef200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostBeef200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postBeefAsync + * + * Perform beef calculation + * + * @param \OpenAPI\Client\Model\PostBeefRequest $post_beef_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBeef'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postBeefAsync($post_beef_request, string $contentType = self::contentTypes['postBeef'][0]) + { + return $this->postBeefAsyncWithHttpInfo($post_beef_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postBeefAsyncWithHttpInfo + * + * Perform beef calculation + * + * @param \OpenAPI\Client\Model\PostBeefRequest $post_beef_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBeef'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postBeefAsyncWithHttpInfo($post_beef_request, string $contentType = self::contentTypes['postBeef'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostBeef200Response'; + $request = $this->postBeefRequest($post_beef_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postBeef' + * + * @param \OpenAPI\Client\Model\PostBeefRequest $post_beef_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBeef'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postBeefRequest($post_beef_request, string $contentType = self::contentTypes['postBeef'][0]) + { + + // verify the required parameter 'post_beef_request' is set + if ($post_beef_request === null || (is_array($post_beef_request) && count($post_beef_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_beef_request when calling postBeef' + ); + } + + + $resourcePath = '/beef'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_beef_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_beef_request)); + } else { + $httpBody = $post_beef_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postBuffalo + * + * Perform buffalo calculation + * + * @param \OpenAPI\Client\Model\PostBuffaloRequest $post_buffalo_request post_buffalo_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBuffalo'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostBuffalo200Response + */ + public function postBuffalo($post_buffalo_request, string $contentType = self::contentTypes['postBuffalo'][0]) + { + list($response) = $this->postBuffaloWithHttpInfo($post_buffalo_request, $contentType); + return $response; + } + + /** + * Operation postBuffaloWithHttpInfo + * + * Perform buffalo calculation + * + * @param \OpenAPI\Client\Model\PostBuffaloRequest $post_buffalo_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBuffalo'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostBuffalo200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postBuffaloWithHttpInfo($post_buffalo_request, string $contentType = self::contentTypes['postBuffalo'][0]) + { + $request = $this->postBuffaloRequest($post_buffalo_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostBuffalo200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostBuffalo200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostBuffalo200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postBuffaloAsync + * + * Perform buffalo calculation + * + * @param \OpenAPI\Client\Model\PostBuffaloRequest $post_buffalo_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBuffalo'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postBuffaloAsync($post_buffalo_request, string $contentType = self::contentTypes['postBuffalo'][0]) + { + return $this->postBuffaloAsyncWithHttpInfo($post_buffalo_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postBuffaloAsyncWithHttpInfo + * + * Perform buffalo calculation + * + * @param \OpenAPI\Client\Model\PostBuffaloRequest $post_buffalo_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBuffalo'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postBuffaloAsyncWithHttpInfo($post_buffalo_request, string $contentType = self::contentTypes['postBuffalo'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostBuffalo200Response'; + $request = $this->postBuffaloRequest($post_buffalo_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postBuffalo' + * + * @param \OpenAPI\Client\Model\PostBuffaloRequest $post_buffalo_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBuffalo'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postBuffaloRequest($post_buffalo_request, string $contentType = self::contentTypes['postBuffalo'][0]) + { + + // verify the required parameter 'post_buffalo_request' is set + if ($post_buffalo_request === null || (is_array($post_buffalo_request) && count($post_buffalo_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_buffalo_request when calling postBuffalo' + ); + } + + + $resourcePath = '/buffalo'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_buffalo_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_buffalo_request)); + } else { + $httpBody = $post_buffalo_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postCotton + * + * Perform cotton calculation + * + * @param \OpenAPI\Client\Model\PostCottonRequest $post_cotton_request post_cotton_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCotton'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostCotton200Response + */ + public function postCotton($post_cotton_request, string $contentType = self::contentTypes['postCotton'][0]) + { + list($response) = $this->postCottonWithHttpInfo($post_cotton_request, $contentType); + return $response; + } + + /** + * Operation postCottonWithHttpInfo + * + * Perform cotton calculation + * + * @param \OpenAPI\Client\Model\PostCottonRequest $post_cotton_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCotton'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostCotton200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postCottonWithHttpInfo($post_cotton_request, string $contentType = self::contentTypes['postCotton'][0]) + { + $request = $this->postCottonRequest($post_cotton_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostCotton200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostCotton200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostCotton200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postCottonAsync + * + * Perform cotton calculation + * + * @param \OpenAPI\Client\Model\PostCottonRequest $post_cotton_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCotton'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postCottonAsync($post_cotton_request, string $contentType = self::contentTypes['postCotton'][0]) + { + return $this->postCottonAsyncWithHttpInfo($post_cotton_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postCottonAsyncWithHttpInfo + * + * Perform cotton calculation + * + * @param \OpenAPI\Client\Model\PostCottonRequest $post_cotton_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCotton'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postCottonAsyncWithHttpInfo($post_cotton_request, string $contentType = self::contentTypes['postCotton'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostCotton200Response'; + $request = $this->postCottonRequest($post_cotton_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postCotton' + * + * @param \OpenAPI\Client\Model\PostCottonRequest $post_cotton_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCotton'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postCottonRequest($post_cotton_request, string $contentType = self::contentTypes['postCotton'][0]) + { + + // verify the required parameter 'post_cotton_request' is set + if ($post_cotton_request === null || (is_array($post_cotton_request) && count($post_cotton_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_cotton_request when calling postCotton' + ); + } + + + $resourcePath = '/cotton'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_cotton_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_cotton_request)); + } else { + $httpBody = $post_cotton_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postDairy + * + * Perform dairy calculation + * + * @param \OpenAPI\Client\Model\PostDairyRequest $post_dairy_request post_dairy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postDairy'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostDairy200Response + */ + public function postDairy($post_dairy_request, string $contentType = self::contentTypes['postDairy'][0]) + { + list($response) = $this->postDairyWithHttpInfo($post_dairy_request, $contentType); + return $response; + } + + /** + * Operation postDairyWithHttpInfo + * + * Perform dairy calculation + * + * @param \OpenAPI\Client\Model\PostDairyRequest $post_dairy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postDairy'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostDairy200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postDairyWithHttpInfo($post_dairy_request, string $contentType = self::contentTypes['postDairy'][0]) + { + $request = $this->postDairyRequest($post_dairy_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostDairy200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostDairy200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostDairy200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postDairyAsync + * + * Perform dairy calculation + * + * @param \OpenAPI\Client\Model\PostDairyRequest $post_dairy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postDairy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postDairyAsync($post_dairy_request, string $contentType = self::contentTypes['postDairy'][0]) + { + return $this->postDairyAsyncWithHttpInfo($post_dairy_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postDairyAsyncWithHttpInfo + * + * Perform dairy calculation + * + * @param \OpenAPI\Client\Model\PostDairyRequest $post_dairy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postDairy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postDairyAsyncWithHttpInfo($post_dairy_request, string $contentType = self::contentTypes['postDairy'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostDairy200Response'; + $request = $this->postDairyRequest($post_dairy_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postDairy' + * + * @param \OpenAPI\Client\Model\PostDairyRequest $post_dairy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postDairy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postDairyRequest($post_dairy_request, string $contentType = self::contentTypes['postDairy'][0]) + { + + // verify the required parameter 'post_dairy_request' is set + if ($post_dairy_request === null || (is_array($post_dairy_request) && count($post_dairy_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_dairy_request when calling postDairy' + ); + } + + + $resourcePath = '/dairy'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_dairy_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_dairy_request)); + } else { + $httpBody = $post_dairy_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postDeer + * + * Perform deer calculation + * + * @param \OpenAPI\Client\Model\PostDeerRequest $post_deer_request post_deer_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postDeer'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostDeer200Response + */ + public function postDeer($post_deer_request, string $contentType = self::contentTypes['postDeer'][0]) + { + list($response) = $this->postDeerWithHttpInfo($post_deer_request, $contentType); + return $response; + } + + /** + * Operation postDeerWithHttpInfo + * + * Perform deer calculation + * + * @param \OpenAPI\Client\Model\PostDeerRequest $post_deer_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postDeer'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostDeer200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postDeerWithHttpInfo($post_deer_request, string $contentType = self::contentTypes['postDeer'][0]) + { + $request = $this->postDeerRequest($post_deer_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostDeer200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostDeer200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostDeer200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postDeerAsync + * + * Perform deer calculation + * + * @param \OpenAPI\Client\Model\PostDeerRequest $post_deer_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postDeer'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postDeerAsync($post_deer_request, string $contentType = self::contentTypes['postDeer'][0]) + { + return $this->postDeerAsyncWithHttpInfo($post_deer_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postDeerAsyncWithHttpInfo + * + * Perform deer calculation + * + * @param \OpenAPI\Client\Model\PostDeerRequest $post_deer_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postDeer'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postDeerAsyncWithHttpInfo($post_deer_request, string $contentType = self::contentTypes['postDeer'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostDeer200Response'; + $request = $this->postDeerRequest($post_deer_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postDeer' + * + * @param \OpenAPI\Client\Model\PostDeerRequest $post_deer_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postDeer'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postDeerRequest($post_deer_request, string $contentType = self::contentTypes['postDeer'][0]) + { + + // verify the required parameter 'post_deer_request' is set + if ($post_deer_request === null || (is_array($post_deer_request) && count($post_deer_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_deer_request when calling postDeer' + ); + } + + + $resourcePath = '/deer'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_deer_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_deer_request)); + } else { + $httpBody = $post_deer_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postFeedlot + * + * Perform feedlot calculation + * + * @param \OpenAPI\Client\Model\PostFeedlotRequest $post_feedlot_request post_feedlot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postFeedlot'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostFeedlot200Response + */ + public function postFeedlot($post_feedlot_request, string $contentType = self::contentTypes['postFeedlot'][0]) + { + list($response) = $this->postFeedlotWithHttpInfo($post_feedlot_request, $contentType); + return $response; + } + + /** + * Operation postFeedlotWithHttpInfo + * + * Perform feedlot calculation + * + * @param \OpenAPI\Client\Model\PostFeedlotRequest $post_feedlot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postFeedlot'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostFeedlot200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postFeedlotWithHttpInfo($post_feedlot_request, string $contentType = self::contentTypes['postFeedlot'][0]) + { + $request = $this->postFeedlotRequest($post_feedlot_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostFeedlot200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostFeedlot200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostFeedlot200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postFeedlotAsync + * + * Perform feedlot calculation + * + * @param \OpenAPI\Client\Model\PostFeedlotRequest $post_feedlot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postFeedlot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postFeedlotAsync($post_feedlot_request, string $contentType = self::contentTypes['postFeedlot'][0]) + { + return $this->postFeedlotAsyncWithHttpInfo($post_feedlot_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postFeedlotAsyncWithHttpInfo + * + * Perform feedlot calculation + * + * @param \OpenAPI\Client\Model\PostFeedlotRequest $post_feedlot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postFeedlot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postFeedlotAsyncWithHttpInfo($post_feedlot_request, string $contentType = self::contentTypes['postFeedlot'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostFeedlot200Response'; + $request = $this->postFeedlotRequest($post_feedlot_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postFeedlot' + * + * @param \OpenAPI\Client\Model\PostFeedlotRequest $post_feedlot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postFeedlot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postFeedlotRequest($post_feedlot_request, string $contentType = self::contentTypes['postFeedlot'][0]) + { + + // verify the required parameter 'post_feedlot_request' is set + if ($post_feedlot_request === null || (is_array($post_feedlot_request) && count($post_feedlot_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_feedlot_request when calling postFeedlot' + ); + } + + + $resourcePath = '/feedlot'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_feedlot_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_feedlot_request)); + } else { + $httpBody = $post_feedlot_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postGoat + * + * Perform goat calculation + * + * @param \OpenAPI\Client\Model\PostGoatRequest $post_goat_request post_goat_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGoat'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostGoat200Response + */ + public function postGoat($post_goat_request, string $contentType = self::contentTypes['postGoat'][0]) + { + list($response) = $this->postGoatWithHttpInfo($post_goat_request, $contentType); + return $response; + } + + /** + * Operation postGoatWithHttpInfo + * + * Perform goat calculation + * + * @param \OpenAPI\Client\Model\PostGoatRequest $post_goat_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGoat'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostGoat200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postGoatWithHttpInfo($post_goat_request, string $contentType = self::contentTypes['postGoat'][0]) + { + $request = $this->postGoatRequest($post_goat_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostGoat200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostGoat200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostGoat200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postGoatAsync + * + * Perform goat calculation + * + * @param \OpenAPI\Client\Model\PostGoatRequest $post_goat_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGoat'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postGoatAsync($post_goat_request, string $contentType = self::contentTypes['postGoat'][0]) + { + return $this->postGoatAsyncWithHttpInfo($post_goat_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postGoatAsyncWithHttpInfo + * + * Perform goat calculation + * + * @param \OpenAPI\Client\Model\PostGoatRequest $post_goat_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGoat'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postGoatAsyncWithHttpInfo($post_goat_request, string $contentType = self::contentTypes['postGoat'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostGoat200Response'; + $request = $this->postGoatRequest($post_goat_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postGoat' + * + * @param \OpenAPI\Client\Model\PostGoatRequest $post_goat_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGoat'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postGoatRequest($post_goat_request, string $contentType = self::contentTypes['postGoat'][0]) + { + + // verify the required parameter 'post_goat_request' is set + if ($post_goat_request === null || (is_array($post_goat_request) && count($post_goat_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_goat_request when calling postGoat' + ); + } + + + $resourcePath = '/goat'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_goat_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_goat_request)); + } else { + $httpBody = $post_goat_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postGrains + * + * Perform grains calculation + * + * @param \OpenAPI\Client\Model\PostGrainsRequest $post_grains_request post_grains_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGrains'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostGrains200Response + */ + public function postGrains($post_grains_request, string $contentType = self::contentTypes['postGrains'][0]) + { + list($response) = $this->postGrainsWithHttpInfo($post_grains_request, $contentType); + return $response; + } + + /** + * Operation postGrainsWithHttpInfo + * + * Perform grains calculation + * + * @param \OpenAPI\Client\Model\PostGrainsRequest $post_grains_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGrains'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostGrains200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postGrainsWithHttpInfo($post_grains_request, string $contentType = self::contentTypes['postGrains'][0]) + { + $request = $this->postGrainsRequest($post_grains_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostGrains200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostGrains200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostGrains200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postGrainsAsync + * + * Perform grains calculation + * + * @param \OpenAPI\Client\Model\PostGrainsRequest $post_grains_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGrains'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postGrainsAsync($post_grains_request, string $contentType = self::contentTypes['postGrains'][0]) + { + return $this->postGrainsAsyncWithHttpInfo($post_grains_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postGrainsAsyncWithHttpInfo + * + * Perform grains calculation + * + * @param \OpenAPI\Client\Model\PostGrainsRequest $post_grains_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGrains'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postGrainsAsyncWithHttpInfo($post_grains_request, string $contentType = self::contentTypes['postGrains'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostGrains200Response'; + $request = $this->postGrainsRequest($post_grains_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postGrains' + * + * @param \OpenAPI\Client\Model\PostGrainsRequest $post_grains_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGrains'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postGrainsRequest($post_grains_request, string $contentType = self::contentTypes['postGrains'][0]) + { + + // verify the required parameter 'post_grains_request' is set + if ($post_grains_request === null || (is_array($post_grains_request) && count($post_grains_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_grains_request when calling postGrains' + ); + } + + + $resourcePath = '/grains'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_grains_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_grains_request)); + } else { + $httpBody = $post_grains_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postHorticulture + * + * Perform horticulture calculation + * + * @param \OpenAPI\Client\Model\PostHorticultureRequest $post_horticulture_request post_horticulture_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postHorticulture'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostHorticulture200Response + */ + public function postHorticulture($post_horticulture_request, string $contentType = self::contentTypes['postHorticulture'][0]) + { + list($response) = $this->postHorticultureWithHttpInfo($post_horticulture_request, $contentType); + return $response; + } + + /** + * Operation postHorticultureWithHttpInfo + * + * Perform horticulture calculation + * + * @param \OpenAPI\Client\Model\PostHorticultureRequest $post_horticulture_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postHorticulture'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostHorticulture200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postHorticultureWithHttpInfo($post_horticulture_request, string $contentType = self::contentTypes['postHorticulture'][0]) + { + $request = $this->postHorticultureRequest($post_horticulture_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostHorticulture200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostHorticulture200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostHorticulture200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postHorticultureAsync + * + * Perform horticulture calculation + * + * @param \OpenAPI\Client\Model\PostHorticultureRequest $post_horticulture_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postHorticulture'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postHorticultureAsync($post_horticulture_request, string $contentType = self::contentTypes['postHorticulture'][0]) + { + return $this->postHorticultureAsyncWithHttpInfo($post_horticulture_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postHorticultureAsyncWithHttpInfo + * + * Perform horticulture calculation + * + * @param \OpenAPI\Client\Model\PostHorticultureRequest $post_horticulture_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postHorticulture'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postHorticultureAsyncWithHttpInfo($post_horticulture_request, string $contentType = self::contentTypes['postHorticulture'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostHorticulture200Response'; + $request = $this->postHorticultureRequest($post_horticulture_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postHorticulture' + * + * @param \OpenAPI\Client\Model\PostHorticultureRequest $post_horticulture_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postHorticulture'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postHorticultureRequest($post_horticulture_request, string $contentType = self::contentTypes['postHorticulture'][0]) + { + + // verify the required parameter 'post_horticulture_request' is set + if ($post_horticulture_request === null || (is_array($post_horticulture_request) && count($post_horticulture_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_horticulture_request when calling postHorticulture' + ); + } + + + $resourcePath = '/horticulture'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_horticulture_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_horticulture_request)); + } else { + $httpBody = $post_horticulture_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postPork + * + * Perform pork calculation + * + * @param \OpenAPI\Client\Model\PostPorkRequest $post_pork_request post_pork_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPork'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostPork200Response + */ + public function postPork($post_pork_request, string $contentType = self::contentTypes['postPork'][0]) + { + list($response) = $this->postPorkWithHttpInfo($post_pork_request, $contentType); + return $response; + } + + /** + * Operation postPorkWithHttpInfo + * + * Perform pork calculation + * + * @param \OpenAPI\Client\Model\PostPorkRequest $post_pork_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPork'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostPork200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postPorkWithHttpInfo($post_pork_request, string $contentType = self::contentTypes['postPork'][0]) + { + $request = $this->postPorkRequest($post_pork_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostPork200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostPork200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostPork200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postPorkAsync + * + * Perform pork calculation + * + * @param \OpenAPI\Client\Model\PostPorkRequest $post_pork_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPork'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postPorkAsync($post_pork_request, string $contentType = self::contentTypes['postPork'][0]) + { + return $this->postPorkAsyncWithHttpInfo($post_pork_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postPorkAsyncWithHttpInfo + * + * Perform pork calculation + * + * @param \OpenAPI\Client\Model\PostPorkRequest $post_pork_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPork'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postPorkAsyncWithHttpInfo($post_pork_request, string $contentType = self::contentTypes['postPork'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostPork200Response'; + $request = $this->postPorkRequest($post_pork_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postPork' + * + * @param \OpenAPI\Client\Model\PostPorkRequest $post_pork_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPork'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postPorkRequest($post_pork_request, string $contentType = self::contentTypes['postPork'][0]) + { + + // verify the required parameter 'post_pork_request' is set + if ($post_pork_request === null || (is_array($post_pork_request) && count($post_pork_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_pork_request when calling postPork' + ); + } + + + $resourcePath = '/pork'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_pork_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_pork_request)); + } else { + $httpBody = $post_pork_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postPoultry + * + * Perform poultry calculation + * + * @param \OpenAPI\Client\Model\PostPoultryRequest $post_poultry_request post_poultry_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPoultry'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostPoultry200Response + */ + public function postPoultry($post_poultry_request, string $contentType = self::contentTypes['postPoultry'][0]) + { + list($response) = $this->postPoultryWithHttpInfo($post_poultry_request, $contentType); + return $response; + } + + /** + * Operation postPoultryWithHttpInfo + * + * Perform poultry calculation + * + * @param \OpenAPI\Client\Model\PostPoultryRequest $post_poultry_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPoultry'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostPoultry200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postPoultryWithHttpInfo($post_poultry_request, string $contentType = self::contentTypes['postPoultry'][0]) + { + $request = $this->postPoultryRequest($post_poultry_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostPoultry200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostPoultry200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostPoultry200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postPoultryAsync + * + * Perform poultry calculation + * + * @param \OpenAPI\Client\Model\PostPoultryRequest $post_poultry_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPoultry'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postPoultryAsync($post_poultry_request, string $contentType = self::contentTypes['postPoultry'][0]) + { + return $this->postPoultryAsyncWithHttpInfo($post_poultry_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postPoultryAsyncWithHttpInfo + * + * Perform poultry calculation + * + * @param \OpenAPI\Client\Model\PostPoultryRequest $post_poultry_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPoultry'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postPoultryAsyncWithHttpInfo($post_poultry_request, string $contentType = self::contentTypes['postPoultry'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostPoultry200Response'; + $request = $this->postPoultryRequest($post_poultry_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postPoultry' + * + * @param \OpenAPI\Client\Model\PostPoultryRequest $post_poultry_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPoultry'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postPoultryRequest($post_poultry_request, string $contentType = self::contentTypes['postPoultry'][0]) + { + + // verify the required parameter 'post_poultry_request' is set + if ($post_poultry_request === null || (is_array($post_poultry_request) && count($post_poultry_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_poultry_request when calling postPoultry' + ); + } + + + $resourcePath = '/poultry'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_poultry_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_poultry_request)); + } else { + $httpBody = $post_poultry_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postProcessing + * + * Perform processing calculation + * + * @param \OpenAPI\Client\Model\PostProcessingRequest $post_processing_request post_processing_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postProcessing'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostProcessing200Response + */ + public function postProcessing($post_processing_request, string $contentType = self::contentTypes['postProcessing'][0]) + { + list($response) = $this->postProcessingWithHttpInfo($post_processing_request, $contentType); + return $response; + } + + /** + * Operation postProcessingWithHttpInfo + * + * Perform processing calculation + * + * @param \OpenAPI\Client\Model\PostProcessingRequest $post_processing_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postProcessing'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostProcessing200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postProcessingWithHttpInfo($post_processing_request, string $contentType = self::contentTypes['postProcessing'][0]) + { + $request = $this->postProcessingRequest($post_processing_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostProcessing200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostProcessing200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostProcessing200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postProcessingAsync + * + * Perform processing calculation + * + * @param \OpenAPI\Client\Model\PostProcessingRequest $post_processing_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postProcessing'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postProcessingAsync($post_processing_request, string $contentType = self::contentTypes['postProcessing'][0]) + { + return $this->postProcessingAsyncWithHttpInfo($post_processing_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postProcessingAsyncWithHttpInfo + * + * Perform processing calculation + * + * @param \OpenAPI\Client\Model\PostProcessingRequest $post_processing_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postProcessing'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postProcessingAsyncWithHttpInfo($post_processing_request, string $contentType = self::contentTypes['postProcessing'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostProcessing200Response'; + $request = $this->postProcessingRequest($post_processing_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postProcessing' + * + * @param \OpenAPI\Client\Model\PostProcessingRequest $post_processing_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postProcessing'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postProcessingRequest($post_processing_request, string $contentType = self::contentTypes['postProcessing'][0]) + { + + // verify the required parameter 'post_processing_request' is set + if ($post_processing_request === null || (is_array($post_processing_request) && count($post_processing_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_processing_request when calling postProcessing' + ); + } + + + $resourcePath = '/processing'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_processing_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_processing_request)); + } else { + $httpBody = $post_processing_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postRice + * + * Perform rice calculation + * + * @param \OpenAPI\Client\Model\PostRiceRequest $post_rice_request post_rice_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRice'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostRice200Response + */ + public function postRice($post_rice_request, string $contentType = self::contentTypes['postRice'][0]) + { + list($response) = $this->postRiceWithHttpInfo($post_rice_request, $contentType); + return $response; + } + + /** + * Operation postRiceWithHttpInfo + * + * Perform rice calculation + * + * @param \OpenAPI\Client\Model\PostRiceRequest $post_rice_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRice'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostRice200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postRiceWithHttpInfo($post_rice_request, string $contentType = self::contentTypes['postRice'][0]) + { + $request = $this->postRiceRequest($post_rice_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostRice200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostRice200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostRice200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postRiceAsync + * + * Perform rice calculation + * + * @param \OpenAPI\Client\Model\PostRiceRequest $post_rice_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRice'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postRiceAsync($post_rice_request, string $contentType = self::contentTypes['postRice'][0]) + { + return $this->postRiceAsyncWithHttpInfo($post_rice_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postRiceAsyncWithHttpInfo + * + * Perform rice calculation + * + * @param \OpenAPI\Client\Model\PostRiceRequest $post_rice_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRice'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postRiceAsyncWithHttpInfo($post_rice_request, string $contentType = self::contentTypes['postRice'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostRice200Response'; + $request = $this->postRiceRequest($post_rice_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postRice' + * + * @param \OpenAPI\Client\Model\PostRiceRequest $post_rice_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRice'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postRiceRequest($post_rice_request, string $contentType = self::contentTypes['postRice'][0]) + { + + // verify the required parameter 'post_rice_request' is set + if ($post_rice_request === null || (is_array($post_rice_request) && count($post_rice_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_rice_request when calling postRice' + ); + } + + + $resourcePath = '/rice'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_rice_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_rice_request)); + } else { + $httpBody = $post_rice_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postSheep + * + * Perform sheep calculation + * + * @param \OpenAPI\Client\Model\PostSheepRequest $post_sheep_request post_sheep_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSheep'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostSheep200Response + */ + public function postSheep($post_sheep_request, string $contentType = self::contentTypes['postSheep'][0]) + { + list($response) = $this->postSheepWithHttpInfo($post_sheep_request, $contentType); + return $response; + } + + /** + * Operation postSheepWithHttpInfo + * + * Perform sheep calculation + * + * @param \OpenAPI\Client\Model\PostSheepRequest $post_sheep_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSheep'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostSheep200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postSheepWithHttpInfo($post_sheep_request, string $contentType = self::contentTypes['postSheep'][0]) + { + $request = $this->postSheepRequest($post_sheep_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostSheep200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostSheep200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostSheep200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postSheepAsync + * + * Perform sheep calculation + * + * @param \OpenAPI\Client\Model\PostSheepRequest $post_sheep_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSheep'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postSheepAsync($post_sheep_request, string $contentType = self::contentTypes['postSheep'][0]) + { + return $this->postSheepAsyncWithHttpInfo($post_sheep_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postSheepAsyncWithHttpInfo + * + * Perform sheep calculation + * + * @param \OpenAPI\Client\Model\PostSheepRequest $post_sheep_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSheep'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postSheepAsyncWithHttpInfo($post_sheep_request, string $contentType = self::contentTypes['postSheep'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostSheep200Response'; + $request = $this->postSheepRequest($post_sheep_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postSheep' + * + * @param \OpenAPI\Client\Model\PostSheepRequest $post_sheep_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSheep'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postSheepRequest($post_sheep_request, string $contentType = self::contentTypes['postSheep'][0]) + { + + // verify the required parameter 'post_sheep_request' is set + if ($post_sheep_request === null || (is_array($post_sheep_request) && count($post_sheep_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_sheep_request when calling postSheep' + ); + } + + + $resourcePath = '/sheep'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_sheep_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_sheep_request)); + } else { + $httpBody = $post_sheep_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postSheepbeef + * + * Perform sheepbeef calculation + * + * @param \OpenAPI\Client\Model\PostSheepbeefRequest $post_sheepbeef_request post_sheepbeef_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSheepbeef'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostSheepbeef200Response + */ + public function postSheepbeef($post_sheepbeef_request, string $contentType = self::contentTypes['postSheepbeef'][0]) + { + list($response) = $this->postSheepbeefWithHttpInfo($post_sheepbeef_request, $contentType); + return $response; + } + + /** + * Operation postSheepbeefWithHttpInfo + * + * Perform sheepbeef calculation + * + * @param \OpenAPI\Client\Model\PostSheepbeefRequest $post_sheepbeef_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSheepbeef'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostSheepbeef200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postSheepbeefWithHttpInfo($post_sheepbeef_request, string $contentType = self::contentTypes['postSheepbeef'][0]) + { + $request = $this->postSheepbeefRequest($post_sheepbeef_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostSheepbeef200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostSheepbeef200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostSheepbeef200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postSheepbeefAsync + * + * Perform sheepbeef calculation + * + * @param \OpenAPI\Client\Model\PostSheepbeefRequest $post_sheepbeef_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSheepbeef'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postSheepbeefAsync($post_sheepbeef_request, string $contentType = self::contentTypes['postSheepbeef'][0]) + { + return $this->postSheepbeefAsyncWithHttpInfo($post_sheepbeef_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postSheepbeefAsyncWithHttpInfo + * + * Perform sheepbeef calculation + * + * @param \OpenAPI\Client\Model\PostSheepbeefRequest $post_sheepbeef_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSheepbeef'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postSheepbeefAsyncWithHttpInfo($post_sheepbeef_request, string $contentType = self::contentTypes['postSheepbeef'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostSheepbeef200Response'; + $request = $this->postSheepbeefRequest($post_sheepbeef_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postSheepbeef' + * + * @param \OpenAPI\Client\Model\PostSheepbeefRequest $post_sheepbeef_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSheepbeef'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postSheepbeefRequest($post_sheepbeef_request, string $contentType = self::contentTypes['postSheepbeef'][0]) + { + + // verify the required parameter 'post_sheepbeef_request' is set + if ($post_sheepbeef_request === null || (is_array($post_sheepbeef_request) && count($post_sheepbeef_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_sheepbeef_request when calling postSheepbeef' + ); + } + + + $resourcePath = '/sheepbeef'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_sheepbeef_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_sheepbeef_request)); + } else { + $httpBody = $post_sheepbeef_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postSugar + * + * Perform sugar calculation + * + * @param \OpenAPI\Client\Model\PostSugarRequest $post_sugar_request post_sugar_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSugar'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostSugar200Response + */ + public function postSugar($post_sugar_request, string $contentType = self::contentTypes['postSugar'][0]) + { + list($response) = $this->postSugarWithHttpInfo($post_sugar_request, $contentType); + return $response; + } + + /** + * Operation postSugarWithHttpInfo + * + * Perform sugar calculation + * + * @param \OpenAPI\Client\Model\PostSugarRequest $post_sugar_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSugar'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostSugar200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postSugarWithHttpInfo($post_sugar_request, string $contentType = self::contentTypes['postSugar'][0]) + { + $request = $this->postSugarRequest($post_sugar_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostSugar200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostSugar200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostSugar200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postSugarAsync + * + * Perform sugar calculation + * + * @param \OpenAPI\Client\Model\PostSugarRequest $post_sugar_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSugar'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postSugarAsync($post_sugar_request, string $contentType = self::contentTypes['postSugar'][0]) + { + return $this->postSugarAsyncWithHttpInfo($post_sugar_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postSugarAsyncWithHttpInfo + * + * Perform sugar calculation + * + * @param \OpenAPI\Client\Model\PostSugarRequest $post_sugar_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSugar'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postSugarAsyncWithHttpInfo($post_sugar_request, string $contentType = self::contentTypes['postSugar'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostSugar200Response'; + $request = $this->postSugarRequest($post_sugar_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postSugar' + * + * @param \OpenAPI\Client\Model\PostSugarRequest $post_sugar_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSugar'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postSugarRequest($post_sugar_request, string $contentType = self::contentTypes['postSugar'][0]) + { + + // verify the required parameter 'post_sugar_request' is set + if ($post_sugar_request === null || (is_array($post_sugar_request) && count($post_sugar_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_sugar_request when calling postSugar' + ); + } + + + $resourcePath = '/sugar'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_sugar_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_sugar_request)); + } else { + $httpBody = $post_sugar_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postVineyard + * + * Perform vineyard calculation + * + * @param \OpenAPI\Client\Model\PostVineyardRequest $post_vineyard_request post_vineyard_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postVineyard'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostVineyard200Response + */ + public function postVineyard($post_vineyard_request, string $contentType = self::contentTypes['postVineyard'][0]) + { + list($response) = $this->postVineyardWithHttpInfo($post_vineyard_request, $contentType); + return $response; + } + + /** + * Operation postVineyardWithHttpInfo + * + * Perform vineyard calculation + * + * @param \OpenAPI\Client\Model\PostVineyardRequest $post_vineyard_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postVineyard'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostVineyard200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postVineyardWithHttpInfo($post_vineyard_request, string $contentType = self::contentTypes['postVineyard'][0]) + { + $request = $this->postVineyardRequest($post_vineyard_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostVineyard200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostVineyard200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostVineyard200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postVineyardAsync + * + * Perform vineyard calculation + * + * @param \OpenAPI\Client\Model\PostVineyardRequest $post_vineyard_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postVineyard'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postVineyardAsync($post_vineyard_request, string $contentType = self::contentTypes['postVineyard'][0]) + { + return $this->postVineyardAsyncWithHttpInfo($post_vineyard_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postVineyardAsyncWithHttpInfo + * + * Perform vineyard calculation + * + * @param \OpenAPI\Client\Model\PostVineyardRequest $post_vineyard_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postVineyard'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postVineyardAsyncWithHttpInfo($post_vineyard_request, string $contentType = self::contentTypes['postVineyard'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostVineyard200Response'; + $request = $this->postVineyardRequest($post_vineyard_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postVineyard' + * + * @param \OpenAPI\Client\Model\PostVineyardRequest $post_vineyard_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postVineyard'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postVineyardRequest($post_vineyard_request, string $contentType = self::contentTypes['postVineyard'][0]) + { + + // verify the required parameter 'post_vineyard_request' is set + if ($post_vineyard_request === null || (is_array($post_vineyard_request) && count($post_vineyard_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_vineyard_request when calling postVineyard' + ); + } + + + $resourcePath = '/vineyard'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_vineyard_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_vineyard_request)); + } else { + $httpBody = $post_vineyard_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postWildcatchfishery + * + * Perform wildcatchfishery calculation + * + * @param \OpenAPI\Client\Model\PostWildcatchfisheryRequest $post_wildcatchfishery_request post_wildcatchfishery_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWildcatchfishery'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostWildcatchfishery200Response + */ + public function postWildcatchfishery($post_wildcatchfishery_request, string $contentType = self::contentTypes['postWildcatchfishery'][0]) + { + list($response) = $this->postWildcatchfisheryWithHttpInfo($post_wildcatchfishery_request, $contentType); + return $response; + } + + /** + * Operation postWildcatchfisheryWithHttpInfo + * + * Perform wildcatchfishery calculation + * + * @param \OpenAPI\Client\Model\PostWildcatchfisheryRequest $post_wildcatchfishery_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWildcatchfishery'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostWildcatchfishery200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postWildcatchfisheryWithHttpInfo($post_wildcatchfishery_request, string $contentType = self::contentTypes['postWildcatchfishery'][0]) + { + $request = $this->postWildcatchfisheryRequest($post_wildcatchfishery_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostWildcatchfishery200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostWildcatchfishery200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostWildcatchfishery200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postWildcatchfisheryAsync + * + * Perform wildcatchfishery calculation + * + * @param \OpenAPI\Client\Model\PostWildcatchfisheryRequest $post_wildcatchfishery_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWildcatchfishery'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postWildcatchfisheryAsync($post_wildcatchfishery_request, string $contentType = self::contentTypes['postWildcatchfishery'][0]) + { + return $this->postWildcatchfisheryAsyncWithHttpInfo($post_wildcatchfishery_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postWildcatchfisheryAsyncWithHttpInfo + * + * Perform wildcatchfishery calculation + * + * @param \OpenAPI\Client\Model\PostWildcatchfisheryRequest $post_wildcatchfishery_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWildcatchfishery'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postWildcatchfisheryAsyncWithHttpInfo($post_wildcatchfishery_request, string $contentType = self::contentTypes['postWildcatchfishery'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostWildcatchfishery200Response'; + $request = $this->postWildcatchfisheryRequest($post_wildcatchfishery_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postWildcatchfishery' + * + * @param \OpenAPI\Client\Model\PostWildcatchfisheryRequest $post_wildcatchfishery_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWildcatchfishery'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postWildcatchfisheryRequest($post_wildcatchfishery_request, string $contentType = self::contentTypes['postWildcatchfishery'][0]) + { + + // verify the required parameter 'post_wildcatchfishery_request' is set + if ($post_wildcatchfishery_request === null || (is_array($post_wildcatchfishery_request) && count($post_wildcatchfishery_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_wildcatchfishery_request when calling postWildcatchfishery' + ); + } + + + $resourcePath = '/wildcatchfishery'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_wildcatchfishery_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_wildcatchfishery_request)); + } else { + $httpBody = $post_wildcatchfishery_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postWildseafisheries + * + * Perform wildseafisheries calculation + * + * @param \OpenAPI\Client\Model\PostWildseafisheriesRequest $post_wildseafisheries_request post_wildseafisheries_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWildseafisheries'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\PostWildseafisheries200Response + */ + public function postWildseafisheries($post_wildseafisheries_request, string $contentType = self::contentTypes['postWildseafisheries'][0]) + { + list($response) = $this->postWildseafisheriesWithHttpInfo($post_wildseafisheries_request, $contentType); + return $response; + } + + /** + * Operation postWildseafisheriesWithHttpInfo + * + * Perform wildseafisheries calculation + * + * @param \OpenAPI\Client\Model\PostWildseafisheriesRequest $post_wildseafisheries_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWildseafisheries'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\PostWildseafisheries200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function postWildseafisheriesWithHttpInfo($post_wildseafisheries_request, string $contentType = self::contentTypes['postWildseafisheries'][0]) + { + $request = $this->postWildseafisheriesRequest($post_wildseafisheries_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch ($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostWildseafisheries200Response', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\PostWildseafisheries200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\PostWildseafisheries200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation postWildseafisheriesAsync + * + * Perform wildseafisheries calculation + * + * @param \OpenAPI\Client\Model\PostWildseafisheriesRequest $post_wildseafisheries_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWildseafisheries'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postWildseafisheriesAsync($post_wildseafisheries_request, string $contentType = self::contentTypes['postWildseafisheries'][0]) + { + return $this->postWildseafisheriesAsyncWithHttpInfo($post_wildseafisheries_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postWildseafisheriesAsyncWithHttpInfo + * + * Perform wildseafisheries calculation + * + * @param \OpenAPI\Client\Model\PostWildseafisheriesRequest $post_wildseafisheries_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWildseafisheries'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postWildseafisheriesAsyncWithHttpInfo($post_wildseafisheries_request, string $contentType = self::contentTypes['postWildseafisheries'][0]) + { + $returnType = '\OpenAPI\Client\Model\PostWildseafisheries200Response'; + $request = $this->postWildseafisheriesRequest($post_wildseafisheries_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postWildseafisheries' + * + * @param \OpenAPI\Client\Model\PostWildseafisheriesRequest $post_wildseafisheries_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWildseafisheries'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postWildseafisheriesRequest($post_wildseafisheries_request, string $contentType = self::contentTypes['postWildseafisheries'][0]) + { + + // verify the required parameter 'post_wildseafisheries_request' is set + if ($post_wildseafisheries_request === null || (is_array($post_wildseafisheries_request) && count($post_wildseafisheries_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $post_wildseafisheries_request when calling postWildseafisheries' + ); + } + + + $resourcePath = '/wildseafisheries'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json',], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($post_wildseafisheries_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_wildseafisheries_request)); + } else { + $httpBody = $post_wildseafisheries_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0] . '00'); + $right = (int) ($rangeCode[0] . '99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/examples/php-api-client/api-client/lib/ApiException.php b/examples/php-api-client/api-client/lib/ApiException.php new file mode 100644 index 00000000..7fae89ef --- /dev/null +++ b/examples/php-api-client/api-client/lib/ApiException.php @@ -0,0 +1,120 @@ +responseHeaders = $responseHeaders; + $this->responseBody = $responseBody; + } + + /** + * Gets the HTTP response header + * + * @return string[][]|null HTTP response header + */ + public function getResponseHeaders() + { + return $this->responseHeaders; + } + + /** + * Gets the HTTP body of the server response either as Json or string + * + * @return \stdClass|string|null HTTP body of the server response either as \stdClass or string + */ + public function getResponseBody() + { + return $this->responseBody; + } + + /** + * Sets the deserialized response object (during deserialization) + * + * @param mixed $obj Deserialized response object + * + * @return void + */ + public function setResponseObject($obj) + { + $this->responseObject = $obj; + } + + /** + * Gets the deserialized response object (during deserialization) + * + * @return mixed the deserialized response object + */ + public function getResponseObject() + { + return $this->responseObject; + } +} diff --git a/examples/php-api-client/api-client/lib/Configuration.php b/examples/php-api-client/api-client/lib/Configuration.php new file mode 100644 index 00000000..07febae4 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Configuration.php @@ -0,0 +1,589 @@ +tempFolderPath = sys_get_temp_dir(); + } + + /** + * Sets API key + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $key API key or token + * + * @return $this + */ + public function setApiKey($apiKeyIdentifier, $key) + { + $this->apiKeys[$apiKeyIdentifier] = $key; + return $this; + } + + /** + * Gets API key + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return null|string API key or token + */ + public function getApiKey($apiKeyIdentifier) + { + return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null; + } + + /** + * Sets the prefix for API key (e.g. Bearer) + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $prefix API key prefix, e.g. Bearer + * + * @return $this + */ + public function setApiKeyPrefix($apiKeyIdentifier, $prefix) + { + $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + return $this; + } + + /** + * Gets API key prefix + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return null|string + */ + public function getApiKeyPrefix($apiKeyIdentifier) + { + return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null; + } + + /** + * Sets the access token for OAuth + * + * @param string $accessToken Token for OAuth + * + * @return $this + */ + public function setAccessToken($accessToken) + { + $this->accessToken = $accessToken; + return $this; + } + + /** + * Gets the access token for OAuth + * + * @return string Access token for OAuth + */ + public function getAccessToken() + { + return $this->accessToken; + } + + /** + * Sets boolean format for query string. + * + * @param string $booleanFormat Boolean format for query string + * + * @return $this + */ + public function setBooleanFormatForQueryString(string $booleanFormat) + { + $this->booleanFormatForQueryString = $booleanFormat; + + return $this; + } + + /** + * Gets boolean format for query string. + * + * @return string Boolean format for query string + */ + public function getBooleanFormatForQueryString(): string + { + return $this->booleanFormatForQueryString; + } + + /** + * Sets the username for HTTP basic authentication + * + * @param string $username Username for HTTP basic authentication + * + * @return $this + */ + public function setUsername($username) + { + $this->username = $username; + return $this; + } + + /** + * Gets the username for HTTP basic authentication + * + * @return string Username for HTTP basic authentication + */ + public function getUsername() + { + return $this->username; + } + + /** + * Sets the password for HTTP basic authentication + * + * @param string $password Password for HTTP basic authentication + * + * @return $this + */ + public function setPassword($password) + { + $this->password = $password; + return $this; + } + + /** + * Gets the password for HTTP basic authentication + * + * @return string Password for HTTP basic authentication + */ + public function getPassword() + { + return $this->password; + } + + /** + * Sets the host + * + * @param string $host Host + * + * @return $this + */ + public function setHost($host) + { + $this->host = $host; + return $this; + } + + /** + * Gets the host + * + * @return string Host + */ + public function getHost() + { + return $this->host; + } + + /** + * Sets the user agent of the api client + * + * @param string $userAgent the user agent of the api client + * + * @throws \InvalidArgumentException + * @return $this + */ + public function setUserAgent($userAgent) + { + if (!is_string($userAgent)) { + throw new \InvalidArgumentException('User-agent must be a string.'); + } + + $this->userAgent = $userAgent; + return $this; + } + + /** + * Gets the user agent of the api client + * + * @return string user agent + */ + public function getUserAgent() + { + return $this->userAgent; + } + + /** + * Sets debug flag + * + * @param bool $debug Debug flag + * + * @return $this + */ + public function setDebug($debug) + { + $this->debug = $debug; + return $this; + } + + /** + * Gets the debug flag + * + * @return bool + */ + public function getDebug() + { + return $this->debug; + } + + /** + * Sets the debug file + * + * @param string $debugFile Debug file + * + * @return $this + */ + public function setDebugFile($debugFile) + { + $this->debugFile = $debugFile; + return $this; + } + + /** + * Gets the debug file + * + * @return string + */ + public function getDebugFile() + { + return $this->debugFile; + } + + /** + * Sets the temp folder path + * + * @param string $tempFolderPath Temp folder path + * + * @return $this + */ + public function setTempFolderPath($tempFolderPath) + { + $this->tempFolderPath = $tempFolderPath; + return $this; + } + + /** + * Gets the temp folder path + * + * @return string Temp folder path + */ + public function getTempFolderPath() + { + return $this->tempFolderPath; + } + + + /** + * Sets the certificate file path, for mTLS + * + * @return $this + */ + public function setCertFile($certFile) + { + $this->certFile = $certFile; + return $this; + } + + /** + * Gets the certificate file path, for mTLS + * + * @return string Certificate file path + */ + public function getCertFile() + { + return $this->certFile; + } + + /** + * Sets the certificate key path, for mTLS + * + * @return $this + */ + public function setKeyFile($keyFile) + { + $this->keyFile = $keyFile; + return $this; + } + + /** + * Gets the certificate key path, for mTLS + * + * @return string Certificate key path + */ + public function getKeyFile() + { + return $this->keyFile; + } + + /** + * Gets the default configuration instance + * + * @return Configuration + */ + public static function getDefaultConfiguration() + { + if (self::$defaultConfiguration === null) { + self::$defaultConfiguration = new Configuration(); + } + + return self::$defaultConfiguration; + } + + /** + * Sets the default configuration instance + * + * @param Configuration $config An instance of the Configuration Object + * + * @return void + */ + public static function setDefaultConfiguration(Configuration $config) + { + self::$defaultConfiguration = $config; + } + + /** + * Gets the essential information for debugging + * + * @return string The report for debugging + */ + public static function toDebugReport() + { + $report = 'PHP SDK (OpenAPI\Client) Debug Report:' . PHP_EOL; + $report .= ' OS: ' . php_uname() . PHP_EOL; + $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; + $report .= ' The version of the OpenAPI document: 3.0.0' . PHP_EOL; + $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; + + return $report; + } + + /** + * Get API key (with prefix if set) + * + * @param string $apiKeyIdentifier name of apikey + * + * @return null|string API key with the prefix + */ + public function getApiKeyWithPrefix($apiKeyIdentifier) + { + $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); + $apiKey = $this->getApiKey($apiKeyIdentifier); + + if ($apiKey === null) { + return null; + } + + if ($prefix === null) { + $keyWithPrefix = $apiKey; + } else { + $keyWithPrefix = $prefix . ' ' . $apiKey; + } + + return $keyWithPrefix; + } + + /** + * Returns an array of host settings + * + * @return array an array of host settings + */ + public function getHostSettings() + { + return [ + [ + "url" => "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0", + "description" => "Production Server", + ] + ]; + } + + /** + * Returns URL based on host settings, index and variables + * + * @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients + * @param int $hostIndex index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ + public static function getHostString(array $hostSettings, $hostIndex, ?array $variables = null) + { + if (null === $variables) { + $variables = []; + } + + // check array index out of bound + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new \InvalidArgumentException("Invalid index $hostIndex when selecting the host. Must be less than " . count($hostSettings)); + } + + $host = $hostSettings[$hostIndex]; + $url = $host["url"]; + + // go through variable and assign a value + foreach ($host["variables"] ?? [] as $name => $variable) { + if (array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user + if (!isset($variable['enum_values']) || in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum + $url = str_replace("{" . $name . "}", $variables[$name], $url); + } else { + throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value " . $variables[$name] . ". Must be " . join(',', $variable["enum_values"]) . "."); + } + } else { + // use default value + $url = str_replace("{" . $name . "}", $variable["default_value"], $url); + } + } + + return $url; + } + + /** + * Returns URL based on the index and variables + * + * @param int $index index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ + public function getHostFromSettings($index, $variables = null) + { + return self::getHostString($this->getHostSettings(), $index, $variables); + } +} diff --git a/examples/php-api-client/api-client/lib/FormDataProcessor.php b/examples/php-api-client/api-client/lib/FormDataProcessor.php new file mode 100644 index 00000000..5370b249 --- /dev/null +++ b/examples/php-api-client/api-client/lib/FormDataProcessor.php @@ -0,0 +1,247 @@ + $values the value of the form parameter + * + * @return array [key => value] of formdata + */ + public function prepare(array $values): array + { + $this->has_file = false; + $result = []; + + foreach ($values as $k => $v) { + if ($v === null) { + continue; + } + + $result[$k] = $this->makeFormSafe($v); + } + + return $result; + } + + /** + * Flattens a multi-level array of data and generates a single-level array + * compatible with formdata - a single-level array where the keys use bracket + * notation to signify nested data. + * + * credit: https://github.com/FranBar1966/FlatPHP + */ + public static function flatten(array $source, string $start = ''): array + { + $opt = [ + 'prefix' => '[', + 'suffix' => ']', + 'suffix-end' => true, + 'prefix-list' => '[', + 'suffix-list' => ']', + 'suffix-list-end' => true, + ]; + + if ($start === '') { + $currentPrefix = ''; + $currentSuffix = ''; + $currentSuffixEnd = false; + } elseif (array_is_list($source)) { + $currentPrefix = $opt['prefix-list']; + $currentSuffix = $opt['suffix-list']; + $currentSuffixEnd = $opt['suffix-list-end']; + } else { + $currentPrefix = $opt['prefix']; + $currentSuffix = $opt['suffix']; + $currentSuffixEnd = $opt['suffix-end']; + } + + $currentName = $start; + $result = []; + + foreach ($source as $key => $val) { + $currentName .= $currentPrefix.$key; + + if (is_array($val) && !empty($val)) { + $currentName .= $currentSuffix; + $result += self::flatten($val, $currentName); + } else { + if ($currentSuffixEnd) { + $currentName .= $currentSuffix; + } + + if (is_resource($val)) { + $result[$currentName] = $val; + } else { + $result[$currentName] = ObjectSerializer::toString($val); + } + } + + $currentName = $start; + } + + return $result; + } + + /** + * formdata must be limited to scalars or arrays of scalar values, + * or a resource for a file upload. Here we iterate through all available + * data and identify how to handle each scenario + */ + protected function makeFormSafe($value) + { + if ($value instanceof SplFileObject) { + return $this->processFiles([$value])[0]; + } + + if (is_resource($value)) { + $this->has_file = true; + + return $value; + } + + if ($value instanceof ModelInterface) { + return $this->processModel($value); + } + + if (is_array($value) || (is_object($value) && !$value instanceof \DateTimeInterface)) { + $data = []; + + foreach ($value as $k => $v) { + $data[$k] = $this->makeFormSafe($v); + } + + return $data; + } + + return ObjectSerializer::toString($value); + } + + /** + * We are able to handle nested ModelInterface. We do not simply call + * json_decode(json_encode()) because any given model may have binary data + * or other data that cannot be serialized to a JSON string + */ + protected function processModel(ModelInterface $model): array + { + $result = []; + + foreach ($model::openAPITypes() as $name => $type) { + $value = $model->offsetGet($name); + + if ($value === null) { + continue; + } + + if (strpos($type, '\SplFileObject') !== false) { + $file = is_array($value) ? $value : [$value]; + $result[$name] = $this->processFiles($file); + + continue; + } + + if ($value instanceof ModelInterface) { + $result[$name] = $this->processModel($value); + + continue; + } + + if (is_array($value) || is_object($value)) { + $result[$name] = $this->makeFormSafe($value); + + continue; + } + + $result[$name] = ObjectSerializer::toString($value); + } + + return $result; + } + + /** + * Handle file data + */ + protected function processFiles(array $files): array + { + $this->has_file = true; + + $result = []; + + foreach ($files as $i => $file) { + if (is_array($file)) { + $result[$i] = $this->processFiles($file); + + continue; + } + + if ($file instanceof StreamInterface) { + $result[$i] = $file; + + continue; + } + + if ($file instanceof SplFileObject) { + $result[$i] = $this->tryFopen($file); + } + } + + return $result; + } + + private function tryFopen(SplFileObject $file) + { + return Utils::tryFopen($file->getRealPath(), 'rb'); + } +} diff --git a/examples/php-api-client/api-client/lib/HeaderSelector.php b/examples/php-api-client/api-client/lib/HeaderSelector.php new file mode 100644 index 00000000..5982425a --- /dev/null +++ b/examples/php-api-client/api-client/lib/HeaderSelector.php @@ -0,0 +1,274 @@ +selectAcceptHeader($accept); + if ($accept !== null) { + $headers['Accept'] = $accept; + } + + if (!$isMultipart) { + if($contentType === '') { + $contentType = 'application/json'; + } + + $headers['Content-Type'] = $contentType; + } + + return $headers; + } + + /** + * Return the header 'Accept' based on an array of Accept provided. + * + * @param string[] $accept Array of header + * + * @return null|string Accept (e.g. application/json) + */ + private function selectAcceptHeader(array $accept): ?string + { + # filter out empty entries + $accept = array_filter($accept); + + if (count($accept) === 0) { + return null; + } + + # If there's only one Accept header, just use it + if (count($accept) === 1) { + return reset($accept); + } + + # If none of the available Accept headers is of type "json", then just use all them + $headersWithJson = $this->selectJsonMimeList($accept); + if (count($headersWithJson) === 0) { + return implode(',', $accept); + } + + # If we got here, then we need add quality values (weight), as described in IETF RFC 9110, Items 12.4.2/12.5.1, + # to give the highest priority to json-like headers - recalculating the existing ones, if needed + return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson); + } + + /** + * Detects whether a string contains a valid JSON mime type + * + * @param string $searchString + * @return bool + */ + public function isJsonMime(string $searchString): bool + { + return preg_match('~^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)~', $searchString) === 1; + } + + /** + * Select all items from a list containing a JSON mime type + * + * @param array $mimeList + * @return array + */ + private function selectJsonMimeList(array $mimeList): array { + $jsonMimeList = []; + foreach ($mimeList as $mime) { + if($this->isJsonMime($mime)) { + $jsonMimeList[] = $mime; + } + } + return $jsonMimeList; + } + + + /** + * Create an Accept header string from the given "Accept" headers array, recalculating all weights + * + * @param string[] $accept Array of Accept Headers + * @param string[] $headersWithJson Array of Accept Headers of type "json" + * + * @return string "Accept" Header (e.g. "application/json, text/html; q=0.9") + */ + private function getAcceptHeaderWithAdjustedWeight(array $accept, array $headersWithJson): string + { + $processedHeaders = [ + 'withApplicationJson' => [], + 'withJson' => [], + 'withoutJson' => [], + ]; + + foreach ($accept as $header) { + + $headerData = $this->getHeaderAndWeight($header); + + if (stripos($headerData['header'], 'application/json') === 0) { + $processedHeaders['withApplicationJson'][] = $headerData; + } elseif (in_array($header, $headersWithJson, true)) { + $processedHeaders['withJson'][] = $headerData; + } else { + $processedHeaders['withoutJson'][] = $headerData; + } + } + + $acceptHeaders = []; + $currentWeight = 1000; + + $hasMoreThan28Headers = count($accept) > 28; + + foreach($processedHeaders as $headers) { + if (count($headers) > 0) { + $acceptHeaders[] = $this->adjustWeight($headers, $currentWeight, $hasMoreThan28Headers); + } + } + + $acceptHeaders = array_merge(...$acceptHeaders); + + return implode(',', $acceptHeaders); + } + + /** + * Given an Accept header, returns an associative array splitting the header and its weight + * + * @param string $header "Accept" Header + * + * @return array with the header and its weight + */ + private function getHeaderAndWeight(string $header): array + { + # matches headers with weight, splitting the header and the weight in $outputArray + if (preg_match('/(.*);\s*q=(1(?:\.0+)?|0\.\d+)$/', $header, $outputArray) === 1) { + $headerData = [ + 'header' => $outputArray[1], + 'weight' => (int)($outputArray[2] * 1000), + ]; + } else { + $headerData = [ + 'header' => trim($header), + 'weight' => 1000, + ]; + } + + return $headerData; + } + + /** + * @param array[] $headers + * @param float $currentWeight + * @param bool $hasMoreThan28Headers + * @return string[] array of adjusted "Accept" headers + */ + private function adjustWeight(array $headers, float &$currentWeight, bool $hasMoreThan28Headers): array + { + usort($headers, function (array $a, array $b) { + return $b['weight'] - $a['weight']; + }); + + $acceptHeaders = []; + foreach ($headers as $index => $header) { + if($index > 0 && $headers[$index - 1]['weight'] > $header['weight']) + { + $currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers); + } + + $weight = $currentWeight; + + $acceptHeaders[] = $this->buildAcceptHeader($header['header'], $weight); + } + + $currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers); + + return $acceptHeaders; + } + + /** + * @param string $header + * @param int $weight + * @return string + */ + private function buildAcceptHeader(string $header, int $weight): string + { + if($weight === 1000) { + return $header; + } + + return trim($header, '; ') . ';q=' . rtrim(sprintf('%0.3f', $weight / 1000), '0'); + } + + /** + * Calculate the next weight, based on the current one. + * + * If there are less than 28 "Accept" headers, the weights will be decreased by 1 on its highest significant digit, using the + * following formula: + * + * next weight = current weight - 10 ^ (floor(log(current weight - 1))) + * + * ( current weight minus ( 10 raised to the power of ( floor of (log to the base 10 of ( current weight minus 1 ) ) ) ) ) + * + * Starting from 1000, this generates the following series: + * + * 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 + * + * The resulting quality codes are closer to the average "normal" usage of them (like "q=0.9", "q=0.8" and so on), but it only works + * if there is a maximum of 28 "Accept" headers. If we have more than that (which is extremely unlikely), then we fall back to a 1-by-1 + * decrement rule, which will result in quality codes like "q=0.999", "q=0.998" etc. + * + * @param int $currentWeight varying from 1 to 1000 (will be divided by 1000 to build the quality value) + * @param bool $hasMoreThan28Headers + * @return int + */ + public function getNextWeight(int $currentWeight, bool $hasMoreThan28Headers): int + { + if ($currentWeight <= 1) { + return 1; + } + + if ($hasMoreThan28Headers) { + return $currentWeight - 1; + } + + return $currentWeight - 10 ** floor( log10($currentWeight - 1) ); + } +} diff --git a/examples/php-api-client/api-client/lib/Model/ModelInterface.php b/examples/php-api-client/api-client/lib/Model/ModelInterface.php new file mode 100644 index 00000000..7e417d89 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/ModelInterface.php @@ -0,0 +1,112 @@ + + */ +class PostAquaculture200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope3', + 'purchased_offsets' => '\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntensities', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'intermediate' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'purchased_offsets' => null, + 'net' => null, + 'intensities' => null, + 'carbon_sequestration' => null, + 'intermediate' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'purchased_offsets' => false, + 'net' => false, + 'intensities' => false, + 'carbon_sequestration' => false, + 'intermediate' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'purchased_offsets' => 'purchasedOffsets', + 'net' => 'net', + 'intensities' => 'intensities', + 'carbon_sequestration' => 'carbonSequestration', + 'intermediate' => 'intermediate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'purchased_offsets' => 'setPurchasedOffsets', + 'net' => 'setNet', + 'intensities' => 'setIntensities', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intermediate' => 'setIntermediate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'purchased_offsets' => 'getPurchasedOffsets', + 'net' => 'getNet', + 'intensities' => 'getIntensities', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intermediate' => 'getIntermediate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('purchased_offsets', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['purchased_offsets'] === null) { + $invalidProperties[] = "'purchased_offsets' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets purchased_offsets + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets + */ + public function getPurchasedOffsets() + { + return $this->container['purchased_offsets']; + } + + /** + * Sets purchased_offsets + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets $purchased_offsets purchased_offsets + * + * @return self + */ + public function setPurchasedOffsets($purchased_offsets) + { + if (is_null($purchased_offsets)) { + throw new \InvalidArgumentException('non-nullable purchased_offsets cannot be null'); + } + $this->container['purchased_offsets'] = $purchased_offsets; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseCarbonSequestration.php b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseCarbonSequestration.php new file mode 100644 index 00000000..ee22da28 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseCarbonSequestration.php @@ -0,0 +1,451 @@ + + */ +class PostAquaculture200ResponseCarbonSequestration implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_200_response_carbonSequestration'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float', + 'intermediate' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null, + 'intermediate' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false, + 'intermediate' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total', + 'intermediate' => 'intermediate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal', + 'intermediate' => 'setIntermediate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal', + 'intermediate' => 'getIntermediate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Annual amount of carbon sequestered, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets intermediate + * + * @return float[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param float[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseIntensities.php b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseIntensities.php new file mode 100644 index 00000000..6cd55349 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseIntensities.php @@ -0,0 +1,487 @@ + + */ +class PostAquaculture200ResponseIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_200_response_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total_harvest_weight_kg' => 'float', + 'aquaculture_excluding_carbon_offsets' => 'float', + 'aquaculture_including_carbon_offsets' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total_harvest_weight_kg' => null, + 'aquaculture_excluding_carbon_offsets' => null, + 'aquaculture_including_carbon_offsets' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total_harvest_weight_kg' => false, + 'aquaculture_excluding_carbon_offsets' => false, + 'aquaculture_including_carbon_offsets' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total_harvest_weight_kg' => 'totalHarvestWeightKg', + 'aquaculture_excluding_carbon_offsets' => 'aquacultureExcludingCarbonOffsets', + 'aquaculture_including_carbon_offsets' => 'aquacultureIncludingCarbonOffsets' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total_harvest_weight_kg' => 'setTotalHarvestWeightKg', + 'aquaculture_excluding_carbon_offsets' => 'setAquacultureExcludingCarbonOffsets', + 'aquaculture_including_carbon_offsets' => 'setAquacultureIncludingCarbonOffsets' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total_harvest_weight_kg' => 'getTotalHarvestWeightKg', + 'aquaculture_excluding_carbon_offsets' => 'getAquacultureExcludingCarbonOffsets', + 'aquaculture_including_carbon_offsets' => 'getAquacultureIncludingCarbonOffsets' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total_harvest_weight_kg', $data ?? [], null); + $this->setIfExists('aquaculture_excluding_carbon_offsets', $data ?? [], null); + $this->setIfExists('aquaculture_including_carbon_offsets', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total_harvest_weight_kg'] === null) { + $invalidProperties[] = "'total_harvest_weight_kg' can't be null"; + } + if ($this->container['aquaculture_excluding_carbon_offsets'] === null) { + $invalidProperties[] = "'aquaculture_excluding_carbon_offsets' can't be null"; + } + if ($this->container['aquaculture_including_carbon_offsets'] === null) { + $invalidProperties[] = "'aquaculture_including_carbon_offsets' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total_harvest_weight_kg + * + * @return float + */ + public function getTotalHarvestWeightKg() + { + return $this->container['total_harvest_weight_kg']; + } + + /** + * Sets total_harvest_weight_kg + * + * @param float $total_harvest_weight_kg Total harvest weight in kg + * + * @return self + */ + public function setTotalHarvestWeightKg($total_harvest_weight_kg) + { + if (is_null($total_harvest_weight_kg)) { + throw new \InvalidArgumentException('non-nullable total_harvest_weight_kg cannot be null'); + } + $this->container['total_harvest_weight_kg'] = $total_harvest_weight_kg; + + return $this; + } + + /** + * Gets aquaculture_excluding_carbon_offsets + * + * @return float + */ + public function getAquacultureExcludingCarbonOffsets() + { + return $this->container['aquaculture_excluding_carbon_offsets']; + } + + /** + * Sets aquaculture_excluding_carbon_offsets + * + * @param float $aquaculture_excluding_carbon_offsets Aquaculture emissions intensity excluding sequestration, in kg-CO2e/kg + * + * @return self + */ + public function setAquacultureExcludingCarbonOffsets($aquaculture_excluding_carbon_offsets) + { + if (is_null($aquaculture_excluding_carbon_offsets)) { + throw new \InvalidArgumentException('non-nullable aquaculture_excluding_carbon_offsets cannot be null'); + } + $this->container['aquaculture_excluding_carbon_offsets'] = $aquaculture_excluding_carbon_offsets; + + return $this; + } + + /** + * Gets aquaculture_including_carbon_offsets + * + * @return float + */ + public function getAquacultureIncludingCarbonOffsets() + { + return $this->container['aquaculture_including_carbon_offsets']; + } + + /** + * Sets aquaculture_including_carbon_offsets + * + * @param float $aquaculture_including_carbon_offsets Aquaculture emissions intensity including sequestration, in kg-CO2e/kg + * + * @return self + */ + public function setAquacultureIncludingCarbonOffsets($aquaculture_including_carbon_offsets) + { + if (is_null($aquaculture_including_carbon_offsets)) { + throw new \InvalidArgumentException('non-nullable aquaculture_including_carbon_offsets cannot be null'); + } + $this->container['aquaculture_including_carbon_offsets'] = $aquaculture_including_carbon_offsets; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseIntermediateInner.php new file mode 100644 index 00000000..0fbdf186 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseIntermediateInner.php @@ -0,0 +1,636 @@ + + */ +class PostAquaculture200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope3', + 'intensities' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntensities', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'intensities' => null, + 'net' => null, + 'carbon_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'intensities' => false, + 'net' => false, + 'carbon_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'intensities' => 'intensities', + 'net' => 'net', + 'carbon_sequestration' => 'carbonSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'intensities' => 'setIntensities', + 'net' => 'setNet', + 'carbon_sequestration' => 'setCarbonSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'intensities' => 'getIntensities', + 'net' => 'getNet', + 'carbon_sequestration' => 'getCarbonSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.php b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.php new file mode 100644 index 00000000..b5ae07b0 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.php @@ -0,0 +1,414 @@ + + */ +class PostAquaculture200ResponseIntermediateInnerCarbonSequestration implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_200_response_intermediate_inner_carbonSequestration'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Annual amount of carbon sequestered, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseNet.php b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseNet.php new file mode 100644 index 00000000..9b4ac981 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseNet.php @@ -0,0 +1,414 @@ + + */ +class PostAquaculture200ResponseNet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_200_response_net'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total total + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponsePurchasedOffsets.php b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponsePurchasedOffsets.php new file mode 100644 index 00000000..ab499066 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponsePurchasedOffsets.php @@ -0,0 +1,414 @@ + + */ +class PostAquaculture200ResponsePurchasedOffsets implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_200_response_purchasedOffsets'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Annual amount of carbon sequestered, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseScope1.php b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseScope1.php new file mode 100644 index 00000000..2ca29242 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseScope1.php @@ -0,0 +1,784 @@ + + */ +class PostAquaculture200ResponseScope1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_200_response_scope1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel_co2' => 'float', + 'fuel_ch4' => 'float', + 'fuel_n2_o' => 'float', + 'hfcs_refrigerant_leakage' => 'float', + 'waste_water_co2' => 'float', + 'composted_solid_waste_co2' => 'float', + 'total_co2' => 'float', + 'total_ch4' => 'float', + 'total_n2_o' => 'float', + 'total_hfcs' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel_co2' => null, + 'fuel_ch4' => null, + 'fuel_n2_o' => null, + 'hfcs_refrigerant_leakage' => null, + 'waste_water_co2' => null, + 'composted_solid_waste_co2' => null, + 'total_co2' => null, + 'total_ch4' => null, + 'total_n2_o' => null, + 'total_hfcs' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel_co2' => false, + 'fuel_ch4' => false, + 'fuel_n2_o' => false, + 'hfcs_refrigerant_leakage' => false, + 'waste_water_co2' => false, + 'composted_solid_waste_co2' => false, + 'total_co2' => false, + 'total_ch4' => false, + 'total_n2_o' => false, + 'total_hfcs' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel_co2' => 'fuelCO2', + 'fuel_ch4' => 'fuelCH4', + 'fuel_n2_o' => 'fuelN2O', + 'hfcs_refrigerant_leakage' => 'hfcsRefrigerantLeakage', + 'waste_water_co2' => 'wasteWaterCO2', + 'composted_solid_waste_co2' => 'compostedSolidWasteCO2', + 'total_co2' => 'totalCO2', + 'total_ch4' => 'totalCH4', + 'total_n2_o' => 'totalN2O', + 'total_hfcs' => 'totalHFCs', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel_co2' => 'setFuelCo2', + 'fuel_ch4' => 'setFuelCh4', + 'fuel_n2_o' => 'setFuelN2O', + 'hfcs_refrigerant_leakage' => 'setHfcsRefrigerantLeakage', + 'waste_water_co2' => 'setWasteWaterCo2', + 'composted_solid_waste_co2' => 'setCompostedSolidWasteCo2', + 'total_co2' => 'setTotalCo2', + 'total_ch4' => 'setTotalCh4', + 'total_n2_o' => 'setTotalN2O', + 'total_hfcs' => 'setTotalHfcs', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel_co2' => 'getFuelCo2', + 'fuel_ch4' => 'getFuelCh4', + 'fuel_n2_o' => 'getFuelN2O', + 'hfcs_refrigerant_leakage' => 'getHfcsRefrigerantLeakage', + 'waste_water_co2' => 'getWasteWaterCo2', + 'composted_solid_waste_co2' => 'getCompostedSolidWasteCo2', + 'total_co2' => 'getTotalCo2', + 'total_ch4' => 'getTotalCh4', + 'total_n2_o' => 'getTotalN2O', + 'total_hfcs' => 'getTotalHfcs', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel_co2', $data ?? [], null); + $this->setIfExists('fuel_ch4', $data ?? [], null); + $this->setIfExists('fuel_n2_o', $data ?? [], null); + $this->setIfExists('hfcs_refrigerant_leakage', $data ?? [], null); + $this->setIfExists('waste_water_co2', $data ?? [], null); + $this->setIfExists('composted_solid_waste_co2', $data ?? [], null); + $this->setIfExists('total_co2', $data ?? [], null); + $this->setIfExists('total_ch4', $data ?? [], null); + $this->setIfExists('total_n2_o', $data ?? [], null); + $this->setIfExists('total_hfcs', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel_co2'] === null) { + $invalidProperties[] = "'fuel_co2' can't be null"; + } + if ($this->container['fuel_ch4'] === null) { + $invalidProperties[] = "'fuel_ch4' can't be null"; + } + if ($this->container['fuel_n2_o'] === null) { + $invalidProperties[] = "'fuel_n2_o' can't be null"; + } + if ($this->container['hfcs_refrigerant_leakage'] === null) { + $invalidProperties[] = "'hfcs_refrigerant_leakage' can't be null"; + } + if ($this->container['waste_water_co2'] === null) { + $invalidProperties[] = "'waste_water_co2' can't be null"; + } + if ($this->container['composted_solid_waste_co2'] === null) { + $invalidProperties[] = "'composted_solid_waste_co2' can't be null"; + } + if ($this->container['total_co2'] === null) { + $invalidProperties[] = "'total_co2' can't be null"; + } + if ($this->container['total_ch4'] === null) { + $invalidProperties[] = "'total_ch4' can't be null"; + } + if ($this->container['total_n2_o'] === null) { + $invalidProperties[] = "'total_n2_o' can't be null"; + } + if ($this->container['total_hfcs'] === null) { + $invalidProperties[] = "'total_hfcs' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel_co2 + * + * @return float + */ + public function getFuelCo2() + { + return $this->container['fuel_co2']; + } + + /** + * Sets fuel_co2 + * + * @param float $fuel_co2 CO2 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCo2($fuel_co2) + { + if (is_null($fuel_co2)) { + throw new \InvalidArgumentException('non-nullable fuel_co2 cannot be null'); + } + $this->container['fuel_co2'] = $fuel_co2; + + return $this; + } + + /** + * Gets fuel_ch4 + * + * @return float + */ + public function getFuelCh4() + { + return $this->container['fuel_ch4']; + } + + /** + * Sets fuel_ch4 + * + * @param float $fuel_ch4 CH4 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCh4($fuel_ch4) + { + if (is_null($fuel_ch4)) { + throw new \InvalidArgumentException('non-nullable fuel_ch4 cannot be null'); + } + $this->container['fuel_ch4'] = $fuel_ch4; + + return $this; + } + + /** + * Gets fuel_n2_o + * + * @return float + */ + public function getFuelN2O() + { + return $this->container['fuel_n2_o']; + } + + /** + * Sets fuel_n2_o + * + * @param float $fuel_n2_o N2O emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelN2O($fuel_n2_o) + { + if (is_null($fuel_n2_o)) { + throw new \InvalidArgumentException('non-nullable fuel_n2_o cannot be null'); + } + $this->container['fuel_n2_o'] = $fuel_n2_o; + + return $this; + } + + /** + * Gets hfcs_refrigerant_leakage + * + * @return float + */ + public function getHfcsRefrigerantLeakage() + { + return $this->container['hfcs_refrigerant_leakage']; + } + + /** + * Sets hfcs_refrigerant_leakage + * + * @param float $hfcs_refrigerant_leakage Emissions from refrigerant leakage, in tonnes-HFCs + * + * @return self + */ + public function setHfcsRefrigerantLeakage($hfcs_refrigerant_leakage) + { + if (is_null($hfcs_refrigerant_leakage)) { + throw new \InvalidArgumentException('non-nullable hfcs_refrigerant_leakage cannot be null'); + } + $this->container['hfcs_refrigerant_leakage'] = $hfcs_refrigerant_leakage; + + return $this; + } + + /** + * Gets waste_water_co2 + * + * @return float + */ + public function getWasteWaterCo2() + { + return $this->container['waste_water_co2']; + } + + /** + * Sets waste_water_co2 + * + * @param float $waste_water_co2 Emissions from wastewater, in tonnes-CO2e + * + * @return self + */ + public function setWasteWaterCo2($waste_water_co2) + { + if (is_null($waste_water_co2)) { + throw new \InvalidArgumentException('non-nullable waste_water_co2 cannot be null'); + } + $this->container['waste_water_co2'] = $waste_water_co2; + + return $this; + } + + /** + * Gets composted_solid_waste_co2 + * + * @return float + */ + public function getCompostedSolidWasteCo2() + { + return $this->container['composted_solid_waste_co2']; + } + + /** + * Sets composted_solid_waste_co2 + * + * @param float $composted_solid_waste_co2 Emissions from composted solid waste, in tonnes-CO2e + * + * @return self + */ + public function setCompostedSolidWasteCo2($composted_solid_waste_co2) + { + if (is_null($composted_solid_waste_co2)) { + throw new \InvalidArgumentException('non-nullable composted_solid_waste_co2 cannot be null'); + } + $this->container['composted_solid_waste_co2'] = $composted_solid_waste_co2; + + return $this; + } + + /** + * Gets total_co2 + * + * @return float + */ + public function getTotalCo2() + { + return $this->container['total_co2']; + } + + /** + * Sets total_co2 + * + * @param float $total_co2 Total CO2 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCo2($total_co2) + { + if (is_null($total_co2)) { + throw new \InvalidArgumentException('non-nullable total_co2 cannot be null'); + } + $this->container['total_co2'] = $total_co2; + + return $this; + } + + /** + * Gets total_ch4 + * + * @return float + */ + public function getTotalCh4() + { + return $this->container['total_ch4']; + } + + /** + * Sets total_ch4 + * + * @param float $total_ch4 Total CH4 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCh4($total_ch4) + { + if (is_null($total_ch4)) { + throw new \InvalidArgumentException('non-nullable total_ch4 cannot be null'); + } + $this->container['total_ch4'] = $total_ch4; + + return $this; + } + + /** + * Gets total_n2_o + * + * @return float + */ + public function getTotalN2O() + { + return $this->container['total_n2_o']; + } + + /** + * Sets total_n2_o + * + * @param float $total_n2_o Total N2O scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalN2O($total_n2_o) + { + if (is_null($total_n2_o)) { + throw new \InvalidArgumentException('non-nullable total_n2_o cannot be null'); + } + $this->container['total_n2_o'] = $total_n2_o; + + return $this; + } + + /** + * Gets total_hfcs + * + * @return float + */ + public function getTotalHfcs() + { + return $this->container['total_hfcs']; + } + + /** + * Sets total_hfcs + * + * @param float $total_hfcs Total HFCs scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalHfcs($total_hfcs) + { + if (is_null($total_hfcs)) { + throw new \InvalidArgumentException('non-nullable total_hfcs cannot be null'); + } + $this->container['total_hfcs'] = $total_hfcs; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseScope2.php b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseScope2.php new file mode 100644 index 00000000..10210c96 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseScope2.php @@ -0,0 +1,451 @@ + + */ +class PostAquaculture200ResponseScope2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_200_response_scope2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'electricity' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'electricity' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'electricity' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'electricity' => 'electricity', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'electricity' => 'setElectricity', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'electricity' => 'getElectricity', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('electricity', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['electricity'] === null) { + $invalidProperties[] = "'electricity' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets electricity + * + * @return float + */ + public function getElectricity() + { + return $this->container['electricity']; + } + + /** + * Sets electricity + * + * @param float $electricity Emissions from electricity, in tonnes-CO2e + * + * @return self + */ + public function setElectricity($electricity) + { + if (is_null($electricity)) { + throw new \InvalidArgumentException('non-nullable electricity cannot be null'); + } + $this->container['electricity'] = $electricity; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 2 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseScope3.php b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseScope3.php new file mode 100644 index 00000000..fb9dc9c1 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquaculture200ResponseScope3.php @@ -0,0 +1,673 @@ + + */ +class PostAquaculture200ResponseScope3 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_200_response_scope3'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'purchased_bait' => 'float', + 'electricity' => 'float', + 'fuel' => 'float', + 'commercial_flights' => 'float', + 'inbound_freight' => 'float', + 'outbound_freight' => 'float', + 'solid_waste_sent_offsite' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'purchased_bait' => null, + 'electricity' => null, + 'fuel' => null, + 'commercial_flights' => null, + 'inbound_freight' => null, + 'outbound_freight' => null, + 'solid_waste_sent_offsite' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'purchased_bait' => false, + 'electricity' => false, + 'fuel' => false, + 'commercial_flights' => false, + 'inbound_freight' => false, + 'outbound_freight' => false, + 'solid_waste_sent_offsite' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'purchased_bait' => 'purchasedBait', + 'electricity' => 'electricity', + 'fuel' => 'fuel', + 'commercial_flights' => 'commercialFlights', + 'inbound_freight' => 'inboundFreight', + 'outbound_freight' => 'outboundFreight', + 'solid_waste_sent_offsite' => 'solidWasteSentOffsite', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'purchased_bait' => 'setPurchasedBait', + 'electricity' => 'setElectricity', + 'fuel' => 'setFuel', + 'commercial_flights' => 'setCommercialFlights', + 'inbound_freight' => 'setInboundFreight', + 'outbound_freight' => 'setOutboundFreight', + 'solid_waste_sent_offsite' => 'setSolidWasteSentOffsite', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'purchased_bait' => 'getPurchasedBait', + 'electricity' => 'getElectricity', + 'fuel' => 'getFuel', + 'commercial_flights' => 'getCommercialFlights', + 'inbound_freight' => 'getInboundFreight', + 'outbound_freight' => 'getOutboundFreight', + 'solid_waste_sent_offsite' => 'getSolidWasteSentOffsite', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('purchased_bait', $data ?? [], null); + $this->setIfExists('electricity', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('commercial_flights', $data ?? [], null); + $this->setIfExists('inbound_freight', $data ?? [], null); + $this->setIfExists('outbound_freight', $data ?? [], null); + $this->setIfExists('solid_waste_sent_offsite', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['purchased_bait'] === null) { + $invalidProperties[] = "'purchased_bait' can't be null"; + } + if ($this->container['electricity'] === null) { + $invalidProperties[] = "'electricity' can't be null"; + } + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['commercial_flights'] === null) { + $invalidProperties[] = "'commercial_flights' can't be null"; + } + if ($this->container['inbound_freight'] === null) { + $invalidProperties[] = "'inbound_freight' can't be null"; + } + if ($this->container['outbound_freight'] === null) { + $invalidProperties[] = "'outbound_freight' can't be null"; + } + if ($this->container['solid_waste_sent_offsite'] === null) { + $invalidProperties[] = "'solid_waste_sent_offsite' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets purchased_bait + * + * @return float + */ + public function getPurchasedBait() + { + return $this->container['purchased_bait']; + } + + /** + * Sets purchased_bait + * + * @param float $purchased_bait Emissions from purchased bait, in tonnes-CO2e + * + * @return self + */ + public function setPurchasedBait($purchased_bait) + { + if (is_null($purchased_bait)) { + throw new \InvalidArgumentException('non-nullable purchased_bait cannot be null'); + } + $this->container['purchased_bait'] = $purchased_bait; + + return $this; + } + + /** + * Gets electricity + * + * @return float + */ + public function getElectricity() + { + return $this->container['electricity']; + } + + /** + * Sets electricity + * + * @param float $electricity Emissions from electricity, in tonnes-CO2e + * + * @return self + */ + public function setElectricity($electricity) + { + if (is_null($electricity)) { + throw new \InvalidArgumentException('non-nullable electricity cannot be null'); + } + $this->container['electricity'] = $electricity; + + return $this; + } + + /** + * Gets fuel + * + * @return float + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param float $fuel Emissions from fuel, in tonnes-CO2e + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets commercial_flights + * + * @return float + */ + public function getCommercialFlights() + { + return $this->container['commercial_flights']; + } + + /** + * Sets commercial_flights + * + * @param float $commercial_flights Emissions from commercial flights, in tonnes-CO2e + * + * @return self + */ + public function setCommercialFlights($commercial_flights) + { + if (is_null($commercial_flights)) { + throw new \InvalidArgumentException('non-nullable commercial_flights cannot be null'); + } + $this->container['commercial_flights'] = $commercial_flights; + + return $this; + } + + /** + * Gets inbound_freight + * + * @return float + */ + public function getInboundFreight() + { + return $this->container['inbound_freight']; + } + + /** + * Sets inbound_freight + * + * @param float $inbound_freight Emissions from inbound freight, in tonnes-CO2e + * + * @return self + */ + public function setInboundFreight($inbound_freight) + { + if (is_null($inbound_freight)) { + throw new \InvalidArgumentException('non-nullable inbound_freight cannot be null'); + } + $this->container['inbound_freight'] = $inbound_freight; + + return $this; + } + + /** + * Gets outbound_freight + * + * @return float + */ + public function getOutboundFreight() + { + return $this->container['outbound_freight']; + } + + /** + * Sets outbound_freight + * + * @param float $outbound_freight Emissions from outbound freight, in tonnes-CO2e + * + * @return self + */ + public function setOutboundFreight($outbound_freight) + { + if (is_null($outbound_freight)) { + throw new \InvalidArgumentException('non-nullable outbound_freight cannot be null'); + } + $this->container['outbound_freight'] = $outbound_freight; + + return $this; + } + + /** + * Gets solid_waste_sent_offsite + * + * @return float + */ + public function getSolidWasteSentOffsite() + { + return $this->container['solid_waste_sent_offsite']; + } + + /** + * Sets solid_waste_sent_offsite + * + * @param float $solid_waste_sent_offsite Emissions from solid waste sent offsite, in tonnes-CO2e + * + * @return self + */ + public function setSolidWasteSentOffsite($solid_waste_sent_offsite) + { + if (is_null($solid_waste_sent_offsite)) { + throw new \InvalidArgumentException('non-nullable solid_waste_sent_offsite cannot be null'); + } + $this->container['solid_waste_sent_offsite'] = $solid_waste_sent_offsite; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 3 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquacultureRequest.php b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequest.php new file mode 100644 index 00000000..ffd54125 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequest.php @@ -0,0 +1,414 @@ + + */ +class PostAquacultureRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'enterprises' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'enterprises' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'enterprises' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'enterprises' => 'enterprises' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enterprises' => 'setEnterprises' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enterprises' => 'getEnterprises' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('enterprises', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['enterprises'] === null) { + $invalidProperties[] = "'enterprises' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets enterprises + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInner[] + */ + public function getEnterprises() + { + return $this->container['enterprises']; + } + + /** + * Sets enterprises + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInner[] $enterprises enterprises + * + * @return self + */ + public function setEnterprises($enterprises) + { + if (is_null($enterprises)) { + throw new \InvalidArgumentException('non-nullable enterprises cannot be null'); + } + $this->container['enterprises'] = $enterprises; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInner.php b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInner.php new file mode 100644 index 00000000..a0db1a62 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInner.php @@ -0,0 +1,1148 @@ + + */ +class PostAquacultureRequestEnterprisesInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_request_enterprises_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'state' => 'string', + 'production_system' => 'string', + 'total_harvest_kg' => 'float', + 'refrigerants' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerRefrigerantsInner[]', + 'bait' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerBaitInner[]', + 'custom_bait' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerCustomBaitInner[]', + 'inbound_freight' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]', + 'outbound_freight' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]', + 'total_commercial_flights_km' => 'float', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'electricity_source' => 'string', + 'fuel' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel', + 'fluid_waste' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[]', + 'solid_waste' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste', + 'carbon_offsets' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'state' => null, + 'production_system' => null, + 'total_harvest_kg' => null, + 'refrigerants' => null, + 'bait' => null, + 'custom_bait' => null, + 'inbound_freight' => null, + 'outbound_freight' => null, + 'total_commercial_flights_km' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'electricity_source' => null, + 'fuel' => null, + 'fluid_waste' => null, + 'solid_waste' => null, + 'carbon_offsets' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'state' => false, + 'production_system' => false, + 'total_harvest_kg' => false, + 'refrigerants' => false, + 'bait' => false, + 'custom_bait' => false, + 'inbound_freight' => false, + 'outbound_freight' => false, + 'total_commercial_flights_km' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'electricity_source' => false, + 'fuel' => false, + 'fluid_waste' => false, + 'solid_waste' => false, + 'carbon_offsets' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'state' => 'state', + 'production_system' => 'productionSystem', + 'total_harvest_kg' => 'totalHarvestKg', + 'refrigerants' => 'refrigerants', + 'bait' => 'bait', + 'custom_bait' => 'customBait', + 'inbound_freight' => 'inboundFreight', + 'outbound_freight' => 'outboundFreight', + 'total_commercial_flights_km' => 'totalCommercialFlightsKm', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'electricity_source' => 'electricitySource', + 'fuel' => 'fuel', + 'fluid_waste' => 'fluidWaste', + 'solid_waste' => 'solidWaste', + 'carbon_offsets' => 'carbonOffsets' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'state' => 'setState', + 'production_system' => 'setProductionSystem', + 'total_harvest_kg' => 'setTotalHarvestKg', + 'refrigerants' => 'setRefrigerants', + 'bait' => 'setBait', + 'custom_bait' => 'setCustomBait', + 'inbound_freight' => 'setInboundFreight', + 'outbound_freight' => 'setOutboundFreight', + 'total_commercial_flights_km' => 'setTotalCommercialFlightsKm', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'electricity_source' => 'setElectricitySource', + 'fuel' => 'setFuel', + 'fluid_waste' => 'setFluidWaste', + 'solid_waste' => 'setSolidWaste', + 'carbon_offsets' => 'setCarbonOffsets' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'state' => 'getState', + 'production_system' => 'getProductionSystem', + 'total_harvest_kg' => 'getTotalHarvestKg', + 'refrigerants' => 'getRefrigerants', + 'bait' => 'getBait', + 'custom_bait' => 'getCustomBait', + 'inbound_freight' => 'getInboundFreight', + 'outbound_freight' => 'getOutboundFreight', + 'total_commercial_flights_km' => 'getTotalCommercialFlightsKm', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'electricity_source' => 'getElectricitySource', + 'fuel' => 'getFuel', + 'fluid_waste' => 'getFluidWaste', + 'solid_waste' => 'getSolidWaste', + 'carbon_offsets' => 'getCarbonOffsets' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + public const PRODUCTION_SYSTEM_ABALONE_FARMING = 'Abalone Farming'; + public const PRODUCTION_SYSTEM_MUSSEL_FARMING = 'Mussel Farming'; + public const PRODUCTION_SYSTEM_OFFSHORE_CAGED_AQUACULTURE = 'Offshore Caged Aquaculture'; + public const PRODUCTION_SYSTEM_ONLAND_FISH_FARMING = 'Onland Fish Farming'; + public const PRODUCTION_SYSTEM_ONSHORE_HATCHERY = 'Onshore Hatchery'; + public const PRODUCTION_SYSTEM_OTHER = 'Other'; + public const PRODUCTION_SYSTEM_OYSTER_FARMING = 'Oyster Farming'; + public const PRODUCTION_SYSTEM_PEARL_FARMING = 'Pearl Farming'; + public const PRODUCTION_SYSTEM_PRAWN_FARMING = 'Prawn Farming'; + public const PRODUCTION_SYSTEM_SEAWEED_AND_MACROALGAE_FARMING = 'Seaweed and Macroalgae Farming'; + public const ELECTRICITY_SOURCE_STATE_GRID = 'State Grid'; + public const ELECTRICITY_SOURCE_RENEWABLE = 'Renewable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getProductionSystemAllowableValues() + { + return [ + self::PRODUCTION_SYSTEM_ABALONE_FARMING, + self::PRODUCTION_SYSTEM_MUSSEL_FARMING, + self::PRODUCTION_SYSTEM_OFFSHORE_CAGED_AQUACULTURE, + self::PRODUCTION_SYSTEM_ONLAND_FISH_FARMING, + self::PRODUCTION_SYSTEM_ONSHORE_HATCHERY, + self::PRODUCTION_SYSTEM_OTHER, + self::PRODUCTION_SYSTEM_OYSTER_FARMING, + self::PRODUCTION_SYSTEM_PEARL_FARMING, + self::PRODUCTION_SYSTEM_PRAWN_FARMING, + self::PRODUCTION_SYSTEM_SEAWEED_AND_MACROALGAE_FARMING, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getElectricitySourceAllowableValues() + { + return [ + self::ELECTRICITY_SOURCE_STATE_GRID, + self::ELECTRICITY_SOURCE_RENEWABLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('production_system', $data ?? [], null); + $this->setIfExists('total_harvest_kg', $data ?? [], null); + $this->setIfExists('refrigerants', $data ?? [], null); + $this->setIfExists('bait', $data ?? [], null); + $this->setIfExists('custom_bait', $data ?? [], null); + $this->setIfExists('inbound_freight', $data ?? [], null); + $this->setIfExists('outbound_freight', $data ?? [], null); + $this->setIfExists('total_commercial_flights_km', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('electricity_source', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('fluid_waste', $data ?? [], null); + $this->setIfExists('solid_waste', $data ?? [], null); + $this->setIfExists('carbon_offsets', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['production_system'] === null) { + $invalidProperties[] = "'production_system' can't be null"; + } + $allowedValues = $this->getProductionSystemAllowableValues(); + if (!is_null($this->container['production_system']) && !in_array($this->container['production_system'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'production_system', must be one of '%s'", + $this->container['production_system'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['total_harvest_kg'] === null) { + $invalidProperties[] = "'total_harvest_kg' can't be null"; + } + if ($this->container['refrigerants'] === null) { + $invalidProperties[] = "'refrigerants' can't be null"; + } + if ($this->container['bait'] === null) { + $invalidProperties[] = "'bait' can't be null"; + } + if ($this->container['custom_bait'] === null) { + $invalidProperties[] = "'custom_bait' can't be null"; + } + if ($this->container['inbound_freight'] === null) { + $invalidProperties[] = "'inbound_freight' can't be null"; + } + if ($this->container['outbound_freight'] === null) { + $invalidProperties[] = "'outbound_freight' can't be null"; + } + if ($this->container['total_commercial_flights_km'] === null) { + $invalidProperties[] = "'total_commercial_flights_km' can't be null"; + } + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['electricity_source'] === null) { + $invalidProperties[] = "'electricity_source' can't be null"; + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!is_null($this->container['electricity_source']) && !in_array($this->container['electricity_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'electricity_source', must be one of '%s'", + $this->container['electricity_source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['fluid_waste'] === null) { + $invalidProperties[] = "'fluid_waste' can't be null"; + } + if ($this->container['solid_waste'] === null) { + $invalidProperties[] = "'solid_waste' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets production_system + * + * @return string + */ + public function getProductionSystem() + { + return $this->container['production_system']; + } + + /** + * Sets production_system + * + * @param string $production_system Production system of the aquaculture enterprise + * + * @return self + */ + public function setProductionSystem($production_system) + { + if (is_null($production_system)) { + throw new \InvalidArgumentException('non-nullable production_system cannot be null'); + } + $allowedValues = $this->getProductionSystemAllowableValues(); + if (!in_array($production_system, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'production_system', must be one of '%s'", + $production_system, + implode("', '", $allowedValues) + ) + ); + } + $this->container['production_system'] = $production_system; + + return $this; + } + + /** + * Gets total_harvest_kg + * + * @return float + */ + public function getTotalHarvestKg() + { + return $this->container['total_harvest_kg']; + } + + /** + * Sets total_harvest_kg + * + * @param float $total_harvest_kg Total harvest in kg + * + * @return self + */ + public function setTotalHarvestKg($total_harvest_kg) + { + if (is_null($total_harvest_kg)) { + throw new \InvalidArgumentException('non-nullable total_harvest_kg cannot be null'); + } + $this->container['total_harvest_kg'] = $total_harvest_kg; + + return $this; + } + + /** + * Gets refrigerants + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerRefrigerantsInner[] + */ + public function getRefrigerants() + { + return $this->container['refrigerants']; + } + + /** + * Sets refrigerants + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerRefrigerantsInner[] $refrigerants Refrigerant type + * + * @return self + */ + public function setRefrigerants($refrigerants) + { + if (is_null($refrigerants)) { + throw new \InvalidArgumentException('non-nullable refrigerants cannot be null'); + } + $this->container['refrigerants'] = $refrigerants; + + return $this; + } + + /** + * Gets bait + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerBaitInner[] + */ + public function getBait() + { + return $this->container['bait']; + } + + /** + * Sets bait + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerBaitInner[] $bait Bait purchases + * + * @return self + */ + public function setBait($bait) + { + if (is_null($bait)) { + throw new \InvalidArgumentException('non-nullable bait cannot be null'); + } + $this->container['bait'] = $bait; + + return $this; + } + + /** + * Gets custom_bait + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerCustomBaitInner[] + */ + public function getCustomBait() + { + return $this->container['custom_bait']; + } + + /** + * Sets custom_bait + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerCustomBaitInner[] $custom_bait Custom bait purchases + * + * @return self + */ + public function setCustomBait($custom_bait) + { + if (is_null($custom_bait)) { + throw new \InvalidArgumentException('non-nullable custom_bait cannot be null'); + } + $this->container['custom_bait'] = $custom_bait; + + return $this; + } + + /** + * Gets inbound_freight + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[] + */ + public function getInboundFreight() + { + return $this->container['inbound_freight']; + } + + /** + * Sets inbound_freight + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[] $inbound_freight Services used to transport goods to the enterprise + * + * @return self + */ + public function setInboundFreight($inbound_freight) + { + if (is_null($inbound_freight)) { + throw new \InvalidArgumentException('non-nullable inbound_freight cannot be null'); + } + $this->container['inbound_freight'] = $inbound_freight; + + return $this; + } + + /** + * Gets outbound_freight + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[] + */ + public function getOutboundFreight() + { + return $this->container['outbound_freight']; + } + + /** + * Sets outbound_freight + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[] $outbound_freight Services used to transport goods from the enterprise + * + * @return self + */ + public function setOutboundFreight($outbound_freight) + { + if (is_null($outbound_freight)) { + throw new \InvalidArgumentException('non-nullable outbound_freight cannot be null'); + } + $this->container['outbound_freight'] = $outbound_freight; + + return $this; + } + + /** + * Gets total_commercial_flights_km + * + * @return float + */ + public function getTotalCommercialFlightsKm() + { + return $this->container['total_commercial_flights_km']; + } + + /** + * Sets total_commercial_flights_km + * + * @param float $total_commercial_flights_km Total distance of commercial flights, in km (kilometers) + * + * @return self + */ + public function setTotalCommercialFlightsKm($total_commercial_flights_km) + { + if (is_null($total_commercial_flights_km)) { + throw new \InvalidArgumentException('non-nullable total_commercial_flights_km cannot be null'); + } + $this->container['total_commercial_flights_km'] = $total_commercial_flights_km; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostAquacultureRequestEnterprisesInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostAquacultureRequestEnterprisesInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets electricity_source + * + * @return string + */ + public function getElectricitySource() + { + return $this->container['electricity_source']; + } + + /** + * Sets electricity_source + * + * @param string $electricity_source Source of electricity + * + * @return self + */ + public function setElectricitySource($electricity_source) + { + if (is_null($electricity_source)) { + throw new \InvalidArgumentException('non-nullable electricity_source cannot be null'); + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!in_array($electricity_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'electricity_source', must be one of '%s'", + $electricity_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['electricity_source'] = $electricity_source; + + return $this; + } + + /** + * Gets fuel + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel $fuel fuel + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets fluid_waste + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[] + */ + public function getFluidWaste() + { + return $this->container['fluid_waste']; + } + + /** + * Sets fluid_waste + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[] $fluid_waste Amount of fluid waste, in kL (kilolitres) + * + * @return self + */ + public function setFluidWaste($fluid_waste) + { + if (is_null($fluid_waste)) { + throw new \InvalidArgumentException('non-nullable fluid_waste cannot be null'); + } + $this->container['fluid_waste'] = $fluid_waste; + + return $this; + } + + /** + * Gets solid_waste + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste + */ + public function getSolidWaste() + { + return $this->container['solid_waste']; + } + + /** + * Sets solid_waste + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste $solid_waste solid_waste + * + * @return self + */ + public function setSolidWaste($solid_waste) + { + if (is_null($solid_waste)) { + throw new \InvalidArgumentException('non-nullable solid_waste cannot be null'); + } + $this->container['solid_waste'] = $solid_waste; + + return $this; + } + + /** + * Gets carbon_offsets + * + * @return float|null + */ + public function getCarbonOffsets() + { + return $this->container['carbon_offsets']; + } + + /** + * Sets carbon_offsets + * + * @param float|null $carbon_offsets Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) + * + * @return self + */ + public function setCarbonOffsets($carbon_offsets) + { + if (is_null($carbon_offsets)) { + throw new \InvalidArgumentException('non-nullable carbon_offsets cannot be null'); + } + $this->container['carbon_offsets'] = $carbon_offsets; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerBaitInner.php b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerBaitInner.php new file mode 100644 index 00000000..a17fc898 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerBaitInner.php @@ -0,0 +1,582 @@ + + */ +class PostAquacultureRequestEnterprisesInnerBaitInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_request_enterprises_inner_bait_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'purchased_tonnes' => 'float', + 'additional_ingredients' => 'float', + 'emissions_intensity' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'purchased_tonnes' => null, + 'additional_ingredients' => null, + 'emissions_intensity' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'type' => false, + 'purchased_tonnes' => false, + 'additional_ingredients' => false, + 'emissions_intensity' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'purchased_tonnes' => 'purchasedTonnes', + 'additional_ingredients' => 'additionalIngredients', + 'emissions_intensity' => 'emissionsIntensity' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'purchased_tonnes' => 'setPurchasedTonnes', + 'additional_ingredients' => 'setAdditionalIngredients', + 'emissions_intensity' => 'setEmissionsIntensity' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'purchased_tonnes' => 'getPurchasedTonnes', + 'additional_ingredients' => 'getAdditionalIngredients', + 'emissions_intensity' => 'getEmissionsIntensity' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_WHOLE_SARDINES = 'Whole Sardines'; + public const TYPE_LOW_ANIMAL_PROTEIN_FORMULATED_FEED = 'Low Animal Protein Formulated Feed'; + public const TYPE_HIGH_ANIMAL_PROTEIN_FORMULATED_FEED = 'High Animal Protein Formulated Feed'; + public const TYPE_CEREAL_GRAIN = 'Cereal Grain'; + public const TYPE_SQUID = 'Squid'; + public const TYPE_WHOLE_FISH = 'Whole Fish'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_WHOLE_SARDINES, + self::TYPE_LOW_ANIMAL_PROTEIN_FORMULATED_FEED, + self::TYPE_HIGH_ANIMAL_PROTEIN_FORMULATED_FEED, + self::TYPE_CEREAL_GRAIN, + self::TYPE_SQUID, + self::TYPE_WHOLE_FISH, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('purchased_tonnes', $data ?? [], null); + $this->setIfExists('additional_ingredients', $data ?? [], null); + $this->setIfExists('emissions_intensity', $data ?? [], 0); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['purchased_tonnes'] === null) { + $invalidProperties[] = "'purchased_tonnes' can't be null"; + } + if ($this->container['additional_ingredients'] === null) { + $invalidProperties[] = "'additional_ingredients' can't be null"; + } + if (($this->container['additional_ingredients'] > 1)) { + $invalidProperties[] = "invalid value for 'additional_ingredients', must be smaller than or equal to 1."; + } + + if (($this->container['additional_ingredients'] < 0)) { + $invalidProperties[] = "invalid value for 'additional_ingredients', must be bigger than or equal to 0."; + } + + if ($this->container['emissions_intensity'] === null) { + $invalidProperties[] = "'emissions_intensity' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Bait product type + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets purchased_tonnes + * + * @return float + */ + public function getPurchasedTonnes() + { + return $this->container['purchased_tonnes']; + } + + /** + * Sets purchased_tonnes + * + * @param float $purchased_tonnes Purchased product in tonnes + * + * @return self + */ + public function setPurchasedTonnes($purchased_tonnes) + { + if (is_null($purchased_tonnes)) { + throw new \InvalidArgumentException('non-nullable purchased_tonnes cannot be null'); + } + $this->container['purchased_tonnes'] = $purchased_tonnes; + + return $this; + } + + /** + * Gets additional_ingredients + * + * @return float + */ + public function getAdditionalIngredients() + { + return $this->container['additional_ingredients']; + } + + /** + * Sets additional_ingredients + * + * @param float $additional_ingredients Additional ingredient fraction, from 0 to 1 + * + * @return self + */ + public function setAdditionalIngredients($additional_ingredients) + { + if (is_null($additional_ingredients)) { + throw new \InvalidArgumentException('non-nullable additional_ingredients cannot be null'); + } + + if (($additional_ingredients > 1)) { + throw new \InvalidArgumentException('invalid value for $additional_ingredients when calling PostAquacultureRequestEnterprisesInnerBaitInner., must be smaller than or equal to 1.'); + } + if (($additional_ingredients < 0)) { + throw new \InvalidArgumentException('invalid value for $additional_ingredients when calling PostAquacultureRequestEnterprisesInnerBaitInner., must be bigger than or equal to 0.'); + } + + $this->container['additional_ingredients'] = $additional_ingredients; + + return $this; + } + + /** + * Gets emissions_intensity + * + * @return float + */ + public function getEmissionsIntensity() + { + return $this->container['emissions_intensity']; + } + + /** + * Sets emissions_intensity + * + * @param float $emissions_intensity Emissions intensity of additional ingredients, in kg CO2e/kg bait (default 0) + * + * @return self + */ + public function setEmissionsIntensity($emissions_intensity) + { + if (is_null($emissions_intensity)) { + throw new \InvalidArgumentException('non-nullable emissions_intensity cannot be null'); + } + $this->container['emissions_intensity'] = $emissions_intensity; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.php b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.php new file mode 100644 index 00000000..7c231b75 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.php @@ -0,0 +1,450 @@ + + */ +class PostAquacultureRequestEnterprisesInnerCustomBaitInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_request_enterprises_inner_customBait_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'purchased_tonnes' => 'float', + 'emissions_intensity' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'purchased_tonnes' => null, + 'emissions_intensity' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'purchased_tonnes' => false, + 'emissions_intensity' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'purchased_tonnes' => 'purchasedTonnes', + 'emissions_intensity' => 'emissionsIntensity' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'purchased_tonnes' => 'setPurchasedTonnes', + 'emissions_intensity' => 'setEmissionsIntensity' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'purchased_tonnes' => 'getPurchasedTonnes', + 'emissions_intensity' => 'getEmissionsIntensity' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('purchased_tonnes', $data ?? [], null); + $this->setIfExists('emissions_intensity', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['purchased_tonnes'] === null) { + $invalidProperties[] = "'purchased_tonnes' can't be null"; + } + if ($this->container['emissions_intensity'] === null) { + $invalidProperties[] = "'emissions_intensity' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets purchased_tonnes + * + * @return float + */ + public function getPurchasedTonnes() + { + return $this->container['purchased_tonnes']; + } + + /** + * Sets purchased_tonnes + * + * @param float $purchased_tonnes Purchased product in tonnes + * + * @return self + */ + public function setPurchasedTonnes($purchased_tonnes) + { + if (is_null($purchased_tonnes)) { + throw new \InvalidArgumentException('non-nullable purchased_tonnes cannot be null'); + } + $this->container['purchased_tonnes'] = $purchased_tonnes; + + return $this; + } + + /** + * Gets emissions_intensity + * + * @return float + */ + public function getEmissionsIntensity() + { + return $this->container['emissions_intensity']; + } + + /** + * Sets emissions_intensity + * + * @param float $emissions_intensity Emissions intensity of product, in kg CO2e/kg bait + * + * @return self + */ + public function setEmissionsIntensity($emissions_intensity) + { + if (is_null($emissions_intensity)) { + throw new \InvalidArgumentException('non-nullable emissions_intensity cannot be null'); + } + $this->container['emissions_intensity'] = $emissions_intensity; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.php b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.php new file mode 100644 index 00000000..382f63c5 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.php @@ -0,0 +1,601 @@ + + */ +class PostAquacultureRequestEnterprisesInnerFluidWasteInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_request_enterprises_inner_fluidWaste_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fluid_waste_kl' => 'float', + 'fluid_waste_treatment_type' => 'string', + 'average_inlet_cod' => 'float', + 'average_outlet_cod' => 'float', + 'flared_combusted_fraction' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fluid_waste_kl' => null, + 'fluid_waste_treatment_type' => null, + 'average_inlet_cod' => null, + 'average_outlet_cod' => null, + 'flared_combusted_fraction' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fluid_waste_kl' => false, + 'fluid_waste_treatment_type' => false, + 'average_inlet_cod' => false, + 'average_outlet_cod' => false, + 'flared_combusted_fraction' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fluid_waste_kl' => 'fluidWasteKl', + 'fluid_waste_treatment_type' => 'fluidWasteTreatmentType', + 'average_inlet_cod' => 'averageInletCOD', + 'average_outlet_cod' => 'averageOutletCOD', + 'flared_combusted_fraction' => 'flaredCombustedFraction' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fluid_waste_kl' => 'setFluidWasteKl', + 'fluid_waste_treatment_type' => 'setFluidWasteTreatmentType', + 'average_inlet_cod' => 'setAverageInletCod', + 'average_outlet_cod' => 'setAverageOutletCod', + 'flared_combusted_fraction' => 'setFlaredCombustedFraction' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fluid_waste_kl' => 'getFluidWasteKl', + 'fluid_waste_treatment_type' => 'getFluidWasteTreatmentType', + 'average_inlet_cod' => 'getAverageInletCod', + 'average_outlet_cod' => 'getAverageOutletCod', + 'flared_combusted_fraction' => 'getFlaredCombustedFraction' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const FLUID_WASTE_TREATMENT_TYPE_MANAGED_AEROBIC = 'Managed Aerobic'; + public const FLUID_WASTE_TREATMENT_TYPE_UNMANAGED_AEROBIC = 'Unmanaged Aerobic'; + public const FLUID_WASTE_TREATMENT_TYPE_ANAEROBIC_DIGESTER_REACTOR = 'Anaerobic Digester/Reactor'; + public const FLUID_WASTE_TREATMENT_TYPE_SHALLOW_ANAEROBIC_LAGOON_2M = 'Shallow Anaerobic Lagoon <2m'; + public const FLUID_WASTE_TREATMENT_TYPE_DEEP_ANAEROBIC_LAGOON_2M = 'Deep Anaerobic Lagoon >2m'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFluidWasteTreatmentTypeAllowableValues() + { + return [ + self::FLUID_WASTE_TREATMENT_TYPE_MANAGED_AEROBIC, + self::FLUID_WASTE_TREATMENT_TYPE_UNMANAGED_AEROBIC, + self::FLUID_WASTE_TREATMENT_TYPE_ANAEROBIC_DIGESTER_REACTOR, + self::FLUID_WASTE_TREATMENT_TYPE_SHALLOW_ANAEROBIC_LAGOON_2M, + self::FLUID_WASTE_TREATMENT_TYPE_DEEP_ANAEROBIC_LAGOON_2M, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fluid_waste_kl', $data ?? [], null); + $this->setIfExists('fluid_waste_treatment_type', $data ?? [], null); + $this->setIfExists('average_inlet_cod', $data ?? [], null); + $this->setIfExists('average_outlet_cod', $data ?? [], null); + $this->setIfExists('flared_combusted_fraction', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fluid_waste_kl'] === null) { + $invalidProperties[] = "'fluid_waste_kl' can't be null"; + } + if ($this->container['fluid_waste_treatment_type'] === null) { + $invalidProperties[] = "'fluid_waste_treatment_type' can't be null"; + } + $allowedValues = $this->getFluidWasteTreatmentTypeAllowableValues(); + if (!is_null($this->container['fluid_waste_treatment_type']) && !in_array($this->container['fluid_waste_treatment_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'fluid_waste_treatment_type', must be one of '%s'", + $this->container['fluid_waste_treatment_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['average_inlet_cod'] === null) { + $invalidProperties[] = "'average_inlet_cod' can't be null"; + } + if ($this->container['average_outlet_cod'] === null) { + $invalidProperties[] = "'average_outlet_cod' can't be null"; + } + if ($this->container['flared_combusted_fraction'] === null) { + $invalidProperties[] = "'flared_combusted_fraction' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fluid_waste_kl + * + * @return float + */ + public function getFluidWasteKl() + { + return $this->container['fluid_waste_kl']; + } + + /** + * Sets fluid_waste_kl + * + * @param float $fluid_waste_kl Amount of fluid waste, in kL (kilolitres) + * + * @return self + */ + public function setFluidWasteKl($fluid_waste_kl) + { + if (is_null($fluid_waste_kl)) { + throw new \InvalidArgumentException('non-nullable fluid_waste_kl cannot be null'); + } + $this->container['fluid_waste_kl'] = $fluid_waste_kl; + + return $this; + } + + /** + * Gets fluid_waste_treatment_type + * + * @return string + */ + public function getFluidWasteTreatmentType() + { + return $this->container['fluid_waste_treatment_type']; + } + + /** + * Sets fluid_waste_treatment_type + * + * @param string $fluid_waste_treatment_type Type of fluid waste treatment + * + * @return self + */ + public function setFluidWasteTreatmentType($fluid_waste_treatment_type) + { + if (is_null($fluid_waste_treatment_type)) { + throw new \InvalidArgumentException('non-nullable fluid_waste_treatment_type cannot be null'); + } + $allowedValues = $this->getFluidWasteTreatmentTypeAllowableValues(); + if (!in_array($fluid_waste_treatment_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'fluid_waste_treatment_type', must be one of '%s'", + $fluid_waste_treatment_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['fluid_waste_treatment_type'] = $fluid_waste_treatment_type; + + return $this; + } + + /** + * Gets average_inlet_cod + * + * @return float + */ + public function getAverageInletCod() + { + return $this->container['average_inlet_cod']; + } + + /** + * Sets average_inlet_cod + * + * @param float $average_inlet_cod Average inlet COD (mg per litre) + * + * @return self + */ + public function setAverageInletCod($average_inlet_cod) + { + if (is_null($average_inlet_cod)) { + throw new \InvalidArgumentException('non-nullable average_inlet_cod cannot be null'); + } + $this->container['average_inlet_cod'] = $average_inlet_cod; + + return $this; + } + + /** + * Gets average_outlet_cod + * + * @return float + */ + public function getAverageOutletCod() + { + return $this->container['average_outlet_cod']; + } + + /** + * Sets average_outlet_cod + * + * @param float $average_outlet_cod Average outlet COD (mg per litre) + * + * @return self + */ + public function setAverageOutletCod($average_outlet_cod) + { + if (is_null($average_outlet_cod)) { + throw new \InvalidArgumentException('non-nullable average_outlet_cod cannot be null'); + } + $this->container['average_outlet_cod'] = $average_outlet_cod; + + return $this; + } + + /** + * Gets flared_combusted_fraction + * + * @return float + */ + public function getFlaredCombustedFraction() + { + return $this->container['flared_combusted_fraction']; + } + + /** + * Sets flared_combusted_fraction + * + * @param float $flared_combusted_fraction Fraction of waste flared or combusted, between 0 and 1 + * + * @return self + */ + public function setFlaredCombustedFraction($flared_combusted_fraction) + { + if (is_null($flared_combusted_fraction)) { + throw new \InvalidArgumentException('non-nullable flared_combusted_fraction cannot be null'); + } + $this->container['flared_combusted_fraction'] = $flared_combusted_fraction; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFuel.php b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFuel.php new file mode 100644 index 00000000..69f5a15d --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFuel.php @@ -0,0 +1,488 @@ + + */ +class PostAquacultureRequestEnterprisesInnerFuel implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_request_enterprises_inner_fuel'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'transport_fuel' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner[]', + 'stationary_fuel' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner[]', + 'natural_gas' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'transport_fuel' => null, + 'stationary_fuel' => null, + 'natural_gas' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'transport_fuel' => false, + 'stationary_fuel' => false, + 'natural_gas' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'transport_fuel' => 'transportFuel', + 'stationary_fuel' => 'stationaryFuel', + 'natural_gas' => 'naturalGas' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'transport_fuel' => 'setTransportFuel', + 'stationary_fuel' => 'setStationaryFuel', + 'natural_gas' => 'setNaturalGas' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'transport_fuel' => 'getTransportFuel', + 'stationary_fuel' => 'getStationaryFuel', + 'natural_gas' => 'getNaturalGas' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('transport_fuel', $data ?? [], null); + $this->setIfExists('stationary_fuel', $data ?? [], null); + $this->setIfExists('natural_gas', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['transport_fuel'] === null) { + $invalidProperties[] = "'transport_fuel' can't be null"; + } + if ($this->container['stationary_fuel'] === null) { + $invalidProperties[] = "'stationary_fuel' can't be null"; + } + if ($this->container['natural_gas'] === null) { + $invalidProperties[] = "'natural_gas' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets transport_fuel + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner[] + */ + public function getTransportFuel() + { + return $this->container['transport_fuel']; + } + + /** + * Sets transport_fuel + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner[] $transport_fuel A list of fuels used in transportation and vehicles + * + * @return self + */ + public function setTransportFuel($transport_fuel) + { + if (is_null($transport_fuel)) { + throw new \InvalidArgumentException('non-nullable transport_fuel cannot be null'); + } + $this->container['transport_fuel'] = $transport_fuel; + + return $this; + } + + /** + * Gets stationary_fuel + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner[] + */ + public function getStationaryFuel() + { + return $this->container['stationary_fuel']; + } + + /** + * Sets stationary_fuel + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner[] $stationary_fuel A list of fuels used in stationary applications + * + * @return self + */ + public function setStationaryFuel($stationary_fuel) + { + if (is_null($stationary_fuel)) { + throw new \InvalidArgumentException('non-nullable stationary_fuel cannot be null'); + } + $this->container['stationary_fuel'] = $stationary_fuel; + + return $this; + } + + /** + * Gets natural_gas + * + * @return float + */ + public function getNaturalGas() + { + return $this->container['natural_gas']; + } + + /** + * Sets natural_gas + * + * @param float $natural_gas Amount of natural gas consumed in Mj (megajoules) + * + * @return self + */ + public function setNaturalGas($natural_gas) + { + if (is_null($natural_gas)) { + throw new \InvalidArgumentException('non-nullable natural_gas cannot be null'); + } + $this->container['natural_gas'] = $natural_gas; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.php b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.php new file mode 100644 index 00000000..dd35e6e0 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.php @@ -0,0 +1,496 @@ + + */ +class PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_request_enterprises_inner_fuel_stationaryFuel_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'amount_litres' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'amount_litres' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'type' => false, + 'amount_litres' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'amount_litres' => 'amountLitres' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'amount_litres' => 'setAmountLitres' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'amount_litres' => 'getAmountLitres' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_PETROL = 'petrol'; + public const TYPE_DIESEL = 'diesel'; + public const TYPE_LPG = 'lpg'; + public const TYPE_ETHANOL = 'ethanol'; + public const TYPE_BIODIESEL = 'biodiesel'; + public const TYPE_RENEWABLE_DIESEL = 'renewable diesel'; + public const TYPE_OTHER_BIOFUELS = 'other biofuels'; + public const TYPE_LNG = 'lng'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PETROL, + self::TYPE_DIESEL, + self::TYPE_LPG, + self::TYPE_ETHANOL, + self::TYPE_BIODIESEL, + self::TYPE_RENEWABLE_DIESEL, + self::TYPE_OTHER_BIOFUELS, + self::TYPE_LNG, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('amount_litres', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['amount_litres'] === null) { + $invalidProperties[] = "'amount_litres' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of fuel + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets amount_litres + * + * @return float + */ + public function getAmountLitres() + { + return $this->container['amount_litres']; + } + + /** + * Sets amount_litres + * + * @param float $amount_litres Amount of fuel consumed (litres) + * + * @return self + */ + public function setAmountLitres($amount_litres) + { + if (is_null($amount_litres)) { + throw new \InvalidArgumentException('non-nullable amount_litres cannot be null'); + } + $this->container['amount_litres'] = $amount_litres; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.php b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.php new file mode 100644 index 00000000..d9341d73 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.php @@ -0,0 +1,504 @@ + + */ +class PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_request_enterprises_inner_fuel_transportFuel_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'amount_litres' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'amount_litres' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'type' => false, + 'amount_litres' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'amount_litres' => 'amountLitres' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'amount_litres' => 'setAmountLitres' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'amount_litres' => 'getAmountLitres' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_PETROL = 'petrol'; + public const TYPE_DIESEL = 'diesel'; + public const TYPE_LPG = 'lpg'; + public const TYPE_ETHANOL = 'ethanol'; + public const TYPE_BIODIESEL = 'biodiesel'; + public const TYPE_RENEWABLE_DIESEL = 'renewable diesel'; + public const TYPE_OTHER_BIOFUELS = 'other biofuels'; + public const TYPE_LNG = 'lng'; + public const TYPE_FUEL_OIL = 'fuel oil'; + public const TYPE_AVGAS = 'avgas'; + public const TYPE_JET_A_1 = 'jet a-1'; + public const TYPE_JET_B = 'jet b'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PETROL, + self::TYPE_DIESEL, + self::TYPE_LPG, + self::TYPE_ETHANOL, + self::TYPE_BIODIESEL, + self::TYPE_RENEWABLE_DIESEL, + self::TYPE_OTHER_BIOFUELS, + self::TYPE_LNG, + self::TYPE_FUEL_OIL, + self::TYPE_AVGAS, + self::TYPE_JET_A_1, + self::TYPE_JET_B, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('amount_litres', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['amount_litres'] === null) { + $invalidProperties[] = "'amount_litres' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of fuel + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets amount_litres + * + * @return float + */ + public function getAmountLitres() + { + return $this->container['amount_litres']; + } + + /** + * Sets amount_litres + * + * @param float $amount_litres Amount of fuel consumed (litres) + * + * @return self + */ + public function setAmountLitres($amount_litres) + { + if (is_null($amount_litres)) { + throw new \InvalidArgumentException('non-nullable amount_litres cannot be null'); + } + $this->container['amount_litres'] = $amount_litres; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.php b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.php new file mode 100644 index 00000000..5e56c621 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.php @@ -0,0 +1,492 @@ + + */ +class PostAquacultureRequestEnterprisesInnerInboundFreightInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_request_enterprises_inner_inboundFreight_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'total_km_tonnes' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'total_km_tonnes' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'type' => false, + 'total_km_tonnes' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'total_km_tonnes' => 'totalKmTonnes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'total_km_tonnes' => 'setTotalKmTonnes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'total_km_tonnes' => 'getTotalKmTonnes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_TRUCK = 'Truck'; + public const TYPE_RAIL = 'Rail'; + public const TYPE_LONG_HAUL_FLIGHT = 'Long haul flight'; + public const TYPE_MEDIUM_HAUL_FLIGHT = 'Medium haul flight'; + public const TYPE_SMALL_CONTAINER_SHIP = 'Small container ship'; + public const TYPE_LARGE_CONTAINER_SHIP = 'Large container ship'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_TRUCK, + self::TYPE_RAIL, + self::TYPE_LONG_HAUL_FLIGHT, + self::TYPE_MEDIUM_HAUL_FLIGHT, + self::TYPE_SMALL_CONTAINER_SHIP, + self::TYPE_LARGE_CONTAINER_SHIP, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('total_km_tonnes', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['total_km_tonnes'] === null) { + $invalidProperties[] = "'total_km_tonnes' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of freight used + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets total_km_tonnes + * + * @return float + */ + public function getTotalKmTonnes() + { + return $this->container['total_km_tonnes']; + } + + /** + * Sets total_km_tonnes + * + * @param float $total_km_tonnes Total distance of freight, in kilometre tonnes + * + * @return self + */ + public function setTotalKmTonnes($total_km_tonnes) + { + if (is_null($total_km_tonnes)) { + throw new \InvalidArgumentException('non-nullable total_km_tonnes cannot be null'); + } + $this->container['total_km_tonnes'] = $total_km_tonnes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.php b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.php new file mode 100644 index 00000000..03b32b5a --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.php @@ -0,0 +1,666 @@ + + */ +class PostAquacultureRequestEnterprisesInnerRefrigerantsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_request_enterprises_inner_refrigerants_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'refrigerant' => 'string', + 'charge_size' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'refrigerant' => null, + 'charge_size' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'refrigerant' => false, + 'charge_size' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'refrigerant' => 'refrigerant', + 'charge_size' => 'chargeSize' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'refrigerant' => 'setRefrigerant', + 'charge_size' => 'setChargeSize' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'refrigerant' => 'getRefrigerant', + 'charge_size' => 'getChargeSize' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const REFRIGERANT_HFC_23 = 'HFC-23'; + public const REFRIGERANT_HFC_32 = 'HFC-32'; + public const REFRIGERANT_HFC_41 = 'HFC-41'; + public const REFRIGERANT_HFC_43_10MEE = 'HFC-43-10mee'; + public const REFRIGERANT_HFC_125 = 'HFC-125'; + public const REFRIGERANT_HFC_134 = 'HFC-134'; + public const REFRIGERANT_HFC_134A = 'HFC-134a'; + public const REFRIGERANT_HFC_143 = 'HFC-143'; + public const REFRIGERANT_HFC_143A = 'HFC-143a'; + public const REFRIGERANT_HFC_152A = 'HFC-152a'; + public const REFRIGERANT_HFC_227EA = 'HFC-227ea'; + public const REFRIGERANT_HFC_236FA = 'HFC-236fa'; + public const REFRIGERANT_HFC_245CA = 'HFC-245ca'; + public const REFRIGERANT_HFC_245FA = 'HFC-245fa'; + public const REFRIGERANT_HFC_365MFC = 'HFC-365mfc'; + public const REFRIGERANT_R438_A = 'R438A'; + public const REFRIGERANT_R448_A = 'R448A'; + public const REFRIGERANT_R_22 = 'R-22'; + public const REFRIGERANT_AMMONIA__R_717 = 'Ammonia (R-717)'; + public const REFRIGERANT_R_11 = 'R-11'; + public const REFRIGERANT_R_12 = 'R-12'; + public const REFRIGERANT_R_13 = 'R-13'; + public const REFRIGERANT_R_23 = 'R-23'; + public const REFRIGERANT_R_32 = 'R-32'; + public const REFRIGERANT_R_113 = 'R-113'; + public const REFRIGERANT_R_114 = 'R-114'; + public const REFRIGERANT_R_115 = 'R-115'; + public const REFRIGERANT_R_116 = 'R-116'; + public const REFRIGERANT_R_123 = 'R-123'; + public const REFRIGERANT_R_124 = 'R-124'; + public const REFRIGERANT_R_125 = 'R-125'; + public const REFRIGERANT_R_134A = 'R-134a'; + public const REFRIGERANT_R_141B = 'R-141b'; + public const REFRIGERANT_R_142B = 'R-142b'; + public const REFRIGERANT_R_143A = 'R-143a'; + public const REFRIGERANT_R_152A = 'R-152a'; + public const REFRIGERANT_R_218 = 'R-218'; + public const REFRIGERANT_R_227EA = 'R-227ea'; + public const REFRIGERANT_R_236FA = 'R-236fa'; + public const REFRIGERANT_R_245CA = 'R-245ca'; + public const REFRIGERANT_R_245FA = 'R-245fa'; + public const REFRIGERANT_R_C318 = 'R-C318'; + public const REFRIGERANT_R_401_A = 'R-401A'; + public const REFRIGERANT_R_401_B = 'R-401B'; + public const REFRIGERANT_R_401_C = 'R-401C'; + public const REFRIGERANT_R_402_A = 'R-402A'; + public const REFRIGERANT_R_402_B = 'R-402B'; + public const REFRIGERANT_R_403_A = 'R-403A'; + public const REFRIGERANT_R_403_B = 'R-403B'; + public const REFRIGERANT_R_404_A = 'R-404A'; + public const REFRIGERANT_R_405_A = 'R-405A'; + public const REFRIGERANT_R_406_A = 'R-406A'; + public const REFRIGERANT_R_407_A = 'R-407A'; + public const REFRIGERANT_R_407_B = 'R-407B'; + public const REFRIGERANT_R_407_C = 'R-407C'; + public const REFRIGERANT_R_407_D = 'R-407D'; + public const REFRIGERANT_R_407_E = 'R-407E'; + public const REFRIGERANT_R_408_A = 'R-408A'; + public const REFRIGERANT_R_409_A = 'R-409A'; + public const REFRIGERANT_R_409_B = 'R-409B'; + public const REFRIGERANT_R_410_A = 'R-410A'; + public const REFRIGERANT_R_411_A = 'R-411A'; + public const REFRIGERANT_R_411_B = 'R-411B'; + public const REFRIGERANT_R_412_A = 'R-412A'; + public const REFRIGERANT_R_413_A = 'R-413A'; + public const REFRIGERANT_R_414_A = 'R-414A'; + public const REFRIGERANT_R_414_B = 'R-414B'; + public const REFRIGERANT_R_415_A = 'R-415A'; + public const REFRIGERANT_R_415_B = 'R-415B'; + public const REFRIGERANT_R_416_A = 'R-416A'; + public const REFRIGERANT_R_417_A = 'R-417A'; + public const REFRIGERANT_R_418_A = 'R-418A'; + public const REFRIGERANT_R_419_A = 'R-419A'; + public const REFRIGERANT_R_420_A = 'R-420A'; + public const REFRIGERANT_R_421_A = 'R-421A'; + public const REFRIGERANT_R_421_B = 'R-421B'; + public const REFRIGERANT_R_422_A = 'R-422A'; + public const REFRIGERANT_R_422_B = 'R-422B'; + public const REFRIGERANT_R_422_C = 'R-422C'; + public const REFRIGERANT_R_422_D = 'R-422D'; + public const REFRIGERANT_R_423_A = 'R-423A'; + public const REFRIGERANT_R_424_A = 'R-424A'; + public const REFRIGERANT_R_425_A = 'R-425A'; + public const REFRIGERANT_R_426_A = 'R-426A'; + public const REFRIGERANT_R_427_A = 'R-427A'; + public const REFRIGERANT_R_428_A = 'R-428A'; + public const REFRIGERANT_R_500 = 'R-500'; + public const REFRIGERANT_R_502 = 'R-502'; + public const REFRIGERANT_R_503 = 'R-503'; + public const REFRIGERANT_R_507_A = 'R-507A'; + public const REFRIGERANT_R_508_A = 'R-508A'; + public const REFRIGERANT_R_508_B = 'R-508B'; + public const REFRIGERANT_R_509_A = 'R-509A'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRefrigerantAllowableValues() + { + return [ + self::REFRIGERANT_HFC_23, + self::REFRIGERANT_HFC_32, + self::REFRIGERANT_HFC_41, + self::REFRIGERANT_HFC_43_10MEE, + self::REFRIGERANT_HFC_125, + self::REFRIGERANT_HFC_134, + self::REFRIGERANT_HFC_134A, + self::REFRIGERANT_HFC_143, + self::REFRIGERANT_HFC_143A, + self::REFRIGERANT_HFC_152A, + self::REFRIGERANT_HFC_227EA, + self::REFRIGERANT_HFC_236FA, + self::REFRIGERANT_HFC_245CA, + self::REFRIGERANT_HFC_245FA, + self::REFRIGERANT_HFC_365MFC, + self::REFRIGERANT_R438_A, + self::REFRIGERANT_R448_A, + self::REFRIGERANT_R_22, + self::REFRIGERANT_AMMONIA__R_717, + self::REFRIGERANT_R_11, + self::REFRIGERANT_R_12, + self::REFRIGERANT_R_13, + self::REFRIGERANT_R_23, + self::REFRIGERANT_R_32, + self::REFRIGERANT_R_113, + self::REFRIGERANT_R_114, + self::REFRIGERANT_R_115, + self::REFRIGERANT_R_116, + self::REFRIGERANT_R_123, + self::REFRIGERANT_R_124, + self::REFRIGERANT_R_125, + self::REFRIGERANT_R_134A, + self::REFRIGERANT_R_141B, + self::REFRIGERANT_R_142B, + self::REFRIGERANT_R_143A, + self::REFRIGERANT_R_152A, + self::REFRIGERANT_R_218, + self::REFRIGERANT_R_227EA, + self::REFRIGERANT_R_236FA, + self::REFRIGERANT_R_245CA, + self::REFRIGERANT_R_245FA, + self::REFRIGERANT_R_C318, + self::REFRIGERANT_R_401_A, + self::REFRIGERANT_R_401_B, + self::REFRIGERANT_R_401_C, + self::REFRIGERANT_R_402_A, + self::REFRIGERANT_R_402_B, + self::REFRIGERANT_R_403_A, + self::REFRIGERANT_R_403_B, + self::REFRIGERANT_R_404_A, + self::REFRIGERANT_R_405_A, + self::REFRIGERANT_R_406_A, + self::REFRIGERANT_R_407_A, + self::REFRIGERANT_R_407_B, + self::REFRIGERANT_R_407_C, + self::REFRIGERANT_R_407_D, + self::REFRIGERANT_R_407_E, + self::REFRIGERANT_R_408_A, + self::REFRIGERANT_R_409_A, + self::REFRIGERANT_R_409_B, + self::REFRIGERANT_R_410_A, + self::REFRIGERANT_R_411_A, + self::REFRIGERANT_R_411_B, + self::REFRIGERANT_R_412_A, + self::REFRIGERANT_R_413_A, + self::REFRIGERANT_R_414_A, + self::REFRIGERANT_R_414_B, + self::REFRIGERANT_R_415_A, + self::REFRIGERANT_R_415_B, + self::REFRIGERANT_R_416_A, + self::REFRIGERANT_R_417_A, + self::REFRIGERANT_R_418_A, + self::REFRIGERANT_R_419_A, + self::REFRIGERANT_R_420_A, + self::REFRIGERANT_R_421_A, + self::REFRIGERANT_R_421_B, + self::REFRIGERANT_R_422_A, + self::REFRIGERANT_R_422_B, + self::REFRIGERANT_R_422_C, + self::REFRIGERANT_R_422_D, + self::REFRIGERANT_R_423_A, + self::REFRIGERANT_R_424_A, + self::REFRIGERANT_R_425_A, + self::REFRIGERANT_R_426_A, + self::REFRIGERANT_R_427_A, + self::REFRIGERANT_R_428_A, + self::REFRIGERANT_R_500, + self::REFRIGERANT_R_502, + self::REFRIGERANT_R_503, + self::REFRIGERANT_R_507_A, + self::REFRIGERANT_R_508_A, + self::REFRIGERANT_R_508_B, + self::REFRIGERANT_R_509_A, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('refrigerant', $data ?? [], null); + $this->setIfExists('charge_size', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['refrigerant'] === null) { + $invalidProperties[] = "'refrigerant' can't be null"; + } + $allowedValues = $this->getRefrigerantAllowableValues(); + if (!is_null($this->container['refrigerant']) && !in_array($this->container['refrigerant'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'refrigerant', must be one of '%s'", + $this->container['refrigerant'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['charge_size'] === null) { + $invalidProperties[] = "'charge_size' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets refrigerant + * + * @return string + */ + public function getRefrigerant() + { + return $this->container['refrigerant']; + } + + /** + * Sets refrigerant + * + * @param string $refrigerant Refrigerant type + * + * @return self + */ + public function setRefrigerant($refrigerant) + { + if (is_null($refrigerant)) { + throw new \InvalidArgumentException('non-nullable refrigerant cannot be null'); + } + $allowedValues = $this->getRefrigerantAllowableValues(); + if (!in_array($refrigerant, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'refrigerant', must be one of '%s'", + $refrigerant, + implode("', '", $allowedValues) + ) + ); + } + $this->container['refrigerant'] = $refrigerant; + + return $this; + } + + /** + * Gets charge_size + * + * @return float + */ + public function getChargeSize() + { + return $this->container['charge_size']; + } + + /** + * Sets charge_size + * + * @param float $charge_size Amount of refrigerant contained in the appliance, in kg + * + * @return self + */ + public function setChargeSize($charge_size) + { + if (is_null($charge_size)) { + throw new \InvalidArgumentException('non-nullable charge_size cannot be null'); + } + $this->container['charge_size'] = $charge_size; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.php b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.php new file mode 100644 index 00000000..2de4bacf --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.php @@ -0,0 +1,451 @@ + + */ +class PostAquacultureRequestEnterprisesInnerSolidWaste implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_aquaculture_request_enterprises_inner_solidWaste'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'sent_offsite_tonnes' => 'float', + 'onsite_composting_tonnes' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'sent_offsite_tonnes' => null, + 'onsite_composting_tonnes' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'sent_offsite_tonnes' => false, + 'onsite_composting_tonnes' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sent_offsite_tonnes' => 'sentOffsiteTonnes', + 'onsite_composting_tonnes' => 'onsiteCompostingTonnes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sent_offsite_tonnes' => 'setSentOffsiteTonnes', + 'onsite_composting_tonnes' => 'setOnsiteCompostingTonnes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sent_offsite_tonnes' => 'getSentOffsiteTonnes', + 'onsite_composting_tonnes' => 'getOnsiteCompostingTonnes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('sent_offsite_tonnes', $data ?? [], null); + $this->setIfExists('onsite_composting_tonnes', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['sent_offsite_tonnes'] === null) { + $invalidProperties[] = "'sent_offsite_tonnes' can't be null"; + } + if ($this->container['onsite_composting_tonnes'] === null) { + $invalidProperties[] = "'onsite_composting_tonnes' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sent_offsite_tonnes + * + * @return float + */ + public function getSentOffsiteTonnes() + { + return $this->container['sent_offsite_tonnes']; + } + + /** + * Sets sent_offsite_tonnes + * + * @param float $sent_offsite_tonnes Amount of solid waste sent offsite to landfill, in tonnes + * + * @return self + */ + public function setSentOffsiteTonnes($sent_offsite_tonnes) + { + if (is_null($sent_offsite_tonnes)) { + throw new \InvalidArgumentException('non-nullable sent_offsite_tonnes cannot be null'); + } + $this->container['sent_offsite_tonnes'] = $sent_offsite_tonnes; + + return $this; + } + + /** + * Gets onsite_composting_tonnes + * + * @return float + */ + public function getOnsiteCompostingTonnes() + { + return $this->container['onsite_composting_tonnes']; + } + + /** + * Sets onsite_composting_tonnes + * + * @param float $onsite_composting_tonnes Amount of solid waste composted on site, in tonnes + * + * @return self + */ + public function setOnsiteCompostingTonnes($onsite_composting_tonnes) + { + if (is_null($onsite_composting_tonnes)) { + throw new \InvalidArgumentException('non-nullable onsite_composting_tonnes cannot be null'); + } + $this->container['onsite_composting_tonnes'] = $onsite_composting_tonnes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeef200Response.php b/examples/php-api-client/api-client/lib/Model/PostBeef200Response.php new file mode 100644 index 00000000..ce3d4528 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeef200Response.php @@ -0,0 +1,636 @@ + + */ +class PostBeef200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostBeef200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostBeef200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'intermediate' => '\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInner[]', + 'net' => '\OpenAPI\Client\Model\PostBeef200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intermediate' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intermediate' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intermediate' => 'intermediate', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intermediate' => 'setIntermediate', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intermediate' => 'getIntermediate', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseIntermediateInner.php new file mode 100644 index 00000000..35f8a6d7 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseIntermediateInner.php @@ -0,0 +1,636 @@ + + */ +class PostBeef200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostBeef200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostBeef200ResponseScope3', + 'carbon_sequestration' => 'float', + 'intensities' => '\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intensities' => null, + 'net' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intensities' => false, + 'net' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intensities' => 'intensities', + 'net' => 'net' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intensities' => 'setIntensities', + 'net' => 'setNet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intensities' => 'getIntensities', + 'net' => 'getNet' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return float + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param float $carbon_sequestration Carbon sequestration, in tonnes-CO2e + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseIntermediateInnerIntensities.php b/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseIntermediateInnerIntensities.php new file mode 100644 index 00000000..774c462d --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseIntermediateInnerIntensities.php @@ -0,0 +1,487 @@ + + */ +class PostBeef200ResponseIntermediateInnerIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_200_response_intermediate_inner_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'liveweight_beef_produced_kg' => 'float', + 'beef_excluding_sequestration' => 'float', + 'beef_including_sequestration' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'liveweight_beef_produced_kg' => null, + 'beef_excluding_sequestration' => null, + 'beef_including_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'liveweight_beef_produced_kg' => false, + 'beef_excluding_sequestration' => false, + 'beef_including_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'liveweight_beef_produced_kg' => 'liveweightBeefProducedKg', + 'beef_excluding_sequestration' => 'beefExcludingSequestration', + 'beef_including_sequestration' => 'beefIncludingSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'liveweight_beef_produced_kg' => 'setLiveweightBeefProducedKg', + 'beef_excluding_sequestration' => 'setBeefExcludingSequestration', + 'beef_including_sequestration' => 'setBeefIncludingSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'liveweight_beef_produced_kg' => 'getLiveweightBeefProducedKg', + 'beef_excluding_sequestration' => 'getBeefExcludingSequestration', + 'beef_including_sequestration' => 'getBeefIncludingSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('liveweight_beef_produced_kg', $data ?? [], null); + $this->setIfExists('beef_excluding_sequestration', $data ?? [], null); + $this->setIfExists('beef_including_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['liveweight_beef_produced_kg'] === null) { + $invalidProperties[] = "'liveweight_beef_produced_kg' can't be null"; + } + if ($this->container['beef_excluding_sequestration'] === null) { + $invalidProperties[] = "'beef_excluding_sequestration' can't be null"; + } + if ($this->container['beef_including_sequestration'] === null) { + $invalidProperties[] = "'beef_including_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets liveweight_beef_produced_kg + * + * @return float + */ + public function getLiveweightBeefProducedKg() + { + return $this->container['liveweight_beef_produced_kg']; + } + + /** + * Sets liveweight_beef_produced_kg + * + * @param float $liveweight_beef_produced_kg Amount of beef produced in kg liveweight + * + * @return self + */ + public function setLiveweightBeefProducedKg($liveweight_beef_produced_kg) + { + if (is_null($liveweight_beef_produced_kg)) { + throw new \InvalidArgumentException('non-nullable liveweight_beef_produced_kg cannot be null'); + } + $this->container['liveweight_beef_produced_kg'] = $liveweight_beef_produced_kg; + + return $this; + } + + /** + * Gets beef_excluding_sequestration + * + * @return float + */ + public function getBeefExcludingSequestration() + { + return $this->container['beef_excluding_sequestration']; + } + + /** + * Sets beef_excluding_sequestration + * + * @param float $beef_excluding_sequestration Beef excluding sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setBeefExcludingSequestration($beef_excluding_sequestration) + { + if (is_null($beef_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable beef_excluding_sequestration cannot be null'); + } + $this->container['beef_excluding_sequestration'] = $beef_excluding_sequestration; + + return $this; + } + + /** + * Gets beef_including_sequestration + * + * @return float + */ + public function getBeefIncludingSequestration() + { + return $this->container['beef_including_sequestration']; + } + + /** + * Sets beef_including_sequestration + * + * @param float $beef_including_sequestration Beef including sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setBeefIncludingSequestration($beef_including_sequestration) + { + if (is_null($beef_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable beef_including_sequestration cannot be null'); + } + $this->container['beef_including_sequestration'] = $beef_including_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseNet.php b/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseNet.php new file mode 100644 index 00000000..caf73e99 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseNet.php @@ -0,0 +1,450 @@ + + */ +class PostBeef200ResponseNet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_200_response_net'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float', + 'beef' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null, + 'beef' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false, + 'beef' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total', + 'beef' => 'beef' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal', + 'beef' => 'setBeef' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal', + 'beef' => 'getBeef' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + $this->setIfExists('beef', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + if ($this->container['beef'] === null) { + $invalidProperties[] = "'beef' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total net emissions of this activity, in tonnes-CO2e/year + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets beef + * + * @return float + */ + public function getBeef() + { + return $this->container['beef']; + } + + /** + * Sets beef + * + * @param float $beef Net emissions of beef, in tonnes-CO2e/year + * + * @return self + */ + public function setBeef($beef) + { + if (is_null($beef)) { + throw new \InvalidArgumentException('non-nullable beef cannot be null'); + } + $this->container['beef'] = $beef; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseScope1.php b/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseScope1.php new file mode 100644 index 00000000..79f496cd --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseScope1.php @@ -0,0 +1,1006 @@ + + */ +class PostBeef200ResponseScope1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_200_response_scope1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel_co2' => 'float', + 'fuel_ch4' => 'float', + 'fuel_n2_o' => 'float', + 'urea_co2' => 'float', + 'lime_co2' => 'float', + 'fertiliser_n2_o' => 'float', + 'enteric_ch4' => 'float', + 'manure_management_ch4' => 'float', + 'urine_and_dung_n2_o' => 'float', + 'atmospheric_deposition_n2_o' => 'float', + 'leaching_and_runoff_n2_o' => 'float', + 'savannah_burning_n2_o' => 'float', + 'savannah_burning_ch4' => 'float', + 'total_co2' => 'float', + 'total_ch4' => 'float', + 'total_n2_o' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel_co2' => null, + 'fuel_ch4' => null, + 'fuel_n2_o' => null, + 'urea_co2' => null, + 'lime_co2' => null, + 'fertiliser_n2_o' => null, + 'enteric_ch4' => null, + 'manure_management_ch4' => null, + 'urine_and_dung_n2_o' => null, + 'atmospheric_deposition_n2_o' => null, + 'leaching_and_runoff_n2_o' => null, + 'savannah_burning_n2_o' => null, + 'savannah_burning_ch4' => null, + 'total_co2' => null, + 'total_ch4' => null, + 'total_n2_o' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel_co2' => false, + 'fuel_ch4' => false, + 'fuel_n2_o' => false, + 'urea_co2' => false, + 'lime_co2' => false, + 'fertiliser_n2_o' => false, + 'enteric_ch4' => false, + 'manure_management_ch4' => false, + 'urine_and_dung_n2_o' => false, + 'atmospheric_deposition_n2_o' => false, + 'leaching_and_runoff_n2_o' => false, + 'savannah_burning_n2_o' => false, + 'savannah_burning_ch4' => false, + 'total_co2' => false, + 'total_ch4' => false, + 'total_n2_o' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel_co2' => 'fuelCO2', + 'fuel_ch4' => 'fuelCH4', + 'fuel_n2_o' => 'fuelN2O', + 'urea_co2' => 'ureaCO2', + 'lime_co2' => 'limeCO2', + 'fertiliser_n2_o' => 'fertiliserN2O', + 'enteric_ch4' => 'entericCH4', + 'manure_management_ch4' => 'manureManagementCH4', + 'urine_and_dung_n2_o' => 'urineAndDungN2O', + 'atmospheric_deposition_n2_o' => 'atmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'leachingAndRunoffN2O', + 'savannah_burning_n2_o' => 'savannahBurningN2O', + 'savannah_burning_ch4' => 'savannahBurningCH4', + 'total_co2' => 'totalCO2', + 'total_ch4' => 'totalCH4', + 'total_n2_o' => 'totalN2O', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel_co2' => 'setFuelCo2', + 'fuel_ch4' => 'setFuelCh4', + 'fuel_n2_o' => 'setFuelN2O', + 'urea_co2' => 'setUreaCo2', + 'lime_co2' => 'setLimeCo2', + 'fertiliser_n2_o' => 'setFertiliserN2O', + 'enteric_ch4' => 'setEntericCh4', + 'manure_management_ch4' => 'setManureManagementCh4', + 'urine_and_dung_n2_o' => 'setUrineAndDungN2O', + 'atmospheric_deposition_n2_o' => 'setAtmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'setLeachingAndRunoffN2O', + 'savannah_burning_n2_o' => 'setSavannahBurningN2O', + 'savannah_burning_ch4' => 'setSavannahBurningCh4', + 'total_co2' => 'setTotalCo2', + 'total_ch4' => 'setTotalCh4', + 'total_n2_o' => 'setTotalN2O', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel_co2' => 'getFuelCo2', + 'fuel_ch4' => 'getFuelCh4', + 'fuel_n2_o' => 'getFuelN2O', + 'urea_co2' => 'getUreaCo2', + 'lime_co2' => 'getLimeCo2', + 'fertiliser_n2_o' => 'getFertiliserN2O', + 'enteric_ch4' => 'getEntericCh4', + 'manure_management_ch4' => 'getManureManagementCh4', + 'urine_and_dung_n2_o' => 'getUrineAndDungN2O', + 'atmospheric_deposition_n2_o' => 'getAtmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'getLeachingAndRunoffN2O', + 'savannah_burning_n2_o' => 'getSavannahBurningN2O', + 'savannah_burning_ch4' => 'getSavannahBurningCh4', + 'total_co2' => 'getTotalCo2', + 'total_ch4' => 'getTotalCh4', + 'total_n2_o' => 'getTotalN2O', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel_co2', $data ?? [], null); + $this->setIfExists('fuel_ch4', $data ?? [], null); + $this->setIfExists('fuel_n2_o', $data ?? [], null); + $this->setIfExists('urea_co2', $data ?? [], null); + $this->setIfExists('lime_co2', $data ?? [], null); + $this->setIfExists('fertiliser_n2_o', $data ?? [], null); + $this->setIfExists('enteric_ch4', $data ?? [], null); + $this->setIfExists('manure_management_ch4', $data ?? [], null); + $this->setIfExists('urine_and_dung_n2_o', $data ?? [], null); + $this->setIfExists('atmospheric_deposition_n2_o', $data ?? [], null); + $this->setIfExists('leaching_and_runoff_n2_o', $data ?? [], null); + $this->setIfExists('savannah_burning_n2_o', $data ?? [], null); + $this->setIfExists('savannah_burning_ch4', $data ?? [], null); + $this->setIfExists('total_co2', $data ?? [], null); + $this->setIfExists('total_ch4', $data ?? [], null); + $this->setIfExists('total_n2_o', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel_co2'] === null) { + $invalidProperties[] = "'fuel_co2' can't be null"; + } + if ($this->container['fuel_ch4'] === null) { + $invalidProperties[] = "'fuel_ch4' can't be null"; + } + if ($this->container['fuel_n2_o'] === null) { + $invalidProperties[] = "'fuel_n2_o' can't be null"; + } + if ($this->container['urea_co2'] === null) { + $invalidProperties[] = "'urea_co2' can't be null"; + } + if ($this->container['lime_co2'] === null) { + $invalidProperties[] = "'lime_co2' can't be null"; + } + if ($this->container['fertiliser_n2_o'] === null) { + $invalidProperties[] = "'fertiliser_n2_o' can't be null"; + } + if ($this->container['enteric_ch4'] === null) { + $invalidProperties[] = "'enteric_ch4' can't be null"; + } + if ($this->container['manure_management_ch4'] === null) { + $invalidProperties[] = "'manure_management_ch4' can't be null"; + } + if ($this->container['urine_and_dung_n2_o'] === null) { + $invalidProperties[] = "'urine_and_dung_n2_o' can't be null"; + } + if ($this->container['atmospheric_deposition_n2_o'] === null) { + $invalidProperties[] = "'atmospheric_deposition_n2_o' can't be null"; + } + if ($this->container['leaching_and_runoff_n2_o'] === null) { + $invalidProperties[] = "'leaching_and_runoff_n2_o' can't be null"; + } + if ($this->container['savannah_burning_n2_o'] === null) { + $invalidProperties[] = "'savannah_burning_n2_o' can't be null"; + } + if ($this->container['savannah_burning_ch4'] === null) { + $invalidProperties[] = "'savannah_burning_ch4' can't be null"; + } + if ($this->container['total_co2'] === null) { + $invalidProperties[] = "'total_co2' can't be null"; + } + if ($this->container['total_ch4'] === null) { + $invalidProperties[] = "'total_ch4' can't be null"; + } + if ($this->container['total_n2_o'] === null) { + $invalidProperties[] = "'total_n2_o' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel_co2 + * + * @return float + */ + public function getFuelCo2() + { + return $this->container['fuel_co2']; + } + + /** + * Sets fuel_co2 + * + * @param float $fuel_co2 CO2 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCo2($fuel_co2) + { + if (is_null($fuel_co2)) { + throw new \InvalidArgumentException('non-nullable fuel_co2 cannot be null'); + } + $this->container['fuel_co2'] = $fuel_co2; + + return $this; + } + + /** + * Gets fuel_ch4 + * + * @return float + */ + public function getFuelCh4() + { + return $this->container['fuel_ch4']; + } + + /** + * Sets fuel_ch4 + * + * @param float $fuel_ch4 CH4 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCh4($fuel_ch4) + { + if (is_null($fuel_ch4)) { + throw new \InvalidArgumentException('non-nullable fuel_ch4 cannot be null'); + } + $this->container['fuel_ch4'] = $fuel_ch4; + + return $this; + } + + /** + * Gets fuel_n2_o + * + * @return float + */ + public function getFuelN2O() + { + return $this->container['fuel_n2_o']; + } + + /** + * Sets fuel_n2_o + * + * @param float $fuel_n2_o N2O emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelN2O($fuel_n2_o) + { + if (is_null($fuel_n2_o)) { + throw new \InvalidArgumentException('non-nullable fuel_n2_o cannot be null'); + } + $this->container['fuel_n2_o'] = $fuel_n2_o; + + return $this; + } + + /** + * Gets urea_co2 + * + * @return float + */ + public function getUreaCo2() + { + return $this->container['urea_co2']; + } + + /** + * Sets urea_co2 + * + * @param float $urea_co2 CO2 emissions from urea, in tonnes-CO2e + * + * @return self + */ + public function setUreaCo2($urea_co2) + { + if (is_null($urea_co2)) { + throw new \InvalidArgumentException('non-nullable urea_co2 cannot be null'); + } + $this->container['urea_co2'] = $urea_co2; + + return $this; + } + + /** + * Gets lime_co2 + * + * @return float + */ + public function getLimeCo2() + { + return $this->container['lime_co2']; + } + + /** + * Sets lime_co2 + * + * @param float $lime_co2 CO2 emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLimeCo2($lime_co2) + { + if (is_null($lime_co2)) { + throw new \InvalidArgumentException('non-nullable lime_co2 cannot be null'); + } + $this->container['lime_co2'] = $lime_co2; + + return $this; + } + + /** + * Gets fertiliser_n2_o + * + * @return float + */ + public function getFertiliserN2O() + { + return $this->container['fertiliser_n2_o']; + } + + /** + * Sets fertiliser_n2_o + * + * @param float $fertiliser_n2_o N2O emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliserN2O($fertiliser_n2_o) + { + if (is_null($fertiliser_n2_o)) { + throw new \InvalidArgumentException('non-nullable fertiliser_n2_o cannot be null'); + } + $this->container['fertiliser_n2_o'] = $fertiliser_n2_o; + + return $this; + } + + /** + * Gets enteric_ch4 + * + * @return float + */ + public function getEntericCh4() + { + return $this->container['enteric_ch4']; + } + + /** + * Sets enteric_ch4 + * + * @param float $enteric_ch4 CH4 emissions from enteric fermentation, in tonnes-CO2e + * + * @return self + */ + public function setEntericCh4($enteric_ch4) + { + if (is_null($enteric_ch4)) { + throw new \InvalidArgumentException('non-nullable enteric_ch4 cannot be null'); + } + $this->container['enteric_ch4'] = $enteric_ch4; + + return $this; + } + + /** + * Gets manure_management_ch4 + * + * @return float + */ + public function getManureManagementCh4() + { + return $this->container['manure_management_ch4']; + } + + /** + * Sets manure_management_ch4 + * + * @param float $manure_management_ch4 CH4 emissions from manure management, in tonnes-CO2e + * + * @return self + */ + public function setManureManagementCh4($manure_management_ch4) + { + if (is_null($manure_management_ch4)) { + throw new \InvalidArgumentException('non-nullable manure_management_ch4 cannot be null'); + } + $this->container['manure_management_ch4'] = $manure_management_ch4; + + return $this; + } + + /** + * Gets urine_and_dung_n2_o + * + * @return float + */ + public function getUrineAndDungN2O() + { + return $this->container['urine_and_dung_n2_o']; + } + + /** + * Sets urine_and_dung_n2_o + * + * @param float $urine_and_dung_n2_o N2O emissions from urine and dung, in tonnes-CO2e + * + * @return self + */ + public function setUrineAndDungN2O($urine_and_dung_n2_o) + { + if (is_null($urine_and_dung_n2_o)) { + throw new \InvalidArgumentException('non-nullable urine_and_dung_n2_o cannot be null'); + } + $this->container['urine_and_dung_n2_o'] = $urine_and_dung_n2_o; + + return $this; + } + + /** + * Gets atmospheric_deposition_n2_o + * + * @return float + */ + public function getAtmosphericDepositionN2O() + { + return $this->container['atmospheric_deposition_n2_o']; + } + + /** + * Sets atmospheric_deposition_n2_o + * + * @param float $atmospheric_deposition_n2_o N2O emissions from atmospheric deposition, in tonnes-CO2e + * + * @return self + */ + public function setAtmosphericDepositionN2O($atmospheric_deposition_n2_o) + { + if (is_null($atmospheric_deposition_n2_o)) { + throw new \InvalidArgumentException('non-nullable atmospheric_deposition_n2_o cannot be null'); + } + $this->container['atmospheric_deposition_n2_o'] = $atmospheric_deposition_n2_o; + + return $this; + } + + /** + * Gets leaching_and_runoff_n2_o + * + * @return float + */ + public function getLeachingAndRunoffN2O() + { + return $this->container['leaching_and_runoff_n2_o']; + } + + /** + * Sets leaching_and_runoff_n2_o + * + * @param float $leaching_and_runoff_n2_o N2O emissions from leeching and runoff, in tonnes-CO2e + * + * @return self + */ + public function setLeachingAndRunoffN2O($leaching_and_runoff_n2_o) + { + if (is_null($leaching_and_runoff_n2_o)) { + throw new \InvalidArgumentException('non-nullable leaching_and_runoff_n2_o cannot be null'); + } + $this->container['leaching_and_runoff_n2_o'] = $leaching_and_runoff_n2_o; + + return $this; + } + + /** + * Gets savannah_burning_n2_o + * + * @return float + */ + public function getSavannahBurningN2O() + { + return $this->container['savannah_burning_n2_o']; + } + + /** + * Sets savannah_burning_n2_o + * + * @param float $savannah_burning_n2_o N2O emissions from field burning, in tonnes-CO2e + * + * @return self + */ + public function setSavannahBurningN2O($savannah_burning_n2_o) + { + if (is_null($savannah_burning_n2_o)) { + throw new \InvalidArgumentException('non-nullable savannah_burning_n2_o cannot be null'); + } + $this->container['savannah_burning_n2_o'] = $savannah_burning_n2_o; + + return $this; + } + + /** + * Gets savannah_burning_ch4 + * + * @return float + */ + public function getSavannahBurningCh4() + { + return $this->container['savannah_burning_ch4']; + } + + /** + * Sets savannah_burning_ch4 + * + * @param float $savannah_burning_ch4 CH4 emissions from field burning, in tonnes-CO2e + * + * @return self + */ + public function setSavannahBurningCh4($savannah_burning_ch4) + { + if (is_null($savannah_burning_ch4)) { + throw new \InvalidArgumentException('non-nullable savannah_burning_ch4 cannot be null'); + } + $this->container['savannah_burning_ch4'] = $savannah_burning_ch4; + + return $this; + } + + /** + * Gets total_co2 + * + * @return float + */ + public function getTotalCo2() + { + return $this->container['total_co2']; + } + + /** + * Sets total_co2 + * + * @param float $total_co2 Total CO2 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCo2($total_co2) + { + if (is_null($total_co2)) { + throw new \InvalidArgumentException('non-nullable total_co2 cannot be null'); + } + $this->container['total_co2'] = $total_co2; + + return $this; + } + + /** + * Gets total_ch4 + * + * @return float + */ + public function getTotalCh4() + { + return $this->container['total_ch4']; + } + + /** + * Sets total_ch4 + * + * @param float $total_ch4 Total CH4 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCh4($total_ch4) + { + if (is_null($total_ch4)) { + throw new \InvalidArgumentException('non-nullable total_ch4 cannot be null'); + } + $this->container['total_ch4'] = $total_ch4; + + return $this; + } + + /** + * Gets total_n2_o + * + * @return float + */ + public function getTotalN2O() + { + return $this->container['total_n2_o']; + } + + /** + * Sets total_n2_o + * + * @param float $total_n2_o Total N2O scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalN2O($total_n2_o) + { + if (is_null($total_n2_o)) { + throw new \InvalidArgumentException('non-nullable total_n2_o cannot be null'); + } + $this->container['total_n2_o'] = $total_n2_o; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseScope3.php b/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseScope3.php new file mode 100644 index 00000000..23f3e88f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeef200ResponseScope3.php @@ -0,0 +1,710 @@ + + */ +class PostBeef200ResponseScope3 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_200_response_scope3'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fertiliser' => 'float', + 'purchased_mineral_supplementation' => 'float', + 'purchased_feed' => 'float', + 'herbicide' => 'float', + 'electricity' => 'float', + 'fuel' => 'float', + 'lime' => 'float', + 'purchased_livestock' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fertiliser' => null, + 'purchased_mineral_supplementation' => null, + 'purchased_feed' => null, + 'herbicide' => null, + 'electricity' => null, + 'fuel' => null, + 'lime' => null, + 'purchased_livestock' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fertiliser' => false, + 'purchased_mineral_supplementation' => false, + 'purchased_feed' => false, + 'herbicide' => false, + 'electricity' => false, + 'fuel' => false, + 'lime' => false, + 'purchased_livestock' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fertiliser' => 'fertiliser', + 'purchased_mineral_supplementation' => 'purchasedMineralSupplementation', + 'purchased_feed' => 'purchasedFeed', + 'herbicide' => 'herbicide', + 'electricity' => 'electricity', + 'fuel' => 'fuel', + 'lime' => 'lime', + 'purchased_livestock' => 'purchasedLivestock', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fertiliser' => 'setFertiliser', + 'purchased_mineral_supplementation' => 'setPurchasedMineralSupplementation', + 'purchased_feed' => 'setPurchasedFeed', + 'herbicide' => 'setHerbicide', + 'electricity' => 'setElectricity', + 'fuel' => 'setFuel', + 'lime' => 'setLime', + 'purchased_livestock' => 'setPurchasedLivestock', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fertiliser' => 'getFertiliser', + 'purchased_mineral_supplementation' => 'getPurchasedMineralSupplementation', + 'purchased_feed' => 'getPurchasedFeed', + 'herbicide' => 'getHerbicide', + 'electricity' => 'getElectricity', + 'fuel' => 'getFuel', + 'lime' => 'getLime', + 'purchased_livestock' => 'getPurchasedLivestock', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('purchased_mineral_supplementation', $data ?? [], null); + $this->setIfExists('purchased_feed', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('electricity', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('lime', $data ?? [], null); + $this->setIfExists('purchased_livestock', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['purchased_mineral_supplementation'] === null) { + $invalidProperties[] = "'purchased_mineral_supplementation' can't be null"; + } + if ($this->container['purchased_feed'] === null) { + $invalidProperties[] = "'purchased_feed' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['electricity'] === null) { + $invalidProperties[] = "'electricity' can't be null"; + } + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['lime'] === null) { + $invalidProperties[] = "'lime' can't be null"; + } + if ($this->container['purchased_livestock'] === null) { + $invalidProperties[] = "'purchased_livestock' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fertiliser + * + * @return float + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param float $fertiliser Emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets purchased_mineral_supplementation + * + * @return float + */ + public function getPurchasedMineralSupplementation() + { + return $this->container['purchased_mineral_supplementation']; + } + + /** + * Sets purchased_mineral_supplementation + * + * @param float $purchased_mineral_supplementation Emissions from purchased mineral supplementation, in tonnes-CO2e + * + * @return self + */ + public function setPurchasedMineralSupplementation($purchased_mineral_supplementation) + { + if (is_null($purchased_mineral_supplementation)) { + throw new \InvalidArgumentException('non-nullable purchased_mineral_supplementation cannot be null'); + } + $this->container['purchased_mineral_supplementation'] = $purchased_mineral_supplementation; + + return $this; + } + + /** + * Gets purchased_feed + * + * @return float + */ + public function getPurchasedFeed() + { + return $this->container['purchased_feed']; + } + + /** + * Sets purchased_feed + * + * @param float $purchased_feed Emissions from purchased feed, in tonnes-CO2e + * + * @return self + */ + public function setPurchasedFeed($purchased_feed) + { + if (is_null($purchased_feed)) { + throw new \InvalidArgumentException('non-nullable purchased_feed cannot be null'); + } + $this->container['purchased_feed'] = $purchased_feed; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Emissions from herbicide, in tonnes-CO2e + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets electricity + * + * @return float + */ + public function getElectricity() + { + return $this->container['electricity']; + } + + /** + * Sets electricity + * + * @param float $electricity Emissions from electricity, in tonnes-CO2e + * + * @return self + */ + public function setElectricity($electricity) + { + if (is_null($electricity)) { + throw new \InvalidArgumentException('non-nullable electricity cannot be null'); + } + $this->container['electricity'] = $electricity; + + return $this; + } + + /** + * Gets fuel + * + * @return float + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param float $fuel Emissions from fuel, in tonnes-CO2e + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets lime + * + * @return float + */ + public function getLime() + { + return $this->container['lime']; + } + + /** + * Sets lime + * + * @param float $lime Emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLime($lime) + { + if (is_null($lime)) { + throw new \InvalidArgumentException('non-nullable lime cannot be null'); + } + $this->container['lime'] = $lime; + + return $this; + } + + /** + * Gets purchased_livestock + * + * @return float + */ + public function getPurchasedLivestock() + { + return $this->container['purchased_livestock']; + } + + /** + * Sets purchased_livestock + * + * @param float $purchased_livestock Emissions from purchased livestock, in tonnes-CO2e + * + * @return self + */ + public function setPurchasedLivestock($purchased_livestock) + { + if (is_null($purchased_livestock)) { + throw new \InvalidArgumentException('non-nullable purchased_livestock cannot be null'); + } + $this->container['purchased_livestock'] = $purchased_livestock; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 3 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequest.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequest.php new file mode 100644 index 00000000..aeb75c5e --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequest.php @@ -0,0 +1,647 @@ + + */ +class PostBeefRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'north_of_tropic_of_capricorn' => 'bool', + 'rainfall_above600' => 'bool', + 'beef' => '\OpenAPI\Client\Model\PostBeefRequestBeefInner[]', + 'burning' => '\OpenAPI\Client\Model\PostBeefRequestBurningInner[]', + 'vegetation' => '\OpenAPI\Client\Model\PostBeefRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'north_of_tropic_of_capricorn' => null, + 'rainfall_above600' => null, + 'beef' => null, + 'burning' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'north_of_tropic_of_capricorn' => false, + 'rainfall_above600' => false, + 'beef' => false, + 'burning' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'north_of_tropic_of_capricorn' => 'northOfTropicOfCapricorn', + 'rainfall_above600' => 'rainfallAbove600', + 'beef' => 'beef', + 'burning' => 'burning', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'north_of_tropic_of_capricorn' => 'setNorthOfTropicOfCapricorn', + 'rainfall_above600' => 'setRainfallAbove600', + 'beef' => 'setBeef', + 'burning' => 'setBurning', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'north_of_tropic_of_capricorn' => 'getNorthOfTropicOfCapricorn', + 'rainfall_above600' => 'getRainfallAbove600', + 'beef' => 'getBeef', + 'burning' => 'getBurning', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('north_of_tropic_of_capricorn', $data ?? [], null); + $this->setIfExists('rainfall_above600', $data ?? [], null); + $this->setIfExists('beef', $data ?? [], null); + $this->setIfExists('burning', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['north_of_tropic_of_capricorn'] === null) { + $invalidProperties[] = "'north_of_tropic_of_capricorn' can't be null"; + } + if ($this->container['rainfall_above600'] === null) { + $invalidProperties[] = "'rainfall_above600' can't be null"; + } + if ($this->container['beef'] === null) { + $invalidProperties[] = "'beef' can't be null"; + } + if ($this->container['burning'] === null) { + $invalidProperties[] = "'burning' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets north_of_tropic_of_capricorn + * + * @return bool + */ + public function getNorthOfTropicOfCapricorn() + { + return $this->container['north_of_tropic_of_capricorn']; + } + + /** + * Sets north_of_tropic_of_capricorn + * + * @param bool $north_of_tropic_of_capricorn Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude + * + * @return self + */ + public function setNorthOfTropicOfCapricorn($north_of_tropic_of_capricorn) + { + if (is_null($north_of_tropic_of_capricorn)) { + throw new \InvalidArgumentException('non-nullable north_of_tropic_of_capricorn cannot be null'); + } + $this->container['north_of_tropic_of_capricorn'] = $north_of_tropic_of_capricorn; + + return $this; + } + + /** + * Gets rainfall_above600 + * + * @return bool + */ + public function getRainfallAbove600() + { + return $this->container['rainfall_above600']; + } + + /** + * Sets rainfall_above600 + * + * @param bool $rainfall_above600 Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm + * + * @return self + */ + public function setRainfallAbove600($rainfall_above600) + { + if (is_null($rainfall_above600)) { + throw new \InvalidArgumentException('non-nullable rainfall_above600 cannot be null'); + } + $this->container['rainfall_above600'] = $rainfall_above600; + + return $this; + } + + /** + * Gets beef + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInner[] + */ + public function getBeef() + { + return $this->container['beef']; + } + + /** + * Sets beef + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInner[] $beef beef + * + * @return self + */ + public function setBeef($beef) + { + if (is_null($beef)) { + throw new \InvalidArgumentException('non-nullable beef cannot be null'); + } + $this->container['beef'] = $beef; + + return $this; + } + + /** + * Gets burning + * + * @return \OpenAPI\Client\Model\PostBeefRequestBurningInner[] + */ + public function getBurning() + { + return $this->container['burning']; + } + + /** + * Sets burning + * + * @param \OpenAPI\Client\Model\PostBeefRequestBurningInner[] $burning burning + * + * @return self + */ + public function setBurning($burning) + { + if (is_null($burning)) { + throw new \InvalidArgumentException('non-nullable burning cannot be null'); + } + $this->container['burning'] = $burning; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostBeefRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostBeefRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInner.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInner.php new file mode 100644 index 00000000..8f4fe33f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInner.php @@ -0,0 +1,1089 @@ + + */ +class PostBeefRequestBeefInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'classes' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClasses', + 'limestone' => 'float', + 'limestone_fraction' => 'float', + 'fertiliser' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser', + 'diesel' => 'float', + 'petrol' => 'float', + 'lpg' => 'float', + 'mineral_supplementation' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation', + 'electricity_source' => 'string', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'grain_feed' => 'float', + 'hay_feed' => 'float', + 'cottonseed_feed' => 'float', + 'herbicide' => 'float', + 'herbicide_other' => 'float', + 'cows_calving' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerCowsCalving' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'classes' => null, + 'limestone' => null, + 'limestone_fraction' => null, + 'fertiliser' => null, + 'diesel' => null, + 'petrol' => null, + 'lpg' => null, + 'mineral_supplementation' => null, + 'electricity_source' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'grain_feed' => null, + 'hay_feed' => null, + 'cottonseed_feed' => null, + 'herbicide' => null, + 'herbicide_other' => null, + 'cows_calving' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'classes' => false, + 'limestone' => false, + 'limestone_fraction' => false, + 'fertiliser' => false, + 'diesel' => false, + 'petrol' => false, + 'lpg' => false, + 'mineral_supplementation' => false, + 'electricity_source' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'grain_feed' => false, + 'hay_feed' => false, + 'cottonseed_feed' => false, + 'herbicide' => false, + 'herbicide_other' => false, + 'cows_calving' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'classes' => 'classes', + 'limestone' => 'limestone', + 'limestone_fraction' => 'limestoneFraction', + 'fertiliser' => 'fertiliser', + 'diesel' => 'diesel', + 'petrol' => 'petrol', + 'lpg' => 'lpg', + 'mineral_supplementation' => 'mineralSupplementation', + 'electricity_source' => 'electricitySource', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'grain_feed' => 'grainFeed', + 'hay_feed' => 'hayFeed', + 'cottonseed_feed' => 'cottonseedFeed', + 'herbicide' => 'herbicide', + 'herbicide_other' => 'herbicideOther', + 'cows_calving' => 'cowsCalving' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'classes' => 'setClasses', + 'limestone' => 'setLimestone', + 'limestone_fraction' => 'setLimestoneFraction', + 'fertiliser' => 'setFertiliser', + 'diesel' => 'setDiesel', + 'petrol' => 'setPetrol', + 'lpg' => 'setLpg', + 'mineral_supplementation' => 'setMineralSupplementation', + 'electricity_source' => 'setElectricitySource', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'grain_feed' => 'setGrainFeed', + 'hay_feed' => 'setHayFeed', + 'cottonseed_feed' => 'setCottonseedFeed', + 'herbicide' => 'setHerbicide', + 'herbicide_other' => 'setHerbicideOther', + 'cows_calving' => 'setCowsCalving' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'classes' => 'getClasses', + 'limestone' => 'getLimestone', + 'limestone_fraction' => 'getLimestoneFraction', + 'fertiliser' => 'getFertiliser', + 'diesel' => 'getDiesel', + 'petrol' => 'getPetrol', + 'lpg' => 'getLpg', + 'mineral_supplementation' => 'getMineralSupplementation', + 'electricity_source' => 'getElectricitySource', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'grain_feed' => 'getGrainFeed', + 'hay_feed' => 'getHayFeed', + 'cottonseed_feed' => 'getCottonseedFeed', + 'herbicide' => 'getHerbicide', + 'herbicide_other' => 'getHerbicideOther', + 'cows_calving' => 'getCowsCalving' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const ELECTRICITY_SOURCE_STATE_GRID = 'State Grid'; + public const ELECTRICITY_SOURCE_RENEWABLE = 'Renewable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getElectricitySourceAllowableValues() + { + return [ + self::ELECTRICITY_SOURCE_STATE_GRID, + self::ELECTRICITY_SOURCE_RENEWABLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('classes', $data ?? [], null); + $this->setIfExists('limestone', $data ?? [], null); + $this->setIfExists('limestone_fraction', $data ?? [], null); + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('diesel', $data ?? [], null); + $this->setIfExists('petrol', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + $this->setIfExists('mineral_supplementation', $data ?? [], null); + $this->setIfExists('electricity_source', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('grain_feed', $data ?? [], null); + $this->setIfExists('hay_feed', $data ?? [], null); + $this->setIfExists('cottonseed_feed', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('herbicide_other', $data ?? [], null); + $this->setIfExists('cows_calving', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['classes'] === null) { + $invalidProperties[] = "'classes' can't be null"; + } + if ($this->container['limestone'] === null) { + $invalidProperties[] = "'limestone' can't be null"; + } + if ($this->container['limestone_fraction'] === null) { + $invalidProperties[] = "'limestone_fraction' can't be null"; + } + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['diesel'] === null) { + $invalidProperties[] = "'diesel' can't be null"; + } + if ($this->container['petrol'] === null) { + $invalidProperties[] = "'petrol' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + if ($this->container['mineral_supplementation'] === null) { + $invalidProperties[] = "'mineral_supplementation' can't be null"; + } + if ($this->container['electricity_source'] === null) { + $invalidProperties[] = "'electricity_source' can't be null"; + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!is_null($this->container['electricity_source']) && !in_array($this->container['electricity_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'electricity_source', must be one of '%s'", + $this->container['electricity_source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['grain_feed'] === null) { + $invalidProperties[] = "'grain_feed' can't be null"; + } + if ($this->container['hay_feed'] === null) { + $invalidProperties[] = "'hay_feed' can't be null"; + } + if ($this->container['cottonseed_feed'] === null) { + $invalidProperties[] = "'cottonseed_feed' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['herbicide_other'] === null) { + $invalidProperties[] = "'herbicide_other' can't be null"; + } + if ($this->container['cows_calving'] === null) { + $invalidProperties[] = "'cows_calving' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets classes + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClasses + */ + public function getClasses() + { + return $this->container['classes']; + } + + /** + * Sets classes + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClasses $classes classes + * + * @return self + */ + public function setClasses($classes) + { + if (is_null($classes)) { + throw new \InvalidArgumentException('non-nullable classes cannot be null'); + } + $this->container['classes'] = $classes; + + return $this; + } + + /** + * Gets limestone + * + * @return float + */ + public function getLimestone() + { + return $this->container['limestone']; + } + + /** + * Sets limestone + * + * @param float $limestone Lime applied in tonnes + * + * @return self + */ + public function setLimestone($limestone) + { + if (is_null($limestone)) { + throw new \InvalidArgumentException('non-nullable limestone cannot be null'); + } + $this->container['limestone'] = $limestone; + + return $this; + } + + /** + * Gets limestone_fraction + * + * @return float + */ + public function getLimestoneFraction() + { + return $this->container['limestone_fraction']; + } + + /** + * Sets limestone_fraction + * + * @param float $limestone_fraction Fraction of lime as limestone vs dolomite, between 0 and 1 + * + * @return self + */ + public function setLimestoneFraction($limestone_fraction) + { + if (is_null($limestone_fraction)) { + throw new \InvalidArgumentException('non-nullable limestone_fraction cannot be null'); + } + $this->container['limestone_fraction'] = $limestone_fraction; + + return $this; + } + + /** + * Gets fertiliser + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser $fertiliser fertiliser + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets diesel + * + * @return float + */ + public function getDiesel() + { + return $this->container['diesel']; + } + + /** + * Sets diesel + * + * @param float $diesel Diesel usage in L (litres) + * + * @return self + */ + public function setDiesel($diesel) + { + if (is_null($diesel)) { + throw new \InvalidArgumentException('non-nullable diesel cannot be null'); + } + $this->container['diesel'] = $diesel; + + return $this; + } + + /** + * Gets petrol + * + * @return float + */ + public function getPetrol() + { + return $this->container['petrol']; + } + + /** + * Sets petrol + * + * @param float $petrol Petrol usage in L (litres) + * + * @return self + */ + public function setPetrol($petrol) + { + if (is_null($petrol)) { + throw new \InvalidArgumentException('non-nullable petrol cannot be null'); + } + $this->container['petrol'] = $petrol; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + + /** + * Gets mineral_supplementation + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation + */ + public function getMineralSupplementation() + { + return $this->container['mineral_supplementation']; + } + + /** + * Sets mineral_supplementation + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation $mineral_supplementation mineral_supplementation + * + * @return self + */ + public function setMineralSupplementation($mineral_supplementation) + { + if (is_null($mineral_supplementation)) { + throw new \InvalidArgumentException('non-nullable mineral_supplementation cannot be null'); + } + $this->container['mineral_supplementation'] = $mineral_supplementation; + + return $this; + } + + /** + * Gets electricity_source + * + * @return string + */ + public function getElectricitySource() + { + return $this->container['electricity_source']; + } + + /** + * Sets electricity_source + * + * @param string $electricity_source Source of electricity + * + * @return self + */ + public function setElectricitySource($electricity_source) + { + if (is_null($electricity_source)) { + throw new \InvalidArgumentException('non-nullable electricity_source cannot be null'); + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!in_array($electricity_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'electricity_source', must be one of '%s'", + $electricity_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['electricity_source'] = $electricity_source; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostBeefRequestBeefInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostBeefRequestBeefInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets grain_feed + * + * @return float + */ + public function getGrainFeed() + { + return $this->container['grain_feed']; + } + + /** + * Sets grain_feed + * + * @param float $grain_feed Grain purchased for cattle feed in tonnes + * + * @return self + */ + public function setGrainFeed($grain_feed) + { + if (is_null($grain_feed)) { + throw new \InvalidArgumentException('non-nullable grain_feed cannot be null'); + } + $this->container['grain_feed'] = $grain_feed; + + return $this; + } + + /** + * Gets hay_feed + * + * @return float + */ + public function getHayFeed() + { + return $this->container['hay_feed']; + } + + /** + * Sets hay_feed + * + * @param float $hay_feed Hay purchased for cattle feed in tonnes + * + * @return self + */ + public function setHayFeed($hay_feed) + { + if (is_null($hay_feed)) { + throw new \InvalidArgumentException('non-nullable hay_feed cannot be null'); + } + $this->container['hay_feed'] = $hay_feed; + + return $this; + } + + /** + * Gets cottonseed_feed + * + * @return float + */ + public function getCottonseedFeed() + { + return $this->container['cottonseed_feed']; + } + + /** + * Sets cottonseed_feed + * + * @param float $cottonseed_feed Cotton seed purchased for cattle feed in tonnes + * + * @return self + */ + public function setCottonseedFeed($cottonseed_feed) + { + if (is_null($cottonseed_feed)) { + throw new \InvalidArgumentException('non-nullable cottonseed_feed cannot be null'); + } + $this->container['cottonseed_feed'] = $cottonseed_feed; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets herbicide_other + * + * @return float + */ + public function getHerbicideOther() + { + return $this->container['herbicide_other']; + } + + /** + * Sets herbicide_other + * + * @param float $herbicide_other Total amount of active ingredients of from other herbicides in kg (kilograms) + * + * @return self + */ + public function setHerbicideOther($herbicide_other) + { + if (is_null($herbicide_other)) { + throw new \InvalidArgumentException('non-nullable herbicide_other cannot be null'); + } + $this->container['herbicide_other'] = $herbicide_other; + + return $this; + } + + /** + * Gets cows_calving + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerCowsCalving + */ + public function getCowsCalving() + { + return $this->container['cows_calving']; + } + + /** + * Sets cows_calving + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerCowsCalving $cows_calving cows_calving + * + * @return self + */ + public function setCowsCalving($cows_calving) + { + if (is_null($cows_calving)) { + throw new \InvalidArgumentException('non-nullable cows_calving cannot be null'); + } + $this->container['cows_calving'] = $cows_calving; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClasses.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClasses.php new file mode 100644 index 00000000..e5cd266f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClasses.php @@ -0,0 +1,921 @@ + + */ +class PostBeefRequestBeefInnerClasses implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bulls_gt1' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1', + 'bulls_gt1_traded' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Traded', + 'steers_lt1' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersLt1', + 'steers_lt1_traded' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersLt1Traded', + 'steers1_to2' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteers1To2', + 'steers1_to2_traded' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteers1To2Traded', + 'steers_gt2' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersGt2', + 'steers_gt2_traded' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersGt2Traded', + 'cows_gt2' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesCowsGt2', + 'cows_gt2_traded' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesCowsGt2Traded', + 'heifers_lt1' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersLt1', + 'heifers_lt1_traded' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersLt1Traded', + 'heifers1_to2' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifers1To2', + 'heifers1_to2_traded' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifers1To2Traded', + 'heifers_gt2' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersGt2', + 'heifers_gt2_traded' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersGt2Traded' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'bulls_gt1' => null, + 'bulls_gt1_traded' => null, + 'steers_lt1' => null, + 'steers_lt1_traded' => null, + 'steers1_to2' => null, + 'steers1_to2_traded' => null, + 'steers_gt2' => null, + 'steers_gt2_traded' => null, + 'cows_gt2' => null, + 'cows_gt2_traded' => null, + 'heifers_lt1' => null, + 'heifers_lt1_traded' => null, + 'heifers1_to2' => null, + 'heifers1_to2_traded' => null, + 'heifers_gt2' => null, + 'heifers_gt2_traded' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'bulls_gt1' => false, + 'bulls_gt1_traded' => false, + 'steers_lt1' => false, + 'steers_lt1_traded' => false, + 'steers1_to2' => false, + 'steers1_to2_traded' => false, + 'steers_gt2' => false, + 'steers_gt2_traded' => false, + 'cows_gt2' => false, + 'cows_gt2_traded' => false, + 'heifers_lt1' => false, + 'heifers_lt1_traded' => false, + 'heifers1_to2' => false, + 'heifers1_to2_traded' => false, + 'heifers_gt2' => false, + 'heifers_gt2_traded' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'bulls_gt1' => 'bullsGt1', + 'bulls_gt1_traded' => 'bullsGt1Traded', + 'steers_lt1' => 'steersLt1', + 'steers_lt1_traded' => 'steersLt1Traded', + 'steers1_to2' => 'steers1To2', + 'steers1_to2_traded' => 'steers1To2Traded', + 'steers_gt2' => 'steersGt2', + 'steers_gt2_traded' => 'steersGt2Traded', + 'cows_gt2' => 'cowsGt2', + 'cows_gt2_traded' => 'cowsGt2Traded', + 'heifers_lt1' => 'heifersLt1', + 'heifers_lt1_traded' => 'heifersLt1Traded', + 'heifers1_to2' => 'heifers1To2', + 'heifers1_to2_traded' => 'heifers1To2Traded', + 'heifers_gt2' => 'heifersGt2', + 'heifers_gt2_traded' => 'heifersGt2Traded' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bulls_gt1' => 'setBullsGt1', + 'bulls_gt1_traded' => 'setBullsGt1Traded', + 'steers_lt1' => 'setSteersLt1', + 'steers_lt1_traded' => 'setSteersLt1Traded', + 'steers1_to2' => 'setSteers1To2', + 'steers1_to2_traded' => 'setSteers1To2Traded', + 'steers_gt2' => 'setSteersGt2', + 'steers_gt2_traded' => 'setSteersGt2Traded', + 'cows_gt2' => 'setCowsGt2', + 'cows_gt2_traded' => 'setCowsGt2Traded', + 'heifers_lt1' => 'setHeifersLt1', + 'heifers_lt1_traded' => 'setHeifersLt1Traded', + 'heifers1_to2' => 'setHeifers1To2', + 'heifers1_to2_traded' => 'setHeifers1To2Traded', + 'heifers_gt2' => 'setHeifersGt2', + 'heifers_gt2_traded' => 'setHeifersGt2Traded' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bulls_gt1' => 'getBullsGt1', + 'bulls_gt1_traded' => 'getBullsGt1Traded', + 'steers_lt1' => 'getSteersLt1', + 'steers_lt1_traded' => 'getSteersLt1Traded', + 'steers1_to2' => 'getSteers1To2', + 'steers1_to2_traded' => 'getSteers1To2Traded', + 'steers_gt2' => 'getSteersGt2', + 'steers_gt2_traded' => 'getSteersGt2Traded', + 'cows_gt2' => 'getCowsGt2', + 'cows_gt2_traded' => 'getCowsGt2Traded', + 'heifers_lt1' => 'getHeifersLt1', + 'heifers_lt1_traded' => 'getHeifersLt1Traded', + 'heifers1_to2' => 'getHeifers1To2', + 'heifers1_to2_traded' => 'getHeifers1To2Traded', + 'heifers_gt2' => 'getHeifersGt2', + 'heifers_gt2_traded' => 'getHeifersGt2Traded' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('bulls_gt1', $data ?? [], null); + $this->setIfExists('bulls_gt1_traded', $data ?? [], null); + $this->setIfExists('steers_lt1', $data ?? [], null); + $this->setIfExists('steers_lt1_traded', $data ?? [], null); + $this->setIfExists('steers1_to2', $data ?? [], null); + $this->setIfExists('steers1_to2_traded', $data ?? [], null); + $this->setIfExists('steers_gt2', $data ?? [], null); + $this->setIfExists('steers_gt2_traded', $data ?? [], null); + $this->setIfExists('cows_gt2', $data ?? [], null); + $this->setIfExists('cows_gt2_traded', $data ?? [], null); + $this->setIfExists('heifers_lt1', $data ?? [], null); + $this->setIfExists('heifers_lt1_traded', $data ?? [], null); + $this->setIfExists('heifers1_to2', $data ?? [], null); + $this->setIfExists('heifers1_to2_traded', $data ?? [], null); + $this->setIfExists('heifers_gt2', $data ?? [], null); + $this->setIfExists('heifers_gt2_traded', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets bulls_gt1 + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1|null + */ + public function getBullsGt1() + { + return $this->container['bulls_gt1']; + } + + /** + * Sets bulls_gt1 + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1|null $bulls_gt1 bulls_gt1 + * + * @return self + */ + public function setBullsGt1($bulls_gt1) + { + if (is_null($bulls_gt1)) { + throw new \InvalidArgumentException('non-nullable bulls_gt1 cannot be null'); + } + $this->container['bulls_gt1'] = $bulls_gt1; + + return $this; + } + + /** + * Gets bulls_gt1_traded + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Traded|null + */ + public function getBullsGt1Traded() + { + return $this->container['bulls_gt1_traded']; + } + + /** + * Sets bulls_gt1_traded + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Traded|null $bulls_gt1_traded bulls_gt1_traded + * + * @return self + */ + public function setBullsGt1Traded($bulls_gt1_traded) + { + if (is_null($bulls_gt1_traded)) { + throw new \InvalidArgumentException('non-nullable bulls_gt1_traded cannot be null'); + } + $this->container['bulls_gt1_traded'] = $bulls_gt1_traded; + + return $this; + } + + /** + * Gets steers_lt1 + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersLt1|null + */ + public function getSteersLt1() + { + return $this->container['steers_lt1']; + } + + /** + * Sets steers_lt1 + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersLt1|null $steers_lt1 steers_lt1 + * + * @return self + */ + public function setSteersLt1($steers_lt1) + { + if (is_null($steers_lt1)) { + throw new \InvalidArgumentException('non-nullable steers_lt1 cannot be null'); + } + $this->container['steers_lt1'] = $steers_lt1; + + return $this; + } + + /** + * Gets steers_lt1_traded + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersLt1Traded|null + */ + public function getSteersLt1Traded() + { + return $this->container['steers_lt1_traded']; + } + + /** + * Sets steers_lt1_traded + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersLt1Traded|null $steers_lt1_traded steers_lt1_traded + * + * @return self + */ + public function setSteersLt1Traded($steers_lt1_traded) + { + if (is_null($steers_lt1_traded)) { + throw new \InvalidArgumentException('non-nullable steers_lt1_traded cannot be null'); + } + $this->container['steers_lt1_traded'] = $steers_lt1_traded; + + return $this; + } + + /** + * Gets steers1_to2 + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteers1To2|null + */ + public function getSteers1To2() + { + return $this->container['steers1_to2']; + } + + /** + * Sets steers1_to2 + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteers1To2|null $steers1_to2 steers1_to2 + * + * @return self + */ + public function setSteers1To2($steers1_to2) + { + if (is_null($steers1_to2)) { + throw new \InvalidArgumentException('non-nullable steers1_to2 cannot be null'); + } + $this->container['steers1_to2'] = $steers1_to2; + + return $this; + } + + /** + * Gets steers1_to2_traded + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteers1To2Traded|null + */ + public function getSteers1To2Traded() + { + return $this->container['steers1_to2_traded']; + } + + /** + * Sets steers1_to2_traded + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteers1To2Traded|null $steers1_to2_traded steers1_to2_traded + * + * @return self + */ + public function setSteers1To2Traded($steers1_to2_traded) + { + if (is_null($steers1_to2_traded)) { + throw new \InvalidArgumentException('non-nullable steers1_to2_traded cannot be null'); + } + $this->container['steers1_to2_traded'] = $steers1_to2_traded; + + return $this; + } + + /** + * Gets steers_gt2 + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersGt2|null + */ + public function getSteersGt2() + { + return $this->container['steers_gt2']; + } + + /** + * Sets steers_gt2 + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersGt2|null $steers_gt2 steers_gt2 + * + * @return self + */ + public function setSteersGt2($steers_gt2) + { + if (is_null($steers_gt2)) { + throw new \InvalidArgumentException('non-nullable steers_gt2 cannot be null'); + } + $this->container['steers_gt2'] = $steers_gt2; + + return $this; + } + + /** + * Gets steers_gt2_traded + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersGt2Traded|null + */ + public function getSteersGt2Traded() + { + return $this->container['steers_gt2_traded']; + } + + /** + * Sets steers_gt2_traded + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersGt2Traded|null $steers_gt2_traded steers_gt2_traded + * + * @return self + */ + public function setSteersGt2Traded($steers_gt2_traded) + { + if (is_null($steers_gt2_traded)) { + throw new \InvalidArgumentException('non-nullable steers_gt2_traded cannot be null'); + } + $this->container['steers_gt2_traded'] = $steers_gt2_traded; + + return $this; + } + + /** + * Gets cows_gt2 + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesCowsGt2|null + */ + public function getCowsGt2() + { + return $this->container['cows_gt2']; + } + + /** + * Sets cows_gt2 + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesCowsGt2|null $cows_gt2 cows_gt2 + * + * @return self + */ + public function setCowsGt2($cows_gt2) + { + if (is_null($cows_gt2)) { + throw new \InvalidArgumentException('non-nullable cows_gt2 cannot be null'); + } + $this->container['cows_gt2'] = $cows_gt2; + + return $this; + } + + /** + * Gets cows_gt2_traded + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesCowsGt2Traded|null + */ + public function getCowsGt2Traded() + { + return $this->container['cows_gt2_traded']; + } + + /** + * Sets cows_gt2_traded + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesCowsGt2Traded|null $cows_gt2_traded cows_gt2_traded + * + * @return self + */ + public function setCowsGt2Traded($cows_gt2_traded) + { + if (is_null($cows_gt2_traded)) { + throw new \InvalidArgumentException('non-nullable cows_gt2_traded cannot be null'); + } + $this->container['cows_gt2_traded'] = $cows_gt2_traded; + + return $this; + } + + /** + * Gets heifers_lt1 + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersLt1|null + */ + public function getHeifersLt1() + { + return $this->container['heifers_lt1']; + } + + /** + * Sets heifers_lt1 + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersLt1|null $heifers_lt1 heifers_lt1 + * + * @return self + */ + public function setHeifersLt1($heifers_lt1) + { + if (is_null($heifers_lt1)) { + throw new \InvalidArgumentException('non-nullable heifers_lt1 cannot be null'); + } + $this->container['heifers_lt1'] = $heifers_lt1; + + return $this; + } + + /** + * Gets heifers_lt1_traded + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersLt1Traded|null + */ + public function getHeifersLt1Traded() + { + return $this->container['heifers_lt1_traded']; + } + + /** + * Sets heifers_lt1_traded + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersLt1Traded|null $heifers_lt1_traded heifers_lt1_traded + * + * @return self + */ + public function setHeifersLt1Traded($heifers_lt1_traded) + { + if (is_null($heifers_lt1_traded)) { + throw new \InvalidArgumentException('non-nullable heifers_lt1_traded cannot be null'); + } + $this->container['heifers_lt1_traded'] = $heifers_lt1_traded; + + return $this; + } + + /** + * Gets heifers1_to2 + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifers1To2|null + */ + public function getHeifers1To2() + { + return $this->container['heifers1_to2']; + } + + /** + * Sets heifers1_to2 + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifers1To2|null $heifers1_to2 heifers1_to2 + * + * @return self + */ + public function setHeifers1To2($heifers1_to2) + { + if (is_null($heifers1_to2)) { + throw new \InvalidArgumentException('non-nullable heifers1_to2 cannot be null'); + } + $this->container['heifers1_to2'] = $heifers1_to2; + + return $this; + } + + /** + * Gets heifers1_to2_traded + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifers1To2Traded|null + */ + public function getHeifers1To2Traded() + { + return $this->container['heifers1_to2_traded']; + } + + /** + * Sets heifers1_to2_traded + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifers1To2Traded|null $heifers1_to2_traded heifers1_to2_traded + * + * @return self + */ + public function setHeifers1To2Traded($heifers1_to2_traded) + { + if (is_null($heifers1_to2_traded)) { + throw new \InvalidArgumentException('non-nullable heifers1_to2_traded cannot be null'); + } + $this->container['heifers1_to2_traded'] = $heifers1_to2_traded; + + return $this; + } + + /** + * Gets heifers_gt2 + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersGt2|null + */ + public function getHeifersGt2() + { + return $this->container['heifers_gt2']; + } + + /** + * Sets heifers_gt2 + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersGt2|null $heifers_gt2 heifers_gt2 + * + * @return self + */ + public function setHeifersGt2($heifers_gt2) + { + if (is_null($heifers_gt2)) { + throw new \InvalidArgumentException('non-nullable heifers_gt2 cannot be null'); + } + $this->container['heifers_gt2'] = $heifers_gt2; + + return $this; + } + + /** + * Gets heifers_gt2_traded + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersGt2Traded|null + */ + public function getHeifersGt2Traded() + { + return $this->container['heifers_gt2_traded']; + } + + /** + * Sets heifers_gt2_traded + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersGt2Traded|null $heifers_gt2_traded heifers_gt2_traded + * + * @return self + */ + public function setHeifersGt2Traded($heifers_gt2_traded) + { + if (is_null($heifers_gt2_traded)) { + throw new \InvalidArgumentException('non-nullable heifers_gt2_traded cannot be null'); + } + $this->container['heifers_gt2_traded'] = $heifers_gt2_traded; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1.php new file mode 100644 index 00000000..5d56f66f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesBullsGt1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_bullsGt1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.php new file mode 100644 index 00000000..7237e205 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.php @@ -0,0 +1,555 @@ + + */ +class PostBeefRequestBeefInnerClassesBullsGt1Autumn implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_bullsGt1_autumn'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'head' => 'float', + 'liveweight' => 'float', + 'liveweight_gain' => 'float', + 'crude_protein' => 'float', + 'dry_matter_digestibility' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'head' => null, + 'liveweight' => null, + 'liveweight_gain' => null, + 'crude_protein' => null, + 'dry_matter_digestibility' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'head' => false, + 'liveweight' => false, + 'liveweight_gain' => false, + 'crude_protein' => false, + 'dry_matter_digestibility' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'head' => 'head', + 'liveweight' => 'liveweight', + 'liveweight_gain' => 'liveweightGain', + 'crude_protein' => 'crudeProtein', + 'dry_matter_digestibility' => 'dryMatterDigestibility' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'head' => 'setHead', + 'liveweight' => 'setLiveweight', + 'liveweight_gain' => 'setLiveweightGain', + 'crude_protein' => 'setCrudeProtein', + 'dry_matter_digestibility' => 'setDryMatterDigestibility' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'head' => 'getHead', + 'liveweight' => 'getLiveweight', + 'liveweight_gain' => 'getLiveweightGain', + 'crude_protein' => 'getCrudeProtein', + 'dry_matter_digestibility' => 'getDryMatterDigestibility' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('head', $data ?? [], null); + $this->setIfExists('liveweight', $data ?? [], null); + $this->setIfExists('liveweight_gain', $data ?? [], null); + $this->setIfExists('crude_protein', $data ?? [], null); + $this->setIfExists('dry_matter_digestibility', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['head'] === null) { + $invalidProperties[] = "'head' can't be null"; + } + if ($this->container['liveweight'] === null) { + $invalidProperties[] = "'liveweight' can't be null"; + } + if ($this->container['liveweight_gain'] === null) { + $invalidProperties[] = "'liveweight_gain' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets head + * + * @return float + */ + public function getHead() + { + return $this->container['head']; + } + + /** + * Sets head + * + * @param float $head Number of animals (head) + * + * @return self + */ + public function setHead($head) + { + if (is_null($head)) { + throw new \InvalidArgumentException('non-nullable head cannot be null'); + } + $this->container['head'] = $head; + + return $this; + } + + /** + * Gets liveweight + * + * @return float + */ + public function getLiveweight() + { + return $this->container['liveweight']; + } + + /** + * Sets liveweight + * + * @param float $liveweight Average liveweight of animals in kg/head (kilogram per head) + * + * @return self + */ + public function setLiveweight($liveweight) + { + if (is_null($liveweight)) { + throw new \InvalidArgumentException('non-nullable liveweight cannot be null'); + } + $this->container['liveweight'] = $liveweight; + + return $this; + } + + /** + * Gets liveweight_gain + * + * @return float + */ + public function getLiveweightGain() + { + return $this->container['liveweight_gain']; + } + + /** + * Sets liveweight_gain + * + * @param float $liveweight_gain Average liveweight gain in kg/day (kilogram per day) + * + * @return self + */ + public function setLiveweightGain($liveweight_gain) + { + if (is_null($liveweight_gain)) { + throw new \InvalidArgumentException('non-nullable liveweight_gain cannot be null'); + } + $this->container['liveweight_gain'] = $liveweight_gain; + + return $this; + } + + /** + * Gets crude_protein + * + * @return float|null + */ + public function getCrudeProtein() + { + return $this->container['crude_protein']; + } + + /** + * Sets crude_protein + * + * @param float|null $crude_protein Crude protein percent, between 0 and 100 + * + * @return self + */ + public function setCrudeProtein($crude_protein) + { + if (is_null($crude_protein)) { + throw new \InvalidArgumentException('non-nullable crude_protein cannot be null'); + } + $this->container['crude_protein'] = $crude_protein; + + return $this; + } + + /** + * Gets dry_matter_digestibility + * + * @return float|null + */ + public function getDryMatterDigestibility() + { + return $this->container['dry_matter_digestibility']; + } + + /** + * Sets dry_matter_digestibility + * + * @param float|null $dry_matter_digestibility Dry matter digestibility percent, between 0 and 100 + * + * @return self + */ + public function setDryMatterDigestibility($dry_matter_digestibility) + { + if (is_null($dry_matter_digestibility)) { + throw new \InvalidArgumentException('non-nullable dry_matter_digestibility cannot be null'); + } + $this->container['dry_matter_digestibility'] = $dry_matter_digestibility; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.php new file mode 100644 index 00000000..a21e0c90 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.php @@ -0,0 +1,534 @@ + + */ +class PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_bullsGt1_purchases_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'head' => 'float', + 'purchase_weight' => 'float', + 'purchase_source' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'head' => null, + 'purchase_weight' => null, + 'purchase_source' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'head' => false, + 'purchase_weight' => false, + 'purchase_source' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'head' => 'head', + 'purchase_weight' => 'purchaseWeight', + 'purchase_source' => 'purchaseSource' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'head' => 'setHead', + 'purchase_weight' => 'setPurchaseWeight', + 'purchase_source' => 'setPurchaseSource' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'head' => 'getHead', + 'purchase_weight' => 'getPurchaseWeight', + 'purchase_source' => 'getPurchaseSource' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const PURCHASE_SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const PURCHASE_SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const PURCHASE_SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const PURCHASE_SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const PURCHASE_SOURCE_SW_WA = 'sw WA'; + public const PURCHASE_SOURCE_WA_PASTORAL = 'WA pastoral'; + public const PURCHASE_SOURCE_TAS = 'TAS'; + public const PURCHASE_SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPurchaseSourceAllowableValues() + { + return [ + self::PURCHASE_SOURCE_DAIRY_ORIGIN, + self::PURCHASE_SOURCE_NTH_STH_CENTRAL_QLD, + self::PURCHASE_SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::PURCHASE_SOURCE_NSW_SA_PASTORAL_ZONE, + self::PURCHASE_SOURCE_SW_WA, + self::PURCHASE_SOURCE_WA_PASTORAL, + self::PURCHASE_SOURCE_TAS, + self::PURCHASE_SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('head', $data ?? [], null); + $this->setIfExists('purchase_weight', $data ?? [], null); + $this->setIfExists('purchase_source', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['head'] === null) { + $invalidProperties[] = "'head' can't be null"; + } + if ($this->container['purchase_weight'] === null) { + $invalidProperties[] = "'purchase_weight' can't be null"; + } + if ($this->container['purchase_source'] === null) { + $invalidProperties[] = "'purchase_source' can't be null"; + } + $allowedValues = $this->getPurchaseSourceAllowableValues(); + if (!is_null($this->container['purchase_source']) && !in_array($this->container['purchase_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'purchase_source', must be one of '%s'", + $this->container['purchase_source'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets head + * + * @return float + */ + public function getHead() + { + return $this->container['head']; + } + + /** + * Sets head + * + * @param float $head Number of animals purchased (head) + * + * @return self + */ + public function setHead($head) + { + if (is_null($head)) { + throw new \InvalidArgumentException('non-nullable head cannot be null'); + } + $this->container['head'] = $head; + + return $this; + } + + /** + * Gets purchase_weight + * + * @return float + */ + public function getPurchaseWeight() + { + return $this->container['purchase_weight']; + } + + /** + * Sets purchase_weight + * + * @param float $purchase_weight Weight at purchase, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setPurchaseWeight($purchase_weight) + { + if (is_null($purchase_weight)) { + throw new \InvalidArgumentException('non-nullable purchase_weight cannot be null'); + } + $this->container['purchase_weight'] = $purchase_weight; + + return $this; + } + + /** + * Gets purchase_source + * + * @return string + */ + public function getPurchaseSource() + { + return $this->container['purchase_source']; + } + + /** + * Sets purchase_source + * + * @param string $purchase_source Source location of livestock purchase + * + * @return self + */ + public function setPurchaseSource($purchase_source) + { + if (is_null($purchase_source)) { + throw new \InvalidArgumentException('non-nullable purchase_source cannot be null'); + } + $allowedValues = $this->getPurchaseSourceAllowableValues(); + if (!in_array($purchase_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'purchase_source', must be one of '%s'", + $purchase_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['purchase_source'] = $purchase_source; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.php new file mode 100644 index 00000000..6b654300 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesBullsGt1Traded implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_bullsGt1Traded'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesCowsGt2.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesCowsGt2.php new file mode 100644 index 00000000..919ae46e --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesCowsGt2.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesCowsGt2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_cowsGt2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.php new file mode 100644 index 00000000..d63537ed --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesCowsGt2Traded implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_cowsGt2Traded'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifers1To2.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifers1To2.php new file mode 100644 index 00000000..742c84b3 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifers1To2.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesHeifers1To2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_heifers1To2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.php new file mode 100644 index 00000000..d1ef789b --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesHeifers1To2Traded implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_heifers1To2Traded'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersGt2.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersGt2.php new file mode 100644 index 00000000..11d00ec5 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersGt2.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesHeifersGt2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_heifersGt2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.php new file mode 100644 index 00000000..b6830d1d --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesHeifersGt2Traded implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_heifersGt2Traded'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersLt1.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersLt1.php new file mode 100644 index 00000000..a85ad460 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersLt1.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesHeifersLt1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_heifersLt1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.php new file mode 100644 index 00000000..eefe9bde --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesHeifersLt1Traded implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_heifersLt1Traded'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteers1To2.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteers1To2.php new file mode 100644 index 00000000..68e854d7 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteers1To2.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesSteers1To2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_steers1To2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.php new file mode 100644 index 00000000..1cc061a3 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesSteers1To2Traded implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_steers1To2Traded'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersGt2.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersGt2.php new file mode 100644 index 00000000..fc30dc67 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersGt2.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesSteersGt2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_steersGt2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.php new file mode 100644 index 00000000..a5834454 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesSteersGt2Traded implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_steersGt2Traded'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersLt1.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersLt1.php new file mode 100644 index 00000000..460b8a15 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersLt1.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesSteersLt1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_steersLt1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.php new file mode 100644 index 00000000..9ee39933 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.php @@ -0,0 +1,787 @@ + + */ +class PostBeefRequestBeefInnerClassesSteersLt1Traded implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_classes_steersLt1Traded'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'winter' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'spring' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'summer' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'source' => 'string', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'source' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'source' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'source' => 'source', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'source' => 'setSource', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'source' => 'getSource', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SOURCE_DAIRY_ORIGIN = 'Dairy origin'; + public const SOURCE_NTH_STH_CENTRAL_QLD = 'nth/sth/central QLD'; + public const SOURCE_NTH_STH_NSW_VIC_STH_SA = 'nth/sth NSW/VIC/sth SA'; + public const SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const SOURCE_SW_WA = 'sw WA'; + public const SOURCE_WA_PASTORAL = 'WA pastoral'; + public const SOURCE_TAS = 'TAS'; + public const SOURCE_NT = 'NT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_DAIRY_ORIGIN, + self::SOURCE_NTH_STH_CENTRAL_QLD, + self::SOURCE_NTH_STH_NSW_VIC_STH_SA, + self::SOURCE_NSW_SA_PASTORAL_ZONE, + self::SOURCE_SW_WA, + self::SOURCE_WA_PASTORAL, + self::SOURCE_TAS, + self::SOURCE_NT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets source + * + * @return string|null + * @deprecated + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source Source location of livestock purchase. Deprecation note: Use `purchases` instead + * + * @return self + * @deprecated + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerCowsCalving.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerCowsCalving.php new file mode 100644 index 00000000..49ed560f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerCowsCalving.php @@ -0,0 +1,525 @@ + + */ +class PostBeefRequestBeefInnerCowsCalving implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_cowsCalving'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'spring' => 'float', + 'summer' => 'float', + 'autumn' => 'float', + 'winter' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'spring' => null, + 'summer' => null, + 'autumn' => null, + 'winter' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'spring' => false, + 'summer' => false, + 'autumn' => false, + 'winter' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'spring' => 'spring', + 'summer' => 'summer', + 'autumn' => 'autumn', + 'winter' => 'winter' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'autumn' => 'setAutumn', + 'winter' => 'setWinter' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'autumn' => 'getAutumn', + 'winter' => 'getWinter' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerFertiliser.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerFertiliser.php new file mode 100644 index 00000000..77531304 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerFertiliser.php @@ -0,0 +1,762 @@ + + */ +class PostBeefRequestBeefInnerFertiliser implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_fertiliser'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'single_superphosphate' => 'float', + 'other_type' => 'string', + 'pasture_dryland' => 'float', + 'pasture_irrigated' => 'float', + 'crops_dryland' => 'float', + 'crops_irrigated' => 'float', + 'other_dryland' => 'float', + 'other_irrigated' => 'float', + 'other_fertilisers' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliserOtherFertilisersInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'single_superphosphate' => null, + 'other_type' => null, + 'pasture_dryland' => null, + 'pasture_irrigated' => null, + 'crops_dryland' => null, + 'crops_irrigated' => null, + 'other_dryland' => null, + 'other_irrigated' => null, + 'other_fertilisers' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'single_superphosphate' => false, + 'other_type' => false, + 'pasture_dryland' => false, + 'pasture_irrigated' => false, + 'crops_dryland' => false, + 'crops_irrigated' => false, + 'other_dryland' => false, + 'other_irrigated' => false, + 'other_fertilisers' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'single_superphosphate' => 'singleSuperphosphate', + 'other_type' => 'otherType', + 'pasture_dryland' => 'pastureDryland', + 'pasture_irrigated' => 'pastureIrrigated', + 'crops_dryland' => 'cropsDryland', + 'crops_irrigated' => 'cropsIrrigated', + 'other_dryland' => 'otherDryland', + 'other_irrigated' => 'otherIrrigated', + 'other_fertilisers' => 'otherFertilisers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'single_superphosphate' => 'setSingleSuperphosphate', + 'other_type' => 'setOtherType', + 'pasture_dryland' => 'setPastureDryland', + 'pasture_irrigated' => 'setPastureIrrigated', + 'crops_dryland' => 'setCropsDryland', + 'crops_irrigated' => 'setCropsIrrigated', + 'other_dryland' => 'setOtherDryland', + 'other_irrigated' => 'setOtherIrrigated', + 'other_fertilisers' => 'setOtherFertilisers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'single_superphosphate' => 'getSingleSuperphosphate', + 'other_type' => 'getOtherType', + 'pasture_dryland' => 'getPastureDryland', + 'pasture_irrigated' => 'getPastureIrrigated', + 'crops_dryland' => 'getCropsDryland', + 'crops_irrigated' => 'getCropsIrrigated', + 'other_dryland' => 'getOtherDryland', + 'other_irrigated' => 'getOtherIrrigated', + 'other_fertilisers' => 'getOtherFertilisers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const OTHER_TYPE_MONOAMMONIUM_PHOSPHATE__MAP = 'Monoammonium phosphate (MAP)'; + public const OTHER_TYPE_DIAMMONIUM_PHOSPHATE__DAP = 'Diammonium Phosphate (DAP)'; + public const OTHER_TYPE_UREA_AMMONIUM_NITRATE__UAN = 'Urea-Ammonium Nitrate (UAN)'; + public const OTHER_TYPE_AMMONIUM_NITRATE__AN = 'Ammonium Nitrate (AN)'; + public const OTHER_TYPE_CALCIUM_AMMONIUM_NITRATE__CAN = 'Calcium Ammonium Nitrate (CAN)'; + public const OTHER_TYPE_TRIPLE_SUPERPHOSPHATE__TSP = 'Triple Superphosphate (TSP)'; + public const OTHER_TYPE_SUPER_POTASH_1_1 = 'Super Potash 1:1'; + public const OTHER_TYPE_SUPER_POTASH_2_1 = 'Super Potash 2:1'; + public const OTHER_TYPE_SUPER_POTASH_3_1 = 'Super Potash 3:1'; + public const OTHER_TYPE_SUPER_POTASH_4_1 = 'Super Potash 4:1'; + public const OTHER_TYPE_SUPER_POTASH_5_1 = 'Super Potash 5:1'; + public const OTHER_TYPE_MURIATE_OF_POTASH = 'Muriate of Potash'; + public const OTHER_TYPE_SULPHATE_OF_POTASH = 'Sulphate of Potash'; + public const OTHER_TYPE_SULPHATE_OF_AMMONIA = 'Sulphate of Ammonia'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOtherTypeAllowableValues() + { + return [ + self::OTHER_TYPE_MONOAMMONIUM_PHOSPHATE__MAP, + self::OTHER_TYPE_DIAMMONIUM_PHOSPHATE__DAP, + self::OTHER_TYPE_UREA_AMMONIUM_NITRATE__UAN, + self::OTHER_TYPE_AMMONIUM_NITRATE__AN, + self::OTHER_TYPE_CALCIUM_AMMONIUM_NITRATE__CAN, + self::OTHER_TYPE_TRIPLE_SUPERPHOSPHATE__TSP, + self::OTHER_TYPE_SUPER_POTASH_1_1, + self::OTHER_TYPE_SUPER_POTASH_2_1, + self::OTHER_TYPE_SUPER_POTASH_3_1, + self::OTHER_TYPE_SUPER_POTASH_4_1, + self::OTHER_TYPE_SUPER_POTASH_5_1, + self::OTHER_TYPE_MURIATE_OF_POTASH, + self::OTHER_TYPE_SULPHATE_OF_POTASH, + self::OTHER_TYPE_SULPHATE_OF_AMMONIA, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('single_superphosphate', $data ?? [], null); + $this->setIfExists('other_type', $data ?? [], null); + $this->setIfExists('pasture_dryland', $data ?? [], null); + $this->setIfExists('pasture_irrigated', $data ?? [], null); + $this->setIfExists('crops_dryland', $data ?? [], null); + $this->setIfExists('crops_irrigated', $data ?? [], null); + $this->setIfExists('other_dryland', $data ?? [], null); + $this->setIfExists('other_irrigated', $data ?? [], null); + $this->setIfExists('other_fertilisers', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['single_superphosphate'] === null) { + $invalidProperties[] = "'single_superphosphate' can't be null"; + } + $allowedValues = $this->getOtherTypeAllowableValues(); + if (!is_null($this->container['other_type']) && !in_array($this->container['other_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'other_type', must be one of '%s'", + $this->container['other_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['pasture_dryland'] === null) { + $invalidProperties[] = "'pasture_dryland' can't be null"; + } + if ($this->container['pasture_irrigated'] === null) { + $invalidProperties[] = "'pasture_irrigated' can't be null"; + } + if ($this->container['crops_dryland'] === null) { + $invalidProperties[] = "'crops_dryland' can't be null"; + } + if ($this->container['crops_irrigated'] === null) { + $invalidProperties[] = "'crops_irrigated' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets single_superphosphate + * + * @return float + */ + public function getSingleSuperphosphate() + { + return $this->container['single_superphosphate']; + } + + /** + * Sets single_superphosphate + * + * @param float $single_superphosphate Single superphosphate usage in tonnes + * + * @return self + */ + public function setSingleSuperphosphate($single_superphosphate) + { + if (is_null($single_superphosphate)) { + throw new \InvalidArgumentException('non-nullable single_superphosphate cannot be null'); + } + $this->container['single_superphosphate'] = $single_superphosphate; + + return $this; + } + + /** + * Gets other_type + * + * @return string|null + * @deprecated + */ + public function getOtherType() + { + return $this->container['other_type']; + } + + /** + * Sets other_type + * + * @param string|null $other_type Other N fertiliser type. Deprecation note: Use `otherFertilisers` instead + * + * @return self + * @deprecated + */ + public function setOtherType($other_type) + { + if (is_null($other_type)) { + throw new \InvalidArgumentException('non-nullable other_type cannot be null'); + } + $allowedValues = $this->getOtherTypeAllowableValues(); + if (!in_array($other_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'other_type', must be one of '%s'", + $other_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['other_type'] = $other_type; + + return $this; + } + + /** + * Gets pasture_dryland + * + * @return float + */ + public function getPastureDryland() + { + return $this->container['pasture_dryland']; + } + + /** + * Sets pasture_dryland + * + * @param float $pasture_dryland Urea fertiliser used for dryland pasture, in tonnes Urea + * + * @return self + */ + public function setPastureDryland($pasture_dryland) + { + if (is_null($pasture_dryland)) { + throw new \InvalidArgumentException('non-nullable pasture_dryland cannot be null'); + } + $this->container['pasture_dryland'] = $pasture_dryland; + + return $this; + } + + /** + * Gets pasture_irrigated + * + * @return float + */ + public function getPastureIrrigated() + { + return $this->container['pasture_irrigated']; + } + + /** + * Sets pasture_irrigated + * + * @param float $pasture_irrigated Urea fertiliser used for irrigated pasture, in tonnes Urea + * + * @return self + */ + public function setPastureIrrigated($pasture_irrigated) + { + if (is_null($pasture_irrigated)) { + throw new \InvalidArgumentException('non-nullable pasture_irrigated cannot be null'); + } + $this->container['pasture_irrigated'] = $pasture_irrigated; + + return $this; + } + + /** + * Gets crops_dryland + * + * @return float + */ + public function getCropsDryland() + { + return $this->container['crops_dryland']; + } + + /** + * Sets crops_dryland + * + * @param float $crops_dryland Urea fertiliser used for dryland crops, in tonnes Urea + * + * @return self + */ + public function setCropsDryland($crops_dryland) + { + if (is_null($crops_dryland)) { + throw new \InvalidArgumentException('non-nullable crops_dryland cannot be null'); + } + $this->container['crops_dryland'] = $crops_dryland; + + return $this; + } + + /** + * Gets crops_irrigated + * + * @return float + */ + public function getCropsIrrigated() + { + return $this->container['crops_irrigated']; + } + + /** + * Sets crops_irrigated + * + * @param float $crops_irrigated Urea fertiliser used for irrigated crops, in tonnes Urea + * + * @return self + */ + public function setCropsIrrigated($crops_irrigated) + { + if (is_null($crops_irrigated)) { + throw new \InvalidArgumentException('non-nullable crops_irrigated cannot be null'); + } + $this->container['crops_irrigated'] = $crops_irrigated; + + return $this; + } + + /** + * Gets other_dryland + * + * @return float|null + * @deprecated + */ + public function getOtherDryland() + { + return $this->container['other_dryland']; + } + + /** + * Sets other_dryland + * + * @param float|null $other_dryland Other N fertiliser used for dryland. Deprecation note: Use `otherFertilisers` instead + * + * @return self + * @deprecated + */ + public function setOtherDryland($other_dryland) + { + if (is_null($other_dryland)) { + throw new \InvalidArgumentException('non-nullable other_dryland cannot be null'); + } + $this->container['other_dryland'] = $other_dryland; + + return $this; + } + + /** + * Gets other_irrigated + * + * @return float|null + * @deprecated + */ + public function getOtherIrrigated() + { + return $this->container['other_irrigated']; + } + + /** + * Sets other_irrigated + * + * @param float|null $other_irrigated Other N fertiliser used for irrigated. Deprecation note: Use `otherFertilisers` instead + * + * @return self + * @deprecated + */ + public function setOtherIrrigated($other_irrigated) + { + if (is_null($other_irrigated)) { + throw new \InvalidArgumentException('non-nullable other_irrigated cannot be null'); + } + $this->container['other_irrigated'] = $other_irrigated; + + return $this; + } + + /** + * Gets other_fertilisers + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliserOtherFertilisersInner[]|null + */ + public function getOtherFertilisers() + { + return $this->container['other_fertilisers']; + } + + /** + * Sets other_fertilisers + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliserOtherFertilisersInner[]|null $other_fertilisers Array of Other N fertiliser. Version note: If this field is set and has a length > 0, the `other` fields within this object are ignored, and this array is used instead + * + * @return self + */ + public function setOtherFertilisers($other_fertilisers) + { + if (is_null($other_fertilisers)) { + throw new \InvalidArgumentException('non-nullable other_fertilisers cannot be null'); + } + $this->container['other_fertilisers'] = $other_fertilisers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.php new file mode 100644 index 00000000..56c91b96 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.php @@ -0,0 +1,546 @@ + + */ +class PostBeefRequestBeefInnerFertiliserOtherFertilisersInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_fertiliser_otherFertilisers_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'other_type' => 'string', + 'other_dryland' => 'float', + 'other_irrigated' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'other_type' => null, + 'other_dryland' => null, + 'other_irrigated' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'other_type' => false, + 'other_dryland' => false, + 'other_irrigated' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'other_type' => 'otherType', + 'other_dryland' => 'otherDryland', + 'other_irrigated' => 'otherIrrigated' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'other_type' => 'setOtherType', + 'other_dryland' => 'setOtherDryland', + 'other_irrigated' => 'setOtherIrrigated' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'other_type' => 'getOtherType', + 'other_dryland' => 'getOtherDryland', + 'other_irrigated' => 'getOtherIrrigated' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const OTHER_TYPE_MONOAMMONIUM_PHOSPHATE__MAP = 'Monoammonium phosphate (MAP)'; + public const OTHER_TYPE_DIAMMONIUM_PHOSPHATE__DAP = 'Diammonium Phosphate (DAP)'; + public const OTHER_TYPE_UREA_AMMONIUM_NITRATE__UAN = 'Urea-Ammonium Nitrate (UAN)'; + public const OTHER_TYPE_AMMONIUM_NITRATE__AN = 'Ammonium Nitrate (AN)'; + public const OTHER_TYPE_CALCIUM_AMMONIUM_NITRATE__CAN = 'Calcium Ammonium Nitrate (CAN)'; + public const OTHER_TYPE_TRIPLE_SUPERPHOSPHATE__TSP = 'Triple Superphosphate (TSP)'; + public const OTHER_TYPE_SUPER_POTASH_1_1 = 'Super Potash 1:1'; + public const OTHER_TYPE_SUPER_POTASH_2_1 = 'Super Potash 2:1'; + public const OTHER_TYPE_SUPER_POTASH_3_1 = 'Super Potash 3:1'; + public const OTHER_TYPE_SUPER_POTASH_4_1 = 'Super Potash 4:1'; + public const OTHER_TYPE_SUPER_POTASH_5_1 = 'Super Potash 5:1'; + public const OTHER_TYPE_MURIATE_OF_POTASH = 'Muriate of Potash'; + public const OTHER_TYPE_SULPHATE_OF_POTASH = 'Sulphate of Potash'; + public const OTHER_TYPE_SULPHATE_OF_AMMONIA = 'Sulphate of Ammonia'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOtherTypeAllowableValues() + { + return [ + self::OTHER_TYPE_MONOAMMONIUM_PHOSPHATE__MAP, + self::OTHER_TYPE_DIAMMONIUM_PHOSPHATE__DAP, + self::OTHER_TYPE_UREA_AMMONIUM_NITRATE__UAN, + self::OTHER_TYPE_AMMONIUM_NITRATE__AN, + self::OTHER_TYPE_CALCIUM_AMMONIUM_NITRATE__CAN, + self::OTHER_TYPE_TRIPLE_SUPERPHOSPHATE__TSP, + self::OTHER_TYPE_SUPER_POTASH_1_1, + self::OTHER_TYPE_SUPER_POTASH_2_1, + self::OTHER_TYPE_SUPER_POTASH_3_1, + self::OTHER_TYPE_SUPER_POTASH_4_1, + self::OTHER_TYPE_SUPER_POTASH_5_1, + self::OTHER_TYPE_MURIATE_OF_POTASH, + self::OTHER_TYPE_SULPHATE_OF_POTASH, + self::OTHER_TYPE_SULPHATE_OF_AMMONIA, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('other_type', $data ?? [], null); + $this->setIfExists('other_dryland', $data ?? [], null); + $this->setIfExists('other_irrigated', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['other_type'] === null) { + $invalidProperties[] = "'other_type' can't be null"; + } + $allowedValues = $this->getOtherTypeAllowableValues(); + if (!is_null($this->container['other_type']) && !in_array($this->container['other_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'other_type', must be one of '%s'", + $this->container['other_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['other_dryland'] === null) { + $invalidProperties[] = "'other_dryland' can't be null"; + } + if ($this->container['other_irrigated'] === null) { + $invalidProperties[] = "'other_irrigated' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets other_type + * + * @return string + */ + public function getOtherType() + { + return $this->container['other_type']; + } + + /** + * Sets other_type + * + * @param string $other_type Other N fertiliser type + * + * @return self + */ + public function setOtherType($other_type) + { + if (is_null($other_type)) { + throw new \InvalidArgumentException('non-nullable other_type cannot be null'); + } + $allowedValues = $this->getOtherTypeAllowableValues(); + if (!in_array($other_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'other_type', must be one of '%s'", + $other_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['other_type'] = $other_type; + + return $this; + } + + /** + * Gets other_dryland + * + * @return float + */ + public function getOtherDryland() + { + return $this->container['other_dryland']; + } + + /** + * Sets other_dryland + * + * @param float $other_dryland Other N fertiliser used for dryland. From v1.1.0, supply tonnes of product. For earlier versions, supply tonnes of N + * + * @return self + */ + public function setOtherDryland($other_dryland) + { + if (is_null($other_dryland)) { + throw new \InvalidArgumentException('non-nullable other_dryland cannot be null'); + } + $this->container['other_dryland'] = $other_dryland; + + return $this; + } + + /** + * Gets other_irrigated + * + * @return float + */ + public function getOtherIrrigated() + { + return $this->container['other_irrigated']; + } + + /** + * Sets other_irrigated + * + * @param float $other_irrigated Other N fertiliser used for irrigated. From v1.1.0, supply tonnes of product. For earlier versions, supply tonnes of N + * + * @return self + */ + public function setOtherIrrigated($other_irrigated) + { + if (is_null($other_irrigated)) { + throw new \InvalidArgumentException('non-nullable other_irrigated cannot be null'); + } + $this->container['other_irrigated'] = $other_irrigated; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerMineralSupplementation.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerMineralSupplementation.php new file mode 100644 index 00000000..8e2ca08a --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBeefInnerMineralSupplementation.php @@ -0,0 +1,599 @@ + + */ +class PostBeefRequestBeefInnerMineralSupplementation implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_beef_inner_mineralSupplementation'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'mineral_block' => 'float', + 'mineral_block_urea' => 'float', + 'weaner_block' => 'float', + 'weaner_block_urea' => 'float', + 'dry_season_mix' => 'float', + 'dry_season_mix_urea' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'mineral_block' => null, + 'mineral_block_urea' => null, + 'weaner_block' => null, + 'weaner_block_urea' => null, + 'dry_season_mix' => null, + 'dry_season_mix_urea' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'mineral_block' => false, + 'mineral_block_urea' => false, + 'weaner_block' => false, + 'weaner_block_urea' => false, + 'dry_season_mix' => false, + 'dry_season_mix_urea' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'mineral_block' => 'mineralBlock', + 'mineral_block_urea' => 'mineralBlockUrea', + 'weaner_block' => 'weanerBlock', + 'weaner_block_urea' => 'weanerBlockUrea', + 'dry_season_mix' => 'drySeasonMix', + 'dry_season_mix_urea' => 'drySeasonMixUrea' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'mineral_block' => 'setMineralBlock', + 'mineral_block_urea' => 'setMineralBlockUrea', + 'weaner_block' => 'setWeanerBlock', + 'weaner_block_urea' => 'setWeanerBlockUrea', + 'dry_season_mix' => 'setDrySeasonMix', + 'dry_season_mix_urea' => 'setDrySeasonMixUrea' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'mineral_block' => 'getMineralBlock', + 'mineral_block_urea' => 'getMineralBlockUrea', + 'weaner_block' => 'getWeanerBlock', + 'weaner_block_urea' => 'getWeanerBlockUrea', + 'dry_season_mix' => 'getDrySeasonMix', + 'dry_season_mix_urea' => 'getDrySeasonMixUrea' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('mineral_block', $data ?? [], 0); + $this->setIfExists('mineral_block_urea', $data ?? [], 0); + $this->setIfExists('weaner_block', $data ?? [], 0); + $this->setIfExists('weaner_block_urea', $data ?? [], 0); + $this->setIfExists('dry_season_mix', $data ?? [], 0); + $this->setIfExists('dry_season_mix_urea', $data ?? [], 0); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['mineral_block'] === null) { + $invalidProperties[] = "'mineral_block' can't be null"; + } + if ($this->container['mineral_block_urea'] === null) { + $invalidProperties[] = "'mineral_block_urea' can't be null"; + } + if ($this->container['weaner_block'] === null) { + $invalidProperties[] = "'weaner_block' can't be null"; + } + if ($this->container['weaner_block_urea'] === null) { + $invalidProperties[] = "'weaner_block_urea' can't be null"; + } + if ($this->container['dry_season_mix'] === null) { + $invalidProperties[] = "'dry_season_mix' can't be null"; + } + if ($this->container['dry_season_mix_urea'] === null) { + $invalidProperties[] = "'dry_season_mix_urea' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets mineral_block + * + * @return float + */ + public function getMineralBlock() + { + return $this->container['mineral_block']; + } + + /** + * Sets mineral_block + * + * @param float $mineral_block Mineral block product used, in tonnes + * + * @return self + */ + public function setMineralBlock($mineral_block) + { + if (is_null($mineral_block)) { + throw new \InvalidArgumentException('non-nullable mineral_block cannot be null'); + } + $this->container['mineral_block'] = $mineral_block; + + return $this; + } + + /** + * Gets mineral_block_urea + * + * @return float + */ + public function getMineralBlockUrea() + { + return $this->container['mineral_block_urea']; + } + + /** + * Sets mineral_block_urea + * + * @param float $mineral_block_urea Fraction of urea content, between 0 and 1 + * + * @return self + */ + public function setMineralBlockUrea($mineral_block_urea) + { + if (is_null($mineral_block_urea)) { + throw new \InvalidArgumentException('non-nullable mineral_block_urea cannot be null'); + } + $this->container['mineral_block_urea'] = $mineral_block_urea; + + return $this; + } + + /** + * Gets weaner_block + * + * @return float + */ + public function getWeanerBlock() + { + return $this->container['weaner_block']; + } + + /** + * Sets weaner_block + * + * @param float $weaner_block Weaner block product used, in tonnes + * + * @return self + */ + public function setWeanerBlock($weaner_block) + { + if (is_null($weaner_block)) { + throw new \InvalidArgumentException('non-nullable weaner_block cannot be null'); + } + $this->container['weaner_block'] = $weaner_block; + + return $this; + } + + /** + * Gets weaner_block_urea + * + * @return float + */ + public function getWeanerBlockUrea() + { + return $this->container['weaner_block_urea']; + } + + /** + * Sets weaner_block_urea + * + * @param float $weaner_block_urea Fraction of urea content, between 0 and 1 + * + * @return self + */ + public function setWeanerBlockUrea($weaner_block_urea) + { + if (is_null($weaner_block_urea)) { + throw new \InvalidArgumentException('non-nullable weaner_block_urea cannot be null'); + } + $this->container['weaner_block_urea'] = $weaner_block_urea; + + return $this; + } + + /** + * Gets dry_season_mix + * + * @return float + */ + public function getDrySeasonMix() + { + return $this->container['dry_season_mix']; + } + + /** + * Sets dry_season_mix + * + * @param float $dry_season_mix Dry season mix product used, in tonnes + * + * @return self + */ + public function setDrySeasonMix($dry_season_mix) + { + if (is_null($dry_season_mix)) { + throw new \InvalidArgumentException('non-nullable dry_season_mix cannot be null'); + } + $this->container['dry_season_mix'] = $dry_season_mix; + + return $this; + } + + /** + * Gets dry_season_mix_urea + * + * @return float + */ + public function getDrySeasonMixUrea() + { + return $this->container['dry_season_mix_urea']; + } + + /** + * Sets dry_season_mix_urea + * + * @param float $dry_season_mix_urea Fraction of urea content, between 0 and 1 + * + * @return self + */ + public function setDrySeasonMixUrea($dry_season_mix_urea) + { + if (is_null($dry_season_mix_urea)) { + throw new \InvalidArgumentException('non-nullable dry_season_mix_urea cannot be null'); + } + $this->container['dry_season_mix_urea'] = $dry_season_mix_urea; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBurningInner.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBurningInner.php new file mode 100644 index 00000000..b7fb5fd7 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBurningInner.php @@ -0,0 +1,451 @@ + + */ +class PostBeefRequestBurningInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_burning_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'burning' => '\OpenAPI\Client\Model\PostBeefRequestBurningInnerBurning', + 'allocation_to_beef' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'burning' => null, + 'allocation_to_beef' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'burning' => false, + 'allocation_to_beef' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'burning' => 'burning', + 'allocation_to_beef' => 'allocationToBeef' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'burning' => 'setBurning', + 'allocation_to_beef' => 'setAllocationToBeef' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'burning' => 'getBurning', + 'allocation_to_beef' => 'getAllocationToBeef' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('burning', $data ?? [], null); + $this->setIfExists('allocation_to_beef', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['burning'] === null) { + $invalidProperties[] = "'burning' can't be null"; + } + if ($this->container['allocation_to_beef'] === null) { + $invalidProperties[] = "'allocation_to_beef' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets burning + * + * @return \OpenAPI\Client\Model\PostBeefRequestBurningInnerBurning + */ + public function getBurning() + { + return $this->container['burning']; + } + + /** + * Sets burning + * + * @param \OpenAPI\Client\Model\PostBeefRequestBurningInnerBurning $burning burning + * + * @return self + */ + public function setBurning($burning) + { + if (is_null($burning)) { + throw new \InvalidArgumentException('non-nullable burning cannot be null'); + } + $this->container['burning'] = $burning; + + return $this; + } + + /** + * Gets allocation_to_beef + * + * @return float[] + */ + public function getAllocationToBeef() + { + return $this->container['allocation_to_beef']; + } + + /** + * Sets allocation_to_beef + * + * @param float[] $allocation_to_beef The proportion of the burning that is allocated to each beef + * + * @return self + */ + public function setAllocationToBeef($allocation_to_beef) + { + if (is_null($allocation_to_beef)) { + throw new \InvalidArgumentException('non-nullable allocation_to_beef cannot be null'); + } + $this->container['allocation_to_beef'] = $allocation_to_beef; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestBurningInnerBurning.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBurningInnerBurning.php new file mode 100644 index 00000000..de6b967f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestBurningInnerBurning.php @@ -0,0 +1,822 @@ + + */ +class PostBeefRequestBurningInnerBurning implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_burning_inner_burning'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel' => 'string', + 'season' => 'string', + 'patchiness' => 'string', + 'rainfall_zone' => 'string', + 'years_since_last_fire' => 'float', + 'fire_scar_area' => 'float', + 'vegetation' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel' => null, + 'season' => null, + 'patchiness' => null, + 'rainfall_zone' => null, + 'years_since_last_fire' => null, + 'fire_scar_area' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel' => false, + 'season' => false, + 'patchiness' => false, + 'rainfall_zone' => false, + 'years_since_last_fire' => false, + 'fire_scar_area' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel' => 'fuel', + 'season' => 'season', + 'patchiness' => 'patchiness', + 'rainfall_zone' => 'rainfallZone', + 'years_since_last_fire' => 'yearsSinceLastFire', + 'fire_scar_area' => 'fireScarArea', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel' => 'setFuel', + 'season' => 'setSeason', + 'patchiness' => 'setPatchiness', + 'rainfall_zone' => 'setRainfallZone', + 'years_since_last_fire' => 'setYearsSinceLastFire', + 'fire_scar_area' => 'setFireScarArea', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel' => 'getFuel', + 'season' => 'getSeason', + 'patchiness' => 'getPatchiness', + 'rainfall_zone' => 'getRainfallZone', + 'years_since_last_fire' => 'getYearsSinceLastFire', + 'fire_scar_area' => 'getFireScarArea', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const FUEL_FINE = 'fine'; + public const FUEL_COARSE = 'coarse'; + public const SEASON_EARLY_DRY_SEASON = 'early dry season'; + public const SEASON_LATE_DRY_SEASON = 'late dry season'; + public const PATCHINESS_LOW = 'low'; + public const PATCHINESS_HIGH = 'high'; + public const RAINFALL_ZONE_LOW = 'low'; + public const RAINFALL_ZONE_HIGH = 'high'; + public const VEGETATION_SHRUBLAND_HUMMOCK = 'Shrubland hummock'; + public const VEGETATION_WOODLAND_HUMMOCK = 'Woodland Hummock'; + public const VEGETATION_MELALEUCA_WOODLAND = 'Melaleuca woodland'; + public const VEGETATION_WOODLAND_MIXED = 'Woodland Mixed'; + public const VEGETATION_OPEN_FOREST_MIXED = 'Open forest mixed'; + public const VEGETATION_SHRUBLAND__HEATH_WITH_HUMMOCK_GRASS = 'Shrubland (heath) with hummock grass'; + public const VEGETATION_WOODLAND_WITH_HUMMOCK_GRASS = 'Woodland with hummock grass'; + public const VEGETATION_OPEN_WOODLAND_WITH_MIXED_GRASS = 'Open woodland with mixed grass'; + public const VEGETATION_WOODLAND_WITH_MIXED_GRASS = 'Woodland with mixed grass'; + public const VEGETATION_WOODLAND_WITH_TUSSOCK_GRASS = 'Woodland with tussock grass'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFuelAllowableValues() + { + return [ + self::FUEL_FINE, + self::FUEL_COARSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSeasonAllowableValues() + { + return [ + self::SEASON_EARLY_DRY_SEASON, + self::SEASON_LATE_DRY_SEASON, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPatchinessAllowableValues() + { + return [ + self::PATCHINESS_LOW, + self::PATCHINESS_HIGH, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRainfallZoneAllowableValues() + { + return [ + self::RAINFALL_ZONE_LOW, + self::RAINFALL_ZONE_HIGH, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVegetationAllowableValues() + { + return [ + self::VEGETATION_SHRUBLAND_HUMMOCK, + self::VEGETATION_WOODLAND_HUMMOCK, + self::VEGETATION_MELALEUCA_WOODLAND, + self::VEGETATION_WOODLAND_MIXED, + self::VEGETATION_OPEN_FOREST_MIXED, + self::VEGETATION_SHRUBLAND__HEATH_WITH_HUMMOCK_GRASS, + self::VEGETATION_WOODLAND_WITH_HUMMOCK_GRASS, + self::VEGETATION_OPEN_WOODLAND_WITH_MIXED_GRASS, + self::VEGETATION_WOODLAND_WITH_MIXED_GRASS, + self::VEGETATION_WOODLAND_WITH_TUSSOCK_GRASS, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel', $data ?? [], 'coarse'); + $this->setIfExists('season', $data ?? [], 'early dry season'); + $this->setIfExists('patchiness', $data ?? [], 'high'); + $this->setIfExists('rainfall_zone', $data ?? [], 'low'); + $this->setIfExists('years_since_last_fire', $data ?? [], 0); + $this->setIfExists('fire_scar_area', $data ?? [], 0); + $this->setIfExists('vegetation', $data ?? [], 'Melaleuca woodland'); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + $allowedValues = $this->getFuelAllowableValues(); + if (!is_null($this->container['fuel']) && !in_array($this->container['fuel'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'fuel', must be one of '%s'", + $this->container['fuel'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['season'] === null) { + $invalidProperties[] = "'season' can't be null"; + } + $allowedValues = $this->getSeasonAllowableValues(); + if (!is_null($this->container['season']) && !in_array($this->container['season'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'season', must be one of '%s'", + $this->container['season'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['patchiness'] === null) { + $invalidProperties[] = "'patchiness' can't be null"; + } + $allowedValues = $this->getPatchinessAllowableValues(); + if (!is_null($this->container['patchiness']) && !in_array($this->container['patchiness'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'patchiness', must be one of '%s'", + $this->container['patchiness'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['rainfall_zone'] === null) { + $invalidProperties[] = "'rainfall_zone' can't be null"; + } + $allowedValues = $this->getRainfallZoneAllowableValues(); + if (!is_null($this->container['rainfall_zone']) && !in_array($this->container['rainfall_zone'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'rainfall_zone', must be one of '%s'", + $this->container['rainfall_zone'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['years_since_last_fire'] === null) { + $invalidProperties[] = "'years_since_last_fire' can't be null"; + } + if ($this->container['fire_scar_area'] === null) { + $invalidProperties[] = "'fire_scar_area' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + $allowedValues = $this->getVegetationAllowableValues(); + if (!is_null($this->container['vegetation']) && !in_array($this->container['vegetation'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'vegetation', must be one of '%s'", + $this->container['vegetation'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel + * + * @return string + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param string $fuel The fuel class size that was burnt + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $allowedValues = $this->getFuelAllowableValues(); + if (!in_array($fuel, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'fuel', must be one of '%s'", + $fuel, + implode("', '", $allowedValues) + ) + ); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets season + * + * @return string + */ + public function getSeason() + { + return $this->container['season']; + } + + /** + * Sets season + * + * @param string $season The time relative to the fire season in which the burning took place + * + * @return self + */ + public function setSeason($season) + { + if (is_null($season)) { + throw new \InvalidArgumentException('non-nullable season cannot be null'); + } + $allowedValues = $this->getSeasonAllowableValues(); + if (!in_array($season, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'season', must be one of '%s'", + $season, + implode("', '", $allowedValues) + ) + ); + } + $this->container['season'] = $season; + + return $this; + } + + /** + * Gets patchiness + * + * @return string + */ + public function getPatchiness() + { + return $this->container['patchiness']; + } + + /** + * Sets patchiness + * + * @param string $patchiness The patchiness of the savannah/vegetation that was burnt + * + * @return self + */ + public function setPatchiness($patchiness) + { + if (is_null($patchiness)) { + throw new \InvalidArgumentException('non-nullable patchiness cannot be null'); + } + $allowedValues = $this->getPatchinessAllowableValues(); + if (!in_array($patchiness, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'patchiness', must be one of '%s'", + $patchiness, + implode("', '", $allowedValues) + ) + ); + } + $this->container['patchiness'] = $patchiness; + + return $this; + } + + /** + * Gets rainfall_zone + * + * @return string + */ + public function getRainfallZone() + { + return $this->container['rainfall_zone']; + } + + /** + * Sets rainfall_zone + * + * @param string $rainfall_zone The rainfall zone in which the burning took place + * + * @return self + */ + public function setRainfallZone($rainfall_zone) + { + if (is_null($rainfall_zone)) { + throw new \InvalidArgumentException('non-nullable rainfall_zone cannot be null'); + } + $allowedValues = $this->getRainfallZoneAllowableValues(); + if (!in_array($rainfall_zone, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'rainfall_zone', must be one of '%s'", + $rainfall_zone, + implode("', '", $allowedValues) + ) + ); + } + $this->container['rainfall_zone'] = $rainfall_zone; + + return $this; + } + + /** + * Gets years_since_last_fire + * + * @return float + */ + public function getYearsSinceLastFire() + { + return $this->container['years_since_last_fire']; + } + + /** + * Sets years_since_last_fire + * + * @param float $years_since_last_fire Time since the last fire, in years + * + * @return self + */ + public function setYearsSinceLastFire($years_since_last_fire) + { + if (is_null($years_since_last_fire)) { + throw new \InvalidArgumentException('non-nullable years_since_last_fire cannot be null'); + } + $this->container['years_since_last_fire'] = $years_since_last_fire; + + return $this; + } + + /** + * Gets fire_scar_area + * + * @return float + */ + public function getFireScarArea() + { + return $this->container['fire_scar_area']; + } + + /** + * Sets fire_scar_area + * + * @param float $fire_scar_area The total area of the fire scar, in ha (hectares) + * + * @return self + */ + public function setFireScarArea($fire_scar_area) + { + if (is_null($fire_scar_area)) { + throw new \InvalidArgumentException('non-nullable fire_scar_area cannot be null'); + } + $this->container['fire_scar_area'] = $fire_scar_area; + + return $this; + } + + /** + * Gets vegetation + * + * @return string + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param string $vegetation The vegetation class that was burnt + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $allowedValues = $this->getVegetationAllowableValues(); + if (!in_array($vegetation, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'vegetation', must be one of '%s'", + $vegetation, + implode("', '", $allowedValues) + ) + ); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestVegetationInner.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestVegetationInner.php new file mode 100644 index 00000000..4b86db68 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestVegetationInner.php @@ -0,0 +1,487 @@ + + */ +class PostBeefRequestVegetationInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_vegetation_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'vegetation' => '\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation', + 'beef_proportion' => 'float', + 'allocation_to_beef' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'vegetation' => null, + 'beef_proportion' => null, + 'allocation_to_beef' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'vegetation' => false, + 'beef_proportion' => false, + 'allocation_to_beef' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vegetation' => 'vegetation', + 'beef_proportion' => 'beefProportion', + 'allocation_to_beef' => 'allocationToBeef' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vegetation' => 'setVegetation', + 'beef_proportion' => 'setBeefProportion', + 'allocation_to_beef' => 'setAllocationToBeef' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vegetation' => 'getVegetation', + 'beef_proportion' => 'getBeefProportion', + 'allocation_to_beef' => 'getAllocationToBeef' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('vegetation', $data ?? [], null); + $this->setIfExists('beef_proportion', $data ?? [], null); + $this->setIfExists('allocation_to_beef', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + if ($this->container['allocation_to_beef'] === null) { + $invalidProperties[] = "'allocation_to_beef' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + + /** + * Gets beef_proportion + * + * @return float|null + * @deprecated + */ + public function getBeefProportion() + { + return $this->container['beef_proportion']; + } + + /** + * Sets beef_proportion + * + * @param float|null $beef_proportion The proportion of the sequestration that is allocated to beef. Deprecation note: Please use `allocationToBeef` instead + * + * @return self + * @deprecated + */ + public function setBeefProportion($beef_proportion) + { + if (is_null($beef_proportion)) { + throw new \InvalidArgumentException('non-nullable beef_proportion cannot be null'); + } + $this->container['beef_proportion'] = $beef_proportion; + + return $this; + } + + /** + * Gets allocation_to_beef + * + * @return float[] + */ + public function getAllocationToBeef() + { + return $this->container['allocation_to_beef']; + } + + /** + * Sets allocation_to_beef + * + * @param float[] $allocation_to_beef The proportion of the sequestration that is allocated to each beef + * + * @return self + */ + public function setAllocationToBeef($allocation_to_beef) + { + if (is_null($allocation_to_beef)) { + throw new \InvalidArgumentException('non-nullable allocation_to_beef cannot be null'); + } + $this->container['allocation_to_beef'] = $allocation_to_beef; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBeefRequestVegetationInnerVegetation.php b/examples/php-api-client/api-client/lib/Model/PostBeefRequestVegetationInnerVegetation.php new file mode 100644 index 00000000..0e6637a9 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBeefRequestVegetationInnerVegetation.php @@ -0,0 +1,850 @@ + + */ +class PostBeefRequestVegetationInnerVegetation implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_beef_request_vegetation_inner_vegetation'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'region' => 'string', + 'tree_species' => 'string', + 'soil' => 'string', + 'area' => 'float', + 'age' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'region' => null, + 'tree_species' => null, + 'soil' => null, + 'area' => null, + 'age' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'region' => false, + 'tree_species' => false, + 'soil' => false, + 'area' => false, + 'age' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'region' => 'region', + 'tree_species' => 'treeSpecies', + 'soil' => 'soil', + 'area' => 'area', + 'age' => 'age' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'region' => 'setRegion', + 'tree_species' => 'setTreeSpecies', + 'soil' => 'setSoil', + 'area' => 'setArea', + 'age' => 'setAge' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'region' => 'getRegion', + 'tree_species' => 'getTreeSpecies', + 'soil' => 'getSoil', + 'area' => 'getArea', + 'age' => 'getAge' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const REGION_SOUTH_WEST = 'South West'; + public const REGION_PILBARA = 'Pilbara'; + public const REGION_KIMBERLEY = 'Kimberley'; + public const REGION_CENTRAL_WEST = 'Central West'; + public const REGION_SOUTH_COASTAL = 'South Coastal'; + public const REGION_GOLDFIELDS_EUCLA = 'Goldfields/Eucla'; + public const REGION_GASCOYNE = 'Gascoyne'; + public const REGION_CENTRAL_WHEAT_BELT = 'Central Wheat Belt'; + public const REGION_INTERIOR = 'Interior'; + public const REGION_NORTH_COAST = 'North Coast'; + public const REGION_SOUTH_COAST = 'South Coast'; + public const REGION_NORTHERN_TABLELANDS = 'Northern Tablelands'; + public const REGION_SOUTHERN_TABLELANDS = 'Southern Tablelands'; + public const REGION_NORTHERN_WHEAT_SHEEP = 'Northern Wheat/Sheep'; + public const REGION_SOUTHERN_WHEAT_SHEEP = 'Southern Wheat/Sheep'; + public const REGION_WESTERN = 'Western'; + public const REGION_NORTH_EAST = 'North East'; + public const REGION_EAST_COAST = 'East Coast'; + public const REGION_CENTRAL_NORTH_MIDLANDS_SOUTH_EAST = 'Central North/Midlands/South East'; + public const REGION_CENTRAL_PLATEAU_DERWENT_VALLEY = 'Central Plateau/Derwent Valley'; + public const REGION_WEST_SOUTH_COAST = 'West/South Coast'; + public const REGION_NORTH_WEST = 'North West'; + public const REGION_SOUTH_EAST = 'South East'; + public const REGION_MURRAY = 'Murray'; + public const REGION_MID_NORTH_FLINDERS = 'Mid-North/Flinders'; + public const REGION_PASTORAL = 'Pastoral'; + public const REGION_WEST_COAST_EYRE = 'West Coast/Eyre'; + public const REGION_MALLEE = 'Mallee'; + public const REGION_WIMMERA = 'Wimmera'; + public const REGION_NORTHERN_COUNTRY = 'Northern Country'; + public const REGION_NORTH_EAST_VIC = 'North East Vic'; + public const REGION_EAST_GIPPSLAND = 'East Gippsland'; + public const REGION_WEST_SOUTH_GIPPSLAND = 'West/South Gippsland'; + public const REGION_CENTRAL = 'Central'; + public const REGION_SOUTH_WEST_VIC = 'South West Vic'; + public const REGION_CENTRAL_HIGHLANDS_NORTHERN = 'Central Highlands/Northern'; + public const REGION_CENTRAL_WEST_FLINDERS = 'Central West/Flinders'; + public const REGION_CHANNEL_COUNTRY = 'Channel Country'; + public const REGION_MARANOA_WARREGO = 'Maranoa/Warrego'; + public const REGION_DARLING_DOWNS_BURNETT = 'Darling Downs/Burnett'; + public const REGION_NORTH_WEST_GULF = 'North West/Gulf'; + public const REGION_DARWIN_DALY = 'Darwin-Daly'; + public const REGION_ARNHEM_ROPER = 'Arnhem-Roper'; + public const REGION_VICTORIA_RIVER_TENNANT_CREEK = 'Victoria River-TennantCreek'; + public const REGION_ALICE_SPRINGS = 'Alice Springs'; + public const TREE_SPECIES_MIXED_SPECIES__ENVIRONMENTAL_PLANTINGS = 'Mixed species (Environmental Plantings)'; + public const TREE_SPECIES_NO_TREE_DATA_AVAILABLE = 'No tree data available'; + public const TREE_SPECIES_TASMANIAN_BLUE_GUM = 'Tasmanian Blue Gum'; + public const TREE_SPECIES_SPOTTED_GUM = 'Spotted Gum'; + public const TREE_SPECIES_SUGAR_GUM = 'Sugar Gum'; + public const TREE_SPECIES_HOOP_PINE = 'Hoop Pine'; + public const TREE_SPECIES_SYDNEY_BLUE_GUM = 'Sydney Blue Gum'; + public const TREE_SPECIES_DUNNS_WHITE_GUM = 'Dunn\'s White Gum'; + public const TREE_SPECIES_SHINING_GUM = 'Shining Gum'; + public const TREE_SPECIES_PINUS_RADIATA = 'Pinus Radiata'; + public const TREE_SPECIES_LEMON_SCENTED_GUM = 'Lemon-scented Gum'; + public const TREE_SPECIES_MARITIME_PINE = 'Maritime Pine'; + public const TREE_SPECIES_FLOODED_GUM = 'Flooded Gum'; + public const TREE_SPECIES_RED_IRONBARK = 'Red Ironbark'; + public const TREE_SPECIES_RADIATA_PINE__LOW_INPUT = 'Radiata Pine (low input)'; + public const TREE_SPECIES_MOUNTAIN_ASH = 'Mountain Ash'; + public const TREE_SPECIES_WESTERN_WHITE_GUM = 'Western White Gum'; + public const TREE_SPECIES_SLASH_PINE = 'Slash Pine'; + public const TREE_SPECIES_RADIATA_PINE__HIGH_INPUT = 'Radiata Pine (high input)'; + public const TREE_SPECIES_PINUS_RADIATA__LOW_INPUT = 'Pinus Radiata (low input)'; + public const TREE_SPECIES_BLACKBUTT = 'Blackbutt'; + public const TREE_SPECIES_LOBLOLLY_PINE = 'Loblolly Pine'; + public const TREE_SPECIES_PINUS_RADIATA__HIGH_INPUT = 'Pinus Radiata (high input)'; + public const TREE_SPECIES_PINUS_HYBRIDS = 'Pinus Hybrids'; + public const SOIL_LOAMS__CLAYS = 'Loams & Clays'; + public const SOIL_NO_SOIL___TREE_DATA_AVAILABLE = 'No Soil / Tree data available'; + public const SOIL_COLOURED_SANDS = 'Coloured Sands'; + public const SOIL_DUPLEX = 'Duplex'; + public const SOIL_CLAY = 'Clay'; + public const SOIL_OTHER_SOILS = '"Other Soils"'; + public const SOIL_OTHER_SOILS2 = 'Other Soils'; + public const SOIL_DUPLEX_SOILS = 'Duplex Soils'; + public const SOIL_SANDY_SOILS = 'Sandy Soils'; + public const SOIL_CALCAROSOLS = 'Calcarosols'; + public const SOIL_GREY_CRACKING_CLAYS = 'Grey Cracking Clays'; + public const SOIL_RED_EARTHS = 'Red Earths'; + public const SOIL_NON_CRACKING_CLAYS = 'Non-cracking Clays'; + public const SOIL_RED_DUPLEX = 'Red Duplex'; + public const SOIL_CRACKING_CLAYS = 'Cracking Clays'; + public const SOIL_CLAYS = 'Clays'; + public const SOIL_CLAY_GIDGEE = 'Clay Gidgee'; + public const SOIL_CLAY__BRIGALO_AND_BELAH = 'Clay (Brigalo and Belah)'; + public const SOIL_KANDOSOLS = 'Kandosols'; + public const SOIL_SANDY_DUPLEXES = 'Sandy Duplexes'; + public const SOIL_CLAY__RED_LOAM = 'Clay & Red Loam'; + public const SOIL_LOAM = 'Loam'; + public const SOIL_STRUCTURED_EARTHS = 'Structured Earths'; + public const SOIL_LOAMY_SOILS = 'Loamy Soils'; + public const SOIL_YELLOW_DUPLEX = 'Yellow Duplex'; + public const SOIL_GRADATIONAL_SOILS = 'Gradational soils'; + public const SOIL_OPEN_DOWNS = 'Open Downs'; + public const SOIL_DUPLEX_WOODLAND = 'Duplex Woodland'; + public const SOIL_EARTHS = 'Earths'; + public const SOIL_TENOSOLS = 'Tenosols'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRegionAllowableValues() + { + return [ + self::REGION_SOUTH_WEST, + self::REGION_PILBARA, + self::REGION_KIMBERLEY, + self::REGION_CENTRAL_WEST, + self::REGION_SOUTH_COASTAL, + self::REGION_GOLDFIELDS_EUCLA, + self::REGION_GASCOYNE, + self::REGION_CENTRAL_WHEAT_BELT, + self::REGION_INTERIOR, + self::REGION_NORTH_COAST, + self::REGION_SOUTH_COAST, + self::REGION_NORTHERN_TABLELANDS, + self::REGION_SOUTHERN_TABLELANDS, + self::REGION_NORTHERN_WHEAT_SHEEP, + self::REGION_SOUTHERN_WHEAT_SHEEP, + self::REGION_WESTERN, + self::REGION_NORTH_EAST, + self::REGION_EAST_COAST, + self::REGION_CENTRAL_NORTH_MIDLANDS_SOUTH_EAST, + self::REGION_CENTRAL_PLATEAU_DERWENT_VALLEY, + self::REGION_WEST_SOUTH_COAST, + self::REGION_NORTH_WEST, + self::REGION_SOUTH_EAST, + self::REGION_MURRAY, + self::REGION_MID_NORTH_FLINDERS, + self::REGION_PASTORAL, + self::REGION_WEST_COAST_EYRE, + self::REGION_MALLEE, + self::REGION_WIMMERA, + self::REGION_NORTHERN_COUNTRY, + self::REGION_NORTH_EAST_VIC, + self::REGION_EAST_GIPPSLAND, + self::REGION_WEST_SOUTH_GIPPSLAND, + self::REGION_CENTRAL, + self::REGION_SOUTH_WEST_VIC, + self::REGION_CENTRAL_HIGHLANDS_NORTHERN, + self::REGION_CENTRAL_WEST_FLINDERS, + self::REGION_CHANNEL_COUNTRY, + self::REGION_MARANOA_WARREGO, + self::REGION_DARLING_DOWNS_BURNETT, + self::REGION_NORTH_WEST_GULF, + self::REGION_DARWIN_DALY, + self::REGION_ARNHEM_ROPER, + self::REGION_VICTORIA_RIVER_TENNANT_CREEK, + self::REGION_ALICE_SPRINGS, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTreeSpeciesAllowableValues() + { + return [ + self::TREE_SPECIES_MIXED_SPECIES__ENVIRONMENTAL_PLANTINGS, + self::TREE_SPECIES_NO_TREE_DATA_AVAILABLE, + self::TREE_SPECIES_TASMANIAN_BLUE_GUM, + self::TREE_SPECIES_SPOTTED_GUM, + self::TREE_SPECIES_SUGAR_GUM, + self::TREE_SPECIES_HOOP_PINE, + self::TREE_SPECIES_SYDNEY_BLUE_GUM, + self::TREE_SPECIES_DUNNS_WHITE_GUM, + self::TREE_SPECIES_SHINING_GUM, + self::TREE_SPECIES_PINUS_RADIATA, + self::TREE_SPECIES_LEMON_SCENTED_GUM, + self::TREE_SPECIES_MARITIME_PINE, + self::TREE_SPECIES_FLOODED_GUM, + self::TREE_SPECIES_RED_IRONBARK, + self::TREE_SPECIES_RADIATA_PINE__LOW_INPUT, + self::TREE_SPECIES_MOUNTAIN_ASH, + self::TREE_SPECIES_WESTERN_WHITE_GUM, + self::TREE_SPECIES_SLASH_PINE, + self::TREE_SPECIES_RADIATA_PINE__HIGH_INPUT, + self::TREE_SPECIES_PINUS_RADIATA__LOW_INPUT, + self::TREE_SPECIES_BLACKBUTT, + self::TREE_SPECIES_LOBLOLLY_PINE, + self::TREE_SPECIES_PINUS_RADIATA__HIGH_INPUT, + self::TREE_SPECIES_PINUS_HYBRIDS, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSoilAllowableValues() + { + return [ + self::SOIL_LOAMS__CLAYS, + self::SOIL_NO_SOIL___TREE_DATA_AVAILABLE, + self::SOIL_COLOURED_SANDS, + self::SOIL_DUPLEX, + self::SOIL_CLAY, + self::SOIL_OTHER_SOILS, + self::SOIL_OTHER_SOILS2, + self::SOIL_DUPLEX_SOILS, + self::SOIL_SANDY_SOILS, + self::SOIL_CALCAROSOLS, + self::SOIL_GREY_CRACKING_CLAYS, + self::SOIL_RED_EARTHS, + self::SOIL_NON_CRACKING_CLAYS, + self::SOIL_RED_DUPLEX, + self::SOIL_CRACKING_CLAYS, + self::SOIL_CLAYS, + self::SOIL_CLAY_GIDGEE, + self::SOIL_CLAY__BRIGALO_AND_BELAH, + self::SOIL_KANDOSOLS, + self::SOIL_SANDY_DUPLEXES, + self::SOIL_CLAY__RED_LOAM, + self::SOIL_LOAM, + self::SOIL_STRUCTURED_EARTHS, + self::SOIL_LOAMY_SOILS, + self::SOIL_YELLOW_DUPLEX, + self::SOIL_GRADATIONAL_SOILS, + self::SOIL_OPEN_DOWNS, + self::SOIL_DUPLEX_WOODLAND, + self::SOIL_EARTHS, + self::SOIL_TENOSOLS, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('region', $data ?? [], null); + $this->setIfExists('tree_species', $data ?? [], null); + $this->setIfExists('soil', $data ?? [], null); + $this->setIfExists('area', $data ?? [], null); + $this->setIfExists('age', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['region'] === null) { + $invalidProperties[] = "'region' can't be null"; + } + $allowedValues = $this->getRegionAllowableValues(); + if (!is_null($this->container['region']) && !in_array($this->container['region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'region', must be one of '%s'", + $this->container['region'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['tree_species'] === null) { + $invalidProperties[] = "'tree_species' can't be null"; + } + $allowedValues = $this->getTreeSpeciesAllowableValues(); + if (!is_null($this->container['tree_species']) && !in_array($this->container['tree_species'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tree_species', must be one of '%s'", + $this->container['tree_species'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['soil'] === null) { + $invalidProperties[] = "'soil' can't be null"; + } + $allowedValues = $this->getSoilAllowableValues(); + if (!is_null($this->container['soil']) && !in_array($this->container['soil'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'soil', must be one of '%s'", + $this->container['soil'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['area'] === null) { + $invalidProperties[] = "'area' can't be null"; + } + if ($this->container['age'] === null) { + $invalidProperties[] = "'age' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets region + * + * @return string + */ + public function getRegion() + { + return $this->container['region']; + } + + /** + * Sets region + * + * @param string $region The rainfall region that the vegetation is in + * + * @return self + */ + public function setRegion($region) + { + if (is_null($region)) { + throw new \InvalidArgumentException('non-nullable region cannot be null'); + } + $allowedValues = $this->getRegionAllowableValues(); + if (!in_array($region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'region', must be one of '%s'", + $region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['region'] = $region; + + return $this; + } + + /** + * Gets tree_species + * + * @return string + */ + public function getTreeSpecies() + { + return $this->container['tree_species']; + } + + /** + * Sets tree_species + * + * @param string $tree_species The species of tree + * + * @return self + */ + public function setTreeSpecies($tree_species) + { + if (is_null($tree_species)) { + throw new \InvalidArgumentException('non-nullable tree_species cannot be null'); + } + $allowedValues = $this->getTreeSpeciesAllowableValues(); + if (!in_array($tree_species, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tree_species', must be one of '%s'", + $tree_species, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tree_species'] = $tree_species; + + return $this; + } + + /** + * Gets soil + * + * @return string + */ + public function getSoil() + { + return $this->container['soil']; + } + + /** + * Sets soil + * + * @param string $soil The soil type the tree is in + * + * @return self + */ + public function setSoil($soil) + { + if (is_null($soil)) { + throw new \InvalidArgumentException('non-nullable soil cannot be null'); + } + $allowedValues = $this->getSoilAllowableValues(); + if (!in_array($soil, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'soil', must be one of '%s'", + $soil, + implode("', '", $allowedValues) + ) + ); + } + $this->container['soil'] = $soil; + + return $this; + } + + /** + * Gets area + * + * @return float + */ + public function getArea() + { + return $this->container['area']; + } + + /** + * Sets area + * + * @param float $area The area of trees, in ha (hectares) + * + * @return self + */ + public function setArea($area) + { + if (is_null($area)) { + throw new \InvalidArgumentException('non-nullable area cannot be null'); + } + $this->container['area'] = $area; + + return $this; + } + + /** + * Gets age + * + * @return float + */ + public function getAge() + { + return $this->container['age']; + } + + /** + * Sets age + * + * @param float $age The age of the trees, in years + * + * @return self + */ + public function setAge($age) + { + if (is_null($age)) { + throw new \InvalidArgumentException('non-nullable age cannot be null'); + } + $this->container['age'] = $age; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffalo200Response.php b/examples/php-api-client/api-client/lib/Model/PostBuffalo200Response.php new file mode 100644 index 00000000..ffbfc0a0 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffalo200Response.php @@ -0,0 +1,636 @@ + + */ +class PostBuffalo200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostBuffalo200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostBuffalo200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'net' => '\OpenAPI\Client\Model\PostBuffalo200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostBuffalo200ResponseIntensities', + 'intermediate' => '\OpenAPI\Client\Model\PostBuffalo200ResponseIntermediateInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'net' => null, + 'intensities' => null, + 'intermediate' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'net' => false, + 'intensities' => false, + 'intermediate' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'net' => 'net', + 'intensities' => 'intensities', + 'intermediate' => 'intermediate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'net' => 'setNet', + 'intensities' => 'setIntensities', + 'intermediate' => 'setIntermediate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'net' => 'getNet', + 'intensities' => 'getIntensities', + 'intermediate' => 'getIntermediate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseIntensities.php b/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseIntensities.php new file mode 100644 index 00000000..be6e7d1e --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseIntensities.php @@ -0,0 +1,487 @@ + + */ +class PostBuffalo200ResponseIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_200_response_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'liveweight_produced_kg' => 'float', + 'buffalo_meat_excluding_sequestration' => 'float', + 'buffalo_meat_including_sequestration' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'liveweight_produced_kg' => null, + 'buffalo_meat_excluding_sequestration' => null, + 'buffalo_meat_including_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'liveweight_produced_kg' => false, + 'buffalo_meat_excluding_sequestration' => false, + 'buffalo_meat_including_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'liveweight_produced_kg' => 'liveweightProducedKg', + 'buffalo_meat_excluding_sequestration' => 'buffaloMeatExcludingSequestration', + 'buffalo_meat_including_sequestration' => 'buffaloMeatIncludingSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'liveweight_produced_kg' => 'setLiveweightProducedKg', + 'buffalo_meat_excluding_sequestration' => 'setBuffaloMeatExcludingSequestration', + 'buffalo_meat_including_sequestration' => 'setBuffaloMeatIncludingSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'liveweight_produced_kg' => 'getLiveweightProducedKg', + 'buffalo_meat_excluding_sequestration' => 'getBuffaloMeatExcludingSequestration', + 'buffalo_meat_including_sequestration' => 'getBuffaloMeatIncludingSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('liveweight_produced_kg', $data ?? [], null); + $this->setIfExists('buffalo_meat_excluding_sequestration', $data ?? [], null); + $this->setIfExists('buffalo_meat_including_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['liveweight_produced_kg'] === null) { + $invalidProperties[] = "'liveweight_produced_kg' can't be null"; + } + if ($this->container['buffalo_meat_excluding_sequestration'] === null) { + $invalidProperties[] = "'buffalo_meat_excluding_sequestration' can't be null"; + } + if ($this->container['buffalo_meat_including_sequestration'] === null) { + $invalidProperties[] = "'buffalo_meat_including_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets liveweight_produced_kg + * + * @return float + */ + public function getLiveweightProducedKg() + { + return $this->container['liveweight_produced_kg']; + } + + /** + * Sets liveweight_produced_kg + * + * @param float $liveweight_produced_kg Amount of buffalo meat produced in kg liveweight + * + * @return self + */ + public function setLiveweightProducedKg($liveweight_produced_kg) + { + if (is_null($liveweight_produced_kg)) { + throw new \InvalidArgumentException('non-nullable liveweight_produced_kg cannot be null'); + } + $this->container['liveweight_produced_kg'] = $liveweight_produced_kg; + + return $this; + } + + /** + * Gets buffalo_meat_excluding_sequestration + * + * @return float + */ + public function getBuffaloMeatExcludingSequestration() + { + return $this->container['buffalo_meat_excluding_sequestration']; + } + + /** + * Sets buffalo_meat_excluding_sequestration + * + * @param float $buffalo_meat_excluding_sequestration Buffalo meat (breeding herd) excluding sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setBuffaloMeatExcludingSequestration($buffalo_meat_excluding_sequestration) + { + if (is_null($buffalo_meat_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable buffalo_meat_excluding_sequestration cannot be null'); + } + $this->container['buffalo_meat_excluding_sequestration'] = $buffalo_meat_excluding_sequestration; + + return $this; + } + + /** + * Gets buffalo_meat_including_sequestration + * + * @return float + */ + public function getBuffaloMeatIncludingSequestration() + { + return $this->container['buffalo_meat_including_sequestration']; + } + + /** + * Sets buffalo_meat_including_sequestration + * + * @param float $buffalo_meat_including_sequestration Buffalo meat (breeding herd) including sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setBuffaloMeatIncludingSequestration($buffalo_meat_including_sequestration) + { + if (is_null($buffalo_meat_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable buffalo_meat_including_sequestration cannot be null'); + } + $this->container['buffalo_meat_including_sequestration'] = $buffalo_meat_including_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseIntermediateInner.php new file mode 100644 index 00000000..5e1af3a5 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseIntermediateInner.php @@ -0,0 +1,636 @@ + + */ +class PostBuffalo200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostBuffalo200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostBuffalo200ResponseScope3', + 'net' => '\OpenAPI\Client\Model\PostBuffalo200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostBuffalo200ResponseIntensities', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'net' => null, + 'intensities' => null, + 'carbon_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'net' => false, + 'intensities' => false, + 'carbon_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'net' => 'net', + 'intensities' => 'intensities', + 'carbon_sequestration' => 'carbonSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'net' => 'setNet', + 'intensities' => 'setIntensities', + 'carbon_sequestration' => 'setCarbonSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'net' => 'getNet', + 'intensities' => 'getIntensities', + 'carbon_sequestration' => 'getCarbonSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseNet.php b/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseNet.php new file mode 100644 index 00000000..b8b436e3 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseNet.php @@ -0,0 +1,414 @@ + + */ +class PostBuffalo200ResponseNet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_200_response_net'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total total + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseScope1.php b/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseScope1.php new file mode 100644 index 00000000..b128bed9 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseScope1.php @@ -0,0 +1,932 @@ + + */ +class PostBuffalo200ResponseScope1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_200_response_scope1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel_co2' => 'float', + 'fuel_ch4' => 'float', + 'fuel_n2_o' => 'float', + 'urea_co2' => 'float', + 'lime_co2' => 'float', + 'fertiliser_n2_o' => 'float', + 'enteric_ch4' => 'float', + 'manure_management_ch4' => 'float', + 'urine_and_dung_n2_o' => 'float', + 'atmospheric_deposition_n2_o' => 'float', + 'leaching_and_runoff_n2_o' => 'float', + 'total_co2' => 'float', + 'total_ch4' => 'float', + 'total_n2_o' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel_co2' => null, + 'fuel_ch4' => null, + 'fuel_n2_o' => null, + 'urea_co2' => null, + 'lime_co2' => null, + 'fertiliser_n2_o' => null, + 'enteric_ch4' => null, + 'manure_management_ch4' => null, + 'urine_and_dung_n2_o' => null, + 'atmospheric_deposition_n2_o' => null, + 'leaching_and_runoff_n2_o' => null, + 'total_co2' => null, + 'total_ch4' => null, + 'total_n2_o' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel_co2' => false, + 'fuel_ch4' => false, + 'fuel_n2_o' => false, + 'urea_co2' => false, + 'lime_co2' => false, + 'fertiliser_n2_o' => false, + 'enteric_ch4' => false, + 'manure_management_ch4' => false, + 'urine_and_dung_n2_o' => false, + 'atmospheric_deposition_n2_o' => false, + 'leaching_and_runoff_n2_o' => false, + 'total_co2' => false, + 'total_ch4' => false, + 'total_n2_o' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel_co2' => 'fuelCO2', + 'fuel_ch4' => 'fuelCH4', + 'fuel_n2_o' => 'fuelN2O', + 'urea_co2' => 'ureaCO2', + 'lime_co2' => 'limeCO2', + 'fertiliser_n2_o' => 'fertiliserN2O', + 'enteric_ch4' => 'entericCH4', + 'manure_management_ch4' => 'manureManagementCH4', + 'urine_and_dung_n2_o' => 'urineAndDungN2O', + 'atmospheric_deposition_n2_o' => 'atmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'leachingAndRunoffN2O', + 'total_co2' => 'totalCO2', + 'total_ch4' => 'totalCH4', + 'total_n2_o' => 'totalN2O', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel_co2' => 'setFuelCo2', + 'fuel_ch4' => 'setFuelCh4', + 'fuel_n2_o' => 'setFuelN2O', + 'urea_co2' => 'setUreaCo2', + 'lime_co2' => 'setLimeCo2', + 'fertiliser_n2_o' => 'setFertiliserN2O', + 'enteric_ch4' => 'setEntericCh4', + 'manure_management_ch4' => 'setManureManagementCh4', + 'urine_and_dung_n2_o' => 'setUrineAndDungN2O', + 'atmospheric_deposition_n2_o' => 'setAtmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'setLeachingAndRunoffN2O', + 'total_co2' => 'setTotalCo2', + 'total_ch4' => 'setTotalCh4', + 'total_n2_o' => 'setTotalN2O', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel_co2' => 'getFuelCo2', + 'fuel_ch4' => 'getFuelCh4', + 'fuel_n2_o' => 'getFuelN2O', + 'urea_co2' => 'getUreaCo2', + 'lime_co2' => 'getLimeCo2', + 'fertiliser_n2_o' => 'getFertiliserN2O', + 'enteric_ch4' => 'getEntericCh4', + 'manure_management_ch4' => 'getManureManagementCh4', + 'urine_and_dung_n2_o' => 'getUrineAndDungN2O', + 'atmospheric_deposition_n2_o' => 'getAtmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'getLeachingAndRunoffN2O', + 'total_co2' => 'getTotalCo2', + 'total_ch4' => 'getTotalCh4', + 'total_n2_o' => 'getTotalN2O', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel_co2', $data ?? [], null); + $this->setIfExists('fuel_ch4', $data ?? [], null); + $this->setIfExists('fuel_n2_o', $data ?? [], null); + $this->setIfExists('urea_co2', $data ?? [], null); + $this->setIfExists('lime_co2', $data ?? [], null); + $this->setIfExists('fertiliser_n2_o', $data ?? [], null); + $this->setIfExists('enteric_ch4', $data ?? [], null); + $this->setIfExists('manure_management_ch4', $data ?? [], null); + $this->setIfExists('urine_and_dung_n2_o', $data ?? [], null); + $this->setIfExists('atmospheric_deposition_n2_o', $data ?? [], null); + $this->setIfExists('leaching_and_runoff_n2_o', $data ?? [], null); + $this->setIfExists('total_co2', $data ?? [], null); + $this->setIfExists('total_ch4', $data ?? [], null); + $this->setIfExists('total_n2_o', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel_co2'] === null) { + $invalidProperties[] = "'fuel_co2' can't be null"; + } + if ($this->container['fuel_ch4'] === null) { + $invalidProperties[] = "'fuel_ch4' can't be null"; + } + if ($this->container['fuel_n2_o'] === null) { + $invalidProperties[] = "'fuel_n2_o' can't be null"; + } + if ($this->container['urea_co2'] === null) { + $invalidProperties[] = "'urea_co2' can't be null"; + } + if ($this->container['lime_co2'] === null) { + $invalidProperties[] = "'lime_co2' can't be null"; + } + if ($this->container['fertiliser_n2_o'] === null) { + $invalidProperties[] = "'fertiliser_n2_o' can't be null"; + } + if ($this->container['enteric_ch4'] === null) { + $invalidProperties[] = "'enteric_ch4' can't be null"; + } + if ($this->container['manure_management_ch4'] === null) { + $invalidProperties[] = "'manure_management_ch4' can't be null"; + } + if ($this->container['urine_and_dung_n2_o'] === null) { + $invalidProperties[] = "'urine_and_dung_n2_o' can't be null"; + } + if ($this->container['atmospheric_deposition_n2_o'] === null) { + $invalidProperties[] = "'atmospheric_deposition_n2_o' can't be null"; + } + if ($this->container['leaching_and_runoff_n2_o'] === null) { + $invalidProperties[] = "'leaching_and_runoff_n2_o' can't be null"; + } + if ($this->container['total_co2'] === null) { + $invalidProperties[] = "'total_co2' can't be null"; + } + if ($this->container['total_ch4'] === null) { + $invalidProperties[] = "'total_ch4' can't be null"; + } + if ($this->container['total_n2_o'] === null) { + $invalidProperties[] = "'total_n2_o' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel_co2 + * + * @return float + */ + public function getFuelCo2() + { + return $this->container['fuel_co2']; + } + + /** + * Sets fuel_co2 + * + * @param float $fuel_co2 CO2 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCo2($fuel_co2) + { + if (is_null($fuel_co2)) { + throw new \InvalidArgumentException('non-nullable fuel_co2 cannot be null'); + } + $this->container['fuel_co2'] = $fuel_co2; + + return $this; + } + + /** + * Gets fuel_ch4 + * + * @return float + */ + public function getFuelCh4() + { + return $this->container['fuel_ch4']; + } + + /** + * Sets fuel_ch4 + * + * @param float $fuel_ch4 CH4 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCh4($fuel_ch4) + { + if (is_null($fuel_ch4)) { + throw new \InvalidArgumentException('non-nullable fuel_ch4 cannot be null'); + } + $this->container['fuel_ch4'] = $fuel_ch4; + + return $this; + } + + /** + * Gets fuel_n2_o + * + * @return float + */ + public function getFuelN2O() + { + return $this->container['fuel_n2_o']; + } + + /** + * Sets fuel_n2_o + * + * @param float $fuel_n2_o N2O emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelN2O($fuel_n2_o) + { + if (is_null($fuel_n2_o)) { + throw new \InvalidArgumentException('non-nullable fuel_n2_o cannot be null'); + } + $this->container['fuel_n2_o'] = $fuel_n2_o; + + return $this; + } + + /** + * Gets urea_co2 + * + * @return float + */ + public function getUreaCo2() + { + return $this->container['urea_co2']; + } + + /** + * Sets urea_co2 + * + * @param float $urea_co2 CO2 emissions from urea, in tonnes-CO2e + * + * @return self + */ + public function setUreaCo2($urea_co2) + { + if (is_null($urea_co2)) { + throw new \InvalidArgumentException('non-nullable urea_co2 cannot be null'); + } + $this->container['urea_co2'] = $urea_co2; + + return $this; + } + + /** + * Gets lime_co2 + * + * @return float + */ + public function getLimeCo2() + { + return $this->container['lime_co2']; + } + + /** + * Sets lime_co2 + * + * @param float $lime_co2 CO2 emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLimeCo2($lime_co2) + { + if (is_null($lime_co2)) { + throw new \InvalidArgumentException('non-nullable lime_co2 cannot be null'); + } + $this->container['lime_co2'] = $lime_co2; + + return $this; + } + + /** + * Gets fertiliser_n2_o + * + * @return float + */ + public function getFertiliserN2O() + { + return $this->container['fertiliser_n2_o']; + } + + /** + * Sets fertiliser_n2_o + * + * @param float $fertiliser_n2_o N2O emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliserN2O($fertiliser_n2_o) + { + if (is_null($fertiliser_n2_o)) { + throw new \InvalidArgumentException('non-nullable fertiliser_n2_o cannot be null'); + } + $this->container['fertiliser_n2_o'] = $fertiliser_n2_o; + + return $this; + } + + /** + * Gets enteric_ch4 + * + * @return float + */ + public function getEntericCh4() + { + return $this->container['enteric_ch4']; + } + + /** + * Sets enteric_ch4 + * + * @param float $enteric_ch4 CH4 emissions from enteric fermentation, in tonnes-CO2e + * + * @return self + */ + public function setEntericCh4($enteric_ch4) + { + if (is_null($enteric_ch4)) { + throw new \InvalidArgumentException('non-nullable enteric_ch4 cannot be null'); + } + $this->container['enteric_ch4'] = $enteric_ch4; + + return $this; + } + + /** + * Gets manure_management_ch4 + * + * @return float + */ + public function getManureManagementCh4() + { + return $this->container['manure_management_ch4']; + } + + /** + * Sets manure_management_ch4 + * + * @param float $manure_management_ch4 CH4 emissions from manure management, in tonnes-CO2e + * + * @return self + */ + public function setManureManagementCh4($manure_management_ch4) + { + if (is_null($manure_management_ch4)) { + throw new \InvalidArgumentException('non-nullable manure_management_ch4 cannot be null'); + } + $this->container['manure_management_ch4'] = $manure_management_ch4; + + return $this; + } + + /** + * Gets urine_and_dung_n2_o + * + * @return float + */ + public function getUrineAndDungN2O() + { + return $this->container['urine_and_dung_n2_o']; + } + + /** + * Sets urine_and_dung_n2_o + * + * @param float $urine_and_dung_n2_o N2O emissions from urine and dung, in tonnes-CO2e + * + * @return self + */ + public function setUrineAndDungN2O($urine_and_dung_n2_o) + { + if (is_null($urine_and_dung_n2_o)) { + throw new \InvalidArgumentException('non-nullable urine_and_dung_n2_o cannot be null'); + } + $this->container['urine_and_dung_n2_o'] = $urine_and_dung_n2_o; + + return $this; + } + + /** + * Gets atmospheric_deposition_n2_o + * + * @return float + */ + public function getAtmosphericDepositionN2O() + { + return $this->container['atmospheric_deposition_n2_o']; + } + + /** + * Sets atmospheric_deposition_n2_o + * + * @param float $atmospheric_deposition_n2_o N2O emissions from atmospheric deposition, in tonnes-CO2e + * + * @return self + */ + public function setAtmosphericDepositionN2O($atmospheric_deposition_n2_o) + { + if (is_null($atmospheric_deposition_n2_o)) { + throw new \InvalidArgumentException('non-nullable atmospheric_deposition_n2_o cannot be null'); + } + $this->container['atmospheric_deposition_n2_o'] = $atmospheric_deposition_n2_o; + + return $this; + } + + /** + * Gets leaching_and_runoff_n2_o + * + * @return float + */ + public function getLeachingAndRunoffN2O() + { + return $this->container['leaching_and_runoff_n2_o']; + } + + /** + * Sets leaching_and_runoff_n2_o + * + * @param float $leaching_and_runoff_n2_o N2O emissions from leeching and runoff, in tonnes-CO2e + * + * @return self + */ + public function setLeachingAndRunoffN2O($leaching_and_runoff_n2_o) + { + if (is_null($leaching_and_runoff_n2_o)) { + throw new \InvalidArgumentException('non-nullable leaching_and_runoff_n2_o cannot be null'); + } + $this->container['leaching_and_runoff_n2_o'] = $leaching_and_runoff_n2_o; + + return $this; + } + + /** + * Gets total_co2 + * + * @return float + */ + public function getTotalCo2() + { + return $this->container['total_co2']; + } + + /** + * Sets total_co2 + * + * @param float $total_co2 Total CO2 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCo2($total_co2) + { + if (is_null($total_co2)) { + throw new \InvalidArgumentException('non-nullable total_co2 cannot be null'); + } + $this->container['total_co2'] = $total_co2; + + return $this; + } + + /** + * Gets total_ch4 + * + * @return float + */ + public function getTotalCh4() + { + return $this->container['total_ch4']; + } + + /** + * Sets total_ch4 + * + * @param float $total_ch4 Total CH4 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCh4($total_ch4) + { + if (is_null($total_ch4)) { + throw new \InvalidArgumentException('non-nullable total_ch4 cannot be null'); + } + $this->container['total_ch4'] = $total_ch4; + + return $this; + } + + /** + * Gets total_n2_o + * + * @return float + */ + public function getTotalN2O() + { + return $this->container['total_n2_o']; + } + + /** + * Sets total_n2_o + * + * @param float $total_n2_o Total N2O scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalN2O($total_n2_o) + { + if (is_null($total_n2_o)) { + throw new \InvalidArgumentException('non-nullable total_n2_o cannot be null'); + } + $this->container['total_n2_o'] = $total_n2_o; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseScope3.php b/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseScope3.php new file mode 100644 index 00000000..4780ab63 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffalo200ResponseScope3.php @@ -0,0 +1,673 @@ + + */ +class PostBuffalo200ResponseScope3 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_200_response_scope3'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fertiliser' => 'float', + 'purchased_feed' => 'float', + 'herbicide' => 'float', + 'electricity' => 'float', + 'fuel' => 'float', + 'lime' => 'float', + 'purchased_livestock' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fertiliser' => null, + 'purchased_feed' => null, + 'herbicide' => null, + 'electricity' => null, + 'fuel' => null, + 'lime' => null, + 'purchased_livestock' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fertiliser' => false, + 'purchased_feed' => false, + 'herbicide' => false, + 'electricity' => false, + 'fuel' => false, + 'lime' => false, + 'purchased_livestock' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fertiliser' => 'fertiliser', + 'purchased_feed' => 'purchasedFeed', + 'herbicide' => 'herbicide', + 'electricity' => 'electricity', + 'fuel' => 'fuel', + 'lime' => 'lime', + 'purchased_livestock' => 'purchasedLivestock', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fertiliser' => 'setFertiliser', + 'purchased_feed' => 'setPurchasedFeed', + 'herbicide' => 'setHerbicide', + 'electricity' => 'setElectricity', + 'fuel' => 'setFuel', + 'lime' => 'setLime', + 'purchased_livestock' => 'setPurchasedLivestock', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fertiliser' => 'getFertiliser', + 'purchased_feed' => 'getPurchasedFeed', + 'herbicide' => 'getHerbicide', + 'electricity' => 'getElectricity', + 'fuel' => 'getFuel', + 'lime' => 'getLime', + 'purchased_livestock' => 'getPurchasedLivestock', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('purchased_feed', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('electricity', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('lime', $data ?? [], null); + $this->setIfExists('purchased_livestock', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['purchased_feed'] === null) { + $invalidProperties[] = "'purchased_feed' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['electricity'] === null) { + $invalidProperties[] = "'electricity' can't be null"; + } + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['lime'] === null) { + $invalidProperties[] = "'lime' can't be null"; + } + if ($this->container['purchased_livestock'] === null) { + $invalidProperties[] = "'purchased_livestock' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fertiliser + * + * @return float + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param float $fertiliser Emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets purchased_feed + * + * @return float + */ + public function getPurchasedFeed() + { + return $this->container['purchased_feed']; + } + + /** + * Sets purchased_feed + * + * @param float $purchased_feed Emissions from purchased feed, in tonnes-CO2e + * + * @return self + */ + public function setPurchasedFeed($purchased_feed) + { + if (is_null($purchased_feed)) { + throw new \InvalidArgumentException('non-nullable purchased_feed cannot be null'); + } + $this->container['purchased_feed'] = $purchased_feed; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Emissions from herbicide, in tonnes-CO2e + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets electricity + * + * @return float + */ + public function getElectricity() + { + return $this->container['electricity']; + } + + /** + * Sets electricity + * + * @param float $electricity Emissions from electricity, in tonnes-CO2e + * + * @return self + */ + public function setElectricity($electricity) + { + if (is_null($electricity)) { + throw new \InvalidArgumentException('non-nullable electricity cannot be null'); + } + $this->container['electricity'] = $electricity; + + return $this; + } + + /** + * Gets fuel + * + * @return float + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param float $fuel Emissions from fuel, in tonnes-CO2e + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets lime + * + * @return float + */ + public function getLime() + { + return $this->container['lime']; + } + + /** + * Sets lime + * + * @param float $lime Emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLime($lime) + { + if (is_null($lime)) { + throw new \InvalidArgumentException('non-nullable lime cannot be null'); + } + $this->container['lime'] = $lime; + + return $this; + } + + /** + * Gets purchased_livestock + * + * @return float + */ + public function getPurchasedLivestock() + { + return $this->container['purchased_livestock']; + } + + /** + * Sets purchased_livestock + * + * @param float $purchased_livestock Emissions from purchased livestock, in tonnes-CO2e + * + * @return self + */ + public function setPurchasedLivestock($purchased_livestock) + { + if (is_null($purchased_livestock)) { + throw new \InvalidArgumentException('non-nullable purchased_livestock cannot be null'); + } + $this->container['purchased_livestock'] = $purchased_livestock; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 3 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequest.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequest.php new file mode 100644 index 00000000..f330ebd7 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequest.php @@ -0,0 +1,573 @@ + + */ +class PostBuffaloRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'rainfall_above600' => 'bool', + 'buffalos' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInner[]', + 'vegetation' => '\OpenAPI\Client\Model\PostBuffaloRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'rainfall_above600' => null, + 'buffalos' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'rainfall_above600' => false, + 'buffalos' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'rainfall_above600' => 'rainfallAbove600', + 'buffalos' => 'buffalos', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'rainfall_above600' => 'setRainfallAbove600', + 'buffalos' => 'setBuffalos', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'rainfall_above600' => 'getRainfallAbove600', + 'buffalos' => 'getBuffalos', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('rainfall_above600', $data ?? [], null); + $this->setIfExists('buffalos', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['rainfall_above600'] === null) { + $invalidProperties[] = "'rainfall_above600' can't be null"; + } + if ($this->container['buffalos'] === null) { + $invalidProperties[] = "'buffalos' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets rainfall_above600 + * + * @return bool + */ + public function getRainfallAbove600() + { + return $this->container['rainfall_above600']; + } + + /** + * Sets rainfall_above600 + * + * @param bool $rainfall_above600 Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm + * + * @return self + */ + public function setRainfallAbove600($rainfall_above600) + { + if (is_null($rainfall_above600)) { + throw new \InvalidArgumentException('non-nullable rainfall_above600 cannot be null'); + } + $this->container['rainfall_above600'] = $rainfall_above600; + + return $this; + } + + /** + * Gets buffalos + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInner[] + */ + public function getBuffalos() + { + return $this->container['buffalos']; + } + + /** + * Sets buffalos + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInner[] $buffalos buffalos + * + * @return self + */ + public function setBuffalos($buffalos) + { + if (is_null($buffalos)) { + throw new \InvalidArgumentException('non-nullable buffalos cannot be null'); + } + $this->container['buffalos'] = $buffalos; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInner.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInner.php new file mode 100644 index 00000000..2babd0cc --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInner.php @@ -0,0 +1,1052 @@ + + */ +class PostBuffaloRequestBuffalosInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_buffalos_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'classes' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClasses', + 'limestone' => 'float', + 'limestone_fraction' => 'float', + 'fertiliser' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser', + 'diesel' => 'float', + 'petrol' => 'float', + 'lpg' => 'float', + 'electricity_source' => 'string', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'grain_feed' => 'float', + 'hay_feed' => 'float', + 'herbicide' => 'float', + 'herbicide_other' => 'float', + 'cows_calving' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerCowsCalving', + 'seasonal_calving' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerSeasonalCalving' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'classes' => null, + 'limestone' => null, + 'limestone_fraction' => null, + 'fertiliser' => null, + 'diesel' => null, + 'petrol' => null, + 'lpg' => null, + 'electricity_source' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'grain_feed' => null, + 'hay_feed' => null, + 'herbicide' => null, + 'herbicide_other' => null, + 'cows_calving' => null, + 'seasonal_calving' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'classes' => false, + 'limestone' => false, + 'limestone_fraction' => false, + 'fertiliser' => false, + 'diesel' => false, + 'petrol' => false, + 'lpg' => false, + 'electricity_source' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'grain_feed' => false, + 'hay_feed' => false, + 'herbicide' => false, + 'herbicide_other' => false, + 'cows_calving' => false, + 'seasonal_calving' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'classes' => 'classes', + 'limestone' => 'limestone', + 'limestone_fraction' => 'limestoneFraction', + 'fertiliser' => 'fertiliser', + 'diesel' => 'diesel', + 'petrol' => 'petrol', + 'lpg' => 'lpg', + 'electricity_source' => 'electricitySource', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'grain_feed' => 'grainFeed', + 'hay_feed' => 'hayFeed', + 'herbicide' => 'herbicide', + 'herbicide_other' => 'herbicideOther', + 'cows_calving' => 'cowsCalving', + 'seasonal_calving' => 'seasonalCalving' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'classes' => 'setClasses', + 'limestone' => 'setLimestone', + 'limestone_fraction' => 'setLimestoneFraction', + 'fertiliser' => 'setFertiliser', + 'diesel' => 'setDiesel', + 'petrol' => 'setPetrol', + 'lpg' => 'setLpg', + 'electricity_source' => 'setElectricitySource', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'grain_feed' => 'setGrainFeed', + 'hay_feed' => 'setHayFeed', + 'herbicide' => 'setHerbicide', + 'herbicide_other' => 'setHerbicideOther', + 'cows_calving' => 'setCowsCalving', + 'seasonal_calving' => 'setSeasonalCalving' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'classes' => 'getClasses', + 'limestone' => 'getLimestone', + 'limestone_fraction' => 'getLimestoneFraction', + 'fertiliser' => 'getFertiliser', + 'diesel' => 'getDiesel', + 'petrol' => 'getPetrol', + 'lpg' => 'getLpg', + 'electricity_source' => 'getElectricitySource', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'grain_feed' => 'getGrainFeed', + 'hay_feed' => 'getHayFeed', + 'herbicide' => 'getHerbicide', + 'herbicide_other' => 'getHerbicideOther', + 'cows_calving' => 'getCowsCalving', + 'seasonal_calving' => 'getSeasonalCalving' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const ELECTRICITY_SOURCE_STATE_GRID = 'State Grid'; + public const ELECTRICITY_SOURCE_RENEWABLE = 'Renewable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getElectricitySourceAllowableValues() + { + return [ + self::ELECTRICITY_SOURCE_STATE_GRID, + self::ELECTRICITY_SOURCE_RENEWABLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('classes', $data ?? [], null); + $this->setIfExists('limestone', $data ?? [], null); + $this->setIfExists('limestone_fraction', $data ?? [], null); + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('diesel', $data ?? [], null); + $this->setIfExists('petrol', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + $this->setIfExists('electricity_source', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('grain_feed', $data ?? [], null); + $this->setIfExists('hay_feed', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('herbicide_other', $data ?? [], null); + $this->setIfExists('cows_calving', $data ?? [], null); + $this->setIfExists('seasonal_calving', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['classes'] === null) { + $invalidProperties[] = "'classes' can't be null"; + } + if ($this->container['limestone'] === null) { + $invalidProperties[] = "'limestone' can't be null"; + } + if ($this->container['limestone_fraction'] === null) { + $invalidProperties[] = "'limestone_fraction' can't be null"; + } + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['diesel'] === null) { + $invalidProperties[] = "'diesel' can't be null"; + } + if ($this->container['petrol'] === null) { + $invalidProperties[] = "'petrol' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + if ($this->container['electricity_source'] === null) { + $invalidProperties[] = "'electricity_source' can't be null"; + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!is_null($this->container['electricity_source']) && !in_array($this->container['electricity_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'electricity_source', must be one of '%s'", + $this->container['electricity_source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['grain_feed'] === null) { + $invalidProperties[] = "'grain_feed' can't be null"; + } + if ($this->container['hay_feed'] === null) { + $invalidProperties[] = "'hay_feed' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['herbicide_other'] === null) { + $invalidProperties[] = "'herbicide_other' can't be null"; + } + if ($this->container['cows_calving'] === null) { + $invalidProperties[] = "'cows_calving' can't be null"; + } + if ($this->container['seasonal_calving'] === null) { + $invalidProperties[] = "'seasonal_calving' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets classes + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClasses + */ + public function getClasses() + { + return $this->container['classes']; + } + + /** + * Sets classes + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClasses $classes classes + * + * @return self + */ + public function setClasses($classes) + { + if (is_null($classes)) { + throw new \InvalidArgumentException('non-nullable classes cannot be null'); + } + $this->container['classes'] = $classes; + + return $this; + } + + /** + * Gets limestone + * + * @return float + */ + public function getLimestone() + { + return $this->container['limestone']; + } + + /** + * Sets limestone + * + * @param float $limestone Lime applied in tonnes + * + * @return self + */ + public function setLimestone($limestone) + { + if (is_null($limestone)) { + throw new \InvalidArgumentException('non-nullable limestone cannot be null'); + } + $this->container['limestone'] = $limestone; + + return $this; + } + + /** + * Gets limestone_fraction + * + * @return float + */ + public function getLimestoneFraction() + { + return $this->container['limestone_fraction']; + } + + /** + * Sets limestone_fraction + * + * @param float $limestone_fraction Fraction of lime as limestone vs dolomite, between 0 and 1 + * + * @return self + */ + public function setLimestoneFraction($limestone_fraction) + { + if (is_null($limestone_fraction)) { + throw new \InvalidArgumentException('non-nullable limestone_fraction cannot be null'); + } + $this->container['limestone_fraction'] = $limestone_fraction; + + return $this; + } + + /** + * Gets fertiliser + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser $fertiliser fertiliser + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets diesel + * + * @return float + */ + public function getDiesel() + { + return $this->container['diesel']; + } + + /** + * Sets diesel + * + * @param float $diesel Diesel usage in L (litres) + * + * @return self + */ + public function setDiesel($diesel) + { + if (is_null($diesel)) { + throw new \InvalidArgumentException('non-nullable diesel cannot be null'); + } + $this->container['diesel'] = $diesel; + + return $this; + } + + /** + * Gets petrol + * + * @return float + */ + public function getPetrol() + { + return $this->container['petrol']; + } + + /** + * Sets petrol + * + * @param float $petrol Petrol usage in L (litres) + * + * @return self + */ + public function setPetrol($petrol) + { + if (is_null($petrol)) { + throw new \InvalidArgumentException('non-nullable petrol cannot be null'); + } + $this->container['petrol'] = $petrol; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + + /** + * Gets electricity_source + * + * @return string + */ + public function getElectricitySource() + { + return $this->container['electricity_source']; + } + + /** + * Sets electricity_source + * + * @param string $electricity_source Source of electricity + * + * @return self + */ + public function setElectricitySource($electricity_source) + { + if (is_null($electricity_source)) { + throw new \InvalidArgumentException('non-nullable electricity_source cannot be null'); + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!in_array($electricity_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'electricity_source', must be one of '%s'", + $electricity_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['electricity_source'] = $electricity_source; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostBuffaloRequestBuffalosInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostBuffaloRequestBuffalosInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets grain_feed + * + * @return float + */ + public function getGrainFeed() + { + return $this->container['grain_feed']; + } + + /** + * Sets grain_feed + * + * @param float $grain_feed Grain purchased for cattle feed in tonnes + * + * @return self + */ + public function setGrainFeed($grain_feed) + { + if (is_null($grain_feed)) { + throw new \InvalidArgumentException('non-nullable grain_feed cannot be null'); + } + $this->container['grain_feed'] = $grain_feed; + + return $this; + } + + /** + * Gets hay_feed + * + * @return float + */ + public function getHayFeed() + { + return $this->container['hay_feed']; + } + + /** + * Sets hay_feed + * + * @param float $hay_feed Hay purchased for cattle feed in tonnes + * + * @return self + */ + public function setHayFeed($hay_feed) + { + if (is_null($hay_feed)) { + throw new \InvalidArgumentException('non-nullable hay_feed cannot be null'); + } + $this->container['hay_feed'] = $hay_feed; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets herbicide_other + * + * @return float + */ + public function getHerbicideOther() + { + return $this->container['herbicide_other']; + } + + /** + * Sets herbicide_other + * + * @param float $herbicide_other Total amount of active ingredients of from other herbicides in kg (kilograms) + * + * @return self + */ + public function setHerbicideOther($herbicide_other) + { + if (is_null($herbicide_other)) { + throw new \InvalidArgumentException('non-nullable herbicide_other cannot be null'); + } + $this->container['herbicide_other'] = $herbicide_other; + + return $this; + } + + /** + * Gets cows_calving + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerCowsCalving + */ + public function getCowsCalving() + { + return $this->container['cows_calving']; + } + + /** + * Sets cows_calving + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerCowsCalving $cows_calving cows_calving + * + * @return self + */ + public function setCowsCalving($cows_calving) + { + if (is_null($cows_calving)) { + throw new \InvalidArgumentException('non-nullable cows_calving cannot be null'); + } + $this->container['cows_calving'] = $cows_calving; + + return $this; + } + + /** + * Gets seasonal_calving + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerSeasonalCalving + */ + public function getSeasonalCalving() + { + return $this->container['seasonal_calving']; + } + + /** + * Sets seasonal_calving + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerSeasonalCalving $seasonal_calving seasonal_calving + * + * @return self + */ + public function setSeasonalCalving($seasonal_calving) + { + if (is_null($seasonal_calving)) { + throw new \InvalidArgumentException('non-nullable seasonal_calving cannot be null'); + } + $this->container['seasonal_calving'] = $seasonal_calving; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClasses.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClasses.php new file mode 100644 index 00000000..27910883 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClasses.php @@ -0,0 +1,649 @@ + + */ +class PostBuffaloRequestBuffalosInnerClasses implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_buffalos_inner_classes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bulls' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBulls', + 'trade_bulls' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeBulls', + 'cows' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesCows', + 'trade_cows' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeCows', + 'steers' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesSteers', + 'trade_steers' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeSteers', + 'calfs' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesCalfs', + 'trade_calfs' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeCalfs' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'bulls' => null, + 'trade_bulls' => null, + 'cows' => null, + 'trade_cows' => null, + 'steers' => null, + 'trade_steers' => null, + 'calfs' => null, + 'trade_calfs' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'bulls' => false, + 'trade_bulls' => false, + 'cows' => false, + 'trade_cows' => false, + 'steers' => false, + 'trade_steers' => false, + 'calfs' => false, + 'trade_calfs' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'bulls' => 'bulls', + 'trade_bulls' => 'tradeBulls', + 'cows' => 'cows', + 'trade_cows' => 'tradeCows', + 'steers' => 'steers', + 'trade_steers' => 'tradeSteers', + 'calfs' => 'calfs', + 'trade_calfs' => 'tradeCalfs' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bulls' => 'setBulls', + 'trade_bulls' => 'setTradeBulls', + 'cows' => 'setCows', + 'trade_cows' => 'setTradeCows', + 'steers' => 'setSteers', + 'trade_steers' => 'setTradeSteers', + 'calfs' => 'setCalfs', + 'trade_calfs' => 'setTradeCalfs' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bulls' => 'getBulls', + 'trade_bulls' => 'getTradeBulls', + 'cows' => 'getCows', + 'trade_cows' => 'getTradeCows', + 'steers' => 'getSteers', + 'trade_steers' => 'getTradeSteers', + 'calfs' => 'getCalfs', + 'trade_calfs' => 'getTradeCalfs' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('bulls', $data ?? [], null); + $this->setIfExists('trade_bulls', $data ?? [], null); + $this->setIfExists('cows', $data ?? [], null); + $this->setIfExists('trade_cows', $data ?? [], null); + $this->setIfExists('steers', $data ?? [], null); + $this->setIfExists('trade_steers', $data ?? [], null); + $this->setIfExists('calfs', $data ?? [], null); + $this->setIfExists('trade_calfs', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets bulls + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBulls|null + */ + public function getBulls() + { + return $this->container['bulls']; + } + + /** + * Sets bulls + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBulls|null $bulls bulls + * + * @return self + */ + public function setBulls($bulls) + { + if (is_null($bulls)) { + throw new \InvalidArgumentException('non-nullable bulls cannot be null'); + } + $this->container['bulls'] = $bulls; + + return $this; + } + + /** + * Gets trade_bulls + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeBulls|null + */ + public function getTradeBulls() + { + return $this->container['trade_bulls']; + } + + /** + * Sets trade_bulls + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeBulls|null $trade_bulls trade_bulls + * + * @return self + */ + public function setTradeBulls($trade_bulls) + { + if (is_null($trade_bulls)) { + throw new \InvalidArgumentException('non-nullable trade_bulls cannot be null'); + } + $this->container['trade_bulls'] = $trade_bulls; + + return $this; + } + + /** + * Gets cows + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesCows|null + */ + public function getCows() + { + return $this->container['cows']; + } + + /** + * Sets cows + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesCows|null $cows cows + * + * @return self + */ + public function setCows($cows) + { + if (is_null($cows)) { + throw new \InvalidArgumentException('non-nullable cows cannot be null'); + } + $this->container['cows'] = $cows; + + return $this; + } + + /** + * Gets trade_cows + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeCows|null + */ + public function getTradeCows() + { + return $this->container['trade_cows']; + } + + /** + * Sets trade_cows + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeCows|null $trade_cows trade_cows + * + * @return self + */ + public function setTradeCows($trade_cows) + { + if (is_null($trade_cows)) { + throw new \InvalidArgumentException('non-nullable trade_cows cannot be null'); + } + $this->container['trade_cows'] = $trade_cows; + + return $this; + } + + /** + * Gets steers + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesSteers|null + */ + public function getSteers() + { + return $this->container['steers']; + } + + /** + * Sets steers + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesSteers|null $steers steers + * + * @return self + */ + public function setSteers($steers) + { + if (is_null($steers)) { + throw new \InvalidArgumentException('non-nullable steers cannot be null'); + } + $this->container['steers'] = $steers; + + return $this; + } + + /** + * Gets trade_steers + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeSteers|null + */ + public function getTradeSteers() + { + return $this->container['trade_steers']; + } + + /** + * Sets trade_steers + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeSteers|null $trade_steers trade_steers + * + * @return self + */ + public function setTradeSteers($trade_steers) + { + if (is_null($trade_steers)) { + throw new \InvalidArgumentException('non-nullable trade_steers cannot be null'); + } + $this->container['trade_steers'] = $trade_steers; + + return $this; + } + + /** + * Gets calfs + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesCalfs|null + */ + public function getCalfs() + { + return $this->container['calfs']; + } + + /** + * Sets calfs + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesCalfs|null $calfs calfs + * + * @return self + */ + public function setCalfs($calfs) + { + if (is_null($calfs)) { + throw new \InvalidArgumentException('non-nullable calfs cannot be null'); + } + $this->container['calfs'] = $calfs; + + return $this; + } + + /** + * Gets trade_calfs + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeCalfs|null + */ + public function getTradeCalfs() + { + return $this->container['trade_calfs']; + } + + /** + * Sets trade_calfs + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeCalfs|null $trade_calfs trade_calfs + * + * @return self + */ + public function setTradeCalfs($trade_calfs) + { + if (is_null($trade_calfs)) { + throw new \InvalidArgumentException('non-nullable trade_calfs cannot be null'); + } + $this->container['trade_calfs'] = $trade_calfs; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesBulls.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesBulls.php new file mode 100644 index 00000000..94f9a5fe --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesBulls.php @@ -0,0 +1,633 @@ + + */ +class PostBuffaloRequestBuffalosInnerClassesBulls implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_buffalos_inner_classes_bulls'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.php new file mode 100644 index 00000000..17b0f558 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.php @@ -0,0 +1,413 @@ + + */ +class PostBuffaloRequestBuffalosInnerClassesBullsAutumn implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_buffalos_inner_classes_bulls_autumn'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'head' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'head' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'head' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'head' => 'head' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'head' => 'setHead' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'head' => 'getHead' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('head', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['head'] === null) { + $invalidProperties[] = "'head' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets head + * + * @return float + */ + public function getHead() + { + return $this->container['head']; + } + + /** + * Sets head + * + * @param float $head Number of animals (head) + * + * @return self + */ + public function setHead($head) + { + if (is_null($head)) { + throw new \InvalidArgumentException('non-nullable head cannot be null'); + } + $this->container['head'] = $head; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.php new file mode 100644 index 00000000..282437a0 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.php @@ -0,0 +1,450 @@ + + */ +class PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'head' => 'float', + 'purchase_weight' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'head' => null, + 'purchase_weight' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'head' => false, + 'purchase_weight' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'head' => 'head', + 'purchase_weight' => 'purchaseWeight' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'head' => 'setHead', + 'purchase_weight' => 'setPurchaseWeight' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'head' => 'getHead', + 'purchase_weight' => 'getPurchaseWeight' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('head', $data ?? [], null); + $this->setIfExists('purchase_weight', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['head'] === null) { + $invalidProperties[] = "'head' can't be null"; + } + if ($this->container['purchase_weight'] === null) { + $invalidProperties[] = "'purchase_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets head + * + * @return float + */ + public function getHead() + { + return $this->container['head']; + } + + /** + * Sets head + * + * @param float $head Number of animals purchased (head) + * + * @return self + */ + public function setHead($head) + { + if (is_null($head)) { + throw new \InvalidArgumentException('non-nullable head cannot be null'); + } + $this->container['head'] = $head; + + return $this; + } + + /** + * Gets purchase_weight + * + * @return float + */ + public function getPurchaseWeight() + { + return $this->container['purchase_weight']; + } + + /** + * Sets purchase_weight + * + * @param float $purchase_weight Weight at purchase, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setPurchaseWeight($purchase_weight) + { + if (is_null($purchase_weight)) { + throw new \InvalidArgumentException('non-nullable purchase_weight cannot be null'); + } + $this->container['purchase_weight'] = $purchase_weight; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.php new file mode 100644 index 00000000..931337ee --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.php @@ -0,0 +1,633 @@ + + */ +class PostBuffaloRequestBuffalosInnerClassesCalfs implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_buffalos_inner_classes_calfs'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesCows.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesCows.php new file mode 100644 index 00000000..5adf938d --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesCows.php @@ -0,0 +1,633 @@ + + */ +class PostBuffaloRequestBuffalosInnerClassesCows implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_buffalos_inner_classes_cows'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesSteers.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesSteers.php new file mode 100644 index 00000000..49458b5d --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesSteers.php @@ -0,0 +1,633 @@ + + */ +class PostBuffaloRequestBuffalosInnerClassesSteers implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_buffalos_inner_classes_steers'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.php new file mode 100644 index 00000000..df7b0652 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.php @@ -0,0 +1,633 @@ + + */ +class PostBuffaloRequestBuffalosInnerClassesTradeBulls implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_buffalos_inner_classes_tradeBulls'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.php new file mode 100644 index 00000000..791cdaec --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.php @@ -0,0 +1,633 @@ + + */ +class PostBuffaloRequestBuffalosInnerClassesTradeCalfs implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_buffalos_inner_classes_tradeCalfs'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.php new file mode 100644 index 00000000..b624a1a4 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.php @@ -0,0 +1,633 @@ + + */ +class PostBuffaloRequestBuffalosInnerClassesTradeCows implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_buffalos_inner_classes_tradeCows'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.php new file mode 100644 index 00000000..01550d70 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.php @@ -0,0 +1,633 @@ + + */ +class PostBuffaloRequestBuffalosInnerClassesTradeSteers implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_buffalos_inner_classes_tradeSteers'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerCowsCalving.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerCowsCalving.php new file mode 100644 index 00000000..570b5918 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerCowsCalving.php @@ -0,0 +1,525 @@ + + */ +class PostBuffaloRequestBuffalosInnerCowsCalving implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_buffalos_inner_cowsCalving'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'spring' => 'float', + 'summer' => 'float', + 'autumn' => 'float', + 'winter' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'spring' => null, + 'summer' => null, + 'autumn' => null, + 'winter' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'spring' => false, + 'summer' => false, + 'autumn' => false, + 'winter' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'spring' => 'spring', + 'summer' => 'summer', + 'autumn' => 'autumn', + 'winter' => 'winter' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'autumn' => 'setAutumn', + 'winter' => 'setWinter' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'autumn' => 'getAutumn', + 'winter' => 'getWinter' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.php new file mode 100644 index 00000000..ba4074b1 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.php @@ -0,0 +1,525 @@ + + */ +class PostBuffaloRequestBuffalosInnerSeasonalCalving implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_buffalos_inner_seasonalCalving'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'spring' => 'float', + 'summer' => 'float', + 'autumn' => 'float', + 'winter' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'spring' => null, + 'summer' => null, + 'autumn' => null, + 'winter' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'spring' => false, + 'summer' => false, + 'autumn' => false, + 'winter' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'spring' => 'spring', + 'summer' => 'summer', + 'autumn' => 'autumn', + 'winter' => 'winter' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'autumn' => 'setAutumn', + 'winter' => 'setWinter' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'autumn' => 'getAutumn', + 'winter' => 'getWinter' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestVegetationInner.php b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestVegetationInner.php new file mode 100644 index 00000000..8f43b1f0 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostBuffaloRequestVegetationInner.php @@ -0,0 +1,451 @@ + + */ +class PostBuffaloRequestVegetationInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_buffalo_request_vegetation_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'vegetation' => '\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation', + 'buffalo_proportion' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'vegetation' => null, + 'buffalo_proportion' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'vegetation' => false, + 'buffalo_proportion' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vegetation' => 'vegetation', + 'buffalo_proportion' => 'buffaloProportion' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vegetation' => 'setVegetation', + 'buffalo_proportion' => 'setBuffaloProportion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vegetation' => 'getVegetation', + 'buffalo_proportion' => 'getBuffaloProportion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('vegetation', $data ?? [], null); + $this->setIfExists('buffalo_proportion', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + if ($this->container['buffalo_proportion'] === null) { + $invalidProperties[] = "'buffalo_proportion' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + + /** + * Gets buffalo_proportion + * + * @return float[] + */ + public function getBuffaloProportion() + { + return $this->container['buffalo_proportion']; + } + + /** + * Sets buffalo_proportion + * + * @param float[] $buffalo_proportion The proportion of the sequestration that is allocated to Buffalo + * + * @return self + */ + public function setBuffaloProportion($buffalo_proportion) + { + if (is_null($buffalo_proportion)) { + throw new \InvalidArgumentException('non-nullable buffalo_proportion cannot be null'); + } + $this->container['buffalo_proportion'] = $buffalo_proportion; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostCotton200Response.php b/examples/php-api-client/api-client/lib/Model/PostCotton200Response.php new file mode 100644 index 00000000..d04ce110 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostCotton200Response.php @@ -0,0 +1,636 @@ + + */ +class PostCotton200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_cotton_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostCotton200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostCotton200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'intermediate' => '\OpenAPI\Client\Model\PostCotton200ResponseIntermediateInner[]', + 'net' => '\OpenAPI\Client\Model\PostCotton200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostCotton200ResponseIntermediateInnerIntensities[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intermediate' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intermediate' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intermediate' => 'intermediate', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intermediate' => 'setIntermediate', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intermediate' => 'getIntermediate', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseIntermediateInnerIntensities[] + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseIntermediateInnerIntensities[] $intensities Emissions intensity for each crop (in order) + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseIntermediateInner.php new file mode 100644 index 00000000..d91368a7 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseIntermediateInner.php @@ -0,0 +1,636 @@ + + */ +class PostCotton200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_cotton_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostCotton200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostCotton200ResponseScope3', + 'intensities' => '\OpenAPI\Client\Model\PostCotton200ResponseIntermediateInnerIntensities', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'intensities' => null, + 'net' => null, + 'carbon_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'intensities' => false, + 'net' => false, + 'carbon_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'intensities' => 'intensities', + 'net' => 'net', + 'carbon_sequestration' => 'carbonSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'intensities' => 'setIntensities', + 'net' => 'setNet', + 'carbon_sequestration' => 'setCarbonSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'intensities' => 'getIntensities', + 'net' => 'getNet', + 'carbon_sequestration' => 'getCarbonSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseIntermediateInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseIntermediateInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseIntermediateInnerIntensities.php b/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseIntermediateInnerIntensities.php new file mode 100644 index 00000000..2e98741b --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseIntermediateInnerIntensities.php @@ -0,0 +1,895 @@ + + */ +class PostCotton200ResponseIntermediateInnerIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_cotton_200_response_intermediate_inner_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'cotton_yield_produced_tonnes' => 'float', + 'bales_produced' => 'float', + 'lint_produced_tonnes' => 'float', + 'seed_produced_tonnes' => 'float', + 'tonnes_crop_excluding_sequestration' => 'float', + 'tonnes_crop_including_sequestration' => 'float', + 'bales_excluding_sequestration' => 'float', + 'bales_including_sequestration' => 'float', + 'lint_including_sequestration' => 'float', + 'lint_excluding_sequestration' => 'float', + 'seed_including_sequestration' => 'float', + 'seed_excluding_sequestration' => 'float', + 'lint_economic_allocation' => 'float', + 'seed_economic_allocation' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'cotton_yield_produced_tonnes' => null, + 'bales_produced' => null, + 'lint_produced_tonnes' => null, + 'seed_produced_tonnes' => null, + 'tonnes_crop_excluding_sequestration' => null, + 'tonnes_crop_including_sequestration' => null, + 'bales_excluding_sequestration' => null, + 'bales_including_sequestration' => null, + 'lint_including_sequestration' => null, + 'lint_excluding_sequestration' => null, + 'seed_including_sequestration' => null, + 'seed_excluding_sequestration' => null, + 'lint_economic_allocation' => null, + 'seed_economic_allocation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'cotton_yield_produced_tonnes' => false, + 'bales_produced' => false, + 'lint_produced_tonnes' => false, + 'seed_produced_tonnes' => false, + 'tonnes_crop_excluding_sequestration' => false, + 'tonnes_crop_including_sequestration' => false, + 'bales_excluding_sequestration' => false, + 'bales_including_sequestration' => false, + 'lint_including_sequestration' => false, + 'lint_excluding_sequestration' => false, + 'seed_including_sequestration' => false, + 'seed_excluding_sequestration' => false, + 'lint_economic_allocation' => false, + 'seed_economic_allocation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'cotton_yield_produced_tonnes' => 'cottonYieldProducedTonnes', + 'bales_produced' => 'balesProduced', + 'lint_produced_tonnes' => 'lintProducedTonnes', + 'seed_produced_tonnes' => 'seedProducedTonnes', + 'tonnes_crop_excluding_sequestration' => 'tonnesCropExcludingSequestration', + 'tonnes_crop_including_sequestration' => 'tonnesCropIncludingSequestration', + 'bales_excluding_sequestration' => 'balesExcludingSequestration', + 'bales_including_sequestration' => 'balesIncludingSequestration', + 'lint_including_sequestration' => 'lintIncludingSequestration', + 'lint_excluding_sequestration' => 'lintExcludingSequestration', + 'seed_including_sequestration' => 'seedIncludingSequestration', + 'seed_excluding_sequestration' => 'seedExcludingSequestration', + 'lint_economic_allocation' => 'lintEconomicAllocation', + 'seed_economic_allocation' => 'seedEconomicAllocation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cotton_yield_produced_tonnes' => 'setCottonYieldProducedTonnes', + 'bales_produced' => 'setBalesProduced', + 'lint_produced_tonnes' => 'setLintProducedTonnes', + 'seed_produced_tonnes' => 'setSeedProducedTonnes', + 'tonnes_crop_excluding_sequestration' => 'setTonnesCropExcludingSequestration', + 'tonnes_crop_including_sequestration' => 'setTonnesCropIncludingSequestration', + 'bales_excluding_sequestration' => 'setBalesExcludingSequestration', + 'bales_including_sequestration' => 'setBalesIncludingSequestration', + 'lint_including_sequestration' => 'setLintIncludingSequestration', + 'lint_excluding_sequestration' => 'setLintExcludingSequestration', + 'seed_including_sequestration' => 'setSeedIncludingSequestration', + 'seed_excluding_sequestration' => 'setSeedExcludingSequestration', + 'lint_economic_allocation' => 'setLintEconomicAllocation', + 'seed_economic_allocation' => 'setSeedEconomicAllocation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cotton_yield_produced_tonnes' => 'getCottonYieldProducedTonnes', + 'bales_produced' => 'getBalesProduced', + 'lint_produced_tonnes' => 'getLintProducedTonnes', + 'seed_produced_tonnes' => 'getSeedProducedTonnes', + 'tonnes_crop_excluding_sequestration' => 'getTonnesCropExcludingSequestration', + 'tonnes_crop_including_sequestration' => 'getTonnesCropIncludingSequestration', + 'bales_excluding_sequestration' => 'getBalesExcludingSequestration', + 'bales_including_sequestration' => 'getBalesIncludingSequestration', + 'lint_including_sequestration' => 'getLintIncludingSequestration', + 'lint_excluding_sequestration' => 'getLintExcludingSequestration', + 'seed_including_sequestration' => 'getSeedIncludingSequestration', + 'seed_excluding_sequestration' => 'getSeedExcludingSequestration', + 'lint_economic_allocation' => 'getLintEconomicAllocation', + 'seed_economic_allocation' => 'getSeedEconomicAllocation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('cotton_yield_produced_tonnes', $data ?? [], null); + $this->setIfExists('bales_produced', $data ?? [], null); + $this->setIfExists('lint_produced_tonnes', $data ?? [], null); + $this->setIfExists('seed_produced_tonnes', $data ?? [], null); + $this->setIfExists('tonnes_crop_excluding_sequestration', $data ?? [], null); + $this->setIfExists('tonnes_crop_including_sequestration', $data ?? [], null); + $this->setIfExists('bales_excluding_sequestration', $data ?? [], null); + $this->setIfExists('bales_including_sequestration', $data ?? [], null); + $this->setIfExists('lint_including_sequestration', $data ?? [], null); + $this->setIfExists('lint_excluding_sequestration', $data ?? [], null); + $this->setIfExists('seed_including_sequestration', $data ?? [], null); + $this->setIfExists('seed_excluding_sequestration', $data ?? [], null); + $this->setIfExists('lint_economic_allocation', $data ?? [], null); + $this->setIfExists('seed_economic_allocation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['cotton_yield_produced_tonnes'] === null) { + $invalidProperties[] = "'cotton_yield_produced_tonnes' can't be null"; + } + if ($this->container['bales_produced'] === null) { + $invalidProperties[] = "'bales_produced' can't be null"; + } + if ($this->container['lint_produced_tonnes'] === null) { + $invalidProperties[] = "'lint_produced_tonnes' can't be null"; + } + if ($this->container['seed_produced_tonnes'] === null) { + $invalidProperties[] = "'seed_produced_tonnes' can't be null"; + } + if ($this->container['tonnes_crop_excluding_sequestration'] === null) { + $invalidProperties[] = "'tonnes_crop_excluding_sequestration' can't be null"; + } + if ($this->container['tonnes_crop_including_sequestration'] === null) { + $invalidProperties[] = "'tonnes_crop_including_sequestration' can't be null"; + } + if ($this->container['bales_excluding_sequestration'] === null) { + $invalidProperties[] = "'bales_excluding_sequestration' can't be null"; + } + if ($this->container['bales_including_sequestration'] === null) { + $invalidProperties[] = "'bales_including_sequestration' can't be null"; + } + if ($this->container['lint_including_sequestration'] === null) { + $invalidProperties[] = "'lint_including_sequestration' can't be null"; + } + if ($this->container['lint_excluding_sequestration'] === null) { + $invalidProperties[] = "'lint_excluding_sequestration' can't be null"; + } + if ($this->container['seed_including_sequestration'] === null) { + $invalidProperties[] = "'seed_including_sequestration' can't be null"; + } + if ($this->container['seed_excluding_sequestration'] === null) { + $invalidProperties[] = "'seed_excluding_sequestration' can't be null"; + } + if ($this->container['lint_economic_allocation'] === null) { + $invalidProperties[] = "'lint_economic_allocation' can't be null"; + } + if ($this->container['seed_economic_allocation'] === null) { + $invalidProperties[] = "'seed_economic_allocation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets cotton_yield_produced_tonnes + * + * @return float + */ + public function getCottonYieldProducedTonnes() + { + return $this->container['cotton_yield_produced_tonnes']; + } + + /** + * Sets cotton_yield_produced_tonnes + * + * @param float $cotton_yield_produced_tonnes Cotton yield produced in tonnes + * + * @return self + */ + public function setCottonYieldProducedTonnes($cotton_yield_produced_tonnes) + { + if (is_null($cotton_yield_produced_tonnes)) { + throw new \InvalidArgumentException('non-nullable cotton_yield_produced_tonnes cannot be null'); + } + $this->container['cotton_yield_produced_tonnes'] = $cotton_yield_produced_tonnes; + + return $this; + } + + /** + * Gets bales_produced + * + * @return float + */ + public function getBalesProduced() + { + return $this->container['bales_produced']; + } + + /** + * Sets bales_produced + * + * @param float $bales_produced Number of bales produced + * + * @return self + */ + public function setBalesProduced($bales_produced) + { + if (is_null($bales_produced)) { + throw new \InvalidArgumentException('non-nullable bales_produced cannot be null'); + } + $this->container['bales_produced'] = $bales_produced; + + return $this; + } + + /** + * Gets lint_produced_tonnes + * + * @return float + */ + public function getLintProducedTonnes() + { + return $this->container['lint_produced_tonnes']; + } + + /** + * Sets lint_produced_tonnes + * + * @param float $lint_produced_tonnes Cotton lint produced in tonnes + * + * @return self + */ + public function setLintProducedTonnes($lint_produced_tonnes) + { + if (is_null($lint_produced_tonnes)) { + throw new \InvalidArgumentException('non-nullable lint_produced_tonnes cannot be null'); + } + $this->container['lint_produced_tonnes'] = $lint_produced_tonnes; + + return $this; + } + + /** + * Gets seed_produced_tonnes + * + * @return float + */ + public function getSeedProducedTonnes() + { + return $this->container['seed_produced_tonnes']; + } + + /** + * Sets seed_produced_tonnes + * + * @param float $seed_produced_tonnes Cotton seed produced in tonnes + * + * @return self + */ + public function setSeedProducedTonnes($seed_produced_tonnes) + { + if (is_null($seed_produced_tonnes)) { + throw new \InvalidArgumentException('non-nullable seed_produced_tonnes cannot be null'); + } + $this->container['seed_produced_tonnes'] = $seed_produced_tonnes; + + return $this; + } + + /** + * Gets tonnes_crop_excluding_sequestration + * + * @return float + */ + public function getTonnesCropExcludingSequestration() + { + return $this->container['tonnes_crop_excluding_sequestration']; + } + + /** + * Sets tonnes_crop_excluding_sequestration + * + * @param float $tonnes_crop_excluding_sequestration Emissions intensity excluding sequestration, in t-CO2e/t crop + * + * @return self + */ + public function setTonnesCropExcludingSequestration($tonnes_crop_excluding_sequestration) + { + if (is_null($tonnes_crop_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable tonnes_crop_excluding_sequestration cannot be null'); + } + $this->container['tonnes_crop_excluding_sequestration'] = $tonnes_crop_excluding_sequestration; + + return $this; + } + + /** + * Gets tonnes_crop_including_sequestration + * + * @return float + */ + public function getTonnesCropIncludingSequestration() + { + return $this->container['tonnes_crop_including_sequestration']; + } + + /** + * Sets tonnes_crop_including_sequestration + * + * @param float $tonnes_crop_including_sequestration Emissions intensity including sequestration, in t-CO2e/t crop + * + * @return self + */ + public function setTonnesCropIncludingSequestration($tonnes_crop_including_sequestration) + { + if (is_null($tonnes_crop_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable tonnes_crop_including_sequestration cannot be null'); + } + $this->container['tonnes_crop_including_sequestration'] = $tonnes_crop_including_sequestration; + + return $this; + } + + /** + * Gets bales_excluding_sequestration + * + * @return float + */ + public function getBalesExcludingSequestration() + { + return $this->container['bales_excluding_sequestration']; + } + + /** + * Sets bales_excluding_sequestration + * + * @param float $bales_excluding_sequestration Emissions intensity excluding sequestration, in t-CO2e/bale + * + * @return self + */ + public function setBalesExcludingSequestration($bales_excluding_sequestration) + { + if (is_null($bales_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable bales_excluding_sequestration cannot be null'); + } + $this->container['bales_excluding_sequestration'] = $bales_excluding_sequestration; + + return $this; + } + + /** + * Gets bales_including_sequestration + * + * @return float + */ + public function getBalesIncludingSequestration() + { + return $this->container['bales_including_sequestration']; + } + + /** + * Sets bales_including_sequestration + * + * @param float $bales_including_sequestration Emissions intensity including sequestration, in t-CO2e/bale + * + * @return self + */ + public function setBalesIncludingSequestration($bales_including_sequestration) + { + if (is_null($bales_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable bales_including_sequestration cannot be null'); + } + $this->container['bales_including_sequestration'] = $bales_including_sequestration; + + return $this; + } + + /** + * Gets lint_including_sequestration + * + * @return float + */ + public function getLintIncludingSequestration() + { + return $this->container['lint_including_sequestration']; + } + + /** + * Sets lint_including_sequestration + * + * @param float $lint_including_sequestration Emissions intensity of lint including sequestration, in t-CO2e/kg + * + * @return self + */ + public function setLintIncludingSequestration($lint_including_sequestration) + { + if (is_null($lint_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable lint_including_sequestration cannot be null'); + } + $this->container['lint_including_sequestration'] = $lint_including_sequestration; + + return $this; + } + + /** + * Gets lint_excluding_sequestration + * + * @return float + */ + public function getLintExcludingSequestration() + { + return $this->container['lint_excluding_sequestration']; + } + + /** + * Sets lint_excluding_sequestration + * + * @param float $lint_excluding_sequestration Emissions intensity of lint excluding sequestration, in t-CO2e/kg + * + * @return self + */ + public function setLintExcludingSequestration($lint_excluding_sequestration) + { + if (is_null($lint_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable lint_excluding_sequestration cannot be null'); + } + $this->container['lint_excluding_sequestration'] = $lint_excluding_sequestration; + + return $this; + } + + /** + * Gets seed_including_sequestration + * + * @return float + */ + public function getSeedIncludingSequestration() + { + return $this->container['seed_including_sequestration']; + } + + /** + * Sets seed_including_sequestration + * + * @param float $seed_including_sequestration Emissions intensity of seed including sequestration, in t-CO2e/kg + * + * @return self + */ + public function setSeedIncludingSequestration($seed_including_sequestration) + { + if (is_null($seed_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable seed_including_sequestration cannot be null'); + } + $this->container['seed_including_sequestration'] = $seed_including_sequestration; + + return $this; + } + + /** + * Gets seed_excluding_sequestration + * + * @return float + */ + public function getSeedExcludingSequestration() + { + return $this->container['seed_excluding_sequestration']; + } + + /** + * Sets seed_excluding_sequestration + * + * @param float $seed_excluding_sequestration Emissions intensity of seed excluding sequestration, in t-CO2e/kg + * + * @return self + */ + public function setSeedExcludingSequestration($seed_excluding_sequestration) + { + if (is_null($seed_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable seed_excluding_sequestration cannot be null'); + } + $this->container['seed_excluding_sequestration'] = $seed_excluding_sequestration; + + return $this; + } + + /** + * Gets lint_economic_allocation + * + * @return float + */ + public function getLintEconomicAllocation() + { + return $this->container['lint_economic_allocation']; + } + + /** + * Sets lint_economic_allocation + * + * @param float $lint_economic_allocation Emissions intensity of lint using economic allocation, in t-CO2e/kg + * + * @return self + */ + public function setLintEconomicAllocation($lint_economic_allocation) + { + if (is_null($lint_economic_allocation)) { + throw new \InvalidArgumentException('non-nullable lint_economic_allocation cannot be null'); + } + $this->container['lint_economic_allocation'] = $lint_economic_allocation; + + return $this; + } + + /** + * Gets seed_economic_allocation + * + * @return float + */ + public function getSeedEconomicAllocation() + { + return $this->container['seed_economic_allocation']; + } + + /** + * Sets seed_economic_allocation + * + * @param float $seed_economic_allocation Emissions intensity of seed using economic allocation, in t-CO2e/kg + * + * @return self + */ + public function setSeedEconomicAllocation($seed_economic_allocation) + { + if (is_null($seed_economic_allocation)) { + throw new \InvalidArgumentException('non-nullable seed_economic_allocation cannot be null'); + } + $this->container['seed_economic_allocation'] = $seed_economic_allocation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseNet.php b/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseNet.php new file mode 100644 index 00000000..8a27cb2d --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseNet.php @@ -0,0 +1,451 @@ + + */ +class PostCotton200ResponseNet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_cotton_200_response_net'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float', + 'crops' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null, + 'crops' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false, + 'crops' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total', + 'crops' => 'crops' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal', + 'crops' => 'setCrops' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal', + 'crops' => 'getCrops' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + $this->setIfExists('crops', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + if ($this->container['crops'] === null) { + $invalidProperties[] = "'crops' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total total + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets crops + * + * @return float[] + */ + public function getCrops() + { + return $this->container['crops']; + } + + /** + * Sets crops + * + * @param float[] $crops crops + * + * @return self + */ + public function setCrops($crops) + { + if (is_null($crops)) { + throw new \InvalidArgumentException('non-nullable crops cannot be null'); + } + $this->container['crops'] = $crops; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseScope1.php b/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseScope1.php new file mode 100644 index 00000000..cc7d1dc3 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseScope1.php @@ -0,0 +1,932 @@ + + */ +class PostCotton200ResponseScope1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_cotton_200_response_scope1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel_co2' => 'float', + 'fuel_ch4' => 'float', + 'fuel_n2_o' => 'float', + 'urea_co2' => 'float', + 'lime_co2' => 'float', + 'fertiliser_n2_o' => 'float', + 'atmospheric_deposition_n2_o' => 'float', + 'leaching_and_runoff_n2_o' => 'float', + 'crop_residue_n2_o' => 'float', + 'field_burning_n2_o' => 'float', + 'field_burning_ch4' => 'float', + 'total_co2' => 'float', + 'total_ch4' => 'float', + 'total_n2_o' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel_co2' => null, + 'fuel_ch4' => null, + 'fuel_n2_o' => null, + 'urea_co2' => null, + 'lime_co2' => null, + 'fertiliser_n2_o' => null, + 'atmospheric_deposition_n2_o' => null, + 'leaching_and_runoff_n2_o' => null, + 'crop_residue_n2_o' => null, + 'field_burning_n2_o' => null, + 'field_burning_ch4' => null, + 'total_co2' => null, + 'total_ch4' => null, + 'total_n2_o' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel_co2' => false, + 'fuel_ch4' => false, + 'fuel_n2_o' => false, + 'urea_co2' => false, + 'lime_co2' => false, + 'fertiliser_n2_o' => false, + 'atmospheric_deposition_n2_o' => false, + 'leaching_and_runoff_n2_o' => false, + 'crop_residue_n2_o' => false, + 'field_burning_n2_o' => false, + 'field_burning_ch4' => false, + 'total_co2' => false, + 'total_ch4' => false, + 'total_n2_o' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel_co2' => 'fuelCO2', + 'fuel_ch4' => 'fuelCH4', + 'fuel_n2_o' => 'fuelN2O', + 'urea_co2' => 'ureaCO2', + 'lime_co2' => 'limeCO2', + 'fertiliser_n2_o' => 'fertiliserN2O', + 'atmospheric_deposition_n2_o' => 'atmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'leachingAndRunoffN2O', + 'crop_residue_n2_o' => 'cropResidueN2O', + 'field_burning_n2_o' => 'fieldBurningN2O', + 'field_burning_ch4' => 'fieldBurningCH4', + 'total_co2' => 'totalCO2', + 'total_ch4' => 'totalCH4', + 'total_n2_o' => 'totalN2O', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel_co2' => 'setFuelCo2', + 'fuel_ch4' => 'setFuelCh4', + 'fuel_n2_o' => 'setFuelN2O', + 'urea_co2' => 'setUreaCo2', + 'lime_co2' => 'setLimeCo2', + 'fertiliser_n2_o' => 'setFertiliserN2O', + 'atmospheric_deposition_n2_o' => 'setAtmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'setLeachingAndRunoffN2O', + 'crop_residue_n2_o' => 'setCropResidueN2O', + 'field_burning_n2_o' => 'setFieldBurningN2O', + 'field_burning_ch4' => 'setFieldBurningCh4', + 'total_co2' => 'setTotalCo2', + 'total_ch4' => 'setTotalCh4', + 'total_n2_o' => 'setTotalN2O', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel_co2' => 'getFuelCo2', + 'fuel_ch4' => 'getFuelCh4', + 'fuel_n2_o' => 'getFuelN2O', + 'urea_co2' => 'getUreaCo2', + 'lime_co2' => 'getLimeCo2', + 'fertiliser_n2_o' => 'getFertiliserN2O', + 'atmospheric_deposition_n2_o' => 'getAtmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'getLeachingAndRunoffN2O', + 'crop_residue_n2_o' => 'getCropResidueN2O', + 'field_burning_n2_o' => 'getFieldBurningN2O', + 'field_burning_ch4' => 'getFieldBurningCh4', + 'total_co2' => 'getTotalCo2', + 'total_ch4' => 'getTotalCh4', + 'total_n2_o' => 'getTotalN2O', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel_co2', $data ?? [], null); + $this->setIfExists('fuel_ch4', $data ?? [], null); + $this->setIfExists('fuel_n2_o', $data ?? [], null); + $this->setIfExists('urea_co2', $data ?? [], null); + $this->setIfExists('lime_co2', $data ?? [], null); + $this->setIfExists('fertiliser_n2_o', $data ?? [], null); + $this->setIfExists('atmospheric_deposition_n2_o', $data ?? [], null); + $this->setIfExists('leaching_and_runoff_n2_o', $data ?? [], null); + $this->setIfExists('crop_residue_n2_o', $data ?? [], null); + $this->setIfExists('field_burning_n2_o', $data ?? [], null); + $this->setIfExists('field_burning_ch4', $data ?? [], null); + $this->setIfExists('total_co2', $data ?? [], null); + $this->setIfExists('total_ch4', $data ?? [], null); + $this->setIfExists('total_n2_o', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel_co2'] === null) { + $invalidProperties[] = "'fuel_co2' can't be null"; + } + if ($this->container['fuel_ch4'] === null) { + $invalidProperties[] = "'fuel_ch4' can't be null"; + } + if ($this->container['fuel_n2_o'] === null) { + $invalidProperties[] = "'fuel_n2_o' can't be null"; + } + if ($this->container['urea_co2'] === null) { + $invalidProperties[] = "'urea_co2' can't be null"; + } + if ($this->container['lime_co2'] === null) { + $invalidProperties[] = "'lime_co2' can't be null"; + } + if ($this->container['fertiliser_n2_o'] === null) { + $invalidProperties[] = "'fertiliser_n2_o' can't be null"; + } + if ($this->container['atmospheric_deposition_n2_o'] === null) { + $invalidProperties[] = "'atmospheric_deposition_n2_o' can't be null"; + } + if ($this->container['leaching_and_runoff_n2_o'] === null) { + $invalidProperties[] = "'leaching_and_runoff_n2_o' can't be null"; + } + if ($this->container['crop_residue_n2_o'] === null) { + $invalidProperties[] = "'crop_residue_n2_o' can't be null"; + } + if ($this->container['field_burning_n2_o'] === null) { + $invalidProperties[] = "'field_burning_n2_o' can't be null"; + } + if ($this->container['field_burning_ch4'] === null) { + $invalidProperties[] = "'field_burning_ch4' can't be null"; + } + if ($this->container['total_co2'] === null) { + $invalidProperties[] = "'total_co2' can't be null"; + } + if ($this->container['total_ch4'] === null) { + $invalidProperties[] = "'total_ch4' can't be null"; + } + if ($this->container['total_n2_o'] === null) { + $invalidProperties[] = "'total_n2_o' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel_co2 + * + * @return float + */ + public function getFuelCo2() + { + return $this->container['fuel_co2']; + } + + /** + * Sets fuel_co2 + * + * @param float $fuel_co2 CO2 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCo2($fuel_co2) + { + if (is_null($fuel_co2)) { + throw new \InvalidArgumentException('non-nullable fuel_co2 cannot be null'); + } + $this->container['fuel_co2'] = $fuel_co2; + + return $this; + } + + /** + * Gets fuel_ch4 + * + * @return float + */ + public function getFuelCh4() + { + return $this->container['fuel_ch4']; + } + + /** + * Sets fuel_ch4 + * + * @param float $fuel_ch4 CH4 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCh4($fuel_ch4) + { + if (is_null($fuel_ch4)) { + throw new \InvalidArgumentException('non-nullable fuel_ch4 cannot be null'); + } + $this->container['fuel_ch4'] = $fuel_ch4; + + return $this; + } + + /** + * Gets fuel_n2_o + * + * @return float + */ + public function getFuelN2O() + { + return $this->container['fuel_n2_o']; + } + + /** + * Sets fuel_n2_o + * + * @param float $fuel_n2_o N2O emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelN2O($fuel_n2_o) + { + if (is_null($fuel_n2_o)) { + throw new \InvalidArgumentException('non-nullable fuel_n2_o cannot be null'); + } + $this->container['fuel_n2_o'] = $fuel_n2_o; + + return $this; + } + + /** + * Gets urea_co2 + * + * @return float + */ + public function getUreaCo2() + { + return $this->container['urea_co2']; + } + + /** + * Sets urea_co2 + * + * @param float $urea_co2 CO2 emissions from urea, in tonnes-CO2e + * + * @return self + */ + public function setUreaCo2($urea_co2) + { + if (is_null($urea_co2)) { + throw new \InvalidArgumentException('non-nullable urea_co2 cannot be null'); + } + $this->container['urea_co2'] = $urea_co2; + + return $this; + } + + /** + * Gets lime_co2 + * + * @return float + */ + public function getLimeCo2() + { + return $this->container['lime_co2']; + } + + /** + * Sets lime_co2 + * + * @param float $lime_co2 CO2 emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLimeCo2($lime_co2) + { + if (is_null($lime_co2)) { + throw new \InvalidArgumentException('non-nullable lime_co2 cannot be null'); + } + $this->container['lime_co2'] = $lime_co2; + + return $this; + } + + /** + * Gets fertiliser_n2_o + * + * @return float + */ + public function getFertiliserN2O() + { + return $this->container['fertiliser_n2_o']; + } + + /** + * Sets fertiliser_n2_o + * + * @param float $fertiliser_n2_o N2O emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliserN2O($fertiliser_n2_o) + { + if (is_null($fertiliser_n2_o)) { + throw new \InvalidArgumentException('non-nullable fertiliser_n2_o cannot be null'); + } + $this->container['fertiliser_n2_o'] = $fertiliser_n2_o; + + return $this; + } + + /** + * Gets atmospheric_deposition_n2_o + * + * @return float + */ + public function getAtmosphericDepositionN2O() + { + return $this->container['atmospheric_deposition_n2_o']; + } + + /** + * Sets atmospheric_deposition_n2_o + * + * @param float $atmospheric_deposition_n2_o N2O emissions from atmospheric deposition, in tonnes-CO2e + * + * @return self + */ + public function setAtmosphericDepositionN2O($atmospheric_deposition_n2_o) + { + if (is_null($atmospheric_deposition_n2_o)) { + throw new \InvalidArgumentException('non-nullable atmospheric_deposition_n2_o cannot be null'); + } + $this->container['atmospheric_deposition_n2_o'] = $atmospheric_deposition_n2_o; + + return $this; + } + + /** + * Gets leaching_and_runoff_n2_o + * + * @return float + */ + public function getLeachingAndRunoffN2O() + { + return $this->container['leaching_and_runoff_n2_o']; + } + + /** + * Sets leaching_and_runoff_n2_o + * + * @param float $leaching_and_runoff_n2_o N2O emissions from leeching and runoff, in tonnes-CO2e + * + * @return self + */ + public function setLeachingAndRunoffN2O($leaching_and_runoff_n2_o) + { + if (is_null($leaching_and_runoff_n2_o)) { + throw new \InvalidArgumentException('non-nullable leaching_and_runoff_n2_o cannot be null'); + } + $this->container['leaching_and_runoff_n2_o'] = $leaching_and_runoff_n2_o; + + return $this; + } + + /** + * Gets crop_residue_n2_o + * + * @return float + */ + public function getCropResidueN2O() + { + return $this->container['crop_residue_n2_o']; + } + + /** + * Sets crop_residue_n2_o + * + * @param float $crop_residue_n2_o N2O emissions from crop residue, in tonnes-CO2e + * + * @return self + */ + public function setCropResidueN2O($crop_residue_n2_o) + { + if (is_null($crop_residue_n2_o)) { + throw new \InvalidArgumentException('non-nullable crop_residue_n2_o cannot be null'); + } + $this->container['crop_residue_n2_o'] = $crop_residue_n2_o; + + return $this; + } + + /** + * Gets field_burning_n2_o + * + * @return float + */ + public function getFieldBurningN2O() + { + return $this->container['field_burning_n2_o']; + } + + /** + * Sets field_burning_n2_o + * + * @param float $field_burning_n2_o N2O emissions from field burning, in tonnes-CO2e + * + * @return self + */ + public function setFieldBurningN2O($field_burning_n2_o) + { + if (is_null($field_burning_n2_o)) { + throw new \InvalidArgumentException('non-nullable field_burning_n2_o cannot be null'); + } + $this->container['field_burning_n2_o'] = $field_burning_n2_o; + + return $this; + } + + /** + * Gets field_burning_ch4 + * + * @return float + */ + public function getFieldBurningCh4() + { + return $this->container['field_burning_ch4']; + } + + /** + * Sets field_burning_ch4 + * + * @param float $field_burning_ch4 CH4 emissions from field burning, in tonnes-CO2e + * + * @return self + */ + public function setFieldBurningCh4($field_burning_ch4) + { + if (is_null($field_burning_ch4)) { + throw new \InvalidArgumentException('non-nullable field_burning_ch4 cannot be null'); + } + $this->container['field_burning_ch4'] = $field_burning_ch4; + + return $this; + } + + /** + * Gets total_co2 + * + * @return float + */ + public function getTotalCo2() + { + return $this->container['total_co2']; + } + + /** + * Sets total_co2 + * + * @param float $total_co2 Total CO2 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCo2($total_co2) + { + if (is_null($total_co2)) { + throw new \InvalidArgumentException('non-nullable total_co2 cannot be null'); + } + $this->container['total_co2'] = $total_co2; + + return $this; + } + + /** + * Gets total_ch4 + * + * @return float + */ + public function getTotalCh4() + { + return $this->container['total_ch4']; + } + + /** + * Sets total_ch4 + * + * @param float $total_ch4 Total CH4 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCh4($total_ch4) + { + if (is_null($total_ch4)) { + throw new \InvalidArgumentException('non-nullable total_ch4 cannot be null'); + } + $this->container['total_ch4'] = $total_ch4; + + return $this; + } + + /** + * Gets total_n2_o + * + * @return float + */ + public function getTotalN2O() + { + return $this->container['total_n2_o']; + } + + /** + * Sets total_n2_o + * + * @param float $total_n2_o Total N2O scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalN2O($total_n2_o) + { + if (is_null($total_n2_o)) { + throw new \InvalidArgumentException('non-nullable total_n2_o cannot be null'); + } + $this->container['total_n2_o'] = $total_n2_o; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseScope3.php b/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseScope3.php new file mode 100644 index 00000000..5e7f938c --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostCotton200ResponseScope3.php @@ -0,0 +1,599 @@ + + */ +class PostCotton200ResponseScope3 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_cotton_200_response_scope3'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fertiliser' => 'float', + 'herbicide' => 'float', + 'electricity' => 'float', + 'fuel' => 'float', + 'lime' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fertiliser' => null, + 'herbicide' => null, + 'electricity' => null, + 'fuel' => null, + 'lime' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fertiliser' => false, + 'herbicide' => false, + 'electricity' => false, + 'fuel' => false, + 'lime' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fertiliser' => 'fertiliser', + 'herbicide' => 'herbicide', + 'electricity' => 'electricity', + 'fuel' => 'fuel', + 'lime' => 'lime', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fertiliser' => 'setFertiliser', + 'herbicide' => 'setHerbicide', + 'electricity' => 'setElectricity', + 'fuel' => 'setFuel', + 'lime' => 'setLime', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fertiliser' => 'getFertiliser', + 'herbicide' => 'getHerbicide', + 'electricity' => 'getElectricity', + 'fuel' => 'getFuel', + 'lime' => 'getLime', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('electricity', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('lime', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['electricity'] === null) { + $invalidProperties[] = "'electricity' can't be null"; + } + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['lime'] === null) { + $invalidProperties[] = "'lime' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fertiliser + * + * @return float + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param float $fertiliser Emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Emissions from herbicide, in tonnes-CO2e + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets electricity + * + * @return float + */ + public function getElectricity() + { + return $this->container['electricity']; + } + + /** + * Sets electricity + * + * @param float $electricity Emissions from electricity, in tonnes-CO2e + * + * @return self + */ + public function setElectricity($electricity) + { + if (is_null($electricity)) { + throw new \InvalidArgumentException('non-nullable electricity cannot be null'); + } + $this->container['electricity'] = $electricity; + + return $this; + } + + /** + * Gets fuel + * + * @return float + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param float $fuel Emissions from fuel, in tonnes-CO2e + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets lime + * + * @return float + */ + public function getLime() + { + return $this->container['lime']; + } + + /** + * Sets lime + * + * @param float $lime Emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLime($lime) + { + if (is_null($lime)) { + throw new \InvalidArgumentException('non-nullable lime cannot be null'); + } + $this->container['lime'] = $lime; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 3 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostCottonRequest.php b/examples/php-api-client/api-client/lib/Model/PostCottonRequest.php new file mode 100644 index 00000000..73ada377 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostCottonRequest.php @@ -0,0 +1,626 @@ + + */ +class PostCottonRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_cotton_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'crops' => '\OpenAPI\Client\Model\PostCottonRequestCropsInner[]', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'vegetation' => '\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'crops' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'crops' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'crops' => 'crops', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'crops' => 'setCrops', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'crops' => 'getCrops', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('crops', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['crops'] === null) { + $invalidProperties[] = "'crops' can't be null"; + } + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets crops + * + * @return \OpenAPI\Client\Model\PostCottonRequestCropsInner[] + */ + public function getCrops() + { + return $this->container['crops']; + } + + /** + * Sets crops + * + * @param \OpenAPI\Client\Model\PostCottonRequestCropsInner[] $crops crops + * + * @return self + */ + public function setCrops($crops) + { + if (is_null($crops)) { + throw new \InvalidArgumentException('non-nullable crops cannot be null'); + } + $this->container['crops'] = $crops; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostCottonRequest., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostCottonRequest., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostCottonRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostCottonRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostCottonRequestCropsInner.php b/examples/php-api-client/api-client/lib/Model/PostCottonRequestCropsInner.php new file mode 100644 index 00000000..76e6816e --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostCottonRequestCropsInner.php @@ -0,0 +1,1479 @@ + + */ +class PostCottonRequestCropsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_cotton_request_crops_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'state' => 'string', + 'average_cotton_yield' => 'float', + 'area_sown' => 'float', + 'average_weight_per_bale_kg' => 'float', + 'cotton_lint_per_bale_kg' => 'float', + 'cotton_seed_per_bale_kg' => 'float', + 'waste_per_bale_kg' => 'float', + 'urea_application' => 'float', + 'other_fertiliser_type' => 'string', + 'other_fertiliser_application' => 'float', + 'non_urea_nitrogen' => 'float', + 'urea_ammonium_nitrate' => 'float', + 'phosphorus_application' => 'float', + 'potassium_application' => 'float', + 'sulfur_application' => 'float', + 'single_super_phosphate' => 'float', + 'rainfall_above600' => 'bool', + 'fraction_of_annual_crop_burnt' => 'float', + 'herbicide_use' => 'float', + 'glyphosate_other_herbicide_use' => 'float', + 'electricity_allocation' => 'float', + 'limestone' => 'float', + 'limestone_fraction' => 'float', + 'diesel_use' => 'float', + 'petrol_use' => 'float', + 'lpg' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'state' => null, + 'average_cotton_yield' => null, + 'area_sown' => null, + 'average_weight_per_bale_kg' => null, + 'cotton_lint_per_bale_kg' => null, + 'cotton_seed_per_bale_kg' => null, + 'waste_per_bale_kg' => null, + 'urea_application' => null, + 'other_fertiliser_type' => null, + 'other_fertiliser_application' => null, + 'non_urea_nitrogen' => null, + 'urea_ammonium_nitrate' => null, + 'phosphorus_application' => null, + 'potassium_application' => null, + 'sulfur_application' => null, + 'single_super_phosphate' => null, + 'rainfall_above600' => null, + 'fraction_of_annual_crop_burnt' => null, + 'herbicide_use' => null, + 'glyphosate_other_herbicide_use' => null, + 'electricity_allocation' => null, + 'limestone' => null, + 'limestone_fraction' => null, + 'diesel_use' => null, + 'petrol_use' => null, + 'lpg' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'state' => false, + 'average_cotton_yield' => false, + 'area_sown' => false, + 'average_weight_per_bale_kg' => false, + 'cotton_lint_per_bale_kg' => false, + 'cotton_seed_per_bale_kg' => false, + 'waste_per_bale_kg' => false, + 'urea_application' => false, + 'other_fertiliser_type' => false, + 'other_fertiliser_application' => false, + 'non_urea_nitrogen' => false, + 'urea_ammonium_nitrate' => false, + 'phosphorus_application' => false, + 'potassium_application' => false, + 'sulfur_application' => false, + 'single_super_phosphate' => false, + 'rainfall_above600' => false, + 'fraction_of_annual_crop_burnt' => false, + 'herbicide_use' => false, + 'glyphosate_other_herbicide_use' => false, + 'electricity_allocation' => false, + 'limestone' => false, + 'limestone_fraction' => false, + 'diesel_use' => false, + 'petrol_use' => false, + 'lpg' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'state' => 'state', + 'average_cotton_yield' => 'averageCottonYield', + 'area_sown' => 'areaSown', + 'average_weight_per_bale_kg' => 'averageWeightPerBaleKg', + 'cotton_lint_per_bale_kg' => 'cottonLintPerBaleKg', + 'cotton_seed_per_bale_kg' => 'cottonSeedPerBaleKg', + 'waste_per_bale_kg' => 'wastePerBaleKg', + 'urea_application' => 'ureaApplication', + 'other_fertiliser_type' => 'otherFertiliserType', + 'other_fertiliser_application' => 'otherFertiliserApplication', + 'non_urea_nitrogen' => 'nonUreaNitrogen', + 'urea_ammonium_nitrate' => 'ureaAmmoniumNitrate', + 'phosphorus_application' => 'phosphorusApplication', + 'potassium_application' => 'potassiumApplication', + 'sulfur_application' => 'sulfurApplication', + 'single_super_phosphate' => 'singleSuperPhosphate', + 'rainfall_above600' => 'rainfallAbove600', + 'fraction_of_annual_crop_burnt' => 'fractionOfAnnualCropBurnt', + 'herbicide_use' => 'herbicideUse', + 'glyphosate_other_herbicide_use' => 'glyphosateOtherHerbicideUse', + 'electricity_allocation' => 'electricityAllocation', + 'limestone' => 'limestone', + 'limestone_fraction' => 'limestoneFraction', + 'diesel_use' => 'dieselUse', + 'petrol_use' => 'petrolUse', + 'lpg' => 'lpg' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'state' => 'setState', + 'average_cotton_yield' => 'setAverageCottonYield', + 'area_sown' => 'setAreaSown', + 'average_weight_per_bale_kg' => 'setAverageWeightPerBaleKg', + 'cotton_lint_per_bale_kg' => 'setCottonLintPerBaleKg', + 'cotton_seed_per_bale_kg' => 'setCottonSeedPerBaleKg', + 'waste_per_bale_kg' => 'setWastePerBaleKg', + 'urea_application' => 'setUreaApplication', + 'other_fertiliser_type' => 'setOtherFertiliserType', + 'other_fertiliser_application' => 'setOtherFertiliserApplication', + 'non_urea_nitrogen' => 'setNonUreaNitrogen', + 'urea_ammonium_nitrate' => 'setUreaAmmoniumNitrate', + 'phosphorus_application' => 'setPhosphorusApplication', + 'potassium_application' => 'setPotassiumApplication', + 'sulfur_application' => 'setSulfurApplication', + 'single_super_phosphate' => 'setSingleSuperPhosphate', + 'rainfall_above600' => 'setRainfallAbove600', + 'fraction_of_annual_crop_burnt' => 'setFractionOfAnnualCropBurnt', + 'herbicide_use' => 'setHerbicideUse', + 'glyphosate_other_herbicide_use' => 'setGlyphosateOtherHerbicideUse', + 'electricity_allocation' => 'setElectricityAllocation', + 'limestone' => 'setLimestone', + 'limestone_fraction' => 'setLimestoneFraction', + 'diesel_use' => 'setDieselUse', + 'petrol_use' => 'setPetrolUse', + 'lpg' => 'setLpg' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'state' => 'getState', + 'average_cotton_yield' => 'getAverageCottonYield', + 'area_sown' => 'getAreaSown', + 'average_weight_per_bale_kg' => 'getAverageWeightPerBaleKg', + 'cotton_lint_per_bale_kg' => 'getCottonLintPerBaleKg', + 'cotton_seed_per_bale_kg' => 'getCottonSeedPerBaleKg', + 'waste_per_bale_kg' => 'getWastePerBaleKg', + 'urea_application' => 'getUreaApplication', + 'other_fertiliser_type' => 'getOtherFertiliserType', + 'other_fertiliser_application' => 'getOtherFertiliserApplication', + 'non_urea_nitrogen' => 'getNonUreaNitrogen', + 'urea_ammonium_nitrate' => 'getUreaAmmoniumNitrate', + 'phosphorus_application' => 'getPhosphorusApplication', + 'potassium_application' => 'getPotassiumApplication', + 'sulfur_application' => 'getSulfurApplication', + 'single_super_phosphate' => 'getSingleSuperPhosphate', + 'rainfall_above600' => 'getRainfallAbove600', + 'fraction_of_annual_crop_burnt' => 'getFractionOfAnnualCropBurnt', + 'herbicide_use' => 'getHerbicideUse', + 'glyphosate_other_herbicide_use' => 'getGlyphosateOtherHerbicideUse', + 'electricity_allocation' => 'getElectricityAllocation', + 'limestone' => 'getLimestone', + 'limestone_fraction' => 'getLimestoneFraction', + 'diesel_use' => 'getDieselUse', + 'petrol_use' => 'getPetrolUse', + 'lpg' => 'getLpg' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + public const OTHER_FERTILISER_TYPE_MONOAMMONIUM_PHOSPHATE__MAP = 'Monoammonium phosphate (MAP)'; + public const OTHER_FERTILISER_TYPE_DIAMMONIUM_PHOSPHATE__DAP = 'Diammonium Phosphate (DAP)'; + public const OTHER_FERTILISER_TYPE_UREA_AMMONIUM_NITRATE__UAN = 'Urea-Ammonium Nitrate (UAN)'; + public const OTHER_FERTILISER_TYPE_AMMONIUM_NITRATE__AN = 'Ammonium Nitrate (AN)'; + public const OTHER_FERTILISER_TYPE_CALCIUM_AMMONIUM_NITRATE__CAN = 'Calcium Ammonium Nitrate (CAN)'; + public const OTHER_FERTILISER_TYPE_TRIPLE_SUPERPHOSPHATE__TSP = 'Triple Superphosphate (TSP)'; + public const OTHER_FERTILISER_TYPE_SUPER_POTASH_1_1 = 'Super Potash 1:1'; + public const OTHER_FERTILISER_TYPE_SUPER_POTASH_2_1 = 'Super Potash 2:1'; + public const OTHER_FERTILISER_TYPE_SUPER_POTASH_3_1 = 'Super Potash 3:1'; + public const OTHER_FERTILISER_TYPE_SUPER_POTASH_4_1 = 'Super Potash 4:1'; + public const OTHER_FERTILISER_TYPE_SUPER_POTASH_5_1 = 'Super Potash 5:1'; + public const OTHER_FERTILISER_TYPE_MURIATE_OF_POTASH = 'Muriate of Potash'; + public const OTHER_FERTILISER_TYPE_SULPHATE_OF_POTASH = 'Sulphate of Potash'; + public const OTHER_FERTILISER_TYPE_SULPHATE_OF_AMMONIA = 'Sulphate of Ammonia'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOtherFertiliserTypeAllowableValues() + { + return [ + self::OTHER_FERTILISER_TYPE_MONOAMMONIUM_PHOSPHATE__MAP, + self::OTHER_FERTILISER_TYPE_DIAMMONIUM_PHOSPHATE__DAP, + self::OTHER_FERTILISER_TYPE_UREA_AMMONIUM_NITRATE__UAN, + self::OTHER_FERTILISER_TYPE_AMMONIUM_NITRATE__AN, + self::OTHER_FERTILISER_TYPE_CALCIUM_AMMONIUM_NITRATE__CAN, + self::OTHER_FERTILISER_TYPE_TRIPLE_SUPERPHOSPHATE__TSP, + self::OTHER_FERTILISER_TYPE_SUPER_POTASH_1_1, + self::OTHER_FERTILISER_TYPE_SUPER_POTASH_2_1, + self::OTHER_FERTILISER_TYPE_SUPER_POTASH_3_1, + self::OTHER_FERTILISER_TYPE_SUPER_POTASH_4_1, + self::OTHER_FERTILISER_TYPE_SUPER_POTASH_5_1, + self::OTHER_FERTILISER_TYPE_MURIATE_OF_POTASH, + self::OTHER_FERTILISER_TYPE_SULPHATE_OF_POTASH, + self::OTHER_FERTILISER_TYPE_SULPHATE_OF_AMMONIA, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('average_cotton_yield', $data ?? [], null); + $this->setIfExists('area_sown', $data ?? [], null); + $this->setIfExists('average_weight_per_bale_kg', $data ?? [], null); + $this->setIfExists('cotton_lint_per_bale_kg', $data ?? [], null); + $this->setIfExists('cotton_seed_per_bale_kg', $data ?? [], null); + $this->setIfExists('waste_per_bale_kg', $data ?? [], null); + $this->setIfExists('urea_application', $data ?? [], null); + $this->setIfExists('other_fertiliser_type', $data ?? [], null); + $this->setIfExists('other_fertiliser_application', $data ?? [], null); + $this->setIfExists('non_urea_nitrogen', $data ?? [], 0); + $this->setIfExists('urea_ammonium_nitrate', $data ?? [], 0); + $this->setIfExists('phosphorus_application', $data ?? [], 0); + $this->setIfExists('potassium_application', $data ?? [], 0); + $this->setIfExists('sulfur_application', $data ?? [], 0); + $this->setIfExists('single_super_phosphate', $data ?? [], null); + $this->setIfExists('rainfall_above600', $data ?? [], null); + $this->setIfExists('fraction_of_annual_crop_burnt', $data ?? [], 0); + $this->setIfExists('herbicide_use', $data ?? [], null); + $this->setIfExists('glyphosate_other_herbicide_use', $data ?? [], null); + $this->setIfExists('electricity_allocation', $data ?? [], null); + $this->setIfExists('limestone', $data ?? [], null); + $this->setIfExists('limestone_fraction', $data ?? [], null); + $this->setIfExists('diesel_use', $data ?? [], null); + $this->setIfExists('petrol_use', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['average_cotton_yield'] === null) { + $invalidProperties[] = "'average_cotton_yield' can't be null"; + } + if ($this->container['area_sown'] === null) { + $invalidProperties[] = "'area_sown' can't be null"; + } + if ($this->container['average_weight_per_bale_kg'] === null) { + $invalidProperties[] = "'average_weight_per_bale_kg' can't be null"; + } + if ($this->container['cotton_lint_per_bale_kg'] === null) { + $invalidProperties[] = "'cotton_lint_per_bale_kg' can't be null"; + } + if ($this->container['cotton_seed_per_bale_kg'] === null) { + $invalidProperties[] = "'cotton_seed_per_bale_kg' can't be null"; + } + if ($this->container['waste_per_bale_kg'] === null) { + $invalidProperties[] = "'waste_per_bale_kg' can't be null"; + } + if ($this->container['urea_application'] === null) { + $invalidProperties[] = "'urea_application' can't be null"; + } + $allowedValues = $this->getOtherFertiliserTypeAllowableValues(); + if (!is_null($this->container['other_fertiliser_type']) && !in_array($this->container['other_fertiliser_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'other_fertiliser_type', must be one of '%s'", + $this->container['other_fertiliser_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['other_fertiliser_application'] === null) { + $invalidProperties[] = "'other_fertiliser_application' can't be null"; + } + if ($this->container['non_urea_nitrogen'] === null) { + $invalidProperties[] = "'non_urea_nitrogen' can't be null"; + } + if ($this->container['urea_ammonium_nitrate'] === null) { + $invalidProperties[] = "'urea_ammonium_nitrate' can't be null"; + } + if ($this->container['phosphorus_application'] === null) { + $invalidProperties[] = "'phosphorus_application' can't be null"; + } + if ($this->container['potassium_application'] === null) { + $invalidProperties[] = "'potassium_application' can't be null"; + } + if ($this->container['sulfur_application'] === null) { + $invalidProperties[] = "'sulfur_application' can't be null"; + } + if ($this->container['single_super_phosphate'] === null) { + $invalidProperties[] = "'single_super_phosphate' can't be null"; + } + if ($this->container['rainfall_above600'] === null) { + $invalidProperties[] = "'rainfall_above600' can't be null"; + } + if ($this->container['fraction_of_annual_crop_burnt'] === null) { + $invalidProperties[] = "'fraction_of_annual_crop_burnt' can't be null"; + } + if ($this->container['herbicide_use'] === null) { + $invalidProperties[] = "'herbicide_use' can't be null"; + } + if ($this->container['glyphosate_other_herbicide_use'] === null) { + $invalidProperties[] = "'glyphosate_other_herbicide_use' can't be null"; + } + if ($this->container['electricity_allocation'] === null) { + $invalidProperties[] = "'electricity_allocation' can't be null"; + } + if ($this->container['limestone'] === null) { + $invalidProperties[] = "'limestone' can't be null"; + } + if ($this->container['limestone_fraction'] === null) { + $invalidProperties[] = "'limestone_fraction' can't be null"; + } + if ($this->container['diesel_use'] === null) { + $invalidProperties[] = "'diesel_use' can't be null"; + } + if ($this->container['petrol_use'] === null) { + $invalidProperties[] = "'petrol_use' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets average_cotton_yield + * + * @return float + */ + public function getAverageCottonYield() + { + return $this->container['average_cotton_yield']; + } + + /** + * Sets average_cotton_yield + * + * @param float $average_cotton_yield Average cotton yield, in t/ha (tonnes per hectare) + * + * @return self + */ + public function setAverageCottonYield($average_cotton_yield) + { + if (is_null($average_cotton_yield)) { + throw new \InvalidArgumentException('non-nullable average_cotton_yield cannot be null'); + } + $this->container['average_cotton_yield'] = $average_cotton_yield; + + return $this; + } + + /** + * Gets area_sown + * + * @return float + */ + public function getAreaSown() + { + return $this->container['area_sown']; + } + + /** + * Sets area_sown + * + * @param float $area_sown Area sown, in ha (hectares) + * + * @return self + */ + public function setAreaSown($area_sown) + { + if (is_null($area_sown)) { + throw new \InvalidArgumentException('non-nullable area_sown cannot be null'); + } + $this->container['area_sown'] = $area_sown; + + return $this; + } + + /** + * Gets average_weight_per_bale_kg + * + * @return float + */ + public function getAverageWeightPerBaleKg() + { + return $this->container['average_weight_per_bale_kg']; + } + + /** + * Sets average_weight_per_bale_kg + * + * @param float $average_weight_per_bale_kg Average weight of unprocessed cotton per bale, in kg + * + * @return self + */ + public function setAverageWeightPerBaleKg($average_weight_per_bale_kg) + { + if (is_null($average_weight_per_bale_kg)) { + throw new \InvalidArgumentException('non-nullable average_weight_per_bale_kg cannot be null'); + } + $this->container['average_weight_per_bale_kg'] = $average_weight_per_bale_kg; + + return $this; + } + + /** + * Gets cotton_lint_per_bale_kg + * + * @return float + */ + public function getCottonLintPerBaleKg() + { + return $this->container['cotton_lint_per_bale_kg']; + } + + /** + * Sets cotton_lint_per_bale_kg + * + * @param float $cotton_lint_per_bale_kg Average weight of cotton lint per bale, in kg + * + * @return self + */ + public function setCottonLintPerBaleKg($cotton_lint_per_bale_kg) + { + if (is_null($cotton_lint_per_bale_kg)) { + throw new \InvalidArgumentException('non-nullable cotton_lint_per_bale_kg cannot be null'); + } + $this->container['cotton_lint_per_bale_kg'] = $cotton_lint_per_bale_kg; + + return $this; + } + + /** + * Gets cotton_seed_per_bale_kg + * + * @return float + */ + public function getCottonSeedPerBaleKg() + { + return $this->container['cotton_seed_per_bale_kg']; + } + + /** + * Sets cotton_seed_per_bale_kg + * + * @param float $cotton_seed_per_bale_kg Average weight of cotton seed produced per bale, in kg + * + * @return self + */ + public function setCottonSeedPerBaleKg($cotton_seed_per_bale_kg) + { + if (is_null($cotton_seed_per_bale_kg)) { + throw new \InvalidArgumentException('non-nullable cotton_seed_per_bale_kg cannot be null'); + } + $this->container['cotton_seed_per_bale_kg'] = $cotton_seed_per_bale_kg; + + return $this; + } + + /** + * Gets waste_per_bale_kg + * + * @return float + */ + public function getWastePerBaleKg() + { + return $this->container['waste_per_bale_kg']; + } + + /** + * Sets waste_per_bale_kg + * + * @param float $waste_per_bale_kg Average weight of cotton waste produced per bale, in kg + * + * @return self + */ + public function setWastePerBaleKg($waste_per_bale_kg) + { + if (is_null($waste_per_bale_kg)) { + throw new \InvalidArgumentException('non-nullable waste_per_bale_kg cannot be null'); + } + $this->container['waste_per_bale_kg'] = $waste_per_bale_kg; + + return $this; + } + + /** + * Gets urea_application + * + * @return float + */ + public function getUreaApplication() + { + return $this->container['urea_application']; + } + + /** + * Sets urea_application + * + * @param float $urea_application Urea application, in kg Urea/ha (kilograms of urea per hectare) + * + * @return self + */ + public function setUreaApplication($urea_application) + { + if (is_null($urea_application)) { + throw new \InvalidArgumentException('non-nullable urea_application cannot be null'); + } + $this->container['urea_application'] = $urea_application; + + return $this; + } + + /** + * Gets other_fertiliser_type + * + * @return string|null + * @deprecated + */ + public function getOtherFertiliserType() + { + return $this->container['other_fertiliser_type']; + } + + /** + * Sets other_fertiliser_type + * + * @param string|null $other_fertiliser_type Other N fertiliser type + * + * @return self + * @deprecated + */ + public function setOtherFertiliserType($other_fertiliser_type) + { + if (is_null($other_fertiliser_type)) { + throw new \InvalidArgumentException('non-nullable other_fertiliser_type cannot be null'); + } + $allowedValues = $this->getOtherFertiliserTypeAllowableValues(); + if (!in_array($other_fertiliser_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'other_fertiliser_type', must be one of '%s'", + $other_fertiliser_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['other_fertiliser_type'] = $other_fertiliser_type; + + return $this; + } + + /** + * Gets other_fertiliser_application + * + * @return float + */ + public function getOtherFertiliserApplication() + { + return $this->container['other_fertiliser_application']; + } + + /** + * Sets other_fertiliser_application + * + * @param float $other_fertiliser_application Other N fertiliser application, in kg/ha (kilograms per hectare) + * + * @return self + */ + public function setOtherFertiliserApplication($other_fertiliser_application) + { + if (is_null($other_fertiliser_application)) { + throw new \InvalidArgumentException('non-nullable other_fertiliser_application cannot be null'); + } + $this->container['other_fertiliser_application'] = $other_fertiliser_application; + + return $this; + } + + /** + * Gets non_urea_nitrogen + * + * @return float + */ + public function getNonUreaNitrogen() + { + return $this->container['non_urea_nitrogen']; + } + + /** + * Sets non_urea_nitrogen + * + * @param float $non_urea_nitrogen Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) + * + * @return self + */ + public function setNonUreaNitrogen($non_urea_nitrogen) + { + if (is_null($non_urea_nitrogen)) { + throw new \InvalidArgumentException('non-nullable non_urea_nitrogen cannot be null'); + } + $this->container['non_urea_nitrogen'] = $non_urea_nitrogen; + + return $this; + } + + /** + * Gets urea_ammonium_nitrate + * + * @return float + */ + public function getUreaAmmoniumNitrate() + { + return $this->container['urea_ammonium_nitrate']; + } + + /** + * Sets urea_ammonium_nitrate + * + * @param float $urea_ammonium_nitrate Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) + * + * @return self + */ + public function setUreaAmmoniumNitrate($urea_ammonium_nitrate) + { + if (is_null($urea_ammonium_nitrate)) { + throw new \InvalidArgumentException('non-nullable urea_ammonium_nitrate cannot be null'); + } + $this->container['urea_ammonium_nitrate'] = $urea_ammonium_nitrate; + + return $this; + } + + /** + * Gets phosphorus_application + * + * @return float + */ + public function getPhosphorusApplication() + { + return $this->container['phosphorus_application']; + } + + /** + * Sets phosphorus_application + * + * @param float $phosphorus_application Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) + * + * @return self + */ + public function setPhosphorusApplication($phosphorus_application) + { + if (is_null($phosphorus_application)) { + throw new \InvalidArgumentException('non-nullable phosphorus_application cannot be null'); + } + $this->container['phosphorus_application'] = $phosphorus_application; + + return $this; + } + + /** + * Gets potassium_application + * + * @return float + */ + public function getPotassiumApplication() + { + return $this->container['potassium_application']; + } + + /** + * Sets potassium_application + * + * @param float $potassium_application Potassium application, in kg K/ha (kilograms of potassium per hectare) + * + * @return self + */ + public function setPotassiumApplication($potassium_application) + { + if (is_null($potassium_application)) { + throw new \InvalidArgumentException('non-nullable potassium_application cannot be null'); + } + $this->container['potassium_application'] = $potassium_application; + + return $this; + } + + /** + * Gets sulfur_application + * + * @return float + */ + public function getSulfurApplication() + { + return $this->container['sulfur_application']; + } + + /** + * Sets sulfur_application + * + * @param float $sulfur_application Sulfur application, in kg S/ha (kilograms of sulfur per hectare) + * + * @return self + */ + public function setSulfurApplication($sulfur_application) + { + if (is_null($sulfur_application)) { + throw new \InvalidArgumentException('non-nullable sulfur_application cannot be null'); + } + $this->container['sulfur_application'] = $sulfur_application; + + return $this; + } + + /** + * Gets single_super_phosphate + * + * @return float + */ + public function getSingleSuperPhosphate() + { + return $this->container['single_super_phosphate']; + } + + /** + * Sets single_super_phosphate + * + * @param float $single_super_phosphate Single superphosphate use, in kg/ha (kilograms per hectare) + * + * @return self + */ + public function setSingleSuperPhosphate($single_super_phosphate) + { + if (is_null($single_super_phosphate)) { + throw new \InvalidArgumentException('non-nullable single_super_phosphate cannot be null'); + } + $this->container['single_super_phosphate'] = $single_super_phosphate; + + return $this; + } + + /** + * Gets rainfall_above600 + * + * @return bool + */ + public function getRainfallAbove600() + { + return $this->container['rainfall_above600']; + } + + /** + * Sets rainfall_above600 + * + * @param bool $rainfall_above600 Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm + * + * @return self + */ + public function setRainfallAbove600($rainfall_above600) + { + if (is_null($rainfall_above600)) { + throw new \InvalidArgumentException('non-nullable rainfall_above600 cannot be null'); + } + $this->container['rainfall_above600'] = $rainfall_above600; + + return $this; + } + + /** + * Gets fraction_of_annual_crop_burnt + * + * @return float + * @deprecated + */ + public function getFractionOfAnnualCropBurnt() + { + return $this->container['fraction_of_annual_crop_burnt']; + } + + /** + * Sets fraction_of_annual_crop_burnt + * + * @param float $fraction_of_annual_crop_burnt Fraction of annual production of crop that is burnt. If included, this should only ever be 0 for cotton + * + * @return self + * @deprecated + */ + public function setFractionOfAnnualCropBurnt($fraction_of_annual_crop_burnt) + { + if (is_null($fraction_of_annual_crop_burnt)) { + throw new \InvalidArgumentException('non-nullable fraction_of_annual_crop_burnt cannot be null'); + } + $this->container['fraction_of_annual_crop_burnt'] = $fraction_of_annual_crop_burnt; + + return $this; + } + + /** + * Gets herbicide_use + * + * @return float + */ + public function getHerbicideUse() + { + return $this->container['herbicide_use']; + } + + /** + * Sets herbicide_use + * + * @param float $herbicide_use Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) + * + * @return self + */ + public function setHerbicideUse($herbicide_use) + { + if (is_null($herbicide_use)) { + throw new \InvalidArgumentException('non-nullable herbicide_use cannot be null'); + } + $this->container['herbicide_use'] = $herbicide_use; + + return $this; + } + + /** + * Gets glyphosate_other_herbicide_use + * + * @return float + */ + public function getGlyphosateOtherHerbicideUse() + { + return $this->container['glyphosate_other_herbicide_use']; + } + + /** + * Sets glyphosate_other_herbicide_use + * + * @param float $glyphosate_other_herbicide_use Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) + * + * @return self + */ + public function setGlyphosateOtherHerbicideUse($glyphosate_other_herbicide_use) + { + if (is_null($glyphosate_other_herbicide_use)) { + throw new \InvalidArgumentException('non-nullable glyphosate_other_herbicide_use cannot be null'); + } + $this->container['glyphosate_other_herbicide_use'] = $glyphosate_other_herbicide_use; + + return $this; + } + + /** + * Gets electricity_allocation + * + * @return float + */ + public function getElectricityAllocation() + { + return $this->container['electricity_allocation']; + } + + /** + * Sets electricity_allocation + * + * @param float $electricity_allocation Percentage of electricity use to allocate to this crop, from 0 to 1 + * + * @return self + */ + public function setElectricityAllocation($electricity_allocation) + { + if (is_null($electricity_allocation)) { + throw new \InvalidArgumentException('non-nullable electricity_allocation cannot be null'); + } + $this->container['electricity_allocation'] = $electricity_allocation; + + return $this; + } + + /** + * Gets limestone + * + * @return float + */ + public function getLimestone() + { + return $this->container['limestone']; + } + + /** + * Sets limestone + * + * @param float $limestone Lime applied in tonnes + * + * @return self + */ + public function setLimestone($limestone) + { + if (is_null($limestone)) { + throw new \InvalidArgumentException('non-nullable limestone cannot be null'); + } + $this->container['limestone'] = $limestone; + + return $this; + } + + /** + * Gets limestone_fraction + * + * @return float + */ + public function getLimestoneFraction() + { + return $this->container['limestone_fraction']; + } + + /** + * Sets limestone_fraction + * + * @param float $limestone_fraction Fraction of lime as limestone vs dolomite, between 0 and 1 + * + * @return self + */ + public function setLimestoneFraction($limestone_fraction) + { + if (is_null($limestone_fraction)) { + throw new \InvalidArgumentException('non-nullable limestone_fraction cannot be null'); + } + $this->container['limestone_fraction'] = $limestone_fraction; + + return $this; + } + + /** + * Gets diesel_use + * + * @return float + */ + public function getDieselUse() + { + return $this->container['diesel_use']; + } + + /** + * Sets diesel_use + * + * @param float $diesel_use Diesel usage in L (litres) + * + * @return self + */ + public function setDieselUse($diesel_use) + { + if (is_null($diesel_use)) { + throw new \InvalidArgumentException('non-nullable diesel_use cannot be null'); + } + $this->container['diesel_use'] = $diesel_use; + + return $this; + } + + /** + * Gets petrol_use + * + * @return float + */ + public function getPetrolUse() + { + return $this->container['petrol_use']; + } + + /** + * Sets petrol_use + * + * @param float $petrol_use Petrol usage in L (litres) + * + * @return self + */ + public function setPetrolUse($petrol_use) + { + if (is_null($petrol_use)) { + throw new \InvalidArgumentException('non-nullable petrol_use cannot be null'); + } + $this->container['petrol_use'] = $petrol_use; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostCottonRequestVegetationInner.php b/examples/php-api-client/api-client/lib/Model/PostCottonRequestVegetationInner.php new file mode 100644 index 00000000..52a7e801 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostCottonRequestVegetationInner.php @@ -0,0 +1,450 @@ + + */ +class PostCottonRequestVegetationInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_cotton_request_vegetation_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'vegetation' => '\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation', + 'allocation_to_crops' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'vegetation' => null, + 'allocation_to_crops' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'vegetation' => false, + 'allocation_to_crops' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vegetation' => 'vegetation', + 'allocation_to_crops' => 'allocationToCrops' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vegetation' => 'setVegetation', + 'allocation_to_crops' => 'setAllocationToCrops' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vegetation' => 'getVegetation', + 'allocation_to_crops' => 'getAllocationToCrops' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('vegetation', $data ?? [], null); + $this->setIfExists('allocation_to_crops', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + if ($this->container['allocation_to_crops'] === null) { + $invalidProperties[] = "'allocation_to_crops' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + + /** + * Gets allocation_to_crops + * + * @return float[] + */ + public function getAllocationToCrops() + { + return $this->container['allocation_to_crops']; + } + + /** + * Sets allocation_to_crops + * + * @param float[] $allocation_to_crops allocation_to_crops + * + * @return self + */ + public function setAllocationToCrops($allocation_to_crops) + { + if (is_null($allocation_to_crops)) { + throw new \InvalidArgumentException('non-nullable allocation_to_crops cannot be null'); + } + $this->container['allocation_to_crops'] = $allocation_to_crops; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairy200Response.php b/examples/php-api-client/api-client/lib/Model/PostDairy200Response.php new file mode 100644 index 00000000..a0ae157d --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairy200Response.php @@ -0,0 +1,636 @@ + + */ +class PostDairy200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostDairy200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostDairy200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'net' => '\OpenAPI\Client\Model\PostDairy200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostDairy200ResponseIntensities', + 'intermediate' => '\OpenAPI\Client\Model\PostDairy200ResponseIntermediateInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'net' => null, + 'intensities' => null, + 'intermediate' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'net' => false, + 'intensities' => false, + 'intermediate' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'net' => 'net', + 'intensities' => 'intensities', + 'intermediate' => 'intermediate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'net' => 'setNet', + 'intensities' => 'setIntensities', + 'intermediate' => 'setIntermediate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'net' => 'getNet', + 'intensities' => 'getIntensities', + 'intermediate' => 'getIntermediate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostDairy200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostDairy200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostDairy200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostDairy200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostDairy200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostDairy200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostDairy200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostDairy200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostDairy200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostDairy200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseIntensities.php b/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseIntensities.php new file mode 100644 index 00000000..b950831f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseIntensities.php @@ -0,0 +1,450 @@ + + */ +class PostDairy200ResponseIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_200_response_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'milk_solids_produced_tonnes' => 'float', + 'intensity' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'milk_solids_produced_tonnes' => null, + 'intensity' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'milk_solids_produced_tonnes' => false, + 'intensity' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'milk_solids_produced_tonnes' => 'milkSolidsProducedTonnes', + 'intensity' => 'intensity' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'milk_solids_produced_tonnes' => 'setMilkSolidsProducedTonnes', + 'intensity' => 'setIntensity' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'milk_solids_produced_tonnes' => 'getMilkSolidsProducedTonnes', + 'intensity' => 'getIntensity' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('milk_solids_produced_tonnes', $data ?? [], null); + $this->setIfExists('intensity', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['milk_solids_produced_tonnes'] === null) { + $invalidProperties[] = "'milk_solids_produced_tonnes' can't be null"; + } + if ($this->container['intensity'] === null) { + $invalidProperties[] = "'intensity' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets milk_solids_produced_tonnes + * + * @return float + */ + public function getMilkSolidsProducedTonnes() + { + return $this->container['milk_solids_produced_tonnes']; + } + + /** + * Sets milk_solids_produced_tonnes + * + * @param float $milk_solids_produced_tonnes Milk solids produced in tonnes + * + * @return self + */ + public function setMilkSolidsProducedTonnes($milk_solids_produced_tonnes) + { + if (is_null($milk_solids_produced_tonnes)) { + throw new \InvalidArgumentException('non-nullable milk_solids_produced_tonnes cannot be null'); + } + $this->container['milk_solids_produced_tonnes'] = $milk_solids_produced_tonnes; + + return $this; + } + + /** + * Gets intensity + * + * @return float + */ + public function getIntensity() + { + return $this->container['intensity']; + } + + /** + * Sets intensity + * + * @param float $intensity Dairy intensities including carbon sequestration, in tonnes-CO2e + * + * @return self + */ + public function setIntensity($intensity) + { + if (is_null($intensity)) { + throw new \InvalidArgumentException('non-nullable intensity cannot be null'); + } + $this->container['intensity'] = $intensity; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseIntermediateInner.php new file mode 100644 index 00000000..b6e7a6d5 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseIntermediateInner.php @@ -0,0 +1,636 @@ + + */ +class PostDairy200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostDairy200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostDairy200ResponseScope3', + 'net' => '\OpenAPI\Client\Model\PostDairy200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostDairy200ResponseIntensities', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'net' => null, + 'intensities' => null, + 'carbon_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'net' => false, + 'intensities' => false, + 'carbon_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'net' => 'net', + 'intensities' => 'intensities', + 'carbon_sequestration' => 'carbonSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'net' => 'setNet', + 'intensities' => 'setIntensities', + 'carbon_sequestration' => 'setCarbonSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'net' => 'getNet', + 'intensities' => 'getIntensities', + 'carbon_sequestration' => 'getCarbonSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostDairy200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostDairy200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostDairy200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostDairy200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostDairy200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostDairy200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostDairy200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostDairy200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseNet.php b/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseNet.php new file mode 100644 index 00000000..1aa6f091 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseNet.php @@ -0,0 +1,413 @@ + + */ +class PostDairy200ResponseNet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_200_response_net'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total net emissions of this activity, in tonnes-CO2e/year + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseScope1.php b/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseScope1.php new file mode 100644 index 00000000..83971897 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseScope1.php @@ -0,0 +1,1117 @@ + + */ +class PostDairy200ResponseScope1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_200_response_scope1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel_co2' => 'float', + 'fuel_ch4' => 'float', + 'fuel_n2_o' => 'float', + 'urea_co2' => 'float', + 'lime_co2' => 'float', + 'enteric_ch4' => 'float', + 'manure_management_ch4' => 'float', + 'manure_management_n2_o' => 'float', + 'animal_waste_n2_o' => 'float', + 'fertiliser_n2_o' => 'float', + 'urine_and_dung_n2_o' => 'float', + 'atmospheric_deposition_n2_o' => 'float', + 'leaching_and_runoff_n2_o' => 'float', + 'transport_n2_o' => 'float', + 'transport_ch4' => 'float', + 'transport_co2' => 'float', + 'total_co2' => 'float', + 'total_ch4' => 'float', + 'total_n2_o' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel_co2' => null, + 'fuel_ch4' => null, + 'fuel_n2_o' => null, + 'urea_co2' => null, + 'lime_co2' => null, + 'enteric_ch4' => null, + 'manure_management_ch4' => null, + 'manure_management_n2_o' => null, + 'animal_waste_n2_o' => null, + 'fertiliser_n2_o' => null, + 'urine_and_dung_n2_o' => null, + 'atmospheric_deposition_n2_o' => null, + 'leaching_and_runoff_n2_o' => null, + 'transport_n2_o' => null, + 'transport_ch4' => null, + 'transport_co2' => null, + 'total_co2' => null, + 'total_ch4' => null, + 'total_n2_o' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel_co2' => false, + 'fuel_ch4' => false, + 'fuel_n2_o' => false, + 'urea_co2' => false, + 'lime_co2' => false, + 'enteric_ch4' => false, + 'manure_management_ch4' => false, + 'manure_management_n2_o' => false, + 'animal_waste_n2_o' => false, + 'fertiliser_n2_o' => false, + 'urine_and_dung_n2_o' => false, + 'atmospheric_deposition_n2_o' => false, + 'leaching_and_runoff_n2_o' => false, + 'transport_n2_o' => false, + 'transport_ch4' => false, + 'transport_co2' => false, + 'total_co2' => false, + 'total_ch4' => false, + 'total_n2_o' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel_co2' => 'fuelCO2', + 'fuel_ch4' => 'fuelCH4', + 'fuel_n2_o' => 'fuelN2O', + 'urea_co2' => 'ureaCO2', + 'lime_co2' => 'limeCO2', + 'enteric_ch4' => 'entericCH4', + 'manure_management_ch4' => 'manureManagementCH4', + 'manure_management_n2_o' => 'manureManagementN2O', + 'animal_waste_n2_o' => 'animalWasteN2O', + 'fertiliser_n2_o' => 'fertiliserN2O', + 'urine_and_dung_n2_o' => 'urineAndDungN2O', + 'atmospheric_deposition_n2_o' => 'atmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'leachingAndRunoffN2O', + 'transport_n2_o' => 'transportN2O', + 'transport_ch4' => 'transportCH4', + 'transport_co2' => 'transportCO2', + 'total_co2' => 'totalCO2', + 'total_ch4' => 'totalCH4', + 'total_n2_o' => 'totalN2O', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel_co2' => 'setFuelCo2', + 'fuel_ch4' => 'setFuelCh4', + 'fuel_n2_o' => 'setFuelN2O', + 'urea_co2' => 'setUreaCo2', + 'lime_co2' => 'setLimeCo2', + 'enteric_ch4' => 'setEntericCh4', + 'manure_management_ch4' => 'setManureManagementCh4', + 'manure_management_n2_o' => 'setManureManagementN2O', + 'animal_waste_n2_o' => 'setAnimalWasteN2O', + 'fertiliser_n2_o' => 'setFertiliserN2O', + 'urine_and_dung_n2_o' => 'setUrineAndDungN2O', + 'atmospheric_deposition_n2_o' => 'setAtmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'setLeachingAndRunoffN2O', + 'transport_n2_o' => 'setTransportN2O', + 'transport_ch4' => 'setTransportCh4', + 'transport_co2' => 'setTransportCo2', + 'total_co2' => 'setTotalCo2', + 'total_ch4' => 'setTotalCh4', + 'total_n2_o' => 'setTotalN2O', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel_co2' => 'getFuelCo2', + 'fuel_ch4' => 'getFuelCh4', + 'fuel_n2_o' => 'getFuelN2O', + 'urea_co2' => 'getUreaCo2', + 'lime_co2' => 'getLimeCo2', + 'enteric_ch4' => 'getEntericCh4', + 'manure_management_ch4' => 'getManureManagementCh4', + 'manure_management_n2_o' => 'getManureManagementN2O', + 'animal_waste_n2_o' => 'getAnimalWasteN2O', + 'fertiliser_n2_o' => 'getFertiliserN2O', + 'urine_and_dung_n2_o' => 'getUrineAndDungN2O', + 'atmospheric_deposition_n2_o' => 'getAtmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'getLeachingAndRunoffN2O', + 'transport_n2_o' => 'getTransportN2O', + 'transport_ch4' => 'getTransportCh4', + 'transport_co2' => 'getTransportCo2', + 'total_co2' => 'getTotalCo2', + 'total_ch4' => 'getTotalCh4', + 'total_n2_o' => 'getTotalN2O', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel_co2', $data ?? [], null); + $this->setIfExists('fuel_ch4', $data ?? [], null); + $this->setIfExists('fuel_n2_o', $data ?? [], null); + $this->setIfExists('urea_co2', $data ?? [], null); + $this->setIfExists('lime_co2', $data ?? [], null); + $this->setIfExists('enteric_ch4', $data ?? [], null); + $this->setIfExists('manure_management_ch4', $data ?? [], null); + $this->setIfExists('manure_management_n2_o', $data ?? [], null); + $this->setIfExists('animal_waste_n2_o', $data ?? [], null); + $this->setIfExists('fertiliser_n2_o', $data ?? [], null); + $this->setIfExists('urine_and_dung_n2_o', $data ?? [], null); + $this->setIfExists('atmospheric_deposition_n2_o', $data ?? [], null); + $this->setIfExists('leaching_and_runoff_n2_o', $data ?? [], null); + $this->setIfExists('transport_n2_o', $data ?? [], null); + $this->setIfExists('transport_ch4', $data ?? [], null); + $this->setIfExists('transport_co2', $data ?? [], null); + $this->setIfExists('total_co2', $data ?? [], null); + $this->setIfExists('total_ch4', $data ?? [], null); + $this->setIfExists('total_n2_o', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel_co2'] === null) { + $invalidProperties[] = "'fuel_co2' can't be null"; + } + if ($this->container['fuel_ch4'] === null) { + $invalidProperties[] = "'fuel_ch4' can't be null"; + } + if ($this->container['fuel_n2_o'] === null) { + $invalidProperties[] = "'fuel_n2_o' can't be null"; + } + if ($this->container['urea_co2'] === null) { + $invalidProperties[] = "'urea_co2' can't be null"; + } + if ($this->container['lime_co2'] === null) { + $invalidProperties[] = "'lime_co2' can't be null"; + } + if ($this->container['enteric_ch4'] === null) { + $invalidProperties[] = "'enteric_ch4' can't be null"; + } + if ($this->container['manure_management_ch4'] === null) { + $invalidProperties[] = "'manure_management_ch4' can't be null"; + } + if ($this->container['manure_management_n2_o'] === null) { + $invalidProperties[] = "'manure_management_n2_o' can't be null"; + } + if ($this->container['animal_waste_n2_o'] === null) { + $invalidProperties[] = "'animal_waste_n2_o' can't be null"; + } + if ($this->container['fertiliser_n2_o'] === null) { + $invalidProperties[] = "'fertiliser_n2_o' can't be null"; + } + if ($this->container['urine_and_dung_n2_o'] === null) { + $invalidProperties[] = "'urine_and_dung_n2_o' can't be null"; + } + if ($this->container['atmospheric_deposition_n2_o'] === null) { + $invalidProperties[] = "'atmospheric_deposition_n2_o' can't be null"; + } + if ($this->container['leaching_and_runoff_n2_o'] === null) { + $invalidProperties[] = "'leaching_and_runoff_n2_o' can't be null"; + } + if ($this->container['transport_n2_o'] === null) { + $invalidProperties[] = "'transport_n2_o' can't be null"; + } + if ($this->container['transport_ch4'] === null) { + $invalidProperties[] = "'transport_ch4' can't be null"; + } + if ($this->container['transport_co2'] === null) { + $invalidProperties[] = "'transport_co2' can't be null"; + } + if ($this->container['total_co2'] === null) { + $invalidProperties[] = "'total_co2' can't be null"; + } + if ($this->container['total_ch4'] === null) { + $invalidProperties[] = "'total_ch4' can't be null"; + } + if ($this->container['total_n2_o'] === null) { + $invalidProperties[] = "'total_n2_o' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel_co2 + * + * @return float + */ + public function getFuelCo2() + { + return $this->container['fuel_co2']; + } + + /** + * Sets fuel_co2 + * + * @param float $fuel_co2 CO2 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCo2($fuel_co2) + { + if (is_null($fuel_co2)) { + throw new \InvalidArgumentException('non-nullable fuel_co2 cannot be null'); + } + $this->container['fuel_co2'] = $fuel_co2; + + return $this; + } + + /** + * Gets fuel_ch4 + * + * @return float + */ + public function getFuelCh4() + { + return $this->container['fuel_ch4']; + } + + /** + * Sets fuel_ch4 + * + * @param float $fuel_ch4 CH4 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCh4($fuel_ch4) + { + if (is_null($fuel_ch4)) { + throw new \InvalidArgumentException('non-nullable fuel_ch4 cannot be null'); + } + $this->container['fuel_ch4'] = $fuel_ch4; + + return $this; + } + + /** + * Gets fuel_n2_o + * + * @return float + */ + public function getFuelN2O() + { + return $this->container['fuel_n2_o']; + } + + /** + * Sets fuel_n2_o + * + * @param float $fuel_n2_o N2O emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelN2O($fuel_n2_o) + { + if (is_null($fuel_n2_o)) { + throw new \InvalidArgumentException('non-nullable fuel_n2_o cannot be null'); + } + $this->container['fuel_n2_o'] = $fuel_n2_o; + + return $this; + } + + /** + * Gets urea_co2 + * + * @return float + */ + public function getUreaCo2() + { + return $this->container['urea_co2']; + } + + /** + * Sets urea_co2 + * + * @param float $urea_co2 CO2 emissions from urea, in tonnes-CO2e + * + * @return self + */ + public function setUreaCo2($urea_co2) + { + if (is_null($urea_co2)) { + throw new \InvalidArgumentException('non-nullable urea_co2 cannot be null'); + } + $this->container['urea_co2'] = $urea_co2; + + return $this; + } + + /** + * Gets lime_co2 + * + * @return float + */ + public function getLimeCo2() + { + return $this->container['lime_co2']; + } + + /** + * Sets lime_co2 + * + * @param float $lime_co2 CO2 emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLimeCo2($lime_co2) + { + if (is_null($lime_co2)) { + throw new \InvalidArgumentException('non-nullable lime_co2 cannot be null'); + } + $this->container['lime_co2'] = $lime_co2; + + return $this; + } + + /** + * Gets enteric_ch4 + * + * @return float + */ + public function getEntericCh4() + { + return $this->container['enteric_ch4']; + } + + /** + * Sets enteric_ch4 + * + * @param float $enteric_ch4 CH4 emissions from enteric fermentation, in tonnes-CO2e + * + * @return self + */ + public function setEntericCh4($enteric_ch4) + { + if (is_null($enteric_ch4)) { + throw new \InvalidArgumentException('non-nullable enteric_ch4 cannot be null'); + } + $this->container['enteric_ch4'] = $enteric_ch4; + + return $this; + } + + /** + * Gets manure_management_ch4 + * + * @return float + */ + public function getManureManagementCh4() + { + return $this->container['manure_management_ch4']; + } + + /** + * Sets manure_management_ch4 + * + * @param float $manure_management_ch4 CH4 emissions from manure management, in tonnes-CO2e + * + * @return self + */ + public function setManureManagementCh4($manure_management_ch4) + { + if (is_null($manure_management_ch4)) { + throw new \InvalidArgumentException('non-nullable manure_management_ch4 cannot be null'); + } + $this->container['manure_management_ch4'] = $manure_management_ch4; + + return $this; + } + + /** + * Gets manure_management_n2_o + * + * @return float + */ + public function getManureManagementN2O() + { + return $this->container['manure_management_n2_o']; + } + + /** + * Sets manure_management_n2_o + * + * @param float $manure_management_n2_o N2O emissions from manure management, in tonnes-CO2e + * + * @return self + */ + public function setManureManagementN2O($manure_management_n2_o) + { + if (is_null($manure_management_n2_o)) { + throw new \InvalidArgumentException('non-nullable manure_management_n2_o cannot be null'); + } + $this->container['manure_management_n2_o'] = $manure_management_n2_o; + + return $this; + } + + /** + * Gets animal_waste_n2_o + * + * @return float + */ + public function getAnimalWasteN2O() + { + return $this->container['animal_waste_n2_o']; + } + + /** + * Sets animal_waste_n2_o + * + * @param float $animal_waste_n2_o N2O emissions from animal waste, in tonnes-CO2e + * + * @return self + */ + public function setAnimalWasteN2O($animal_waste_n2_o) + { + if (is_null($animal_waste_n2_o)) { + throw new \InvalidArgumentException('non-nullable animal_waste_n2_o cannot be null'); + } + $this->container['animal_waste_n2_o'] = $animal_waste_n2_o; + + return $this; + } + + /** + * Gets fertiliser_n2_o + * + * @return float + */ + public function getFertiliserN2O() + { + return $this->container['fertiliser_n2_o']; + } + + /** + * Sets fertiliser_n2_o + * + * @param float $fertiliser_n2_o N2O emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliserN2O($fertiliser_n2_o) + { + if (is_null($fertiliser_n2_o)) { + throw new \InvalidArgumentException('non-nullable fertiliser_n2_o cannot be null'); + } + $this->container['fertiliser_n2_o'] = $fertiliser_n2_o; + + return $this; + } + + /** + * Gets urine_and_dung_n2_o + * + * @return float + */ + public function getUrineAndDungN2O() + { + return $this->container['urine_and_dung_n2_o']; + } + + /** + * Sets urine_and_dung_n2_o + * + * @param float $urine_and_dung_n2_o N2O emissions from urine and dung, in tonnes-CO2e + * + * @return self + */ + public function setUrineAndDungN2O($urine_and_dung_n2_o) + { + if (is_null($urine_and_dung_n2_o)) { + throw new \InvalidArgumentException('non-nullable urine_and_dung_n2_o cannot be null'); + } + $this->container['urine_and_dung_n2_o'] = $urine_and_dung_n2_o; + + return $this; + } + + /** + * Gets atmospheric_deposition_n2_o + * + * @return float + */ + public function getAtmosphericDepositionN2O() + { + return $this->container['atmospheric_deposition_n2_o']; + } + + /** + * Sets atmospheric_deposition_n2_o + * + * @param float $atmospheric_deposition_n2_o N2O emissions from atmospheric deposition, in tonnes-CO2e + * + * @return self + */ + public function setAtmosphericDepositionN2O($atmospheric_deposition_n2_o) + { + if (is_null($atmospheric_deposition_n2_o)) { + throw new \InvalidArgumentException('non-nullable atmospheric_deposition_n2_o cannot be null'); + } + $this->container['atmospheric_deposition_n2_o'] = $atmospheric_deposition_n2_o; + + return $this; + } + + /** + * Gets leaching_and_runoff_n2_o + * + * @return float + */ + public function getLeachingAndRunoffN2O() + { + return $this->container['leaching_and_runoff_n2_o']; + } + + /** + * Sets leaching_and_runoff_n2_o + * + * @param float $leaching_and_runoff_n2_o N2O emissions from leeching and runoff, in tonnes-CO2e + * + * @return self + */ + public function setLeachingAndRunoffN2O($leaching_and_runoff_n2_o) + { + if (is_null($leaching_and_runoff_n2_o)) { + throw new \InvalidArgumentException('non-nullable leaching_and_runoff_n2_o cannot be null'); + } + $this->container['leaching_and_runoff_n2_o'] = $leaching_and_runoff_n2_o; + + return $this; + } + + /** + * Gets transport_n2_o + * + * @return float + */ + public function getTransportN2O() + { + return $this->container['transport_n2_o']; + } + + /** + * Sets transport_n2_o + * + * @param float $transport_n2_o N2O emissions from transport, in tonnes-CO2e + * + * @return self + */ + public function setTransportN2O($transport_n2_o) + { + if (is_null($transport_n2_o)) { + throw new \InvalidArgumentException('non-nullable transport_n2_o cannot be null'); + } + $this->container['transport_n2_o'] = $transport_n2_o; + + return $this; + } + + /** + * Gets transport_ch4 + * + * @return float + */ + public function getTransportCh4() + { + return $this->container['transport_ch4']; + } + + /** + * Sets transport_ch4 + * + * @param float $transport_ch4 CH4 emissions from transport, in tonnes-CO2e + * + * @return self + */ + public function setTransportCh4($transport_ch4) + { + if (is_null($transport_ch4)) { + throw new \InvalidArgumentException('non-nullable transport_ch4 cannot be null'); + } + $this->container['transport_ch4'] = $transport_ch4; + + return $this; + } + + /** + * Gets transport_co2 + * + * @return float + */ + public function getTransportCo2() + { + return $this->container['transport_co2']; + } + + /** + * Sets transport_co2 + * + * @param float $transport_co2 CO2 emissions from transport, in tonnes-CO2e + * + * @return self + */ + public function setTransportCo2($transport_co2) + { + if (is_null($transport_co2)) { + throw new \InvalidArgumentException('non-nullable transport_co2 cannot be null'); + } + $this->container['transport_co2'] = $transport_co2; + + return $this; + } + + /** + * Gets total_co2 + * + * @return float + */ + public function getTotalCo2() + { + return $this->container['total_co2']; + } + + /** + * Sets total_co2 + * + * @param float $total_co2 Total CO2 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCo2($total_co2) + { + if (is_null($total_co2)) { + throw new \InvalidArgumentException('non-nullable total_co2 cannot be null'); + } + $this->container['total_co2'] = $total_co2; + + return $this; + } + + /** + * Gets total_ch4 + * + * @return float + */ + public function getTotalCh4() + { + return $this->container['total_ch4']; + } + + /** + * Sets total_ch4 + * + * @param float $total_ch4 Total CH4 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCh4($total_ch4) + { + if (is_null($total_ch4)) { + throw new \InvalidArgumentException('non-nullable total_ch4 cannot be null'); + } + $this->container['total_ch4'] = $total_ch4; + + return $this; + } + + /** + * Gets total_n2_o + * + * @return float + */ + public function getTotalN2O() + { + return $this->container['total_n2_o']; + } + + /** + * Sets total_n2_o + * + * @param float $total_n2_o Total N2O scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalN2O($total_n2_o) + { + if (is_null($total_n2_o)) { + throw new \InvalidArgumentException('non-nullable total_n2_o cannot be null'); + } + $this->container['total_n2_o'] = $total_n2_o; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseScope3.php b/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseScope3.php new file mode 100644 index 00000000..aa0dab90 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairy200ResponseScope3.php @@ -0,0 +1,636 @@ + + */ +class PostDairy200ResponseScope3 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_200_response_scope3'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fertiliser' => 'float', + 'purchased_feed' => 'float', + 'herbicide' => 'float', + 'electricity' => 'float', + 'fuel' => 'float', + 'lime' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fertiliser' => null, + 'purchased_feed' => null, + 'herbicide' => null, + 'electricity' => null, + 'fuel' => null, + 'lime' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fertiliser' => false, + 'purchased_feed' => false, + 'herbicide' => false, + 'electricity' => false, + 'fuel' => false, + 'lime' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fertiliser' => 'fertiliser', + 'purchased_feed' => 'purchasedFeed', + 'herbicide' => 'herbicide', + 'electricity' => 'electricity', + 'fuel' => 'fuel', + 'lime' => 'lime', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fertiliser' => 'setFertiliser', + 'purchased_feed' => 'setPurchasedFeed', + 'herbicide' => 'setHerbicide', + 'electricity' => 'setElectricity', + 'fuel' => 'setFuel', + 'lime' => 'setLime', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fertiliser' => 'getFertiliser', + 'purchased_feed' => 'getPurchasedFeed', + 'herbicide' => 'getHerbicide', + 'electricity' => 'getElectricity', + 'fuel' => 'getFuel', + 'lime' => 'getLime', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('purchased_feed', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('electricity', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('lime', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['purchased_feed'] === null) { + $invalidProperties[] = "'purchased_feed' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['electricity'] === null) { + $invalidProperties[] = "'electricity' can't be null"; + } + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['lime'] === null) { + $invalidProperties[] = "'lime' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fertiliser + * + * @return float + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param float $fertiliser Emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets purchased_feed + * + * @return float + */ + public function getPurchasedFeed() + { + return $this->container['purchased_feed']; + } + + /** + * Sets purchased_feed + * + * @param float $purchased_feed Emissions from purchased feed, in tonnes-CO2e + * + * @return self + */ + public function setPurchasedFeed($purchased_feed) + { + if (is_null($purchased_feed)) { + throw new \InvalidArgumentException('non-nullable purchased_feed cannot be null'); + } + $this->container['purchased_feed'] = $purchased_feed; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Emissions from herbicide, in tonnes-CO2e + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets electricity + * + * @return float + */ + public function getElectricity() + { + return $this->container['electricity']; + } + + /** + * Sets electricity + * + * @param float $electricity Emissions from electricity, in tonnes-CO2e + * + * @return self + */ + public function setElectricity($electricity) + { + if (is_null($electricity)) { + throw new \InvalidArgumentException('non-nullable electricity cannot be null'); + } + $this->container['electricity'] = $electricity; + + return $this; + } + + /** + * Gets fuel + * + * @return float + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param float $fuel Emissions from fuel, in tonnes-CO2e + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets lime + * + * @return float + */ + public function getLime() + { + return $this->container['lime']; + } + + /** + * Sets lime + * + * @param float $lime Emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLime($lime) + { + if (is_null($lime)) { + throw new \InvalidArgumentException('non-nullable lime cannot be null'); + } + $this->container['lime'] = $lime; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 3 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairyRequest.php b/examples/php-api-client/api-client/lib/Model/PostDairyRequest.php new file mode 100644 index 00000000..35586502 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairyRequest.php @@ -0,0 +1,648 @@ + + */ +class PostDairyRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'rainfall_above600' => 'bool', + 'production_system' => 'string', + 'dairy' => '\OpenAPI\Client\Model\PostDairyRequestDairyInner[]', + 'vegetation' => '\OpenAPI\Client\Model\PostDairyRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'rainfall_above600' => null, + 'production_system' => null, + 'dairy' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'rainfall_above600' => false, + 'production_system' => false, + 'dairy' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'rainfall_above600' => 'rainfallAbove600', + 'production_system' => 'productionSystem', + 'dairy' => 'dairy', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'rainfall_above600' => 'setRainfallAbove600', + 'production_system' => 'setProductionSystem', + 'dairy' => 'setDairy', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'rainfall_above600' => 'getRainfallAbove600', + 'production_system' => 'getProductionSystem', + 'dairy' => 'getDairy', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + public const PRODUCTION_SYSTEM_NON_IRRIGATED_CROP = 'Non-irrigated Crop'; + public const PRODUCTION_SYSTEM_IRRIGATED_CROP = 'Irrigated Crop'; + public const PRODUCTION_SYSTEM_IRRIGATED_PASTURE = 'Irrigated Pasture'; + public const PRODUCTION_SYSTEM_NON_IRRIGATED_PASTURE = 'Non-irrigated Pasture'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getProductionSystemAllowableValues() + { + return [ + self::PRODUCTION_SYSTEM_NON_IRRIGATED_CROP, + self::PRODUCTION_SYSTEM_IRRIGATED_CROP, + self::PRODUCTION_SYSTEM_IRRIGATED_PASTURE, + self::PRODUCTION_SYSTEM_NON_IRRIGATED_PASTURE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('rainfall_above600', $data ?? [], null); + $this->setIfExists('production_system', $data ?? [], null); + $this->setIfExists('dairy', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['rainfall_above600'] === null) { + $invalidProperties[] = "'rainfall_above600' can't be null"; + } + if ($this->container['production_system'] === null) { + $invalidProperties[] = "'production_system' can't be null"; + } + $allowedValues = $this->getProductionSystemAllowableValues(); + if (!is_null($this->container['production_system']) && !in_array($this->container['production_system'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'production_system', must be one of '%s'", + $this->container['production_system'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['dairy'] === null) { + $invalidProperties[] = "'dairy' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets rainfall_above600 + * + * @return bool + */ + public function getRainfallAbove600() + { + return $this->container['rainfall_above600']; + } + + /** + * Sets rainfall_above600 + * + * @param bool $rainfall_above600 Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm + * + * @return self + */ + public function setRainfallAbove600($rainfall_above600) + { + if (is_null($rainfall_above600)) { + throw new \InvalidArgumentException('non-nullable rainfall_above600 cannot be null'); + } + $this->container['rainfall_above600'] = $rainfall_above600; + + return $this; + } + + /** + * Gets production_system + * + * @return string + */ + public function getProductionSystem() + { + return $this->container['production_system']; + } + + /** + * Sets production_system + * + * @param string $production_system Production system + * + * @return self + */ + public function setProductionSystem($production_system) + { + if (is_null($production_system)) { + throw new \InvalidArgumentException('non-nullable production_system cannot be null'); + } + $allowedValues = $this->getProductionSystemAllowableValues(); + if (!in_array($production_system, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'production_system', must be one of '%s'", + $production_system, + implode("', '", $allowedValues) + ) + ); + } + $this->container['production_system'] = $production_system; + + return $this; + } + + /** + * Gets dairy + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInner[] + */ + public function getDairy() + { + return $this->container['dairy']; + } + + /** + * Sets dairy + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInner[] $dairy dairy + * + * @return self + */ + public function setDairy($dairy) + { + if (is_null($dairy)) { + throw new \InvalidArgumentException('non-nullable dairy cannot be null'); + } + $this->container['dairy'] = $dairy; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostDairyRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostDairyRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInner.php b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInner.php new file mode 100644 index 00000000..bc55b30f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInner.php @@ -0,0 +1,1255 @@ + + */ +class PostDairyRequestDairyInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_request_dairy_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'classes' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClasses', + 'limestone' => 'float', + 'limestone_fraction' => 'float', + 'fertiliser' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser', + 'seasonal_fertiliser' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliser', + 'areas' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerAreas', + 'diesel' => 'float', + 'petrol' => 'float', + 'lpg' => 'float', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'grain_feed' => 'float', + 'hay_feed' => 'float', + 'cottonseed_feed' => 'float', + 'herbicide' => 'float', + 'herbicide_other' => 'float', + 'manure_management_milking_cows' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerManureManagementMilkingCows', + 'manure_management_other_dairy_cows' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerManureManagementMilkingCows', + 'emissions_allocation_to_red_meat_production' => 'float', + 'truck_type' => 'string', + 'distance_cattle_transported' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'classes' => null, + 'limestone' => null, + 'limestone_fraction' => null, + 'fertiliser' => null, + 'seasonal_fertiliser' => null, + 'areas' => null, + 'diesel' => null, + 'petrol' => null, + 'lpg' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'grain_feed' => null, + 'hay_feed' => null, + 'cottonseed_feed' => null, + 'herbicide' => null, + 'herbicide_other' => null, + 'manure_management_milking_cows' => null, + 'manure_management_other_dairy_cows' => null, + 'emissions_allocation_to_red_meat_production' => null, + 'truck_type' => null, + 'distance_cattle_transported' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'classes' => false, + 'limestone' => false, + 'limestone_fraction' => false, + 'fertiliser' => false, + 'seasonal_fertiliser' => false, + 'areas' => false, + 'diesel' => false, + 'petrol' => false, + 'lpg' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'grain_feed' => false, + 'hay_feed' => false, + 'cottonseed_feed' => false, + 'herbicide' => false, + 'herbicide_other' => false, + 'manure_management_milking_cows' => false, + 'manure_management_other_dairy_cows' => false, + 'emissions_allocation_to_red_meat_production' => false, + 'truck_type' => false, + 'distance_cattle_transported' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'classes' => 'classes', + 'limestone' => 'limestone', + 'limestone_fraction' => 'limestoneFraction', + 'fertiliser' => 'fertiliser', + 'seasonal_fertiliser' => 'seasonalFertiliser', + 'areas' => 'areas', + 'diesel' => 'diesel', + 'petrol' => 'petrol', + 'lpg' => 'lpg', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'grain_feed' => 'grainFeed', + 'hay_feed' => 'hayFeed', + 'cottonseed_feed' => 'cottonseedFeed', + 'herbicide' => 'herbicide', + 'herbicide_other' => 'herbicideOther', + 'manure_management_milking_cows' => 'manureManagementMilkingCows', + 'manure_management_other_dairy_cows' => 'manureManagementOtherDairyCows', + 'emissions_allocation_to_red_meat_production' => 'emissionsAllocationToRedMeatProduction', + 'truck_type' => 'truckType', + 'distance_cattle_transported' => 'distanceCattleTransported' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'classes' => 'setClasses', + 'limestone' => 'setLimestone', + 'limestone_fraction' => 'setLimestoneFraction', + 'fertiliser' => 'setFertiliser', + 'seasonal_fertiliser' => 'setSeasonalFertiliser', + 'areas' => 'setAreas', + 'diesel' => 'setDiesel', + 'petrol' => 'setPetrol', + 'lpg' => 'setLpg', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'grain_feed' => 'setGrainFeed', + 'hay_feed' => 'setHayFeed', + 'cottonseed_feed' => 'setCottonseedFeed', + 'herbicide' => 'setHerbicide', + 'herbicide_other' => 'setHerbicideOther', + 'manure_management_milking_cows' => 'setManureManagementMilkingCows', + 'manure_management_other_dairy_cows' => 'setManureManagementOtherDairyCows', + 'emissions_allocation_to_red_meat_production' => 'setEmissionsAllocationToRedMeatProduction', + 'truck_type' => 'setTruckType', + 'distance_cattle_transported' => 'setDistanceCattleTransported' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'classes' => 'getClasses', + 'limestone' => 'getLimestone', + 'limestone_fraction' => 'getLimestoneFraction', + 'fertiliser' => 'getFertiliser', + 'seasonal_fertiliser' => 'getSeasonalFertiliser', + 'areas' => 'getAreas', + 'diesel' => 'getDiesel', + 'petrol' => 'getPetrol', + 'lpg' => 'getLpg', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'grain_feed' => 'getGrainFeed', + 'hay_feed' => 'getHayFeed', + 'cottonseed_feed' => 'getCottonseedFeed', + 'herbicide' => 'getHerbicide', + 'herbicide_other' => 'getHerbicideOther', + 'manure_management_milking_cows' => 'getManureManagementMilkingCows', + 'manure_management_other_dairy_cows' => 'getManureManagementOtherDairyCows', + 'emissions_allocation_to_red_meat_production' => 'getEmissionsAllocationToRedMeatProduction', + 'truck_type' => 'getTruckType', + 'distance_cattle_transported' => 'getDistanceCattleTransported' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TRUCK_TYPE__4_DECK_TRAILER = '4 Deck Trailer'; + public const TRUCK_TYPE__6_DECK_TRAILER = '6 Deck Trailer'; + public const TRUCK_TYPE_B_DOUBLE = 'B-Double'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTruckTypeAllowableValues() + { + return [ + self::TRUCK_TYPE__4_DECK_TRAILER, + self::TRUCK_TYPE__6_DECK_TRAILER, + self::TRUCK_TYPE_B_DOUBLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('classes', $data ?? [], null); + $this->setIfExists('limestone', $data ?? [], null); + $this->setIfExists('limestone_fraction', $data ?? [], null); + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('seasonal_fertiliser', $data ?? [], null); + $this->setIfExists('areas', $data ?? [], null); + $this->setIfExists('diesel', $data ?? [], null); + $this->setIfExists('petrol', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('grain_feed', $data ?? [], null); + $this->setIfExists('hay_feed', $data ?? [], null); + $this->setIfExists('cottonseed_feed', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('herbicide_other', $data ?? [], null); + $this->setIfExists('manure_management_milking_cows', $data ?? [], null); + $this->setIfExists('manure_management_other_dairy_cows', $data ?? [], null); + $this->setIfExists('emissions_allocation_to_red_meat_production', $data ?? [], null); + $this->setIfExists('truck_type', $data ?? [], null); + $this->setIfExists('distance_cattle_transported', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['classes'] === null) { + $invalidProperties[] = "'classes' can't be null"; + } + if ($this->container['limestone'] === null) { + $invalidProperties[] = "'limestone' can't be null"; + } + if ($this->container['limestone_fraction'] === null) { + $invalidProperties[] = "'limestone_fraction' can't be null"; + } + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['seasonal_fertiliser'] === null) { + $invalidProperties[] = "'seasonal_fertiliser' can't be null"; + } + if ($this->container['areas'] === null) { + $invalidProperties[] = "'areas' can't be null"; + } + if ($this->container['diesel'] === null) { + $invalidProperties[] = "'diesel' can't be null"; + } + if ($this->container['petrol'] === null) { + $invalidProperties[] = "'petrol' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['grain_feed'] === null) { + $invalidProperties[] = "'grain_feed' can't be null"; + } + if ($this->container['hay_feed'] === null) { + $invalidProperties[] = "'hay_feed' can't be null"; + } + if ($this->container['cottonseed_feed'] === null) { + $invalidProperties[] = "'cottonseed_feed' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['herbicide_other'] === null) { + $invalidProperties[] = "'herbicide_other' can't be null"; + } + if ($this->container['manure_management_milking_cows'] === null) { + $invalidProperties[] = "'manure_management_milking_cows' can't be null"; + } + if ($this->container['manure_management_other_dairy_cows'] === null) { + $invalidProperties[] = "'manure_management_other_dairy_cows' can't be null"; + } + if ($this->container['emissions_allocation_to_red_meat_production'] === null) { + $invalidProperties[] = "'emissions_allocation_to_red_meat_production' can't be null"; + } + if (($this->container['emissions_allocation_to_red_meat_production'] > 1)) { + $invalidProperties[] = "invalid value for 'emissions_allocation_to_red_meat_production', must be smaller than or equal to 1."; + } + + if (($this->container['emissions_allocation_to_red_meat_production'] < 0)) { + $invalidProperties[] = "invalid value for 'emissions_allocation_to_red_meat_production', must be bigger than or equal to 0."; + } + + if ($this->container['truck_type'] === null) { + $invalidProperties[] = "'truck_type' can't be null"; + } + $allowedValues = $this->getTruckTypeAllowableValues(); + if (!is_null($this->container['truck_type']) && !in_array($this->container['truck_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'truck_type', must be one of '%s'", + $this->container['truck_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['distance_cattle_transported'] === null) { + $invalidProperties[] = "'distance_cattle_transported' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets classes + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClasses + */ + public function getClasses() + { + return $this->container['classes']; + } + + /** + * Sets classes + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClasses $classes classes + * + * @return self + */ + public function setClasses($classes) + { + if (is_null($classes)) { + throw new \InvalidArgumentException('non-nullable classes cannot be null'); + } + $this->container['classes'] = $classes; + + return $this; + } + + /** + * Gets limestone + * + * @return float + */ + public function getLimestone() + { + return $this->container['limestone']; + } + + /** + * Sets limestone + * + * @param float $limestone Lime applied in tonnes + * + * @return self + */ + public function setLimestone($limestone) + { + if (is_null($limestone)) { + throw new \InvalidArgumentException('non-nullable limestone cannot be null'); + } + $this->container['limestone'] = $limestone; + + return $this; + } + + /** + * Gets limestone_fraction + * + * @return float + */ + public function getLimestoneFraction() + { + return $this->container['limestone_fraction']; + } + + /** + * Sets limestone_fraction + * + * @param float $limestone_fraction Fraction of lime as limestone vs dolomite, between 0 and 1 + * + * @return self + */ + public function setLimestoneFraction($limestone_fraction) + { + if (is_null($limestone_fraction)) { + throw new \InvalidArgumentException('non-nullable limestone_fraction cannot be null'); + } + $this->container['limestone_fraction'] = $limestone_fraction; + + return $this; + } + + /** + * Gets fertiliser + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser $fertiliser fertiliser + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets seasonal_fertiliser + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliser + */ + public function getSeasonalFertiliser() + { + return $this->container['seasonal_fertiliser']; + } + + /** + * Sets seasonal_fertiliser + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliser $seasonal_fertiliser seasonal_fertiliser + * + * @return self + */ + public function setSeasonalFertiliser($seasonal_fertiliser) + { + if (is_null($seasonal_fertiliser)) { + throw new \InvalidArgumentException('non-nullable seasonal_fertiliser cannot be null'); + } + $this->container['seasonal_fertiliser'] = $seasonal_fertiliser; + + return $this; + } + + /** + * Gets areas + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerAreas + */ + public function getAreas() + { + return $this->container['areas']; + } + + /** + * Sets areas + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerAreas $areas areas + * + * @return self + */ + public function setAreas($areas) + { + if (is_null($areas)) { + throw new \InvalidArgumentException('non-nullable areas cannot be null'); + } + $this->container['areas'] = $areas; + + return $this; + } + + /** + * Gets diesel + * + * @return float + */ + public function getDiesel() + { + return $this->container['diesel']; + } + + /** + * Sets diesel + * + * @param float $diesel Diesel usage in L (litres) + * + * @return self + */ + public function setDiesel($diesel) + { + if (is_null($diesel)) { + throw new \InvalidArgumentException('non-nullable diesel cannot be null'); + } + $this->container['diesel'] = $diesel; + + return $this; + } + + /** + * Gets petrol + * + * @return float + */ + public function getPetrol() + { + return $this->container['petrol']; + } + + /** + * Sets petrol + * + * @param float $petrol Petrol usage in L (litres) + * + * @return self + */ + public function setPetrol($petrol) + { + if (is_null($petrol)) { + throw new \InvalidArgumentException('non-nullable petrol cannot be null'); + } + $this->container['petrol'] = $petrol; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostDairyRequestDairyInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostDairyRequestDairyInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets grain_feed + * + * @return float + */ + public function getGrainFeed() + { + return $this->container['grain_feed']; + } + + /** + * Sets grain_feed + * + * @param float $grain_feed Grain purchased for cattle feed in tonnes + * + * @return self + */ + public function setGrainFeed($grain_feed) + { + if (is_null($grain_feed)) { + throw new \InvalidArgumentException('non-nullable grain_feed cannot be null'); + } + $this->container['grain_feed'] = $grain_feed; + + return $this; + } + + /** + * Gets hay_feed + * + * @return float + */ + public function getHayFeed() + { + return $this->container['hay_feed']; + } + + /** + * Sets hay_feed + * + * @param float $hay_feed Hay purchased for cattle feed in tonnes + * + * @return self + */ + public function setHayFeed($hay_feed) + { + if (is_null($hay_feed)) { + throw new \InvalidArgumentException('non-nullable hay_feed cannot be null'); + } + $this->container['hay_feed'] = $hay_feed; + + return $this; + } + + /** + * Gets cottonseed_feed + * + * @return float + */ + public function getCottonseedFeed() + { + return $this->container['cottonseed_feed']; + } + + /** + * Sets cottonseed_feed + * + * @param float $cottonseed_feed Cotton seed purchased for cattle feed in tonnes + * + * @return self + */ + public function setCottonseedFeed($cottonseed_feed) + { + if (is_null($cottonseed_feed)) { + throw new \InvalidArgumentException('non-nullable cottonseed_feed cannot be null'); + } + $this->container['cottonseed_feed'] = $cottonseed_feed; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets herbicide_other + * + * @return float + */ + public function getHerbicideOther() + { + return $this->container['herbicide_other']; + } + + /** + * Sets herbicide_other + * + * @param float $herbicide_other Total amount of active ingredients of from other herbicides in kg (kilograms) + * + * @return self + */ + public function setHerbicideOther($herbicide_other) + { + if (is_null($herbicide_other)) { + throw new \InvalidArgumentException('non-nullable herbicide_other cannot be null'); + } + $this->container['herbicide_other'] = $herbicide_other; + + return $this; + } + + /** + * Gets manure_management_milking_cows + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerManureManagementMilkingCows + */ + public function getManureManagementMilkingCows() + { + return $this->container['manure_management_milking_cows']; + } + + /** + * Sets manure_management_milking_cows + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerManureManagementMilkingCows $manure_management_milking_cows manure_management_milking_cows + * + * @return self + */ + public function setManureManagementMilkingCows($manure_management_milking_cows) + { + if (is_null($manure_management_milking_cows)) { + throw new \InvalidArgumentException('non-nullable manure_management_milking_cows cannot be null'); + } + $this->container['manure_management_milking_cows'] = $manure_management_milking_cows; + + return $this; + } + + /** + * Gets manure_management_other_dairy_cows + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerManureManagementMilkingCows + */ + public function getManureManagementOtherDairyCows() + { + return $this->container['manure_management_other_dairy_cows']; + } + + /** + * Sets manure_management_other_dairy_cows + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerManureManagementMilkingCows $manure_management_other_dairy_cows manure_management_other_dairy_cows + * + * @return self + */ + public function setManureManagementOtherDairyCows($manure_management_other_dairy_cows) + { + if (is_null($manure_management_other_dairy_cows)) { + throw new \InvalidArgumentException('non-nullable manure_management_other_dairy_cows cannot be null'); + } + $this->container['manure_management_other_dairy_cows'] = $manure_management_other_dairy_cows; + + return $this; + } + + /** + * Gets emissions_allocation_to_red_meat_production + * + * @return float + */ + public function getEmissionsAllocationToRedMeatProduction() + { + return $this->container['emissions_allocation_to_red_meat_production']; + } + + /** + * Sets emissions_allocation_to_red_meat_production + * + * @param float $emissions_allocation_to_red_meat_production Allocation as a fraction, from 0 to 1 + * + * @return self + */ + public function setEmissionsAllocationToRedMeatProduction($emissions_allocation_to_red_meat_production) + { + if (is_null($emissions_allocation_to_red_meat_production)) { + throw new \InvalidArgumentException('non-nullable emissions_allocation_to_red_meat_production cannot be null'); + } + + if (($emissions_allocation_to_red_meat_production > 1)) { + throw new \InvalidArgumentException('invalid value for $emissions_allocation_to_red_meat_production when calling PostDairyRequestDairyInner., must be smaller than or equal to 1.'); + } + if (($emissions_allocation_to_red_meat_production < 0)) { + throw new \InvalidArgumentException('invalid value for $emissions_allocation_to_red_meat_production when calling PostDairyRequestDairyInner., must be bigger than or equal to 0.'); + } + + $this->container['emissions_allocation_to_red_meat_production'] = $emissions_allocation_to_red_meat_production; + + return $this; + } + + /** + * Gets truck_type + * + * @return string + */ + public function getTruckType() + { + return $this->container['truck_type']; + } + + /** + * Sets truck_type + * + * @param string $truck_type Type of truck used for cattle transport + * + * @return self + */ + public function setTruckType($truck_type) + { + if (is_null($truck_type)) { + throw new \InvalidArgumentException('non-nullable truck_type cannot be null'); + } + $allowedValues = $this->getTruckTypeAllowableValues(); + if (!in_array($truck_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'truck_type', must be one of '%s'", + $truck_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['truck_type'] = $truck_type; + + return $this; + } + + /** + * Gets distance_cattle_transported + * + * @return float + */ + public function getDistanceCattleTransported() + { + return $this->container['distance_cattle_transported']; + } + + /** + * Sets distance_cattle_transported + * + * @param float $distance_cattle_transported Distance cattle are transported between farms, in km (kilometres) + * + * @return self + */ + public function setDistanceCattleTransported($distance_cattle_transported) + { + if (is_null($distance_cattle_transported)) { + throw new \InvalidArgumentException('non-nullable distance_cattle_transported cannot be null'); + } + $this->container['distance_cattle_transported'] = $distance_cattle_transported; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerAreas.php b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerAreas.php new file mode 100644 index 00000000..5a824a2f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerAreas.php @@ -0,0 +1,525 @@ + + */ +class PostDairyRequestDairyInnerAreas implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_request_dairy_inner_areas'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'cropped_dryland' => 'float', + 'cropped_irrigated' => 'float', + 'improved_pasture_dryland' => 'float', + 'improved_pasture_irrigated' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'cropped_dryland' => null, + 'cropped_irrigated' => null, + 'improved_pasture_dryland' => null, + 'improved_pasture_irrigated' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'cropped_dryland' => false, + 'cropped_irrigated' => false, + 'improved_pasture_dryland' => false, + 'improved_pasture_irrigated' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'cropped_dryland' => 'croppedDryland', + 'cropped_irrigated' => 'croppedIrrigated', + 'improved_pasture_dryland' => 'improvedPastureDryland', + 'improved_pasture_irrigated' => 'improvedPastureIrrigated' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cropped_dryland' => 'setCroppedDryland', + 'cropped_irrigated' => 'setCroppedIrrigated', + 'improved_pasture_dryland' => 'setImprovedPastureDryland', + 'improved_pasture_irrigated' => 'setImprovedPastureIrrigated' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cropped_dryland' => 'getCroppedDryland', + 'cropped_irrigated' => 'getCroppedIrrigated', + 'improved_pasture_dryland' => 'getImprovedPastureDryland', + 'improved_pasture_irrigated' => 'getImprovedPastureIrrigated' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('cropped_dryland', $data ?? [], 0); + $this->setIfExists('cropped_irrigated', $data ?? [], 0); + $this->setIfExists('improved_pasture_dryland', $data ?? [], 0); + $this->setIfExists('improved_pasture_irrigated', $data ?? [], 0); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['cropped_dryland'] === null) { + $invalidProperties[] = "'cropped_dryland' can't be null"; + } + if ($this->container['cropped_irrigated'] === null) { + $invalidProperties[] = "'cropped_irrigated' can't be null"; + } + if ($this->container['improved_pasture_dryland'] === null) { + $invalidProperties[] = "'improved_pasture_dryland' can't be null"; + } + if ($this->container['improved_pasture_irrigated'] === null) { + $invalidProperties[] = "'improved_pasture_irrigated' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets cropped_dryland + * + * @return float + */ + public function getCroppedDryland() + { + return $this->container['cropped_dryland']; + } + + /** + * Sets cropped_dryland + * + * @param float $cropped_dryland cropped_dryland + * + * @return self + */ + public function setCroppedDryland($cropped_dryland) + { + if (is_null($cropped_dryland)) { + throw new \InvalidArgumentException('non-nullable cropped_dryland cannot be null'); + } + $this->container['cropped_dryland'] = $cropped_dryland; + + return $this; + } + + /** + * Gets cropped_irrigated + * + * @return float + */ + public function getCroppedIrrigated() + { + return $this->container['cropped_irrigated']; + } + + /** + * Sets cropped_irrigated + * + * @param float $cropped_irrigated cropped_irrigated + * + * @return self + */ + public function setCroppedIrrigated($cropped_irrigated) + { + if (is_null($cropped_irrigated)) { + throw new \InvalidArgumentException('non-nullable cropped_irrigated cannot be null'); + } + $this->container['cropped_irrigated'] = $cropped_irrigated; + + return $this; + } + + /** + * Gets improved_pasture_dryland + * + * @return float + */ + public function getImprovedPastureDryland() + { + return $this->container['improved_pasture_dryland']; + } + + /** + * Sets improved_pasture_dryland + * + * @param float $improved_pasture_dryland improved_pasture_dryland + * + * @return self + */ + public function setImprovedPastureDryland($improved_pasture_dryland) + { + if (is_null($improved_pasture_dryland)) { + throw new \InvalidArgumentException('non-nullable improved_pasture_dryland cannot be null'); + } + $this->container['improved_pasture_dryland'] = $improved_pasture_dryland; + + return $this; + } + + /** + * Gets improved_pasture_irrigated + * + * @return float + */ + public function getImprovedPastureIrrigated() + { + return $this->container['improved_pasture_irrigated']; + } + + /** + * Sets improved_pasture_irrigated + * + * @param float $improved_pasture_irrigated improved_pasture_irrigated + * + * @return self + */ + public function setImprovedPastureIrrigated($improved_pasture_irrigated) + { + if (is_null($improved_pasture_irrigated)) { + throw new \InvalidArgumentException('non-nullable improved_pasture_irrigated cannot be null'); + } + $this->container['improved_pasture_irrigated'] = $improved_pasture_irrigated; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClasses.php b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClasses.php new file mode 100644 index 00000000..9a342773 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClasses.php @@ -0,0 +1,562 @@ + + */ +class PostDairyRequestDairyInnerClasses implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_request_dairy_inner_classes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'milking_cows' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCows', + 'heifers_lt1' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesHeifersLt1', + 'heifers_gt1' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesHeifersGt1', + 'dairy_bulls_lt1' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesDairyBullsLt1', + 'dairy_bulls_gt1' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesDairyBullsGt1' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'milking_cows' => null, + 'heifers_lt1' => null, + 'heifers_gt1' => null, + 'dairy_bulls_lt1' => null, + 'dairy_bulls_gt1' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'milking_cows' => false, + 'heifers_lt1' => false, + 'heifers_gt1' => false, + 'dairy_bulls_lt1' => false, + 'dairy_bulls_gt1' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'milking_cows' => 'milkingCows', + 'heifers_lt1' => 'heifersLt1', + 'heifers_gt1' => 'heifersGt1', + 'dairy_bulls_lt1' => 'dairyBullsLt1', + 'dairy_bulls_gt1' => 'dairyBullsGt1' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'milking_cows' => 'setMilkingCows', + 'heifers_lt1' => 'setHeifersLt1', + 'heifers_gt1' => 'setHeifersGt1', + 'dairy_bulls_lt1' => 'setDairyBullsLt1', + 'dairy_bulls_gt1' => 'setDairyBullsGt1' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'milking_cows' => 'getMilkingCows', + 'heifers_lt1' => 'getHeifersLt1', + 'heifers_gt1' => 'getHeifersGt1', + 'dairy_bulls_lt1' => 'getDairyBullsLt1', + 'dairy_bulls_gt1' => 'getDairyBullsGt1' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('milking_cows', $data ?? [], null); + $this->setIfExists('heifers_lt1', $data ?? [], null); + $this->setIfExists('heifers_gt1', $data ?? [], null); + $this->setIfExists('dairy_bulls_lt1', $data ?? [], null); + $this->setIfExists('dairy_bulls_gt1', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['milking_cows'] === null) { + $invalidProperties[] = "'milking_cows' can't be null"; + } + if ($this->container['heifers_lt1'] === null) { + $invalidProperties[] = "'heifers_lt1' can't be null"; + } + if ($this->container['heifers_gt1'] === null) { + $invalidProperties[] = "'heifers_gt1' can't be null"; + } + if ($this->container['dairy_bulls_lt1'] === null) { + $invalidProperties[] = "'dairy_bulls_lt1' can't be null"; + } + if ($this->container['dairy_bulls_gt1'] === null) { + $invalidProperties[] = "'dairy_bulls_gt1' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets milking_cows + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCows + */ + public function getMilkingCows() + { + return $this->container['milking_cows']; + } + + /** + * Sets milking_cows + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCows $milking_cows milking_cows + * + * @return self + */ + public function setMilkingCows($milking_cows) + { + if (is_null($milking_cows)) { + throw new \InvalidArgumentException('non-nullable milking_cows cannot be null'); + } + $this->container['milking_cows'] = $milking_cows; + + return $this; + } + + /** + * Gets heifers_lt1 + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesHeifersLt1 + */ + public function getHeifersLt1() + { + return $this->container['heifers_lt1']; + } + + /** + * Sets heifers_lt1 + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesHeifersLt1 $heifers_lt1 heifers_lt1 + * + * @return self + */ + public function setHeifersLt1($heifers_lt1) + { + if (is_null($heifers_lt1)) { + throw new \InvalidArgumentException('non-nullable heifers_lt1 cannot be null'); + } + $this->container['heifers_lt1'] = $heifers_lt1; + + return $this; + } + + /** + * Gets heifers_gt1 + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesHeifersGt1 + */ + public function getHeifersGt1() + { + return $this->container['heifers_gt1']; + } + + /** + * Sets heifers_gt1 + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesHeifersGt1 $heifers_gt1 heifers_gt1 + * + * @return self + */ + public function setHeifersGt1($heifers_gt1) + { + if (is_null($heifers_gt1)) { + throw new \InvalidArgumentException('non-nullable heifers_gt1 cannot be null'); + } + $this->container['heifers_gt1'] = $heifers_gt1; + + return $this; + } + + /** + * Gets dairy_bulls_lt1 + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesDairyBullsLt1 + */ + public function getDairyBullsLt1() + { + return $this->container['dairy_bulls_lt1']; + } + + /** + * Sets dairy_bulls_lt1 + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesDairyBullsLt1 $dairy_bulls_lt1 dairy_bulls_lt1 + * + * @return self + */ + public function setDairyBullsLt1($dairy_bulls_lt1) + { + if (is_null($dairy_bulls_lt1)) { + throw new \InvalidArgumentException('non-nullable dairy_bulls_lt1 cannot be null'); + } + $this->container['dairy_bulls_lt1'] = $dairy_bulls_lt1; + + return $this; + } + + /** + * Gets dairy_bulls_gt1 + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesDairyBullsGt1 + */ + public function getDairyBullsGt1() + { + return $this->container['dairy_bulls_gt1']; + } + + /** + * Sets dairy_bulls_gt1 + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesDairyBullsGt1 $dairy_bulls_gt1 dairy_bulls_gt1 + * + * @return self + */ + public function setDairyBullsGt1($dairy_bulls_gt1) + { + if (is_null($dairy_bulls_gt1)) { + throw new \InvalidArgumentException('non-nullable dairy_bulls_gt1 cannot be null'); + } + $this->container['dairy_bulls_gt1'] = $dairy_bulls_gt1; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.php b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.php new file mode 100644 index 00000000..ec5269dd --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.php @@ -0,0 +1,525 @@ + + */ +class PostDairyRequestDairyInnerClassesDairyBullsGt1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_request_dairy_inner_classes_dairyBullsGt1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.php b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.php new file mode 100644 index 00000000..9bd366ec --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.php @@ -0,0 +1,525 @@ + + */ +class PostDairyRequestDairyInnerClassesDairyBullsLt1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_request_dairy_inner_classes_dairyBullsLt1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesHeifersGt1.php b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesHeifersGt1.php new file mode 100644 index 00000000..acaef7fe --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesHeifersGt1.php @@ -0,0 +1,525 @@ + + */ +class PostDairyRequestDairyInnerClassesHeifersGt1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_request_dairy_inner_classes_heifersGt1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesHeifersLt1.php b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesHeifersLt1.php new file mode 100644 index 00000000..41b867a6 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesHeifersLt1.php @@ -0,0 +1,525 @@ + + */ +class PostDairyRequestDairyInnerClassesHeifersLt1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_request_dairy_inner_classes_heifersLt1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesMilkingCows.php b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesMilkingCows.php new file mode 100644 index 00000000..2788a2c1 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesMilkingCows.php @@ -0,0 +1,525 @@ + + */ +class PostDairyRequestDairyInnerClassesMilkingCows implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_request_dairy_inner_classes_milkingCows'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.php b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.php new file mode 100644 index 00000000..7ef2eb27 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.php @@ -0,0 +1,589 @@ + + */ +class PostDairyRequestDairyInnerClassesMilkingCowsAutumn implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_request_dairy_inner_classes_milkingCows_autumn'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'head' => 'float', + 'liveweight' => 'float', + 'liveweight_gain' => 'float', + 'crude_protein' => 'float', + 'dry_matter_digestibility' => 'float', + 'milk_production' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'head' => null, + 'liveweight' => null, + 'liveweight_gain' => null, + 'crude_protein' => null, + 'dry_matter_digestibility' => null, + 'milk_production' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'head' => false, + 'liveweight' => false, + 'liveweight_gain' => false, + 'crude_protein' => false, + 'dry_matter_digestibility' => false, + 'milk_production' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'head' => 'head', + 'liveweight' => 'liveweight', + 'liveweight_gain' => 'liveweightGain', + 'crude_protein' => 'crudeProtein', + 'dry_matter_digestibility' => 'dryMatterDigestibility', + 'milk_production' => 'milkProduction' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'head' => 'setHead', + 'liveweight' => 'setLiveweight', + 'liveweight_gain' => 'setLiveweightGain', + 'crude_protein' => 'setCrudeProtein', + 'dry_matter_digestibility' => 'setDryMatterDigestibility', + 'milk_production' => 'setMilkProduction' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'head' => 'getHead', + 'liveweight' => 'getLiveweight', + 'liveweight_gain' => 'getLiveweightGain', + 'crude_protein' => 'getCrudeProtein', + 'dry_matter_digestibility' => 'getDryMatterDigestibility', + 'milk_production' => 'getMilkProduction' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('head', $data ?? [], null); + $this->setIfExists('liveweight', $data ?? [], null); + $this->setIfExists('liveweight_gain', $data ?? [], null); + $this->setIfExists('crude_protein', $data ?? [], null); + $this->setIfExists('dry_matter_digestibility', $data ?? [], null); + $this->setIfExists('milk_production', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['head'] === null) { + $invalidProperties[] = "'head' can't be null"; + } + if ($this->container['liveweight'] === null) { + $invalidProperties[] = "'liveweight' can't be null"; + } + if ($this->container['liveweight_gain'] === null) { + $invalidProperties[] = "'liveweight_gain' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets head + * + * @return float + */ + public function getHead() + { + return $this->container['head']; + } + + /** + * Sets head + * + * @param float $head Number of animals (head) + * + * @return self + */ + public function setHead($head) + { + if (is_null($head)) { + throw new \InvalidArgumentException('non-nullable head cannot be null'); + } + $this->container['head'] = $head; + + return $this; + } + + /** + * Gets liveweight + * + * @return float + */ + public function getLiveweight() + { + return $this->container['liveweight']; + } + + /** + * Sets liveweight + * + * @param float $liveweight Average liveweight of animals in kg/head (kilogram per head) + * + * @return self + */ + public function setLiveweight($liveweight) + { + if (is_null($liveweight)) { + throw new \InvalidArgumentException('non-nullable liveweight cannot be null'); + } + $this->container['liveweight'] = $liveweight; + + return $this; + } + + /** + * Gets liveweight_gain + * + * @return float + */ + public function getLiveweightGain() + { + return $this->container['liveweight_gain']; + } + + /** + * Sets liveweight_gain + * + * @param float $liveweight_gain Average liveweight gain in kg/day (kilogram per day) + * + * @return self + */ + public function setLiveweightGain($liveweight_gain) + { + if (is_null($liveweight_gain)) { + throw new \InvalidArgumentException('non-nullable liveweight_gain cannot be null'); + } + $this->container['liveweight_gain'] = $liveweight_gain; + + return $this; + } + + /** + * Gets crude_protein + * + * @return float|null + */ + public function getCrudeProtein() + { + return $this->container['crude_protein']; + } + + /** + * Sets crude_protein + * + * @param float|null $crude_protein Crude protein percent, between 0 and 100. Note: If no value is provided, zero will be assumed. This will result in large, negative output values. This input will become mandatory in a future version. + * + * @return self + */ + public function setCrudeProtein($crude_protein) + { + if (is_null($crude_protein)) { + throw new \InvalidArgumentException('non-nullable crude_protein cannot be null'); + } + $this->container['crude_protein'] = $crude_protein; + + return $this; + } + + /** + * Gets dry_matter_digestibility + * + * @return float|null + */ + public function getDryMatterDigestibility() + { + return $this->container['dry_matter_digestibility']; + } + + /** + * Sets dry_matter_digestibility + * + * @param float|null $dry_matter_digestibility Dry matter digestibility percent, between 0 and 100. Note: If no value is provided, zero will be assumed. This will result in large, negative output values. This input will become mandatory in a future version. + * + * @return self + */ + public function setDryMatterDigestibility($dry_matter_digestibility) + { + if (is_null($dry_matter_digestibility)) { + throw new \InvalidArgumentException('non-nullable dry_matter_digestibility cannot be null'); + } + $this->container['dry_matter_digestibility'] = $dry_matter_digestibility; + + return $this; + } + + /** + * Gets milk_production + * + * @return float|null + */ + public function getMilkProduction() + { + return $this->container['milk_production']; + } + + /** + * Sets milk_production + * + * @param float|null $milk_production Milk produced in L/day/head (litres per day per head) + * + * @return self + */ + public function setMilkProduction($milk_production) + { + if (is_null($milk_production)) { + throw new \InvalidArgumentException('non-nullable milk_production cannot be null'); + } + $this->container['milk_production'] = $milk_production; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.php b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.php new file mode 100644 index 00000000..ed9b2a78 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.php @@ -0,0 +1,642 @@ + + */ +class PostDairyRequestDairyInnerManureManagementMilkingCows implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_request_dairy_inner_manureManagementMilkingCows'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'pasture' => 'float', + 'anaerobic_lagoon' => 'float', + 'sump_and_dispersal' => 'float', + 'drain_to_paddocks' => 'float', + 'soild_storage' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'pasture' => null, + 'anaerobic_lagoon' => null, + 'sump_and_dispersal' => null, + 'drain_to_paddocks' => null, + 'soild_storage' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'pasture' => false, + 'anaerobic_lagoon' => false, + 'sump_and_dispersal' => false, + 'drain_to_paddocks' => false, + 'soild_storage' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'pasture' => 'pasture', + 'anaerobic_lagoon' => 'anaerobicLagoon', + 'sump_and_dispersal' => 'sumpAndDispersal', + 'drain_to_paddocks' => 'drainToPaddocks', + 'soild_storage' => 'soildStorage' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'pasture' => 'setPasture', + 'anaerobic_lagoon' => 'setAnaerobicLagoon', + 'sump_and_dispersal' => 'setSumpAndDispersal', + 'drain_to_paddocks' => 'setDrainToPaddocks', + 'soild_storage' => 'setSoildStorage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'pasture' => 'getPasture', + 'anaerobic_lagoon' => 'getAnaerobicLagoon', + 'sump_and_dispersal' => 'getSumpAndDispersal', + 'drain_to_paddocks' => 'getDrainToPaddocks', + 'soild_storage' => 'getSoildStorage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('pasture', $data ?? [], null); + $this->setIfExists('anaerobic_lagoon', $data ?? [], null); + $this->setIfExists('sump_and_dispersal', $data ?? [], null); + $this->setIfExists('drain_to_paddocks', $data ?? [], null); + $this->setIfExists('soild_storage', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['pasture'] === null) { + $invalidProperties[] = "'pasture' can't be null"; + } + if (($this->container['pasture'] > 100)) { + $invalidProperties[] = "invalid value for 'pasture', must be smaller than or equal to 100."; + } + + if (($this->container['pasture'] < 0)) { + $invalidProperties[] = "invalid value for 'pasture', must be bigger than or equal to 0."; + } + + if ($this->container['anaerobic_lagoon'] === null) { + $invalidProperties[] = "'anaerobic_lagoon' can't be null"; + } + if (($this->container['anaerobic_lagoon'] > 100)) { + $invalidProperties[] = "invalid value for 'anaerobic_lagoon', must be smaller than or equal to 100."; + } + + if (($this->container['anaerobic_lagoon'] < 0)) { + $invalidProperties[] = "invalid value for 'anaerobic_lagoon', must be bigger than or equal to 0."; + } + + if ($this->container['sump_and_dispersal'] === null) { + $invalidProperties[] = "'sump_and_dispersal' can't be null"; + } + if (($this->container['sump_and_dispersal'] > 100)) { + $invalidProperties[] = "invalid value for 'sump_and_dispersal', must be smaller than or equal to 100."; + } + + if (($this->container['sump_and_dispersal'] < 0)) { + $invalidProperties[] = "invalid value for 'sump_and_dispersal', must be bigger than or equal to 0."; + } + + if ($this->container['drain_to_paddocks'] === null) { + $invalidProperties[] = "'drain_to_paddocks' can't be null"; + } + if (($this->container['drain_to_paddocks'] > 100)) { + $invalidProperties[] = "invalid value for 'drain_to_paddocks', must be smaller than or equal to 100."; + } + + if (($this->container['drain_to_paddocks'] < 0)) { + $invalidProperties[] = "invalid value for 'drain_to_paddocks', must be bigger than or equal to 0."; + } + + if ($this->container['soild_storage'] === null) { + $invalidProperties[] = "'soild_storage' can't be null"; + } + if (($this->container['soild_storage'] > 100)) { + $invalidProperties[] = "invalid value for 'soild_storage', must be smaller than or equal to 100."; + } + + if (($this->container['soild_storage'] < 0)) { + $invalidProperties[] = "invalid value for 'soild_storage', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets pasture + * + * @return float + */ + public function getPasture() + { + return $this->container['pasture']; + } + + /** + * Sets pasture + * + * @param float $pasture pasture + * + * @return self + */ + public function setPasture($pasture) + { + if (is_null($pasture)) { + throw new \InvalidArgumentException('non-nullable pasture cannot be null'); + } + + if (($pasture > 100)) { + throw new \InvalidArgumentException('invalid value for $pasture when calling PostDairyRequestDairyInnerManureManagementMilkingCows., must be smaller than or equal to 100.'); + } + if (($pasture < 0)) { + throw new \InvalidArgumentException('invalid value for $pasture when calling PostDairyRequestDairyInnerManureManagementMilkingCows., must be bigger than or equal to 0.'); + } + + $this->container['pasture'] = $pasture; + + return $this; + } + + /** + * Gets anaerobic_lagoon + * + * @return float + */ + public function getAnaerobicLagoon() + { + return $this->container['anaerobic_lagoon']; + } + + /** + * Sets anaerobic_lagoon + * + * @param float $anaerobic_lagoon anaerobic_lagoon + * + * @return self + */ + public function setAnaerobicLagoon($anaerobic_lagoon) + { + if (is_null($anaerobic_lagoon)) { + throw new \InvalidArgumentException('non-nullable anaerobic_lagoon cannot be null'); + } + + if (($anaerobic_lagoon > 100)) { + throw new \InvalidArgumentException('invalid value for $anaerobic_lagoon when calling PostDairyRequestDairyInnerManureManagementMilkingCows., must be smaller than or equal to 100.'); + } + if (($anaerobic_lagoon < 0)) { + throw new \InvalidArgumentException('invalid value for $anaerobic_lagoon when calling PostDairyRequestDairyInnerManureManagementMilkingCows., must be bigger than or equal to 0.'); + } + + $this->container['anaerobic_lagoon'] = $anaerobic_lagoon; + + return $this; + } + + /** + * Gets sump_and_dispersal + * + * @return float + */ + public function getSumpAndDispersal() + { + return $this->container['sump_and_dispersal']; + } + + /** + * Sets sump_and_dispersal + * + * @param float $sump_and_dispersal sump_and_dispersal + * + * @return self + */ + public function setSumpAndDispersal($sump_and_dispersal) + { + if (is_null($sump_and_dispersal)) { + throw new \InvalidArgumentException('non-nullable sump_and_dispersal cannot be null'); + } + + if (($sump_and_dispersal > 100)) { + throw new \InvalidArgumentException('invalid value for $sump_and_dispersal when calling PostDairyRequestDairyInnerManureManagementMilkingCows., must be smaller than or equal to 100.'); + } + if (($sump_and_dispersal < 0)) { + throw new \InvalidArgumentException('invalid value for $sump_and_dispersal when calling PostDairyRequestDairyInnerManureManagementMilkingCows., must be bigger than or equal to 0.'); + } + + $this->container['sump_and_dispersal'] = $sump_and_dispersal; + + return $this; + } + + /** + * Gets drain_to_paddocks + * + * @return float + */ + public function getDrainToPaddocks() + { + return $this->container['drain_to_paddocks']; + } + + /** + * Sets drain_to_paddocks + * + * @param float $drain_to_paddocks drain_to_paddocks + * + * @return self + */ + public function setDrainToPaddocks($drain_to_paddocks) + { + if (is_null($drain_to_paddocks)) { + throw new \InvalidArgumentException('non-nullable drain_to_paddocks cannot be null'); + } + + if (($drain_to_paddocks > 100)) { + throw new \InvalidArgumentException('invalid value for $drain_to_paddocks when calling PostDairyRequestDairyInnerManureManagementMilkingCows., must be smaller than or equal to 100.'); + } + if (($drain_to_paddocks < 0)) { + throw new \InvalidArgumentException('invalid value for $drain_to_paddocks when calling PostDairyRequestDairyInnerManureManagementMilkingCows., must be bigger than or equal to 0.'); + } + + $this->container['drain_to_paddocks'] = $drain_to_paddocks; + + return $this; + } + + /** + * Gets soild_storage + * + * @return float + */ + public function getSoildStorage() + { + return $this->container['soild_storage']; + } + + /** + * Sets soild_storage + * + * @param float $soild_storage soild_storage + * + * @return self + */ + public function setSoildStorage($soild_storage) + { + if (is_null($soild_storage)) { + throw new \InvalidArgumentException('non-nullable soild_storage cannot be null'); + } + + if (($soild_storage > 100)) { + throw new \InvalidArgumentException('invalid value for $soild_storage when calling PostDairyRequestDairyInnerManureManagementMilkingCows., must be smaller than or equal to 100.'); + } + if (($soild_storage < 0)) { + throw new \InvalidArgumentException('invalid value for $soild_storage when calling PostDairyRequestDairyInnerManureManagementMilkingCows., must be bigger than or equal to 0.'); + } + + $this->container['soild_storage'] = $soild_storage; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerSeasonalFertiliser.php b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerSeasonalFertiliser.php new file mode 100644 index 00000000..2a2465cb --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerSeasonalFertiliser.php @@ -0,0 +1,525 @@ + + */ +class PostDairyRequestDairyInnerSeasonalFertiliser implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_request_dairy_inner_seasonalFertiliser'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn', + 'winter' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn', + 'spring' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn', + 'summer' => '\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.php b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.php new file mode 100644 index 00000000..c5946789 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.php @@ -0,0 +1,525 @@ + + */ +class PostDairyRequestDairyInnerSeasonalFertiliserAutumn implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_request_dairy_inner_seasonalFertiliser_autumn'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'crops_irrigated' => 'float', + 'crops_dryland' => 'float', + 'pasture_irrigated' => 'float', + 'pasture_dryland' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'crops_irrigated' => null, + 'crops_dryland' => null, + 'pasture_irrigated' => null, + 'pasture_dryland' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'crops_irrigated' => false, + 'crops_dryland' => false, + 'pasture_irrigated' => false, + 'pasture_dryland' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'crops_irrigated' => 'cropsIrrigated', + 'crops_dryland' => 'cropsDryland', + 'pasture_irrigated' => 'pastureIrrigated', + 'pasture_dryland' => 'pastureDryland' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'crops_irrigated' => 'setCropsIrrigated', + 'crops_dryland' => 'setCropsDryland', + 'pasture_irrigated' => 'setPastureIrrigated', + 'pasture_dryland' => 'setPastureDryland' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'crops_irrigated' => 'getCropsIrrigated', + 'crops_dryland' => 'getCropsDryland', + 'pasture_irrigated' => 'getPastureIrrigated', + 'pasture_dryland' => 'getPastureDryland' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('crops_irrigated', $data ?? [], null); + $this->setIfExists('crops_dryland', $data ?? [], null); + $this->setIfExists('pasture_irrigated', $data ?? [], null); + $this->setIfExists('pasture_dryland', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['crops_irrigated'] === null) { + $invalidProperties[] = "'crops_irrigated' can't be null"; + } + if ($this->container['crops_dryland'] === null) { + $invalidProperties[] = "'crops_dryland' can't be null"; + } + if ($this->container['pasture_irrigated'] === null) { + $invalidProperties[] = "'pasture_irrigated' can't be null"; + } + if ($this->container['pasture_dryland'] === null) { + $invalidProperties[] = "'pasture_dryland' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets crops_irrigated + * + * @return float + */ + public function getCropsIrrigated() + { + return $this->container['crops_irrigated']; + } + + /** + * Sets crops_irrigated + * + * @param float $crops_irrigated crops_irrigated + * + * @return self + */ + public function setCropsIrrigated($crops_irrigated) + { + if (is_null($crops_irrigated)) { + throw new \InvalidArgumentException('non-nullable crops_irrigated cannot be null'); + } + $this->container['crops_irrigated'] = $crops_irrigated; + + return $this; + } + + /** + * Gets crops_dryland + * + * @return float + */ + public function getCropsDryland() + { + return $this->container['crops_dryland']; + } + + /** + * Sets crops_dryland + * + * @param float $crops_dryland crops_dryland + * + * @return self + */ + public function setCropsDryland($crops_dryland) + { + if (is_null($crops_dryland)) { + throw new \InvalidArgumentException('non-nullable crops_dryland cannot be null'); + } + $this->container['crops_dryland'] = $crops_dryland; + + return $this; + } + + /** + * Gets pasture_irrigated + * + * @return float + */ + public function getPastureIrrigated() + { + return $this->container['pasture_irrigated']; + } + + /** + * Sets pasture_irrigated + * + * @param float $pasture_irrigated pasture_irrigated + * + * @return self + */ + public function setPastureIrrigated($pasture_irrigated) + { + if (is_null($pasture_irrigated)) { + throw new \InvalidArgumentException('non-nullable pasture_irrigated cannot be null'); + } + $this->container['pasture_irrigated'] = $pasture_irrigated; + + return $this; + } + + /** + * Gets pasture_dryland + * + * @return float + */ + public function getPastureDryland() + { + return $this->container['pasture_dryland']; + } + + /** + * Sets pasture_dryland + * + * @param float $pasture_dryland pasture_dryland + * + * @return self + */ + public function setPastureDryland($pasture_dryland) + { + if (is_null($pasture_dryland)) { + throw new \InvalidArgumentException('non-nullable pasture_dryland cannot be null'); + } + $this->container['pasture_dryland'] = $pasture_dryland; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDairyRequestVegetationInner.php b/examples/php-api-client/api-client/lib/Model/PostDairyRequestVegetationInner.php new file mode 100644 index 00000000..d8aca822 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDairyRequestVegetationInner.php @@ -0,0 +1,451 @@ + + */ +class PostDairyRequestVegetationInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_dairy_request_vegetation_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'vegetation' => '\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation', + 'dairy_proportion' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'vegetation' => null, + 'dairy_proportion' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'vegetation' => false, + 'dairy_proportion' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vegetation' => 'vegetation', + 'dairy_proportion' => 'dairyProportion' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vegetation' => 'setVegetation', + 'dairy_proportion' => 'setDairyProportion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vegetation' => 'getVegetation', + 'dairy_proportion' => 'getDairyProportion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('vegetation', $data ?? [], null); + $this->setIfExists('dairy_proportion', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + if ($this->container['dairy_proportion'] === null) { + $invalidProperties[] = "'dairy_proportion' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + + /** + * Gets dairy_proportion + * + * @return float[] + */ + public function getDairyProportion() + { + return $this->container['dairy_proportion']; + } + + /** + * Sets dairy_proportion + * + * @param float[] $dairy_proportion The proportion of the sequestration that is allocated to dairy + * + * @return self + */ + public function setDairyProportion($dairy_proportion) + { + if (is_null($dairy_proportion)) { + throw new \InvalidArgumentException('non-nullable dairy_proportion cannot be null'); + } + $this->container['dairy_proportion'] = $dairy_proportion; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeer200Response.php b/examples/php-api-client/api-client/lib/Model/PostDeer200Response.php new file mode 100644 index 00000000..3f047694 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeer200Response.php @@ -0,0 +1,636 @@ + + */ +class PostDeer200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostBuffalo200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostBuffalo200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'net' => '\OpenAPI\Client\Model\PostDeer200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostDeer200ResponseIntensities', + 'intermediate' => '\OpenAPI\Client\Model\PostDeer200ResponseIntermediateInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'net' => null, + 'intensities' => null, + 'intermediate' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'net' => false, + 'intensities' => false, + 'intermediate' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'net' => 'net', + 'intensities' => 'intensities', + 'intermediate' => 'intermediate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'net' => 'setNet', + 'intensities' => 'setIntensities', + 'intermediate' => 'setIntermediate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'net' => 'getNet', + 'intensities' => 'getIntensities', + 'intermediate' => 'getIntermediate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostDeer200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostDeer200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostDeer200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostDeer200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostDeer200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostDeer200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeer200ResponseIntensities.php b/examples/php-api-client/api-client/lib/Model/PostDeer200ResponseIntensities.php new file mode 100644 index 00000000..b16268b2 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeer200ResponseIntensities.php @@ -0,0 +1,487 @@ + + */ +class PostDeer200ResponseIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_200_response_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'liveweight_produced_kg' => 'float', + 'deer_meat_excluding_sequestration' => 'float', + 'deer_meat_including_sequestration' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'liveweight_produced_kg' => null, + 'deer_meat_excluding_sequestration' => null, + 'deer_meat_including_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'liveweight_produced_kg' => false, + 'deer_meat_excluding_sequestration' => false, + 'deer_meat_including_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'liveweight_produced_kg' => 'liveweightProducedKg', + 'deer_meat_excluding_sequestration' => 'deerMeatExcludingSequestration', + 'deer_meat_including_sequestration' => 'deerMeatIncludingSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'liveweight_produced_kg' => 'setLiveweightProducedKg', + 'deer_meat_excluding_sequestration' => 'setDeerMeatExcludingSequestration', + 'deer_meat_including_sequestration' => 'setDeerMeatIncludingSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'liveweight_produced_kg' => 'getLiveweightProducedKg', + 'deer_meat_excluding_sequestration' => 'getDeerMeatExcludingSequestration', + 'deer_meat_including_sequestration' => 'getDeerMeatIncludingSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('liveweight_produced_kg', $data ?? [], null); + $this->setIfExists('deer_meat_excluding_sequestration', $data ?? [], null); + $this->setIfExists('deer_meat_including_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['liveweight_produced_kg'] === null) { + $invalidProperties[] = "'liveweight_produced_kg' can't be null"; + } + if ($this->container['deer_meat_excluding_sequestration'] === null) { + $invalidProperties[] = "'deer_meat_excluding_sequestration' can't be null"; + } + if ($this->container['deer_meat_including_sequestration'] === null) { + $invalidProperties[] = "'deer_meat_including_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets liveweight_produced_kg + * + * @return float + */ + public function getLiveweightProducedKg() + { + return $this->container['liveweight_produced_kg']; + } + + /** + * Sets liveweight_produced_kg + * + * @param float $liveweight_produced_kg Deer meat produced in kg liveweight + * + * @return self + */ + public function setLiveweightProducedKg($liveweight_produced_kg) + { + if (is_null($liveweight_produced_kg)) { + throw new \InvalidArgumentException('non-nullable liveweight_produced_kg cannot be null'); + } + $this->container['liveweight_produced_kg'] = $liveweight_produced_kg; + + return $this; + } + + /** + * Gets deer_meat_excluding_sequestration + * + * @return float + */ + public function getDeerMeatExcludingSequestration() + { + return $this->container['deer_meat_excluding_sequestration']; + } + + /** + * Sets deer_meat_excluding_sequestration + * + * @param float $deer_meat_excluding_sequestration Deer meat (breeding herd) excluding sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setDeerMeatExcludingSequestration($deer_meat_excluding_sequestration) + { + if (is_null($deer_meat_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable deer_meat_excluding_sequestration cannot be null'); + } + $this->container['deer_meat_excluding_sequestration'] = $deer_meat_excluding_sequestration; + + return $this; + } + + /** + * Gets deer_meat_including_sequestration + * + * @return float + */ + public function getDeerMeatIncludingSequestration() + { + return $this->container['deer_meat_including_sequestration']; + } + + /** + * Sets deer_meat_including_sequestration + * + * @param float $deer_meat_including_sequestration Deer meat (breeding herd) including sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setDeerMeatIncludingSequestration($deer_meat_including_sequestration) + { + if (is_null($deer_meat_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable deer_meat_including_sequestration cannot be null'); + } + $this->container['deer_meat_including_sequestration'] = $deer_meat_including_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeer200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostDeer200ResponseIntermediateInner.php new file mode 100644 index 00000000..9468dae1 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeer200ResponseIntermediateInner.php @@ -0,0 +1,636 @@ + + */ +class PostDeer200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostBuffalo200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostBuffalo200ResponseScope3', + 'net' => '\OpenAPI\Client\Model\PostDeer200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostDeer200ResponseIntensities', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'net' => null, + 'intensities' => null, + 'carbon_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'net' => false, + 'intensities' => false, + 'carbon_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'net' => 'net', + 'intensities' => 'intensities', + 'carbon_sequestration' => 'carbonSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'net' => 'setNet', + 'intensities' => 'setIntensities', + 'carbon_sequestration' => 'setCarbonSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'net' => 'getNet', + 'intensities' => 'getIntensities', + 'carbon_sequestration' => 'getCarbonSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostDeer200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostDeer200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostDeer200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostDeer200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeer200ResponseNet.php b/examples/php-api-client/api-client/lib/Model/PostDeer200ResponseNet.php new file mode 100644 index 00000000..4c81acc6 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeer200ResponseNet.php @@ -0,0 +1,414 @@ + + */ +class PostDeer200ResponseNet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_200_response_net'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total total + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeerRequest.php b/examples/php-api-client/api-client/lib/Model/PostDeerRequest.php new file mode 100644 index 00000000..f35c0792 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeerRequest.php @@ -0,0 +1,573 @@ + + */ +class PostDeerRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'rainfall_above600' => 'bool', + 'deers' => '\OpenAPI\Client\Model\PostDeerRequestDeersInner[]', + 'vegetation' => '\OpenAPI\Client\Model\PostDeerRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'rainfall_above600' => null, + 'deers' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'rainfall_above600' => false, + 'deers' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'rainfall_above600' => 'rainfallAbove600', + 'deers' => 'deers', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'rainfall_above600' => 'setRainfallAbove600', + 'deers' => 'setDeers', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'rainfall_above600' => 'getRainfallAbove600', + 'deers' => 'getDeers', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('rainfall_above600', $data ?? [], null); + $this->setIfExists('deers', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['rainfall_above600'] === null) { + $invalidProperties[] = "'rainfall_above600' can't be null"; + } + if ($this->container['deers'] === null) { + $invalidProperties[] = "'deers' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets rainfall_above600 + * + * @return bool + */ + public function getRainfallAbove600() + { + return $this->container['rainfall_above600']; + } + + /** + * Sets rainfall_above600 + * + * @param bool $rainfall_above600 Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm + * + * @return self + */ + public function setRainfallAbove600($rainfall_above600) + { + if (is_null($rainfall_above600)) { + throw new \InvalidArgumentException('non-nullable rainfall_above600 cannot be null'); + } + $this->container['rainfall_above600'] = $rainfall_above600; + + return $this; + } + + /** + * Gets deers + * + * @return \OpenAPI\Client\Model\PostDeerRequestDeersInner[] + */ + public function getDeers() + { + return $this->container['deers']; + } + + /** + * Sets deers + * + * @param \OpenAPI\Client\Model\PostDeerRequestDeersInner[] $deers deers + * + * @return self + */ + public function setDeers($deers) + { + if (is_null($deers)) { + throw new \InvalidArgumentException('non-nullable deers cannot be null'); + } + $this->container['deers'] = $deers; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostDeerRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostDeerRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInner.php b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInner.php new file mode 100644 index 00000000..1ac652c5 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInner.php @@ -0,0 +1,1052 @@ + + */ +class PostDeerRequestDeersInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_request_deers_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'classes' => '\OpenAPI\Client\Model\PostDeerRequestDeersInnerClasses', + 'limestone' => 'float', + 'limestone_fraction' => 'float', + 'fertiliser' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser', + 'diesel' => 'float', + 'petrol' => 'float', + 'lpg' => 'float', + 'electricity_source' => 'string', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'grain_feed' => 'float', + 'hay_feed' => 'float', + 'herbicide' => 'float', + 'herbicide_other' => 'float', + 'does_fawning' => '\OpenAPI\Client\Model\PostDeerRequestDeersInnerDoesFawning', + 'seasonal_fawning' => '\OpenAPI\Client\Model\PostDeerRequestDeersInnerSeasonalFawning' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'classes' => null, + 'limestone' => null, + 'limestone_fraction' => null, + 'fertiliser' => null, + 'diesel' => null, + 'petrol' => null, + 'lpg' => null, + 'electricity_source' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'grain_feed' => null, + 'hay_feed' => null, + 'herbicide' => null, + 'herbicide_other' => null, + 'does_fawning' => null, + 'seasonal_fawning' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'classes' => false, + 'limestone' => false, + 'limestone_fraction' => false, + 'fertiliser' => false, + 'diesel' => false, + 'petrol' => false, + 'lpg' => false, + 'electricity_source' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'grain_feed' => false, + 'hay_feed' => false, + 'herbicide' => false, + 'herbicide_other' => false, + 'does_fawning' => false, + 'seasonal_fawning' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'classes' => 'classes', + 'limestone' => 'limestone', + 'limestone_fraction' => 'limestoneFraction', + 'fertiliser' => 'fertiliser', + 'diesel' => 'diesel', + 'petrol' => 'petrol', + 'lpg' => 'lpg', + 'electricity_source' => 'electricitySource', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'grain_feed' => 'grainFeed', + 'hay_feed' => 'hayFeed', + 'herbicide' => 'herbicide', + 'herbicide_other' => 'herbicideOther', + 'does_fawning' => 'doesFawning', + 'seasonal_fawning' => 'seasonalFawning' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'classes' => 'setClasses', + 'limestone' => 'setLimestone', + 'limestone_fraction' => 'setLimestoneFraction', + 'fertiliser' => 'setFertiliser', + 'diesel' => 'setDiesel', + 'petrol' => 'setPetrol', + 'lpg' => 'setLpg', + 'electricity_source' => 'setElectricitySource', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'grain_feed' => 'setGrainFeed', + 'hay_feed' => 'setHayFeed', + 'herbicide' => 'setHerbicide', + 'herbicide_other' => 'setHerbicideOther', + 'does_fawning' => 'setDoesFawning', + 'seasonal_fawning' => 'setSeasonalFawning' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'classes' => 'getClasses', + 'limestone' => 'getLimestone', + 'limestone_fraction' => 'getLimestoneFraction', + 'fertiliser' => 'getFertiliser', + 'diesel' => 'getDiesel', + 'petrol' => 'getPetrol', + 'lpg' => 'getLpg', + 'electricity_source' => 'getElectricitySource', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'grain_feed' => 'getGrainFeed', + 'hay_feed' => 'getHayFeed', + 'herbicide' => 'getHerbicide', + 'herbicide_other' => 'getHerbicideOther', + 'does_fawning' => 'getDoesFawning', + 'seasonal_fawning' => 'getSeasonalFawning' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const ELECTRICITY_SOURCE_STATE_GRID = 'State Grid'; + public const ELECTRICITY_SOURCE_RENEWABLE = 'Renewable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getElectricitySourceAllowableValues() + { + return [ + self::ELECTRICITY_SOURCE_STATE_GRID, + self::ELECTRICITY_SOURCE_RENEWABLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('classes', $data ?? [], null); + $this->setIfExists('limestone', $data ?? [], null); + $this->setIfExists('limestone_fraction', $data ?? [], null); + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('diesel', $data ?? [], null); + $this->setIfExists('petrol', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + $this->setIfExists('electricity_source', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('grain_feed', $data ?? [], null); + $this->setIfExists('hay_feed', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('herbicide_other', $data ?? [], null); + $this->setIfExists('does_fawning', $data ?? [], null); + $this->setIfExists('seasonal_fawning', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['classes'] === null) { + $invalidProperties[] = "'classes' can't be null"; + } + if ($this->container['limestone'] === null) { + $invalidProperties[] = "'limestone' can't be null"; + } + if ($this->container['limestone_fraction'] === null) { + $invalidProperties[] = "'limestone_fraction' can't be null"; + } + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['diesel'] === null) { + $invalidProperties[] = "'diesel' can't be null"; + } + if ($this->container['petrol'] === null) { + $invalidProperties[] = "'petrol' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + if ($this->container['electricity_source'] === null) { + $invalidProperties[] = "'electricity_source' can't be null"; + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!is_null($this->container['electricity_source']) && !in_array($this->container['electricity_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'electricity_source', must be one of '%s'", + $this->container['electricity_source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['grain_feed'] === null) { + $invalidProperties[] = "'grain_feed' can't be null"; + } + if ($this->container['hay_feed'] === null) { + $invalidProperties[] = "'hay_feed' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['herbicide_other'] === null) { + $invalidProperties[] = "'herbicide_other' can't be null"; + } + if ($this->container['does_fawning'] === null) { + $invalidProperties[] = "'does_fawning' can't be null"; + } + if ($this->container['seasonal_fawning'] === null) { + $invalidProperties[] = "'seasonal_fawning' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets classes + * + * @return \OpenAPI\Client\Model\PostDeerRequestDeersInnerClasses + */ + public function getClasses() + { + return $this->container['classes']; + } + + /** + * Sets classes + * + * @param \OpenAPI\Client\Model\PostDeerRequestDeersInnerClasses $classes classes + * + * @return self + */ + public function setClasses($classes) + { + if (is_null($classes)) { + throw new \InvalidArgumentException('non-nullable classes cannot be null'); + } + $this->container['classes'] = $classes; + + return $this; + } + + /** + * Gets limestone + * + * @return float + */ + public function getLimestone() + { + return $this->container['limestone']; + } + + /** + * Sets limestone + * + * @param float $limestone Lime applied in tonnes + * + * @return self + */ + public function setLimestone($limestone) + { + if (is_null($limestone)) { + throw new \InvalidArgumentException('non-nullable limestone cannot be null'); + } + $this->container['limestone'] = $limestone; + + return $this; + } + + /** + * Gets limestone_fraction + * + * @return float + */ + public function getLimestoneFraction() + { + return $this->container['limestone_fraction']; + } + + /** + * Sets limestone_fraction + * + * @param float $limestone_fraction Fraction of lime as limestone vs dolomite, between 0 and 1 + * + * @return self + */ + public function setLimestoneFraction($limestone_fraction) + { + if (is_null($limestone_fraction)) { + throw new \InvalidArgumentException('non-nullable limestone_fraction cannot be null'); + } + $this->container['limestone_fraction'] = $limestone_fraction; + + return $this; + } + + /** + * Gets fertiliser + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser $fertiliser fertiliser + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets diesel + * + * @return float + */ + public function getDiesel() + { + return $this->container['diesel']; + } + + /** + * Sets diesel + * + * @param float $diesel Diesel usage in L (litres) + * + * @return self + */ + public function setDiesel($diesel) + { + if (is_null($diesel)) { + throw new \InvalidArgumentException('non-nullable diesel cannot be null'); + } + $this->container['diesel'] = $diesel; + + return $this; + } + + /** + * Gets petrol + * + * @return float + */ + public function getPetrol() + { + return $this->container['petrol']; + } + + /** + * Sets petrol + * + * @param float $petrol Petrol usage in L (litres) + * + * @return self + */ + public function setPetrol($petrol) + { + if (is_null($petrol)) { + throw new \InvalidArgumentException('non-nullable petrol cannot be null'); + } + $this->container['petrol'] = $petrol; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + + /** + * Gets electricity_source + * + * @return string + */ + public function getElectricitySource() + { + return $this->container['electricity_source']; + } + + /** + * Sets electricity_source + * + * @param string $electricity_source Source of electricity + * + * @return self + */ + public function setElectricitySource($electricity_source) + { + if (is_null($electricity_source)) { + throw new \InvalidArgumentException('non-nullable electricity_source cannot be null'); + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!in_array($electricity_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'electricity_source', must be one of '%s'", + $electricity_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['electricity_source'] = $electricity_source; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostDeerRequestDeersInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostDeerRequestDeersInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets grain_feed + * + * @return float + */ + public function getGrainFeed() + { + return $this->container['grain_feed']; + } + + /** + * Sets grain_feed + * + * @param float $grain_feed Grain purchased for cattle feed in tonnes + * + * @return self + */ + public function setGrainFeed($grain_feed) + { + if (is_null($grain_feed)) { + throw new \InvalidArgumentException('non-nullable grain_feed cannot be null'); + } + $this->container['grain_feed'] = $grain_feed; + + return $this; + } + + /** + * Gets hay_feed + * + * @return float + */ + public function getHayFeed() + { + return $this->container['hay_feed']; + } + + /** + * Sets hay_feed + * + * @param float $hay_feed Hay purchased for cattle feed in tonnes + * + * @return self + */ + public function setHayFeed($hay_feed) + { + if (is_null($hay_feed)) { + throw new \InvalidArgumentException('non-nullable hay_feed cannot be null'); + } + $this->container['hay_feed'] = $hay_feed; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets herbicide_other + * + * @return float + */ + public function getHerbicideOther() + { + return $this->container['herbicide_other']; + } + + /** + * Sets herbicide_other + * + * @param float $herbicide_other Total amount of active ingredients of from other herbicides in kg (kilograms) + * + * @return self + */ + public function setHerbicideOther($herbicide_other) + { + if (is_null($herbicide_other)) { + throw new \InvalidArgumentException('non-nullable herbicide_other cannot be null'); + } + $this->container['herbicide_other'] = $herbicide_other; + + return $this; + } + + /** + * Gets does_fawning + * + * @return \OpenAPI\Client\Model\PostDeerRequestDeersInnerDoesFawning + */ + public function getDoesFawning() + { + return $this->container['does_fawning']; + } + + /** + * Sets does_fawning + * + * @param \OpenAPI\Client\Model\PostDeerRequestDeersInnerDoesFawning $does_fawning does_fawning + * + * @return self + */ + public function setDoesFawning($does_fawning) + { + if (is_null($does_fawning)) { + throw new \InvalidArgumentException('non-nullable does_fawning cannot be null'); + } + $this->container['does_fawning'] = $does_fawning; + + return $this; + } + + /** + * Gets seasonal_fawning + * + * @return \OpenAPI\Client\Model\PostDeerRequestDeersInnerSeasonalFawning + */ + public function getSeasonalFawning() + { + return $this->container['seasonal_fawning']; + } + + /** + * Sets seasonal_fawning + * + * @param \OpenAPI\Client\Model\PostDeerRequestDeersInnerSeasonalFawning $seasonal_fawning seasonal_fawning + * + * @return self + */ + public function setSeasonalFawning($seasonal_fawning) + { + if (is_null($seasonal_fawning)) { + throw new \InvalidArgumentException('non-nullable seasonal_fawning cannot be null'); + } + $this->container['seasonal_fawning'] = $seasonal_fawning; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClasses.php b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClasses.php new file mode 100644 index 00000000..2e422c6e --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClasses.php @@ -0,0 +1,649 @@ + + */ +class PostDeerRequestDeersInnerClasses implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_request_deers_inner_classes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bucks' => '\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesBucks', + 'trade_bucks' => '\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeBucks', + 'breeding_does' => '\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesBreedingDoes', + 'trade_does' => '\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeDoes', + 'other_does' => '\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesOtherDoes', + 'trade_other_does' => '\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeOtherDoes', + 'fawn' => '\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesFawn', + 'trade_fawn' => '\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeFawn' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'bucks' => null, + 'trade_bucks' => null, + 'breeding_does' => null, + 'trade_does' => null, + 'other_does' => null, + 'trade_other_does' => null, + 'fawn' => null, + 'trade_fawn' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'bucks' => false, + 'trade_bucks' => false, + 'breeding_does' => false, + 'trade_does' => false, + 'other_does' => false, + 'trade_other_does' => false, + 'fawn' => false, + 'trade_fawn' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'bucks' => 'bucks', + 'trade_bucks' => 'tradeBucks', + 'breeding_does' => 'breedingDoes', + 'trade_does' => 'tradeDoes', + 'other_does' => 'otherDoes', + 'trade_other_does' => 'tradeOtherDoes', + 'fawn' => 'fawn', + 'trade_fawn' => 'tradeFawn' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bucks' => 'setBucks', + 'trade_bucks' => 'setTradeBucks', + 'breeding_does' => 'setBreedingDoes', + 'trade_does' => 'setTradeDoes', + 'other_does' => 'setOtherDoes', + 'trade_other_does' => 'setTradeOtherDoes', + 'fawn' => 'setFawn', + 'trade_fawn' => 'setTradeFawn' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bucks' => 'getBucks', + 'trade_bucks' => 'getTradeBucks', + 'breeding_does' => 'getBreedingDoes', + 'trade_does' => 'getTradeDoes', + 'other_does' => 'getOtherDoes', + 'trade_other_does' => 'getTradeOtherDoes', + 'fawn' => 'getFawn', + 'trade_fawn' => 'getTradeFawn' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('bucks', $data ?? [], null); + $this->setIfExists('trade_bucks', $data ?? [], null); + $this->setIfExists('breeding_does', $data ?? [], null); + $this->setIfExists('trade_does', $data ?? [], null); + $this->setIfExists('other_does', $data ?? [], null); + $this->setIfExists('trade_other_does', $data ?? [], null); + $this->setIfExists('fawn', $data ?? [], null); + $this->setIfExists('trade_fawn', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets bucks + * + * @return \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesBucks|null + */ + public function getBucks() + { + return $this->container['bucks']; + } + + /** + * Sets bucks + * + * @param \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesBucks|null $bucks bucks + * + * @return self + */ + public function setBucks($bucks) + { + if (is_null($bucks)) { + throw new \InvalidArgumentException('non-nullable bucks cannot be null'); + } + $this->container['bucks'] = $bucks; + + return $this; + } + + /** + * Gets trade_bucks + * + * @return \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeBucks|null + */ + public function getTradeBucks() + { + return $this->container['trade_bucks']; + } + + /** + * Sets trade_bucks + * + * @param \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeBucks|null $trade_bucks trade_bucks + * + * @return self + */ + public function setTradeBucks($trade_bucks) + { + if (is_null($trade_bucks)) { + throw new \InvalidArgumentException('non-nullable trade_bucks cannot be null'); + } + $this->container['trade_bucks'] = $trade_bucks; + + return $this; + } + + /** + * Gets breeding_does + * + * @return \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesBreedingDoes|null + */ + public function getBreedingDoes() + { + return $this->container['breeding_does']; + } + + /** + * Sets breeding_does + * + * @param \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesBreedingDoes|null $breeding_does breeding_does + * + * @return self + */ + public function setBreedingDoes($breeding_does) + { + if (is_null($breeding_does)) { + throw new \InvalidArgumentException('non-nullable breeding_does cannot be null'); + } + $this->container['breeding_does'] = $breeding_does; + + return $this; + } + + /** + * Gets trade_does + * + * @return \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeDoes|null + */ + public function getTradeDoes() + { + return $this->container['trade_does']; + } + + /** + * Sets trade_does + * + * @param \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeDoes|null $trade_does trade_does + * + * @return self + */ + public function setTradeDoes($trade_does) + { + if (is_null($trade_does)) { + throw new \InvalidArgumentException('non-nullable trade_does cannot be null'); + } + $this->container['trade_does'] = $trade_does; + + return $this; + } + + /** + * Gets other_does + * + * @return \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesOtherDoes|null + */ + public function getOtherDoes() + { + return $this->container['other_does']; + } + + /** + * Sets other_does + * + * @param \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesOtherDoes|null $other_does other_does + * + * @return self + */ + public function setOtherDoes($other_does) + { + if (is_null($other_does)) { + throw new \InvalidArgumentException('non-nullable other_does cannot be null'); + } + $this->container['other_does'] = $other_does; + + return $this; + } + + /** + * Gets trade_other_does + * + * @return \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeOtherDoes|null + */ + public function getTradeOtherDoes() + { + return $this->container['trade_other_does']; + } + + /** + * Sets trade_other_does + * + * @param \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeOtherDoes|null $trade_other_does trade_other_does + * + * @return self + */ + public function setTradeOtherDoes($trade_other_does) + { + if (is_null($trade_other_does)) { + throw new \InvalidArgumentException('non-nullable trade_other_does cannot be null'); + } + $this->container['trade_other_does'] = $trade_other_does; + + return $this; + } + + /** + * Gets fawn + * + * @return \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesFawn|null + */ + public function getFawn() + { + return $this->container['fawn']; + } + + /** + * Sets fawn + * + * @param \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesFawn|null $fawn fawn + * + * @return self + */ + public function setFawn($fawn) + { + if (is_null($fawn)) { + throw new \InvalidArgumentException('non-nullable fawn cannot be null'); + } + $this->container['fawn'] = $fawn; + + return $this; + } + + /** + * Gets trade_fawn + * + * @return \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeFawn|null + */ + public function getTradeFawn() + { + return $this->container['trade_fawn']; + } + + /** + * Sets trade_fawn + * + * @param \OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeFawn|null $trade_fawn trade_fawn + * + * @return self + */ + public function setTradeFawn($trade_fawn) + { + if (is_null($trade_fawn)) { + throw new \InvalidArgumentException('non-nullable trade_fawn cannot be null'); + } + $this->container['trade_fawn'] = $trade_fawn; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesBreedingDoes.php b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesBreedingDoes.php new file mode 100644 index 00000000..a51a0471 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesBreedingDoes.php @@ -0,0 +1,633 @@ + + */ +class PostDeerRequestDeersInnerClassesBreedingDoes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_request_deers_inner_classes_breedingDoes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesBucks.php b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesBucks.php new file mode 100644 index 00000000..29718fb1 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesBucks.php @@ -0,0 +1,633 @@ + + */ +class PostDeerRequestDeersInnerClassesBucks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_request_deers_inner_classes_bucks'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesFawn.php b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesFawn.php new file mode 100644 index 00000000..11873b2a --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesFawn.php @@ -0,0 +1,633 @@ + + */ +class PostDeerRequestDeersInnerClassesFawn implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_request_deers_inner_classes_fawn'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesOtherDoes.php b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesOtherDoes.php new file mode 100644 index 00000000..f0758ef4 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesOtherDoes.php @@ -0,0 +1,633 @@ + + */ +class PostDeerRequestDeersInnerClassesOtherDoes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_request_deers_inner_classes_otherDoes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeBucks.php b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeBucks.php new file mode 100644 index 00000000..fe435a19 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeBucks.php @@ -0,0 +1,633 @@ + + */ +class PostDeerRequestDeersInnerClassesTradeBucks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_request_deers_inner_classes_tradeBucks'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeDoes.php b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeDoes.php new file mode 100644 index 00000000..cafcd335 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeDoes.php @@ -0,0 +1,633 @@ + + */ +class PostDeerRequestDeersInnerClassesTradeDoes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_request_deers_inner_classes_tradeDoes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeFawn.php b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeFawn.php new file mode 100644 index 00000000..5a9c6492 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeFawn.php @@ -0,0 +1,633 @@ + + */ +class PostDeerRequestDeersInnerClassesTradeFawn implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_request_deers_inner_classes_tradeFawn'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.php b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.php new file mode 100644 index 00000000..fa492bcc --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.php @@ -0,0 +1,633 @@ + + */ +class PostDeerRequestDeersInnerClassesTradeOtherDoes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_request_deers_inner_classes_tradeOtherDoes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerDoesFawning.php b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerDoesFawning.php new file mode 100644 index 00000000..87f9843b --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerDoesFawning.php @@ -0,0 +1,525 @@ + + */ +class PostDeerRequestDeersInnerDoesFawning implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_request_deers_inner_doesFawning'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'spring' => 'float', + 'summer' => 'float', + 'autumn' => 'float', + 'winter' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'spring' => null, + 'summer' => null, + 'autumn' => null, + 'winter' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'spring' => false, + 'summer' => false, + 'autumn' => false, + 'winter' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'spring' => 'spring', + 'summer' => 'summer', + 'autumn' => 'autumn', + 'winter' => 'winter' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'autumn' => 'setAutumn', + 'winter' => 'setWinter' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'autumn' => 'getAutumn', + 'winter' => 'getWinter' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerSeasonalFawning.php b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerSeasonalFawning.php new file mode 100644 index 00000000..400e142a --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeerRequestDeersInnerSeasonalFawning.php @@ -0,0 +1,525 @@ + + */ +class PostDeerRequestDeersInnerSeasonalFawning implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_request_deers_inner_seasonalFawning'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'spring' => 'float', + 'summer' => 'float', + 'autumn' => 'float', + 'winter' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'spring' => null, + 'summer' => null, + 'autumn' => null, + 'winter' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'spring' => false, + 'summer' => false, + 'autumn' => false, + 'winter' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'spring' => 'spring', + 'summer' => 'summer', + 'autumn' => 'autumn', + 'winter' => 'winter' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'autumn' => 'setAutumn', + 'winter' => 'setWinter' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'autumn' => 'getAutumn', + 'winter' => 'getWinter' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostDeerRequestVegetationInner.php b/examples/php-api-client/api-client/lib/Model/PostDeerRequestVegetationInner.php new file mode 100644 index 00000000..2d77f9ca --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostDeerRequestVegetationInner.php @@ -0,0 +1,451 @@ + + */ +class PostDeerRequestVegetationInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_deer_request_vegetation_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'vegetation' => '\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation', + 'deer_proportion' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'vegetation' => null, + 'deer_proportion' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'vegetation' => false, + 'deer_proportion' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vegetation' => 'vegetation', + 'deer_proportion' => 'deerProportion' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vegetation' => 'setVegetation', + 'deer_proportion' => 'setDeerProportion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vegetation' => 'getVegetation', + 'deer_proportion' => 'getDeerProportion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('vegetation', $data ?? [], null); + $this->setIfExists('deer_proportion', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + if ($this->container['deer_proportion'] === null) { + $invalidProperties[] = "'deer_proportion' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + + /** + * Gets deer_proportion + * + * @return float[] + */ + public function getDeerProportion() + { + return $this->container['deer_proportion']; + } + + /** + * Sets deer_proportion + * + * @param float[] $deer_proportion The proportion of the sequestration that is allocated to deer + * + * @return self + */ + public function setDeerProportion($deer_proportion) + { + if (is_null($deer_proportion)) { + throw new \InvalidArgumentException('non-nullable deer_proportion cannot be null'); + } + $this->container['deer_proportion'] = $deer_proportion; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlot200Response.php b/examples/php-api-client/api-client/lib/Model/PostFeedlot200Response.php new file mode 100644 index 00000000..7edc17cf --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlot200Response.php @@ -0,0 +1,636 @@ + + */ +class PostFeedlot200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostFeedlot200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostFeedlot200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'intermediate' => '\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInner[]', + 'net' => '\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerNet', + 'intensities' => '\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerIntensities' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intermediate' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intermediate' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intermediate' => 'intermediate', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intermediate' => 'setIntermediate', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intermediate' => 'getIntermediate', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostFeedlot200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostFeedlot200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostFeedlot200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostFeedlot200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseIntermediateInner.php new file mode 100644 index 00000000..2f2038f9 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseIntermediateInner.php @@ -0,0 +1,635 @@ + + */ +class PostFeedlot200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostFeedlot200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostFeedlot200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration', + 'net' => '\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerNet', + 'intensities' => '\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerIntensities' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostFeedlot200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostFeedlot200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostFeedlot200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostFeedlot200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseIntermediateInnerIntensities.php b/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseIntermediateInnerIntensities.php new file mode 100644 index 00000000..c6b9a5a7 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseIntermediateInnerIntensities.php @@ -0,0 +1,487 @@ + + */ +class PostFeedlot200ResponseIntermediateInnerIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_200_response_intermediate_inner_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'liveweight_produced_kg' => 'float', + 'beef_including_sequestration' => 'float', + 'beef_excluding_sequestration' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'liveweight_produced_kg' => null, + 'beef_including_sequestration' => null, + 'beef_excluding_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'liveweight_produced_kg' => false, + 'beef_including_sequestration' => false, + 'beef_excluding_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'liveweight_produced_kg' => 'liveweightProducedKg', + 'beef_including_sequestration' => 'beefIncludingSequestration', + 'beef_excluding_sequestration' => 'beefExcludingSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'liveweight_produced_kg' => 'setLiveweightProducedKg', + 'beef_including_sequestration' => 'setBeefIncludingSequestration', + 'beef_excluding_sequestration' => 'setBeefExcludingSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'liveweight_produced_kg' => 'getLiveweightProducedKg', + 'beef_including_sequestration' => 'getBeefIncludingSequestration', + 'beef_excluding_sequestration' => 'getBeefExcludingSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('liveweight_produced_kg', $data ?? [], null); + $this->setIfExists('beef_including_sequestration', $data ?? [], null); + $this->setIfExists('beef_excluding_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['liveweight_produced_kg'] === null) { + $invalidProperties[] = "'liveweight_produced_kg' can't be null"; + } + if ($this->container['beef_including_sequestration'] === null) { + $invalidProperties[] = "'beef_including_sequestration' can't be null"; + } + if ($this->container['beef_excluding_sequestration'] === null) { + $invalidProperties[] = "'beef_excluding_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets liveweight_produced_kg + * + * @return float + */ + public function getLiveweightProducedKg() + { + return $this->container['liveweight_produced_kg']; + } + + /** + * Sets liveweight_produced_kg + * + * @param float $liveweight_produced_kg Amount of meat produced in kg liveweight + * + * @return self + */ + public function setLiveweightProducedKg($liveweight_produced_kg) + { + if (is_null($liveweight_produced_kg)) { + throw new \InvalidArgumentException('non-nullable liveweight_produced_kg cannot be null'); + } + $this->container['liveweight_produced_kg'] = $liveweight_produced_kg; + + return $this; + } + + /** + * Gets beef_including_sequestration + * + * @return float + */ + public function getBeefIncludingSequestration() + { + return $this->container['beef_including_sequestration']; + } + + /** + * Sets beef_including_sequestration + * + * @param float $beef_including_sequestration Beef including carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setBeefIncludingSequestration($beef_including_sequestration) + { + if (is_null($beef_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable beef_including_sequestration cannot be null'); + } + $this->container['beef_including_sequestration'] = $beef_including_sequestration; + + return $this; + } + + /** + * Gets beef_excluding_sequestration + * + * @return float + */ + public function getBeefExcludingSequestration() + { + return $this->container['beef_excluding_sequestration']; + } + + /** + * Sets beef_excluding_sequestration + * + * @param float $beef_excluding_sequestration Beef excluding carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setBeefExcludingSequestration($beef_excluding_sequestration) + { + if (is_null($beef_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable beef_excluding_sequestration cannot be null'); + } + $this->container['beef_excluding_sequestration'] = $beef_excluding_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseIntermediateInnerNet.php b/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseIntermediateInnerNet.php new file mode 100644 index 00000000..8b4fd6fa --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseIntermediateInnerNet.php @@ -0,0 +1,414 @@ + + */ +class PostFeedlot200ResponseIntermediateInnerNet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_200_response_intermediate_inner_net'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total total + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseScope1.php b/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseScope1.php new file mode 100644 index 00000000..5c07ea29 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseScope1.php @@ -0,0 +1,1043 @@ + + */ +class PostFeedlot200ResponseScope1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_200_response_scope1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel_co2' => 'float', + 'fuel_ch4' => 'float', + 'fuel_n2_o' => 'float', + 'transport_co2' => 'float', + 'transport_ch4' => 'float', + 'transport_n2_o' => 'float', + 'urea_co2' => 'float', + 'lime_co2' => 'float', + 'atmospheric_deposition_n2_o' => 'float', + 'manure_direct_n2_o' => 'float', + 'manure_indirect_n2_o' => 'float', + 'manure_management_ch4' => 'float', + 'manure_applied_to_soil_n2_o' => 'float', + 'enteric_ch4' => 'float', + 'total_co2' => 'float', + 'total_ch4' => 'float', + 'total_n2_o' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel_co2' => null, + 'fuel_ch4' => null, + 'fuel_n2_o' => null, + 'transport_co2' => null, + 'transport_ch4' => null, + 'transport_n2_o' => null, + 'urea_co2' => null, + 'lime_co2' => null, + 'atmospheric_deposition_n2_o' => null, + 'manure_direct_n2_o' => null, + 'manure_indirect_n2_o' => null, + 'manure_management_ch4' => null, + 'manure_applied_to_soil_n2_o' => null, + 'enteric_ch4' => null, + 'total_co2' => null, + 'total_ch4' => null, + 'total_n2_o' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel_co2' => false, + 'fuel_ch4' => false, + 'fuel_n2_o' => false, + 'transport_co2' => false, + 'transport_ch4' => false, + 'transport_n2_o' => false, + 'urea_co2' => false, + 'lime_co2' => false, + 'atmospheric_deposition_n2_o' => false, + 'manure_direct_n2_o' => false, + 'manure_indirect_n2_o' => false, + 'manure_management_ch4' => false, + 'manure_applied_to_soil_n2_o' => false, + 'enteric_ch4' => false, + 'total_co2' => false, + 'total_ch4' => false, + 'total_n2_o' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel_co2' => 'fuelCO2', + 'fuel_ch4' => 'fuelCH4', + 'fuel_n2_o' => 'fuelN2O', + 'transport_co2' => 'transportCO2', + 'transport_ch4' => 'transportCH4', + 'transport_n2_o' => 'transportN2O', + 'urea_co2' => 'ureaCO2', + 'lime_co2' => 'limeCO2', + 'atmospheric_deposition_n2_o' => 'atmosphericDepositionN2O', + 'manure_direct_n2_o' => 'manureDirectN2O', + 'manure_indirect_n2_o' => 'manureIndirectN2O', + 'manure_management_ch4' => 'manureManagementCH4', + 'manure_applied_to_soil_n2_o' => 'manureAppliedToSoilN2O', + 'enteric_ch4' => 'entericCH4', + 'total_co2' => 'totalCO2', + 'total_ch4' => 'totalCH4', + 'total_n2_o' => 'totalN2O', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel_co2' => 'setFuelCo2', + 'fuel_ch4' => 'setFuelCh4', + 'fuel_n2_o' => 'setFuelN2O', + 'transport_co2' => 'setTransportCo2', + 'transport_ch4' => 'setTransportCh4', + 'transport_n2_o' => 'setTransportN2O', + 'urea_co2' => 'setUreaCo2', + 'lime_co2' => 'setLimeCo2', + 'atmospheric_deposition_n2_o' => 'setAtmosphericDepositionN2O', + 'manure_direct_n2_o' => 'setManureDirectN2O', + 'manure_indirect_n2_o' => 'setManureIndirectN2O', + 'manure_management_ch4' => 'setManureManagementCh4', + 'manure_applied_to_soil_n2_o' => 'setManureAppliedToSoilN2O', + 'enteric_ch4' => 'setEntericCh4', + 'total_co2' => 'setTotalCo2', + 'total_ch4' => 'setTotalCh4', + 'total_n2_o' => 'setTotalN2O', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel_co2' => 'getFuelCo2', + 'fuel_ch4' => 'getFuelCh4', + 'fuel_n2_o' => 'getFuelN2O', + 'transport_co2' => 'getTransportCo2', + 'transport_ch4' => 'getTransportCh4', + 'transport_n2_o' => 'getTransportN2O', + 'urea_co2' => 'getUreaCo2', + 'lime_co2' => 'getLimeCo2', + 'atmospheric_deposition_n2_o' => 'getAtmosphericDepositionN2O', + 'manure_direct_n2_o' => 'getManureDirectN2O', + 'manure_indirect_n2_o' => 'getManureIndirectN2O', + 'manure_management_ch4' => 'getManureManagementCh4', + 'manure_applied_to_soil_n2_o' => 'getManureAppliedToSoilN2O', + 'enteric_ch4' => 'getEntericCh4', + 'total_co2' => 'getTotalCo2', + 'total_ch4' => 'getTotalCh4', + 'total_n2_o' => 'getTotalN2O', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel_co2', $data ?? [], null); + $this->setIfExists('fuel_ch4', $data ?? [], null); + $this->setIfExists('fuel_n2_o', $data ?? [], null); + $this->setIfExists('transport_co2', $data ?? [], null); + $this->setIfExists('transport_ch4', $data ?? [], null); + $this->setIfExists('transport_n2_o', $data ?? [], null); + $this->setIfExists('urea_co2', $data ?? [], null); + $this->setIfExists('lime_co2', $data ?? [], null); + $this->setIfExists('atmospheric_deposition_n2_o', $data ?? [], null); + $this->setIfExists('manure_direct_n2_o', $data ?? [], null); + $this->setIfExists('manure_indirect_n2_o', $data ?? [], null); + $this->setIfExists('manure_management_ch4', $data ?? [], null); + $this->setIfExists('manure_applied_to_soil_n2_o', $data ?? [], null); + $this->setIfExists('enteric_ch4', $data ?? [], null); + $this->setIfExists('total_co2', $data ?? [], null); + $this->setIfExists('total_ch4', $data ?? [], null); + $this->setIfExists('total_n2_o', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel_co2'] === null) { + $invalidProperties[] = "'fuel_co2' can't be null"; + } + if ($this->container['fuel_ch4'] === null) { + $invalidProperties[] = "'fuel_ch4' can't be null"; + } + if ($this->container['fuel_n2_o'] === null) { + $invalidProperties[] = "'fuel_n2_o' can't be null"; + } + if ($this->container['transport_co2'] === null) { + $invalidProperties[] = "'transport_co2' can't be null"; + } + if ($this->container['transport_ch4'] === null) { + $invalidProperties[] = "'transport_ch4' can't be null"; + } + if ($this->container['transport_n2_o'] === null) { + $invalidProperties[] = "'transport_n2_o' can't be null"; + } + if ($this->container['urea_co2'] === null) { + $invalidProperties[] = "'urea_co2' can't be null"; + } + if ($this->container['lime_co2'] === null) { + $invalidProperties[] = "'lime_co2' can't be null"; + } + if ($this->container['atmospheric_deposition_n2_o'] === null) { + $invalidProperties[] = "'atmospheric_deposition_n2_o' can't be null"; + } + if ($this->container['manure_direct_n2_o'] === null) { + $invalidProperties[] = "'manure_direct_n2_o' can't be null"; + } + if ($this->container['manure_indirect_n2_o'] === null) { + $invalidProperties[] = "'manure_indirect_n2_o' can't be null"; + } + if ($this->container['manure_management_ch4'] === null) { + $invalidProperties[] = "'manure_management_ch4' can't be null"; + } + if ($this->container['manure_applied_to_soil_n2_o'] === null) { + $invalidProperties[] = "'manure_applied_to_soil_n2_o' can't be null"; + } + if ($this->container['enteric_ch4'] === null) { + $invalidProperties[] = "'enteric_ch4' can't be null"; + } + if ($this->container['total_co2'] === null) { + $invalidProperties[] = "'total_co2' can't be null"; + } + if ($this->container['total_ch4'] === null) { + $invalidProperties[] = "'total_ch4' can't be null"; + } + if ($this->container['total_n2_o'] === null) { + $invalidProperties[] = "'total_n2_o' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel_co2 + * + * @return float + */ + public function getFuelCo2() + { + return $this->container['fuel_co2']; + } + + /** + * Sets fuel_co2 + * + * @param float $fuel_co2 CO2 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCo2($fuel_co2) + { + if (is_null($fuel_co2)) { + throw new \InvalidArgumentException('non-nullable fuel_co2 cannot be null'); + } + $this->container['fuel_co2'] = $fuel_co2; + + return $this; + } + + /** + * Gets fuel_ch4 + * + * @return float + */ + public function getFuelCh4() + { + return $this->container['fuel_ch4']; + } + + /** + * Sets fuel_ch4 + * + * @param float $fuel_ch4 CH4 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCh4($fuel_ch4) + { + if (is_null($fuel_ch4)) { + throw new \InvalidArgumentException('non-nullable fuel_ch4 cannot be null'); + } + $this->container['fuel_ch4'] = $fuel_ch4; + + return $this; + } + + /** + * Gets fuel_n2_o + * + * @return float + */ + public function getFuelN2O() + { + return $this->container['fuel_n2_o']; + } + + /** + * Sets fuel_n2_o + * + * @param float $fuel_n2_o N2O emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelN2O($fuel_n2_o) + { + if (is_null($fuel_n2_o)) { + throw new \InvalidArgumentException('non-nullable fuel_n2_o cannot be null'); + } + $this->container['fuel_n2_o'] = $fuel_n2_o; + + return $this; + } + + /** + * Gets transport_co2 + * + * @return float + */ + public function getTransportCo2() + { + return $this->container['transport_co2']; + } + + /** + * Sets transport_co2 + * + * @param float $transport_co2 CO2 emissions from transport, in tonnes-CO2e + * + * @return self + */ + public function setTransportCo2($transport_co2) + { + if (is_null($transport_co2)) { + throw new \InvalidArgumentException('non-nullable transport_co2 cannot be null'); + } + $this->container['transport_co2'] = $transport_co2; + + return $this; + } + + /** + * Gets transport_ch4 + * + * @return float + */ + public function getTransportCh4() + { + return $this->container['transport_ch4']; + } + + /** + * Sets transport_ch4 + * + * @param float $transport_ch4 CH4 emissions from transport, in tonnes-CO2e + * + * @return self + */ + public function setTransportCh4($transport_ch4) + { + if (is_null($transport_ch4)) { + throw new \InvalidArgumentException('non-nullable transport_ch4 cannot be null'); + } + $this->container['transport_ch4'] = $transport_ch4; + + return $this; + } + + /** + * Gets transport_n2_o + * + * @return float + */ + public function getTransportN2O() + { + return $this->container['transport_n2_o']; + } + + /** + * Sets transport_n2_o + * + * @param float $transport_n2_o N2O emissions from transport, in tonnes-CO2e + * + * @return self + */ + public function setTransportN2O($transport_n2_o) + { + if (is_null($transport_n2_o)) { + throw new \InvalidArgumentException('non-nullable transport_n2_o cannot be null'); + } + $this->container['transport_n2_o'] = $transport_n2_o; + + return $this; + } + + /** + * Gets urea_co2 + * + * @return float + */ + public function getUreaCo2() + { + return $this->container['urea_co2']; + } + + /** + * Sets urea_co2 + * + * @param float $urea_co2 CO2 emissions from urea, in tonnes-CO2e + * + * @return self + */ + public function setUreaCo2($urea_co2) + { + if (is_null($urea_co2)) { + throw new \InvalidArgumentException('non-nullable urea_co2 cannot be null'); + } + $this->container['urea_co2'] = $urea_co2; + + return $this; + } + + /** + * Gets lime_co2 + * + * @return float + */ + public function getLimeCo2() + { + return $this->container['lime_co2']; + } + + /** + * Sets lime_co2 + * + * @param float $lime_co2 CO2 emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLimeCo2($lime_co2) + { + if (is_null($lime_co2)) { + throw new \InvalidArgumentException('non-nullable lime_co2 cannot be null'); + } + $this->container['lime_co2'] = $lime_co2; + + return $this; + } + + /** + * Gets atmospheric_deposition_n2_o + * + * @return float + */ + public function getAtmosphericDepositionN2O() + { + return $this->container['atmospheric_deposition_n2_o']; + } + + /** + * Sets atmospheric_deposition_n2_o + * + * @param float $atmospheric_deposition_n2_o N2O emissions from atmospheric deposition, in tonnes-CO2e + * + * @return self + */ + public function setAtmosphericDepositionN2O($atmospheric_deposition_n2_o) + { + if (is_null($atmospheric_deposition_n2_o)) { + throw new \InvalidArgumentException('non-nullable atmospheric_deposition_n2_o cannot be null'); + } + $this->container['atmospheric_deposition_n2_o'] = $atmospheric_deposition_n2_o; + + return $this; + } + + /** + * Gets manure_direct_n2_o + * + * @return float + */ + public function getManureDirectN2O() + { + return $this->container['manure_direct_n2_o']; + } + + /** + * Sets manure_direct_n2_o + * + * @param float $manure_direct_n2_o CH4 emissions from manure management (direct), in tonnes-CO2e + * + * @return self + */ + public function setManureDirectN2O($manure_direct_n2_o) + { + if (is_null($manure_direct_n2_o)) { + throw new \InvalidArgumentException('non-nullable manure_direct_n2_o cannot be null'); + } + $this->container['manure_direct_n2_o'] = $manure_direct_n2_o; + + return $this; + } + + /** + * Gets manure_indirect_n2_o + * + * @return float + */ + public function getManureIndirectN2O() + { + return $this->container['manure_indirect_n2_o']; + } + + /** + * Sets manure_indirect_n2_o + * + * @param float $manure_indirect_n2_o CH4 emissions from manure management (indirect), in tonnes-CO2e + * + * @return self + */ + public function setManureIndirectN2O($manure_indirect_n2_o) + { + if (is_null($manure_indirect_n2_o)) { + throw new \InvalidArgumentException('non-nullable manure_indirect_n2_o cannot be null'); + } + $this->container['manure_indirect_n2_o'] = $manure_indirect_n2_o; + + return $this; + } + + /** + * Gets manure_management_ch4 + * + * @return float + */ + public function getManureManagementCh4() + { + return $this->container['manure_management_ch4']; + } + + /** + * Sets manure_management_ch4 + * + * @param float $manure_management_ch4 CH4 emissions from manure management, in tonnes-CO2e + * + * @return self + */ + public function setManureManagementCh4($manure_management_ch4) + { + if (is_null($manure_management_ch4)) { + throw new \InvalidArgumentException('non-nullable manure_management_ch4 cannot be null'); + } + $this->container['manure_management_ch4'] = $manure_management_ch4; + + return $this; + } + + /** + * Gets manure_applied_to_soil_n2_o + * + * @return float + */ + public function getManureAppliedToSoilN2O() + { + return $this->container['manure_applied_to_soil_n2_o']; + } + + /** + * Sets manure_applied_to_soil_n2_o + * + * @param float $manure_applied_to_soil_n2_o CH4 emissions from manure applied to soil, in tonnes-CO2e + * + * @return self + */ + public function setManureAppliedToSoilN2O($manure_applied_to_soil_n2_o) + { + if (is_null($manure_applied_to_soil_n2_o)) { + throw new \InvalidArgumentException('non-nullable manure_applied_to_soil_n2_o cannot be null'); + } + $this->container['manure_applied_to_soil_n2_o'] = $manure_applied_to_soil_n2_o; + + return $this; + } + + /** + * Gets enteric_ch4 + * + * @return float + */ + public function getEntericCh4() + { + return $this->container['enteric_ch4']; + } + + /** + * Sets enteric_ch4 + * + * @param float $enteric_ch4 CH4 emissions from enteric fermentation, in tonnes-CO2e + * + * @return self + */ + public function setEntericCh4($enteric_ch4) + { + if (is_null($enteric_ch4)) { + throw new \InvalidArgumentException('non-nullable enteric_ch4 cannot be null'); + } + $this->container['enteric_ch4'] = $enteric_ch4; + + return $this; + } + + /** + * Gets total_co2 + * + * @return float + */ + public function getTotalCo2() + { + return $this->container['total_co2']; + } + + /** + * Sets total_co2 + * + * @param float $total_co2 Total CO2 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCo2($total_co2) + { + if (is_null($total_co2)) { + throw new \InvalidArgumentException('non-nullable total_co2 cannot be null'); + } + $this->container['total_co2'] = $total_co2; + + return $this; + } + + /** + * Gets total_ch4 + * + * @return float + */ + public function getTotalCh4() + { + return $this->container['total_ch4']; + } + + /** + * Sets total_ch4 + * + * @param float $total_ch4 Total CH4 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCh4($total_ch4) + { + if (is_null($total_ch4)) { + throw new \InvalidArgumentException('non-nullable total_ch4 cannot be null'); + } + $this->container['total_ch4'] = $total_ch4; + + return $this; + } + + /** + * Gets total_n2_o + * + * @return float + */ + public function getTotalN2O() + { + return $this->container['total_n2_o']; + } + + /** + * Sets total_n2_o + * + * @param float $total_n2_o Total N2O scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalN2O($total_n2_o) + { + if (is_null($total_n2_o)) { + throw new \InvalidArgumentException('non-nullable total_n2_o cannot be null'); + } + $this->container['total_n2_o'] = $total_n2_o; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseScope3.php b/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseScope3.php new file mode 100644 index 00000000..2b9e6f03 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlot200ResponseScope3.php @@ -0,0 +1,673 @@ + + */ +class PostFeedlot200ResponseScope3 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_200_response_scope3'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fertiliser' => 'float', + 'herbicide' => 'float', + 'electricity' => 'float', + 'fuel' => 'float', + 'lime' => 'float', + 'feed' => 'float', + 'purchase_livestock' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fertiliser' => null, + 'herbicide' => null, + 'electricity' => null, + 'fuel' => null, + 'lime' => null, + 'feed' => null, + 'purchase_livestock' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fertiliser' => false, + 'herbicide' => false, + 'electricity' => false, + 'fuel' => false, + 'lime' => false, + 'feed' => false, + 'purchase_livestock' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fertiliser' => 'fertiliser', + 'herbicide' => 'herbicide', + 'electricity' => 'electricity', + 'fuel' => 'fuel', + 'lime' => 'lime', + 'feed' => 'feed', + 'purchase_livestock' => 'purchaseLivestock', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fertiliser' => 'setFertiliser', + 'herbicide' => 'setHerbicide', + 'electricity' => 'setElectricity', + 'fuel' => 'setFuel', + 'lime' => 'setLime', + 'feed' => 'setFeed', + 'purchase_livestock' => 'setPurchaseLivestock', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fertiliser' => 'getFertiliser', + 'herbicide' => 'getHerbicide', + 'electricity' => 'getElectricity', + 'fuel' => 'getFuel', + 'lime' => 'getLime', + 'feed' => 'getFeed', + 'purchase_livestock' => 'getPurchaseLivestock', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('electricity', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('lime', $data ?? [], null); + $this->setIfExists('feed', $data ?? [], null); + $this->setIfExists('purchase_livestock', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['electricity'] === null) { + $invalidProperties[] = "'electricity' can't be null"; + } + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['lime'] === null) { + $invalidProperties[] = "'lime' can't be null"; + } + if ($this->container['feed'] === null) { + $invalidProperties[] = "'feed' can't be null"; + } + if ($this->container['purchase_livestock'] === null) { + $invalidProperties[] = "'purchase_livestock' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fertiliser + * + * @return float + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param float $fertiliser Emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Emissions from herbicide, in tonnes-CO2e + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets electricity + * + * @return float + */ + public function getElectricity() + { + return $this->container['electricity']; + } + + /** + * Sets electricity + * + * @param float $electricity Emissions from electricity, in tonnes-CO2e + * + * @return self + */ + public function setElectricity($electricity) + { + if (is_null($electricity)) { + throw new \InvalidArgumentException('non-nullable electricity cannot be null'); + } + $this->container['electricity'] = $electricity; + + return $this; + } + + /** + * Gets fuel + * + * @return float + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param float $fuel Emissions from fuel, in tonnes-CO2e + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets lime + * + * @return float + */ + public function getLime() + { + return $this->container['lime']; + } + + /** + * Sets lime + * + * @param float $lime Emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLime($lime) + { + if (is_null($lime)) { + throw new \InvalidArgumentException('non-nullable lime cannot be null'); + } + $this->container['lime'] = $lime; + + return $this; + } + + /** + * Gets feed + * + * @return float + */ + public function getFeed() + { + return $this->container['feed']; + } + + /** + * Sets feed + * + * @param float $feed Emissions from feed, in tonnes-CO2e + * + * @return self + */ + public function setFeed($feed) + { + if (is_null($feed)) { + throw new \InvalidArgumentException('non-nullable feed cannot be null'); + } + $this->container['feed'] = $feed; + + return $this; + } + + /** + * Gets purchase_livestock + * + * @return float + */ + public function getPurchaseLivestock() + { + return $this->container['purchase_livestock']; + } + + /** + * Sets purchase_livestock + * + * @param float $purchase_livestock Emissions from purchased livestock, in tonnes-CO2e + * + * @return self + */ + public function setPurchaseLivestock($purchase_livestock) + { + if (is_null($purchase_livestock)) { + throw new \InvalidArgumentException('non-nullable purchase_livestock cannot be null'); + } + $this->container['purchase_livestock'] = $purchase_livestock; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 3 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlotRequest.php b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequest.php new file mode 100644 index 00000000..a8dfdb6d --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequest.php @@ -0,0 +1,536 @@ + + */ +class PostFeedlotRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'feedlots' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInner[]', + 'vegetation' => '\OpenAPI\Client\Model\PostFeedlotRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'feedlots' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'feedlots' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'feedlots' => 'feedlots', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'feedlots' => 'setFeedlots', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'feedlots' => 'getFeedlots', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('feedlots', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['feedlots'] === null) { + $invalidProperties[] = "'feedlots' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets feedlots + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInner[] + */ + public function getFeedlots() + { + return $this->container['feedlots']; + } + + /** + * Sets feedlots + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInner[] $feedlots feedlots + * + * @return self + */ + public function setFeedlots($feedlots) + { + if (is_null($feedlots)) { + throw new \InvalidArgumentException('non-nullable feedlots cannot be null'); + } + $this->container['feedlots'] = $feedlots; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInner.php b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInner.php new file mode 100644 index 00000000..bb3cb1d2 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInner.php @@ -0,0 +1,1275 @@ + + */ +class PostFeedlotRequestFeedlotsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_request_feedlots_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'system' => 'string', + 'groups' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerGroupsInner[]', + 'fertiliser' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser', + 'purchases' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchases', + 'sales' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSales', + 'diesel' => 'float', + 'petrol' => 'float', + 'lpg' => 'float', + 'electricity_source' => 'string', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'grain_feed' => 'float', + 'hay_feed' => 'float', + 'cottonseed_feed' => 'float', + 'herbicide' => 'float', + 'herbicide_other' => 'float', + 'distance_cattle_transported' => 'float', + 'truck_type' => 'string', + 'limestone' => 'float', + 'limestone_fraction' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'system' => null, + 'groups' => null, + 'fertiliser' => null, + 'purchases' => null, + 'sales' => null, + 'diesel' => null, + 'petrol' => null, + 'lpg' => null, + 'electricity_source' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'grain_feed' => null, + 'hay_feed' => null, + 'cottonseed_feed' => null, + 'herbicide' => null, + 'herbicide_other' => null, + 'distance_cattle_transported' => null, + 'truck_type' => null, + 'limestone' => null, + 'limestone_fraction' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'system' => false, + 'groups' => false, + 'fertiliser' => false, + 'purchases' => false, + 'sales' => false, + 'diesel' => false, + 'petrol' => false, + 'lpg' => false, + 'electricity_source' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'grain_feed' => false, + 'hay_feed' => false, + 'cottonseed_feed' => false, + 'herbicide' => false, + 'herbicide_other' => false, + 'distance_cattle_transported' => false, + 'truck_type' => false, + 'limestone' => false, + 'limestone_fraction' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'system' => 'system', + 'groups' => 'groups', + 'fertiliser' => 'fertiliser', + 'purchases' => 'purchases', + 'sales' => 'sales', + 'diesel' => 'diesel', + 'petrol' => 'petrol', + 'lpg' => 'lpg', + 'electricity_source' => 'electricitySource', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'grain_feed' => 'grainFeed', + 'hay_feed' => 'hayFeed', + 'cottonseed_feed' => 'cottonseedFeed', + 'herbicide' => 'herbicide', + 'herbicide_other' => 'herbicideOther', + 'distance_cattle_transported' => 'distanceCattleTransported', + 'truck_type' => 'truckType', + 'limestone' => 'limestone', + 'limestone_fraction' => 'limestoneFraction' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'system' => 'setSystem', + 'groups' => 'setGroups', + 'fertiliser' => 'setFertiliser', + 'purchases' => 'setPurchases', + 'sales' => 'setSales', + 'diesel' => 'setDiesel', + 'petrol' => 'setPetrol', + 'lpg' => 'setLpg', + 'electricity_source' => 'setElectricitySource', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'grain_feed' => 'setGrainFeed', + 'hay_feed' => 'setHayFeed', + 'cottonseed_feed' => 'setCottonseedFeed', + 'herbicide' => 'setHerbicide', + 'herbicide_other' => 'setHerbicideOther', + 'distance_cattle_transported' => 'setDistanceCattleTransported', + 'truck_type' => 'setTruckType', + 'limestone' => 'setLimestone', + 'limestone_fraction' => 'setLimestoneFraction' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'system' => 'getSystem', + 'groups' => 'getGroups', + 'fertiliser' => 'getFertiliser', + 'purchases' => 'getPurchases', + 'sales' => 'getSales', + 'diesel' => 'getDiesel', + 'petrol' => 'getPetrol', + 'lpg' => 'getLpg', + 'electricity_source' => 'getElectricitySource', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'grain_feed' => 'getGrainFeed', + 'hay_feed' => 'getHayFeed', + 'cottonseed_feed' => 'getCottonseedFeed', + 'herbicide' => 'getHerbicide', + 'herbicide_other' => 'getHerbicideOther', + 'distance_cattle_transported' => 'getDistanceCattleTransported', + 'truck_type' => 'getTruckType', + 'limestone' => 'getLimestone', + 'limestone_fraction' => 'getLimestoneFraction' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const SYSTEM_DRYLOT = 'Drylot'; + public const SYSTEM_SOLID_STORAGE = 'Solid Storage'; + public const SYSTEM_COMPOSTING = 'Composting'; + public const SYSTEM_UNCOVERED_ANAEROBIC_LAGOON = 'Uncovered anaerobic lagoon'; + public const ELECTRICITY_SOURCE_STATE_GRID = 'State Grid'; + public const ELECTRICITY_SOURCE_RENEWABLE = 'Renewable'; + public const TRUCK_TYPE__4_DECK_TRAILER = '4 Deck Trailer'; + public const TRUCK_TYPE__6_DECK_TRAILER = '6 Deck Trailer'; + public const TRUCK_TYPE_B_DOUBLE = 'B-Double'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSystemAllowableValues() + { + return [ + self::SYSTEM_DRYLOT, + self::SYSTEM_SOLID_STORAGE, + self::SYSTEM_COMPOSTING, + self::SYSTEM_UNCOVERED_ANAEROBIC_LAGOON, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getElectricitySourceAllowableValues() + { + return [ + self::ELECTRICITY_SOURCE_STATE_GRID, + self::ELECTRICITY_SOURCE_RENEWABLE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTruckTypeAllowableValues() + { + return [ + self::TRUCK_TYPE__4_DECK_TRAILER, + self::TRUCK_TYPE__6_DECK_TRAILER, + self::TRUCK_TYPE_B_DOUBLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('system', $data ?? [], null); + $this->setIfExists('groups', $data ?? [], null); + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + $this->setIfExists('sales', $data ?? [], null); + $this->setIfExists('diesel', $data ?? [], null); + $this->setIfExists('petrol', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + $this->setIfExists('electricity_source', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('grain_feed', $data ?? [], null); + $this->setIfExists('hay_feed', $data ?? [], null); + $this->setIfExists('cottonseed_feed', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('herbicide_other', $data ?? [], null); + $this->setIfExists('distance_cattle_transported', $data ?? [], null); + $this->setIfExists('truck_type', $data ?? [], null); + $this->setIfExists('limestone', $data ?? [], null); + $this->setIfExists('limestone_fraction', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['system'] === null) { + $invalidProperties[] = "'system' can't be null"; + } + $allowedValues = $this->getSystemAllowableValues(); + if (!is_null($this->container['system']) && !in_array($this->container['system'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'system', must be one of '%s'", + $this->container['system'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['groups'] === null) { + $invalidProperties[] = "'groups' can't be null"; + } + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['purchases'] === null) { + $invalidProperties[] = "'purchases' can't be null"; + } + if ($this->container['sales'] === null) { + $invalidProperties[] = "'sales' can't be null"; + } + if ($this->container['diesel'] === null) { + $invalidProperties[] = "'diesel' can't be null"; + } + if ($this->container['petrol'] === null) { + $invalidProperties[] = "'petrol' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + if ($this->container['electricity_source'] === null) { + $invalidProperties[] = "'electricity_source' can't be null"; + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!is_null($this->container['electricity_source']) && !in_array($this->container['electricity_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'electricity_source', must be one of '%s'", + $this->container['electricity_source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['grain_feed'] === null) { + $invalidProperties[] = "'grain_feed' can't be null"; + } + if ($this->container['hay_feed'] === null) { + $invalidProperties[] = "'hay_feed' can't be null"; + } + if ($this->container['cottonseed_feed'] === null) { + $invalidProperties[] = "'cottonseed_feed' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['herbicide_other'] === null) { + $invalidProperties[] = "'herbicide_other' can't be null"; + } + if ($this->container['distance_cattle_transported'] === null) { + $invalidProperties[] = "'distance_cattle_transported' can't be null"; + } + if ($this->container['truck_type'] === null) { + $invalidProperties[] = "'truck_type' can't be null"; + } + $allowedValues = $this->getTruckTypeAllowableValues(); + if (!is_null($this->container['truck_type']) && !in_array($this->container['truck_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'truck_type', must be one of '%s'", + $this->container['truck_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['limestone'] === null) { + $invalidProperties[] = "'limestone' can't be null"; + } + if ($this->container['limestone_fraction'] === null) { + $invalidProperties[] = "'limestone_fraction' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for the feedlot enterprise + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets system + * + * @return string + */ + public function getSystem() + { + return $this->container['system']; + } + + /** + * Sets system + * + * @param string $system Type of feedlot/production system + * + * @return self + */ + public function setSystem($system) + { + if (is_null($system)) { + throw new \InvalidArgumentException('non-nullable system cannot be null'); + } + $allowedValues = $this->getSystemAllowableValues(); + if (!in_array($system, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'system', must be one of '%s'", + $system, + implode("', '", $allowedValues) + ) + ); + } + $this->container['system'] = $system; + + return $this; + } + + /** + * Gets groups + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerGroupsInner[] + */ + public function getGroups() + { + return $this->container['groups']; + } + + /** + * Sets groups + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerGroupsInner[] $groups groups + * + * @return self + */ + public function setGroups($groups) + { + if (is_null($groups)) { + throw new \InvalidArgumentException('non-nullable groups cannot be null'); + } + $this->container['groups'] = $groups; + + return $this; + } + + /** + * Gets fertiliser + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser $fertiliser fertiliser + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchases + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchases $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + + /** + * Gets sales + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSales + */ + public function getSales() + { + return $this->container['sales']; + } + + /** + * Sets sales + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSales $sales sales + * + * @return self + */ + public function setSales($sales) + { + if (is_null($sales)) { + throw new \InvalidArgumentException('non-nullable sales cannot be null'); + } + $this->container['sales'] = $sales; + + return $this; + } + + /** + * Gets diesel + * + * @return float + */ + public function getDiesel() + { + return $this->container['diesel']; + } + + /** + * Sets diesel + * + * @param float $diesel Diesel usage in L (litres) + * + * @return self + */ + public function setDiesel($diesel) + { + if (is_null($diesel)) { + throw new \InvalidArgumentException('non-nullable diesel cannot be null'); + } + $this->container['diesel'] = $diesel; + + return $this; + } + + /** + * Gets petrol + * + * @return float + */ + public function getPetrol() + { + return $this->container['petrol']; + } + + /** + * Sets petrol + * + * @param float $petrol Petrol usage in L (litres) + * + * @return self + */ + public function setPetrol($petrol) + { + if (is_null($petrol)) { + throw new \InvalidArgumentException('non-nullable petrol cannot be null'); + } + $this->container['petrol'] = $petrol; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + + /** + * Gets electricity_source + * + * @return string + */ + public function getElectricitySource() + { + return $this->container['electricity_source']; + } + + /** + * Sets electricity_source + * + * @param string $electricity_source Source of electricity + * + * @return self + */ + public function setElectricitySource($electricity_source) + { + if (is_null($electricity_source)) { + throw new \InvalidArgumentException('non-nullable electricity_source cannot be null'); + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!in_array($electricity_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'electricity_source', must be one of '%s'", + $electricity_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['electricity_source'] = $electricity_source; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostFeedlotRequestFeedlotsInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostFeedlotRequestFeedlotsInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets grain_feed + * + * @return float + */ + public function getGrainFeed() + { + return $this->container['grain_feed']; + } + + /** + * Sets grain_feed + * + * @param float $grain_feed Grain purchased for cattle feed in tonnes + * + * @return self + */ + public function setGrainFeed($grain_feed) + { + if (is_null($grain_feed)) { + throw new \InvalidArgumentException('non-nullable grain_feed cannot be null'); + } + $this->container['grain_feed'] = $grain_feed; + + return $this; + } + + /** + * Gets hay_feed + * + * @return float + */ + public function getHayFeed() + { + return $this->container['hay_feed']; + } + + /** + * Sets hay_feed + * + * @param float $hay_feed Hay purchased for cattle feed in tonnes + * + * @return self + */ + public function setHayFeed($hay_feed) + { + if (is_null($hay_feed)) { + throw new \InvalidArgumentException('non-nullable hay_feed cannot be null'); + } + $this->container['hay_feed'] = $hay_feed; + + return $this; + } + + /** + * Gets cottonseed_feed + * + * @return float + */ + public function getCottonseedFeed() + { + return $this->container['cottonseed_feed']; + } + + /** + * Sets cottonseed_feed + * + * @param float $cottonseed_feed Cotton seed purchased for cattle feed in tonnes + * + * @return self + */ + public function setCottonseedFeed($cottonseed_feed) + { + if (is_null($cottonseed_feed)) { + throw new \InvalidArgumentException('non-nullable cottonseed_feed cannot be null'); + } + $this->container['cottonseed_feed'] = $cottonseed_feed; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets herbicide_other + * + * @return float + */ + public function getHerbicideOther() + { + return $this->container['herbicide_other']; + } + + /** + * Sets herbicide_other + * + * @param float $herbicide_other Total amount of active ingredients of from other herbicides in kg (kilograms) + * + * @return self + */ + public function setHerbicideOther($herbicide_other) + { + if (is_null($herbicide_other)) { + throw new \InvalidArgumentException('non-nullable herbicide_other cannot be null'); + } + $this->container['herbicide_other'] = $herbicide_other; + + return $this; + } + + /** + * Gets distance_cattle_transported + * + * @return float + */ + public function getDistanceCattleTransported() + { + return $this->container['distance_cattle_transported']; + } + + /** + * Sets distance_cattle_transported + * + * @param float $distance_cattle_transported Distance cattle are transported to farm, in km (kilometres) + * + * @return self + */ + public function setDistanceCattleTransported($distance_cattle_transported) + { + if (is_null($distance_cattle_transported)) { + throw new \InvalidArgumentException('non-nullable distance_cattle_transported cannot be null'); + } + $this->container['distance_cattle_transported'] = $distance_cattle_transported; + + return $this; + } + + /** + * Gets truck_type + * + * @return string + */ + public function getTruckType() + { + return $this->container['truck_type']; + } + + /** + * Sets truck_type + * + * @param string $truck_type Type of truck used for cattle transport + * + * @return self + */ + public function setTruckType($truck_type) + { + if (is_null($truck_type)) { + throw new \InvalidArgumentException('non-nullable truck_type cannot be null'); + } + $allowedValues = $this->getTruckTypeAllowableValues(); + if (!in_array($truck_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'truck_type', must be one of '%s'", + $truck_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['truck_type'] = $truck_type; + + return $this; + } + + /** + * Gets limestone + * + * @return float + */ + public function getLimestone() + { + return $this->container['limestone']; + } + + /** + * Sets limestone + * + * @param float $limestone Lime applied in tonnes + * + * @return self + */ + public function setLimestone($limestone) + { + if (is_null($limestone)) { + throw new \InvalidArgumentException('non-nullable limestone cannot be null'); + } + $this->container['limestone'] = $limestone; + + return $this; + } + + /** + * Gets limestone_fraction + * + * @return float + */ + public function getLimestoneFraction() + { + return $this->container['limestone_fraction']; + } + + /** + * Sets limestone_fraction + * + * @param float $limestone_fraction Fraction of lime as limestone vs dolomite, between 0 and 1 + * + * @return self + */ + public function setLimestoneFraction($limestone_fraction) + { + if (is_null($limestone_fraction)) { + throw new \InvalidArgumentException('non-nullable limestone_fraction cannot be null'); + } + $this->container['limestone_fraction'] = $limestone_fraction; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.php b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.php new file mode 100644 index 00000000..763e7d53 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.php @@ -0,0 +1,413 @@ + + */ +class PostFeedlotRequestFeedlotsInnerGroupsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_request_feedlots_inner_groups_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'stays' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'stays' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'stays' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'stays' => 'stays' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'stays' => 'setStays' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'stays' => 'getStays' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('stays', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['stays'] === null) { + $invalidProperties[] = "'stays' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets stays + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner[] + */ + public function getStays() + { + return $this->container['stays']; + } + + /** + * Sets stays + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner[] $stays stays + * + * @return self + */ + public function setStays($stays) + { + if (is_null($stays)) { + throw new \InvalidArgumentException('non-nullable stays cannot be null'); + } + $this->container['stays'] = $stays; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.php b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.php new file mode 100644 index 00000000..f181780c --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.php @@ -0,0 +1,710 @@ + + */ +class PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_request_feedlots_inner_groups_inner_stays_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'livestock' => 'float', + 'stay_average_duration' => 'float', + 'liveweight' => 'float', + 'dry_matter_digestibility' => 'float', + 'crude_protein' => 'float', + 'nitrogen_retention' => 'float', + 'daily_intake' => 'float', + 'ndf' => 'float', + 'ether_extract' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'livestock' => null, + 'stay_average_duration' => null, + 'liveweight' => null, + 'dry_matter_digestibility' => null, + 'crude_protein' => null, + 'nitrogen_retention' => null, + 'daily_intake' => null, + 'ndf' => null, + 'ether_extract' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'livestock' => false, + 'stay_average_duration' => false, + 'liveweight' => false, + 'dry_matter_digestibility' => false, + 'crude_protein' => false, + 'nitrogen_retention' => false, + 'daily_intake' => false, + 'ndf' => false, + 'ether_extract' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'livestock' => 'livestock', + 'stay_average_duration' => 'stayAverageDuration', + 'liveweight' => 'liveweight', + 'dry_matter_digestibility' => 'dryMatterDigestibility', + 'crude_protein' => 'crudeProtein', + 'nitrogen_retention' => 'nitrogenRetention', + 'daily_intake' => 'dailyIntake', + 'ndf' => 'ndf', + 'ether_extract' => 'etherExtract' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'livestock' => 'setLivestock', + 'stay_average_duration' => 'setStayAverageDuration', + 'liveweight' => 'setLiveweight', + 'dry_matter_digestibility' => 'setDryMatterDigestibility', + 'crude_protein' => 'setCrudeProtein', + 'nitrogen_retention' => 'setNitrogenRetention', + 'daily_intake' => 'setDailyIntake', + 'ndf' => 'setNdf', + 'ether_extract' => 'setEtherExtract' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'livestock' => 'getLivestock', + 'stay_average_duration' => 'getStayAverageDuration', + 'liveweight' => 'getLiveweight', + 'dry_matter_digestibility' => 'getDryMatterDigestibility', + 'crude_protein' => 'getCrudeProtein', + 'nitrogen_retention' => 'getNitrogenRetention', + 'daily_intake' => 'getDailyIntake', + 'ndf' => 'getNdf', + 'ether_extract' => 'getEtherExtract' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('livestock', $data ?? [], null); + $this->setIfExists('stay_average_duration', $data ?? [], null); + $this->setIfExists('liveweight', $data ?? [], null); + $this->setIfExists('dry_matter_digestibility', $data ?? [], null); + $this->setIfExists('crude_protein', $data ?? [], null); + $this->setIfExists('nitrogen_retention', $data ?? [], null); + $this->setIfExists('daily_intake', $data ?? [], null); + $this->setIfExists('ndf', $data ?? [], null); + $this->setIfExists('ether_extract', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['livestock'] === null) { + $invalidProperties[] = "'livestock' can't be null"; + } + if ($this->container['stay_average_duration'] === null) { + $invalidProperties[] = "'stay_average_duration' can't be null"; + } + if ($this->container['liveweight'] === null) { + $invalidProperties[] = "'liveweight' can't be null"; + } + if ($this->container['dry_matter_digestibility'] === null) { + $invalidProperties[] = "'dry_matter_digestibility' can't be null"; + } + if ($this->container['crude_protein'] === null) { + $invalidProperties[] = "'crude_protein' can't be null"; + } + if ($this->container['nitrogen_retention'] === null) { + $invalidProperties[] = "'nitrogen_retention' can't be null"; + } + if ($this->container['daily_intake'] === null) { + $invalidProperties[] = "'daily_intake' can't be null"; + } + if ($this->container['ndf'] === null) { + $invalidProperties[] = "'ndf' can't be null"; + } + if ($this->container['ether_extract'] === null) { + $invalidProperties[] = "'ether_extract' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets livestock + * + * @return float + */ + public function getLivestock() + { + return $this->container['livestock']; + } + + /** + * Sets livestock + * + * @param float $livestock Number of animals (head) + * + * @return self + */ + public function setLivestock($livestock) + { + if (is_null($livestock)) { + throw new \InvalidArgumentException('non-nullable livestock cannot be null'); + } + $this->container['livestock'] = $livestock; + + return $this; + } + + /** + * Gets stay_average_duration + * + * @return float + */ + public function getStayAverageDuration() + { + return $this->container['stay_average_duration']; + } + + /** + * Sets stay_average_duration + * + * @param float $stay_average_duration Average stay length in feedlot, in days + * + * @return self + */ + public function setStayAverageDuration($stay_average_duration) + { + if (is_null($stay_average_duration)) { + throw new \InvalidArgumentException('non-nullable stay_average_duration cannot be null'); + } + $this->container['stay_average_duration'] = $stay_average_duration; + + return $this; + } + + /** + * Gets liveweight + * + * @return float + */ + public function getLiveweight() + { + return $this->container['liveweight']; + } + + /** + * Sets liveweight + * + * @param float $liveweight Average liveweight of animals in kg/head (kilogram per head) + * + * @return self + */ + public function setLiveweight($liveweight) + { + if (is_null($liveweight)) { + throw new \InvalidArgumentException('non-nullable liveweight cannot be null'); + } + $this->container['liveweight'] = $liveweight; + + return $this; + } + + /** + * Gets dry_matter_digestibility + * + * @return float + */ + public function getDryMatterDigestibility() + { + return $this->container['dry_matter_digestibility']; + } + + /** + * Sets dry_matter_digestibility + * + * @param float $dry_matter_digestibility Percent dry matter digestibility of the feed eaten, from 0 to 100 + * + * @return self + */ + public function setDryMatterDigestibility($dry_matter_digestibility) + { + if (is_null($dry_matter_digestibility)) { + throw new \InvalidArgumentException('non-nullable dry_matter_digestibility cannot be null'); + } + $this->container['dry_matter_digestibility'] = $dry_matter_digestibility; + + return $this; + } + + /** + * Gets crude_protein + * + * @return float + */ + public function getCrudeProtein() + { + return $this->container['crude_protein']; + } + + /** + * Sets crude_protein + * + * @param float $crude_protein Percent crude protein of the whole diet, from 0 to 100 + * + * @return self + */ + public function setCrudeProtein($crude_protein) + { + if (is_null($crude_protein)) { + throw new \InvalidArgumentException('non-nullable crude_protein cannot be null'); + } + $this->container['crude_protein'] = $crude_protein; + + return $this; + } + + /** + * Gets nitrogen_retention + * + * @return float + */ + public function getNitrogenRetention() + { + return $this->container['nitrogen_retention']; + } + + /** + * Sets nitrogen_retention + * + * @param float $nitrogen_retention Percent nitrogen retention of intake, from 0 to 100 + * + * @return self + */ + public function setNitrogenRetention($nitrogen_retention) + { + if (is_null($nitrogen_retention)) { + throw new \InvalidArgumentException('non-nullable nitrogen_retention cannot be null'); + } + $this->container['nitrogen_retention'] = $nitrogen_retention; + + return $this; + } + + /** + * Gets daily_intake + * + * @return float + */ + public function getDailyIntake() + { + return $this->container['daily_intake']; + } + + /** + * Sets daily_intake + * + * @param float $daily_intake Daily intake of dry matter in kilograms per head per day + * + * @return self + */ + public function setDailyIntake($daily_intake) + { + if (is_null($daily_intake)) { + throw new \InvalidArgumentException('non-nullable daily_intake cannot be null'); + } + $this->container['daily_intake'] = $daily_intake; + + return $this; + } + + /** + * Gets ndf + * + * @return float + */ + public function getNdf() + { + return $this->container['ndf']; + } + + /** + * Sets ndf + * + * @param float $ndf Percent Neutral detergent fibre (NDF) of intake, from 0 to 100 + * + * @return self + */ + public function setNdf($ndf) + { + if (is_null($ndf)) { + throw new \InvalidArgumentException('non-nullable ndf cannot be null'); + } + $this->container['ndf'] = $ndf; + + return $this; + } + + /** + * Gets ether_extract + * + * @return float + */ + public function getEtherExtract() + { + return $this->container['ether_extract']; + } + + /** + * Sets ether_extract + * + * @param float $ether_extract Percent ether extract of intake, from 0 to 100 + * + * @return self + */ + public function setEtherExtract($ether_extract) + { + if (is_null($ether_extract)) { + throw new \InvalidArgumentException('non-nullable ether_extract cannot be null'); + } + $this->container['ether_extract'] = $ether_extract; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerPurchases.php b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerPurchases.php new file mode 100644 index 00000000..e4966ed0 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerPurchases.php @@ -0,0 +1,921 @@ + + */ +class PostFeedlotRequestFeedlotsInnerPurchases implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_request_feedlots_inner_purchases'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bulls_gt1' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'bulls_gt1_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'steers_lt1' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'steers_lt1_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'steers1_to2' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'steers1_to2_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'steers_gt2' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'steers_gt2_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'cows_gt2' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'cows_gt2_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'heifers_lt1' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'heifers_lt1_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'heifers1_to2' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'heifers1_to2_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'heifers_gt2' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]', + 'heifers_gt2_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'bulls_gt1' => null, + 'bulls_gt1_traded' => null, + 'steers_lt1' => null, + 'steers_lt1_traded' => null, + 'steers1_to2' => null, + 'steers1_to2_traded' => null, + 'steers_gt2' => null, + 'steers_gt2_traded' => null, + 'cows_gt2' => null, + 'cows_gt2_traded' => null, + 'heifers_lt1' => null, + 'heifers_lt1_traded' => null, + 'heifers1_to2' => null, + 'heifers1_to2_traded' => null, + 'heifers_gt2' => null, + 'heifers_gt2_traded' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'bulls_gt1' => false, + 'bulls_gt1_traded' => false, + 'steers_lt1' => false, + 'steers_lt1_traded' => false, + 'steers1_to2' => false, + 'steers1_to2_traded' => false, + 'steers_gt2' => false, + 'steers_gt2_traded' => false, + 'cows_gt2' => false, + 'cows_gt2_traded' => false, + 'heifers_lt1' => false, + 'heifers_lt1_traded' => false, + 'heifers1_to2' => false, + 'heifers1_to2_traded' => false, + 'heifers_gt2' => false, + 'heifers_gt2_traded' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'bulls_gt1' => 'bullsGt1', + 'bulls_gt1_traded' => 'bullsGt1Traded', + 'steers_lt1' => 'steersLt1', + 'steers_lt1_traded' => 'steersLt1Traded', + 'steers1_to2' => 'steers1To2', + 'steers1_to2_traded' => 'steers1To2Traded', + 'steers_gt2' => 'steersGt2', + 'steers_gt2_traded' => 'steersGt2Traded', + 'cows_gt2' => 'cowsGt2', + 'cows_gt2_traded' => 'cowsGt2Traded', + 'heifers_lt1' => 'heifersLt1', + 'heifers_lt1_traded' => 'heifersLt1Traded', + 'heifers1_to2' => 'heifers1To2', + 'heifers1_to2_traded' => 'heifers1To2Traded', + 'heifers_gt2' => 'heifersGt2', + 'heifers_gt2_traded' => 'heifersGt2Traded' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bulls_gt1' => 'setBullsGt1', + 'bulls_gt1_traded' => 'setBullsGt1Traded', + 'steers_lt1' => 'setSteersLt1', + 'steers_lt1_traded' => 'setSteersLt1Traded', + 'steers1_to2' => 'setSteers1To2', + 'steers1_to2_traded' => 'setSteers1To2Traded', + 'steers_gt2' => 'setSteersGt2', + 'steers_gt2_traded' => 'setSteersGt2Traded', + 'cows_gt2' => 'setCowsGt2', + 'cows_gt2_traded' => 'setCowsGt2Traded', + 'heifers_lt1' => 'setHeifersLt1', + 'heifers_lt1_traded' => 'setHeifersLt1Traded', + 'heifers1_to2' => 'setHeifers1To2', + 'heifers1_to2_traded' => 'setHeifers1To2Traded', + 'heifers_gt2' => 'setHeifersGt2', + 'heifers_gt2_traded' => 'setHeifersGt2Traded' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bulls_gt1' => 'getBullsGt1', + 'bulls_gt1_traded' => 'getBullsGt1Traded', + 'steers_lt1' => 'getSteersLt1', + 'steers_lt1_traded' => 'getSteersLt1Traded', + 'steers1_to2' => 'getSteers1To2', + 'steers1_to2_traded' => 'getSteers1To2Traded', + 'steers_gt2' => 'getSteersGt2', + 'steers_gt2_traded' => 'getSteersGt2Traded', + 'cows_gt2' => 'getCowsGt2', + 'cows_gt2_traded' => 'getCowsGt2Traded', + 'heifers_lt1' => 'getHeifersLt1', + 'heifers_lt1_traded' => 'getHeifersLt1Traded', + 'heifers1_to2' => 'getHeifers1To2', + 'heifers1_to2_traded' => 'getHeifers1To2Traded', + 'heifers_gt2' => 'getHeifersGt2', + 'heifers_gt2_traded' => 'getHeifersGt2Traded' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('bulls_gt1', $data ?? [], null); + $this->setIfExists('bulls_gt1_traded', $data ?? [], null); + $this->setIfExists('steers_lt1', $data ?? [], null); + $this->setIfExists('steers_lt1_traded', $data ?? [], null); + $this->setIfExists('steers1_to2', $data ?? [], null); + $this->setIfExists('steers1_to2_traded', $data ?? [], null); + $this->setIfExists('steers_gt2', $data ?? [], null); + $this->setIfExists('steers_gt2_traded', $data ?? [], null); + $this->setIfExists('cows_gt2', $data ?? [], null); + $this->setIfExists('cows_gt2_traded', $data ?? [], null); + $this->setIfExists('heifers_lt1', $data ?? [], null); + $this->setIfExists('heifers_lt1_traded', $data ?? [], null); + $this->setIfExists('heifers1_to2', $data ?? [], null); + $this->setIfExists('heifers1_to2_traded', $data ?? [], null); + $this->setIfExists('heifers_gt2', $data ?? [], null); + $this->setIfExists('heifers_gt2_traded', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets bulls_gt1 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getBullsGt1() + { + return $this->container['bulls_gt1']; + } + + /** + * Sets bulls_gt1 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $bulls_gt1 Livestock purchases for bulls whose age is greater than 1 year old + * + * @return self + */ + public function setBullsGt1($bulls_gt1) + { + if (is_null($bulls_gt1)) { + throw new \InvalidArgumentException('non-nullable bulls_gt1 cannot be null'); + } + $this->container['bulls_gt1'] = $bulls_gt1; + + return $this; + } + + /** + * Gets bulls_gt1_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getBullsGt1Traded() + { + return $this->container['bulls_gt1_traded']; + } + + /** + * Sets bulls_gt1_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $bulls_gt1_traded Livestock purchases for traded bulls whose age is greater than 1 year old + * + * @return self + */ + public function setBullsGt1Traded($bulls_gt1_traded) + { + if (is_null($bulls_gt1_traded)) { + throw new \InvalidArgumentException('non-nullable bulls_gt1_traded cannot be null'); + } + $this->container['bulls_gt1_traded'] = $bulls_gt1_traded; + + return $this; + } + + /** + * Gets steers_lt1 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getSteersLt1() + { + return $this->container['steers_lt1']; + } + + /** + * Sets steers_lt1 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $steers_lt1 Livestock purchases for Steers whose age is less than 1 year old + * + * @return self + */ + public function setSteersLt1($steers_lt1) + { + if (is_null($steers_lt1)) { + throw new \InvalidArgumentException('non-nullable steers_lt1 cannot be null'); + } + $this->container['steers_lt1'] = $steers_lt1; + + return $this; + } + + /** + * Gets steers_lt1_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getSteersLt1Traded() + { + return $this->container['steers_lt1_traded']; + } + + /** + * Sets steers_lt1_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $steers_lt1_traded Livestock purchases for traded Steers whose age is less than 1 year old + * + * @return self + */ + public function setSteersLt1Traded($steers_lt1_traded) + { + if (is_null($steers_lt1_traded)) { + throw new \InvalidArgumentException('non-nullable steers_lt1_traded cannot be null'); + } + $this->container['steers_lt1_traded'] = $steers_lt1_traded; + + return $this; + } + + /** + * Gets steers1_to2 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getSteers1To2() + { + return $this->container['steers1_to2']; + } + + /** + * Sets steers1_to2 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $steers1_to2 Livestock purchases for Steers whose age is between 1 and 2 years old + * + * @return self + */ + public function setSteers1To2($steers1_to2) + { + if (is_null($steers1_to2)) { + throw new \InvalidArgumentException('non-nullable steers1_to2 cannot be null'); + } + $this->container['steers1_to2'] = $steers1_to2; + + return $this; + } + + /** + * Gets steers1_to2_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getSteers1To2Traded() + { + return $this->container['steers1_to2_traded']; + } + + /** + * Sets steers1_to2_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $steers1_to2_traded Livestock purchases for traded Steers whose age is between 1 and 2 years old + * + * @return self + */ + public function setSteers1To2Traded($steers1_to2_traded) + { + if (is_null($steers1_to2_traded)) { + throw new \InvalidArgumentException('non-nullable steers1_to2_traded cannot be null'); + } + $this->container['steers1_to2_traded'] = $steers1_to2_traded; + + return $this; + } + + /** + * Gets steers_gt2 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getSteersGt2() + { + return $this->container['steers_gt2']; + } + + /** + * Sets steers_gt2 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $steers_gt2 Livestock purchases for Steers whose age is greater than 2 years old + * + * @return self + */ + public function setSteersGt2($steers_gt2) + { + if (is_null($steers_gt2)) { + throw new \InvalidArgumentException('non-nullable steers_gt2 cannot be null'); + } + $this->container['steers_gt2'] = $steers_gt2; + + return $this; + } + + /** + * Gets steers_gt2_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getSteersGt2Traded() + { + return $this->container['steers_gt2_traded']; + } + + /** + * Sets steers_gt2_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $steers_gt2_traded Livestock purchases for traded Steers whose age is greater than 2 years old + * + * @return self + */ + public function setSteersGt2Traded($steers_gt2_traded) + { + if (is_null($steers_gt2_traded)) { + throw new \InvalidArgumentException('non-nullable steers_gt2_traded cannot be null'); + } + $this->container['steers_gt2_traded'] = $steers_gt2_traded; + + return $this; + } + + /** + * Gets cows_gt2 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getCowsGt2() + { + return $this->container['cows_gt2']; + } + + /** + * Sets cows_gt2 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $cows_gt2 Livestock purchases for Cows whose age is greater than 2 years old + * + * @return self + */ + public function setCowsGt2($cows_gt2) + { + if (is_null($cows_gt2)) { + throw new \InvalidArgumentException('non-nullable cows_gt2 cannot be null'); + } + $this->container['cows_gt2'] = $cows_gt2; + + return $this; + } + + /** + * Gets cows_gt2_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getCowsGt2Traded() + { + return $this->container['cows_gt2_traded']; + } + + /** + * Sets cows_gt2_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $cows_gt2_traded Livestock purchases for traded Cows whose age is greater than 2 years old + * + * @return self + */ + public function setCowsGt2Traded($cows_gt2_traded) + { + if (is_null($cows_gt2_traded)) { + throw new \InvalidArgumentException('non-nullable cows_gt2_traded cannot be null'); + } + $this->container['cows_gt2_traded'] = $cows_gt2_traded; + + return $this; + } + + /** + * Gets heifers_lt1 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getHeifersLt1() + { + return $this->container['heifers_lt1']; + } + + /** + * Sets heifers_lt1 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $heifers_lt1 Livestock purchases for Heifers whose age is less than 1 year old + * + * @return self + */ + public function setHeifersLt1($heifers_lt1) + { + if (is_null($heifers_lt1)) { + throw new \InvalidArgumentException('non-nullable heifers_lt1 cannot be null'); + } + $this->container['heifers_lt1'] = $heifers_lt1; + + return $this; + } + + /** + * Gets heifers_lt1_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getHeifersLt1Traded() + { + return $this->container['heifers_lt1_traded']; + } + + /** + * Sets heifers_lt1_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $heifers_lt1_traded Livestock purchases for traded Heifers whose age is less than 1 year old + * + * @return self + */ + public function setHeifersLt1Traded($heifers_lt1_traded) + { + if (is_null($heifers_lt1_traded)) { + throw new \InvalidArgumentException('non-nullable heifers_lt1_traded cannot be null'); + } + $this->container['heifers_lt1_traded'] = $heifers_lt1_traded; + + return $this; + } + + /** + * Gets heifers1_to2 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getHeifers1To2() + { + return $this->container['heifers1_to2']; + } + + /** + * Sets heifers1_to2 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $heifers1_to2 Livestock purchases for Heifers whose age is between 1 and 2 years old + * + * @return self + */ + public function setHeifers1To2($heifers1_to2) + { + if (is_null($heifers1_to2)) { + throw new \InvalidArgumentException('non-nullable heifers1_to2 cannot be null'); + } + $this->container['heifers1_to2'] = $heifers1_to2; + + return $this; + } + + /** + * Gets heifers1_to2_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getHeifers1To2Traded() + { + return $this->container['heifers1_to2_traded']; + } + + /** + * Sets heifers1_to2_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $heifers1_to2_traded Livestock purchases for traded Heifers whose age is between 1 and 2 years old + * + * @return self + */ + public function setHeifers1To2Traded($heifers1_to2_traded) + { + if (is_null($heifers1_to2_traded)) { + throw new \InvalidArgumentException('non-nullable heifers1_to2_traded cannot be null'); + } + $this->container['heifers1_to2_traded'] = $heifers1_to2_traded; + + return $this; + } + + /** + * Gets heifers_gt2 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getHeifersGt2() + { + return $this->container['heifers_gt2']; + } + + /** + * Sets heifers_gt2 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $heifers_gt2 Livestock purchases for Heifers whose age is greater than 2 years old + * + * @return self + */ + public function setHeifersGt2($heifers_gt2) + { + if (is_null($heifers_gt2)) { + throw new \InvalidArgumentException('non-nullable heifers_gt2 cannot be null'); + } + $this->container['heifers_gt2'] = $heifers_gt2; + + return $this; + } + + /** + * Gets heifers_gt2_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null + */ + public function getHeifersGt2Traded() + { + return $this->container['heifers_gt2_traded']; + } + + /** + * Sets heifers_gt2_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]|null $heifers_gt2_traded Livestock purchases for traded Heifers whose age is greater than 2 years old + * + * @return self + */ + public function setHeifersGt2Traded($heifers_gt2_traded) + { + if (is_null($heifers_gt2_traded)) { + throw new \InvalidArgumentException('non-nullable heifers_gt2_traded cannot be null'); + } + $this->container['heifers_gt2_traded'] = $heifers_gt2_traded; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.php b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.php new file mode 100644 index 00000000..4c6bbb06 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.php @@ -0,0 +1,535 @@ + + */ +class PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_request_feedlots_inner_purchases_bullsGt1_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'head' => 'float', + 'purchase_weight' => 'float', + 'purchase_source' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'head' => null, + 'purchase_weight' => null, + 'purchase_source' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'head' => false, + 'purchase_weight' => false, + 'purchase_source' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'head' => 'head', + 'purchase_weight' => 'purchaseWeight', + 'purchase_source' => 'purchaseSource' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'head' => 'setHead', + 'purchase_weight' => 'setPurchaseWeight', + 'purchase_source' => 'setPurchaseSource' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'head' => 'getHead', + 'purchase_weight' => 'getPurchaseWeight', + 'purchase_source' => 'getPurchaseSource' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const PURCHASE_SOURCE_NT = 'NT'; + public const PURCHASE_SOURCE_NTH_QLD = 'nth QLD'; + public const PURCHASE_SOURCE_STH_CENTRAL_QLD = 'sth/central QLD'; + public const PURCHASE_SOURCE_NTH_NSW = 'nth NSW'; + public const PURCHASE_SOURCE_STH_NSW_VIC_STH_SA = 'sth NSW/VIC/sth SA'; + public const PURCHASE_SOURCE_NSW_SA_PASTORAL_ZONE = 'NSW/SA pastoral zone'; + public const PURCHASE_SOURCE_SW_WA = 'sw WA'; + public const PURCHASE_SOURCE_WA_PASTORAL = 'WA pastoral'; + public const PURCHASE_SOURCE_TAS = 'TAS'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPurchaseSourceAllowableValues() + { + return [ + self::PURCHASE_SOURCE_NT, + self::PURCHASE_SOURCE_NTH_QLD, + self::PURCHASE_SOURCE_STH_CENTRAL_QLD, + self::PURCHASE_SOURCE_NTH_NSW, + self::PURCHASE_SOURCE_STH_NSW_VIC_STH_SA, + self::PURCHASE_SOURCE_NSW_SA_PASTORAL_ZONE, + self::PURCHASE_SOURCE_SW_WA, + self::PURCHASE_SOURCE_WA_PASTORAL, + self::PURCHASE_SOURCE_TAS, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('head', $data ?? [], null); + $this->setIfExists('purchase_weight', $data ?? [], null); + $this->setIfExists('purchase_source', $data ?? [], 'sth NSW/VIC/sth SA'); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['head'] === null) { + $invalidProperties[] = "'head' can't be null"; + } + if ($this->container['purchase_weight'] === null) { + $invalidProperties[] = "'purchase_weight' can't be null"; + } + if ($this->container['purchase_source'] === null) { + $invalidProperties[] = "'purchase_source' can't be null"; + } + $allowedValues = $this->getPurchaseSourceAllowableValues(); + if (!is_null($this->container['purchase_source']) && !in_array($this->container['purchase_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'purchase_source', must be one of '%s'", + $this->container['purchase_source'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets head + * + * @return float + */ + public function getHead() + { + return $this->container['head']; + } + + /** + * Sets head + * + * @param float $head Number of animals purchased (head) + * + * @return self + */ + public function setHead($head) + { + if (is_null($head)) { + throw new \InvalidArgumentException('non-nullable head cannot be null'); + } + $this->container['head'] = $head; + + return $this; + } + + /** + * Gets purchase_weight + * + * @return float + */ + public function getPurchaseWeight() + { + return $this->container['purchase_weight']; + } + + /** + * Sets purchase_weight + * + * @param float $purchase_weight Weight at purchase, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setPurchaseWeight($purchase_weight) + { + if (is_null($purchase_weight)) { + throw new \InvalidArgumentException('non-nullable purchase_weight cannot be null'); + } + $this->container['purchase_weight'] = $purchase_weight; + + return $this; + } + + /** + * Gets purchase_source + * + * @return string + */ + public function getPurchaseSource() + { + return $this->container['purchase_source']; + } + + /** + * Sets purchase_source + * + * @param string $purchase_source Source location of trading cattle purchases + * + * @return self + */ + public function setPurchaseSource($purchase_source) + { + if (is_null($purchase_source)) { + throw new \InvalidArgumentException('non-nullable purchase_source cannot be null'); + } + $allowedValues = $this->getPurchaseSourceAllowableValues(); + if (!in_array($purchase_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'purchase_source', must be one of '%s'", + $purchase_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['purchase_source'] = $purchase_source; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerSales.php b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerSales.php new file mode 100644 index 00000000..f0c73e0d --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerSales.php @@ -0,0 +1,969 @@ + + */ +class PostFeedlotRequestFeedlotsInnerSales implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_request_feedlots_inner_sales'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bulls_gt1' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'bulls_gt1_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'steers_lt1' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'steers_lt1_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'steers1_to2' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'steers1_to2_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'steers_gt2' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'steers_gt2_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'cows_gt2' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'cows_gt2_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'heifers_lt1' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'heifers_lt1_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'heifers1_to2' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'heifers1_to2_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'heifers_gt2' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]', + 'heifers_gt2_traded' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'bulls_gt1' => null, + 'bulls_gt1_traded' => null, + 'steers_lt1' => null, + 'steers_lt1_traded' => null, + 'steers1_to2' => null, + 'steers1_to2_traded' => null, + 'steers_gt2' => null, + 'steers_gt2_traded' => null, + 'cows_gt2' => null, + 'cows_gt2_traded' => null, + 'heifers_lt1' => null, + 'heifers_lt1_traded' => null, + 'heifers1_to2' => null, + 'heifers1_to2_traded' => null, + 'heifers_gt2' => null, + 'heifers_gt2_traded' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'bulls_gt1' => false, + 'bulls_gt1_traded' => false, + 'steers_lt1' => false, + 'steers_lt1_traded' => false, + 'steers1_to2' => false, + 'steers1_to2_traded' => false, + 'steers_gt2' => false, + 'steers_gt2_traded' => false, + 'cows_gt2' => false, + 'cows_gt2_traded' => false, + 'heifers_lt1' => false, + 'heifers_lt1_traded' => false, + 'heifers1_to2' => false, + 'heifers1_to2_traded' => false, + 'heifers_gt2' => false, + 'heifers_gt2_traded' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'bulls_gt1' => 'bullsGt1', + 'bulls_gt1_traded' => 'bullsGt1Traded', + 'steers_lt1' => 'steersLt1', + 'steers_lt1_traded' => 'steersLt1Traded', + 'steers1_to2' => 'steers1To2', + 'steers1_to2_traded' => 'steers1To2Traded', + 'steers_gt2' => 'steersGt2', + 'steers_gt2_traded' => 'steersGt2Traded', + 'cows_gt2' => 'cowsGt2', + 'cows_gt2_traded' => 'cowsGt2Traded', + 'heifers_lt1' => 'heifersLt1', + 'heifers_lt1_traded' => 'heifersLt1Traded', + 'heifers1_to2' => 'heifers1To2', + 'heifers1_to2_traded' => 'heifers1To2Traded', + 'heifers_gt2' => 'heifersGt2', + 'heifers_gt2_traded' => 'heifersGt2Traded' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bulls_gt1' => 'setBullsGt1', + 'bulls_gt1_traded' => 'setBullsGt1Traded', + 'steers_lt1' => 'setSteersLt1', + 'steers_lt1_traded' => 'setSteersLt1Traded', + 'steers1_to2' => 'setSteers1To2', + 'steers1_to2_traded' => 'setSteers1To2Traded', + 'steers_gt2' => 'setSteersGt2', + 'steers_gt2_traded' => 'setSteersGt2Traded', + 'cows_gt2' => 'setCowsGt2', + 'cows_gt2_traded' => 'setCowsGt2Traded', + 'heifers_lt1' => 'setHeifersLt1', + 'heifers_lt1_traded' => 'setHeifersLt1Traded', + 'heifers1_to2' => 'setHeifers1To2', + 'heifers1_to2_traded' => 'setHeifers1To2Traded', + 'heifers_gt2' => 'setHeifersGt2', + 'heifers_gt2_traded' => 'setHeifersGt2Traded' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bulls_gt1' => 'getBullsGt1', + 'bulls_gt1_traded' => 'getBullsGt1Traded', + 'steers_lt1' => 'getSteersLt1', + 'steers_lt1_traded' => 'getSteersLt1Traded', + 'steers1_to2' => 'getSteers1To2', + 'steers1_to2_traded' => 'getSteers1To2Traded', + 'steers_gt2' => 'getSteersGt2', + 'steers_gt2_traded' => 'getSteersGt2Traded', + 'cows_gt2' => 'getCowsGt2', + 'cows_gt2_traded' => 'getCowsGt2Traded', + 'heifers_lt1' => 'getHeifersLt1', + 'heifers_lt1_traded' => 'getHeifersLt1Traded', + 'heifers1_to2' => 'getHeifers1To2', + 'heifers1_to2_traded' => 'getHeifers1To2Traded', + 'heifers_gt2' => 'getHeifersGt2', + 'heifers_gt2_traded' => 'getHeifersGt2Traded' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('bulls_gt1', $data ?? [], null); + $this->setIfExists('bulls_gt1_traded', $data ?? [], null); + $this->setIfExists('steers_lt1', $data ?? [], null); + $this->setIfExists('steers_lt1_traded', $data ?? [], null); + $this->setIfExists('steers1_to2', $data ?? [], null); + $this->setIfExists('steers1_to2_traded', $data ?? [], null); + $this->setIfExists('steers_gt2', $data ?? [], null); + $this->setIfExists('steers_gt2_traded', $data ?? [], null); + $this->setIfExists('cows_gt2', $data ?? [], null); + $this->setIfExists('cows_gt2_traded', $data ?? [], null); + $this->setIfExists('heifers_lt1', $data ?? [], null); + $this->setIfExists('heifers_lt1_traded', $data ?? [], null); + $this->setIfExists('heifers1_to2', $data ?? [], null); + $this->setIfExists('heifers1_to2_traded', $data ?? [], null); + $this->setIfExists('heifers_gt2', $data ?? [], null); + $this->setIfExists('heifers_gt2_traded', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['bulls_gt1'] === null) { + $invalidProperties[] = "'bulls_gt1' can't be null"; + } + if ($this->container['bulls_gt1_traded'] === null) { + $invalidProperties[] = "'bulls_gt1_traded' can't be null"; + } + if ($this->container['steers_lt1'] === null) { + $invalidProperties[] = "'steers_lt1' can't be null"; + } + if ($this->container['steers_lt1_traded'] === null) { + $invalidProperties[] = "'steers_lt1_traded' can't be null"; + } + if ($this->container['steers1_to2'] === null) { + $invalidProperties[] = "'steers1_to2' can't be null"; + } + if ($this->container['steers1_to2_traded'] === null) { + $invalidProperties[] = "'steers1_to2_traded' can't be null"; + } + if ($this->container['steers_gt2'] === null) { + $invalidProperties[] = "'steers_gt2' can't be null"; + } + if ($this->container['steers_gt2_traded'] === null) { + $invalidProperties[] = "'steers_gt2_traded' can't be null"; + } + if ($this->container['cows_gt2'] === null) { + $invalidProperties[] = "'cows_gt2' can't be null"; + } + if ($this->container['cows_gt2_traded'] === null) { + $invalidProperties[] = "'cows_gt2_traded' can't be null"; + } + if ($this->container['heifers_lt1'] === null) { + $invalidProperties[] = "'heifers_lt1' can't be null"; + } + if ($this->container['heifers_lt1_traded'] === null) { + $invalidProperties[] = "'heifers_lt1_traded' can't be null"; + } + if ($this->container['heifers1_to2'] === null) { + $invalidProperties[] = "'heifers1_to2' can't be null"; + } + if ($this->container['heifers1_to2_traded'] === null) { + $invalidProperties[] = "'heifers1_to2_traded' can't be null"; + } + if ($this->container['heifers_gt2'] === null) { + $invalidProperties[] = "'heifers_gt2' can't be null"; + } + if ($this->container['heifers_gt2_traded'] === null) { + $invalidProperties[] = "'heifers_gt2_traded' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets bulls_gt1 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getBullsGt1() + { + return $this->container['bulls_gt1']; + } + + /** + * Sets bulls_gt1 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $bulls_gt1 Livestock sales for bulls whose age is greater than 1 year old + * + * @return self + */ + public function setBullsGt1($bulls_gt1) + { + if (is_null($bulls_gt1)) { + throw new \InvalidArgumentException('non-nullable bulls_gt1 cannot be null'); + } + $this->container['bulls_gt1'] = $bulls_gt1; + + return $this; + } + + /** + * Gets bulls_gt1_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getBullsGt1Traded() + { + return $this->container['bulls_gt1_traded']; + } + + /** + * Sets bulls_gt1_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $bulls_gt1_traded Livestock sales for traded bulls whose age is greater than 1 year old + * + * @return self + */ + public function setBullsGt1Traded($bulls_gt1_traded) + { + if (is_null($bulls_gt1_traded)) { + throw new \InvalidArgumentException('non-nullable bulls_gt1_traded cannot be null'); + } + $this->container['bulls_gt1_traded'] = $bulls_gt1_traded; + + return $this; + } + + /** + * Gets steers_lt1 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getSteersLt1() + { + return $this->container['steers_lt1']; + } + + /** + * Sets steers_lt1 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $steers_lt1 Livestock sales for Steers whose age is less than 1 year old + * + * @return self + */ + public function setSteersLt1($steers_lt1) + { + if (is_null($steers_lt1)) { + throw new \InvalidArgumentException('non-nullable steers_lt1 cannot be null'); + } + $this->container['steers_lt1'] = $steers_lt1; + + return $this; + } + + /** + * Gets steers_lt1_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getSteersLt1Traded() + { + return $this->container['steers_lt1_traded']; + } + + /** + * Sets steers_lt1_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $steers_lt1_traded Livestock sales for traded Steers whose age is less than 1 year old + * + * @return self + */ + public function setSteersLt1Traded($steers_lt1_traded) + { + if (is_null($steers_lt1_traded)) { + throw new \InvalidArgumentException('non-nullable steers_lt1_traded cannot be null'); + } + $this->container['steers_lt1_traded'] = $steers_lt1_traded; + + return $this; + } + + /** + * Gets steers1_to2 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getSteers1To2() + { + return $this->container['steers1_to2']; + } + + /** + * Sets steers1_to2 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $steers1_to2 Livestock sales for Steers whose age is between 1 and 2 years old + * + * @return self + */ + public function setSteers1To2($steers1_to2) + { + if (is_null($steers1_to2)) { + throw new \InvalidArgumentException('non-nullable steers1_to2 cannot be null'); + } + $this->container['steers1_to2'] = $steers1_to2; + + return $this; + } + + /** + * Gets steers1_to2_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getSteers1To2Traded() + { + return $this->container['steers1_to2_traded']; + } + + /** + * Sets steers1_to2_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $steers1_to2_traded Livestock sales for traded Steers whose age is between 1 and 2 years old + * + * @return self + */ + public function setSteers1To2Traded($steers1_to2_traded) + { + if (is_null($steers1_to2_traded)) { + throw new \InvalidArgumentException('non-nullable steers1_to2_traded cannot be null'); + } + $this->container['steers1_to2_traded'] = $steers1_to2_traded; + + return $this; + } + + /** + * Gets steers_gt2 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getSteersGt2() + { + return $this->container['steers_gt2']; + } + + /** + * Sets steers_gt2 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $steers_gt2 Livestock sales for Steers whose age is greater than 2 years old + * + * @return self + */ + public function setSteersGt2($steers_gt2) + { + if (is_null($steers_gt2)) { + throw new \InvalidArgumentException('non-nullable steers_gt2 cannot be null'); + } + $this->container['steers_gt2'] = $steers_gt2; + + return $this; + } + + /** + * Gets steers_gt2_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getSteersGt2Traded() + { + return $this->container['steers_gt2_traded']; + } + + /** + * Sets steers_gt2_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $steers_gt2_traded Livestock sales for traded Steers whose age is greater than 2 years old + * + * @return self + */ + public function setSteersGt2Traded($steers_gt2_traded) + { + if (is_null($steers_gt2_traded)) { + throw new \InvalidArgumentException('non-nullable steers_gt2_traded cannot be null'); + } + $this->container['steers_gt2_traded'] = $steers_gt2_traded; + + return $this; + } + + /** + * Gets cows_gt2 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getCowsGt2() + { + return $this->container['cows_gt2']; + } + + /** + * Sets cows_gt2 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $cows_gt2 Livestock sales for Cows whose age is greater than 2 years old + * + * @return self + */ + public function setCowsGt2($cows_gt2) + { + if (is_null($cows_gt2)) { + throw new \InvalidArgumentException('non-nullable cows_gt2 cannot be null'); + } + $this->container['cows_gt2'] = $cows_gt2; + + return $this; + } + + /** + * Gets cows_gt2_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getCowsGt2Traded() + { + return $this->container['cows_gt2_traded']; + } + + /** + * Sets cows_gt2_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $cows_gt2_traded Livestock sales for traded Cows whose age is greater than 2 years old + * + * @return self + */ + public function setCowsGt2Traded($cows_gt2_traded) + { + if (is_null($cows_gt2_traded)) { + throw new \InvalidArgumentException('non-nullable cows_gt2_traded cannot be null'); + } + $this->container['cows_gt2_traded'] = $cows_gt2_traded; + + return $this; + } + + /** + * Gets heifers_lt1 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getHeifersLt1() + { + return $this->container['heifers_lt1']; + } + + /** + * Sets heifers_lt1 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $heifers_lt1 Livestock sales for Heifers whose age is less than 1 year old + * + * @return self + */ + public function setHeifersLt1($heifers_lt1) + { + if (is_null($heifers_lt1)) { + throw new \InvalidArgumentException('non-nullable heifers_lt1 cannot be null'); + } + $this->container['heifers_lt1'] = $heifers_lt1; + + return $this; + } + + /** + * Gets heifers_lt1_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getHeifersLt1Traded() + { + return $this->container['heifers_lt1_traded']; + } + + /** + * Sets heifers_lt1_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $heifers_lt1_traded Livestock sales for traded Heifers whose age is less than 1 year old + * + * @return self + */ + public function setHeifersLt1Traded($heifers_lt1_traded) + { + if (is_null($heifers_lt1_traded)) { + throw new \InvalidArgumentException('non-nullable heifers_lt1_traded cannot be null'); + } + $this->container['heifers_lt1_traded'] = $heifers_lt1_traded; + + return $this; + } + + /** + * Gets heifers1_to2 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getHeifers1To2() + { + return $this->container['heifers1_to2']; + } + + /** + * Sets heifers1_to2 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $heifers1_to2 Livestock sales for Heifers whose age is between 1 and 2 years old + * + * @return self + */ + public function setHeifers1To2($heifers1_to2) + { + if (is_null($heifers1_to2)) { + throw new \InvalidArgumentException('non-nullable heifers1_to2 cannot be null'); + } + $this->container['heifers1_to2'] = $heifers1_to2; + + return $this; + } + + /** + * Gets heifers1_to2_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getHeifers1To2Traded() + { + return $this->container['heifers1_to2_traded']; + } + + /** + * Sets heifers1_to2_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $heifers1_to2_traded Livestock sales for traded Heifers whose age is between 1 and 2 years old + * + * @return self + */ + public function setHeifers1To2Traded($heifers1_to2_traded) + { + if (is_null($heifers1_to2_traded)) { + throw new \InvalidArgumentException('non-nullable heifers1_to2_traded cannot be null'); + } + $this->container['heifers1_to2_traded'] = $heifers1_to2_traded; + + return $this; + } + + /** + * Gets heifers_gt2 + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getHeifersGt2() + { + return $this->container['heifers_gt2']; + } + + /** + * Sets heifers_gt2 + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $heifers_gt2 Livestock sales for Heifers whose age is greater than 2 years old + * + * @return self + */ + public function setHeifersGt2($heifers_gt2) + { + if (is_null($heifers_gt2)) { + throw new \InvalidArgumentException('non-nullable heifers_gt2 cannot be null'); + } + $this->container['heifers_gt2'] = $heifers_gt2; + + return $this; + } + + /** + * Gets heifers_gt2_traded + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] + */ + public function getHeifersGt2Traded() + { + return $this->container['heifers_gt2_traded']; + } + + /** + * Sets heifers_gt2_traded + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[] $heifers_gt2_traded Livestock sales for traded Heifers whose age is greater than 2 years old + * + * @return self + */ + public function setHeifersGt2Traded($heifers_gt2_traded) + { + if (is_null($heifers_gt2_traded)) { + throw new \InvalidArgumentException('non-nullable heifers_gt2_traded cannot be null'); + } + $this->container['heifers_gt2_traded'] = $heifers_gt2_traded; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.php b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.php new file mode 100644 index 00000000..aa5738e7 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.php @@ -0,0 +1,450 @@ + + */ +class PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_request_feedlots_inner_sales_bullsGt1_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'head' => 'float', + 'sale_weight' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'head' => null, + 'sale_weight' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'head' => false, + 'sale_weight' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'head' => 'head', + 'sale_weight' => 'saleWeight' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'head' => 'setHead', + 'sale_weight' => 'setSaleWeight' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'head' => 'getHead', + 'sale_weight' => 'getSaleWeight' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('head', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['head'] === null) { + $invalidProperties[] = "'head' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets head + * + * @return float + */ + public function getHead() + { + return $this->container['head']; + } + + /** + * Sets head + * + * @param float $head Number of animals sold (head) + * + * @return self + */ + public function setHead($head) + { + if (is_null($head)) { + throw new \InvalidArgumentException('non-nullable head cannot be null'); + } + $this->container['head'] = $head; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestVegetationInner.php b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestVegetationInner.php new file mode 100644 index 00000000..7433b1f1 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostFeedlotRequestVegetationInner.php @@ -0,0 +1,450 @@ + + */ +class PostFeedlotRequestVegetationInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_feedlot_request_vegetation_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'vegetation' => '\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation', + 'feedlot_proportion' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'vegetation' => null, + 'feedlot_proportion' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'vegetation' => false, + 'feedlot_proportion' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vegetation' => 'vegetation', + 'feedlot_proportion' => 'feedlotProportion' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vegetation' => 'setVegetation', + 'feedlot_proportion' => 'setFeedlotProportion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vegetation' => 'getVegetation', + 'feedlot_proportion' => 'getFeedlotProportion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('vegetation', $data ?? [], null); + $this->setIfExists('feedlot_proportion', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + if ($this->container['feedlot_proportion'] === null) { + $invalidProperties[] = "'feedlot_proportion' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + + /** + * Gets feedlot_proportion + * + * @return float[] + */ + public function getFeedlotProportion() + { + return $this->container['feedlot_proportion']; + } + + /** + * Sets feedlot_proportion + * + * @param float[] $feedlot_proportion feedlot_proportion + * + * @return self + */ + public function setFeedlotProportion($feedlot_proportion) + { + if (is_null($feedlot_proportion)) { + throw new \InvalidArgumentException('non-nullable feedlot_proportion cannot be null'); + } + $this->container['feedlot_proportion'] = $feedlot_proportion; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoat200Response.php b/examples/php-api-client/api-client/lib/Model/PostGoat200Response.php new file mode 100644 index 00000000..3583149f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoat200Response.php @@ -0,0 +1,636 @@ + + */ +class PostGoat200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostBuffalo200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostBeef200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'net' => '\OpenAPI\Client\Model\PostGoat200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostGoat200ResponseIntensities', + 'intermediate' => '\OpenAPI\Client\Model\PostGoat200ResponseIntermediateInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'net' => null, + 'intensities' => null, + 'intermediate' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'net' => false, + 'intensities' => false, + 'intermediate' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'net' => 'net', + 'intensities' => 'intensities', + 'intermediate' => 'intermediate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'net' => 'setNet', + 'intensities' => 'setIntensities', + 'intermediate' => 'setIntermediate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'net' => 'getNet', + 'intensities' => 'getIntensities', + 'intermediate' => 'getIntermediate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostGoat200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostGoat200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostGoat200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostGoat200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostGoat200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostGoat200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoat200ResponseIntensities.php b/examples/php-api-client/api-client/lib/Model/PostGoat200ResponseIntensities.php new file mode 100644 index 00000000..8378628f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoat200ResponseIntensities.php @@ -0,0 +1,598 @@ + + */ +class PostGoat200ResponseIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_200_response_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'amount_meat_produced' => 'float', + 'amount_wool_produced' => 'float', + 'goat_meat_breeding_including_sequestration' => 'float', + 'goat_meat_breeding_excluding_sequestration' => 'float', + 'wool_including_sequestration' => 'float', + 'wool_excluding_sequestration' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'amount_meat_produced' => null, + 'amount_wool_produced' => null, + 'goat_meat_breeding_including_sequestration' => null, + 'goat_meat_breeding_excluding_sequestration' => null, + 'wool_including_sequestration' => null, + 'wool_excluding_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'amount_meat_produced' => false, + 'amount_wool_produced' => false, + 'goat_meat_breeding_including_sequestration' => false, + 'goat_meat_breeding_excluding_sequestration' => false, + 'wool_including_sequestration' => false, + 'wool_excluding_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'amount_meat_produced' => 'amountMeatProduced', + 'amount_wool_produced' => 'amountWoolProduced', + 'goat_meat_breeding_including_sequestration' => 'goatMeatBreedingIncludingSequestration', + 'goat_meat_breeding_excluding_sequestration' => 'goatMeatBreedingExcludingSequestration', + 'wool_including_sequestration' => 'woolIncludingSequestration', + 'wool_excluding_sequestration' => 'woolExcludingSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount_meat_produced' => 'setAmountMeatProduced', + 'amount_wool_produced' => 'setAmountWoolProduced', + 'goat_meat_breeding_including_sequestration' => 'setGoatMeatBreedingIncludingSequestration', + 'goat_meat_breeding_excluding_sequestration' => 'setGoatMeatBreedingExcludingSequestration', + 'wool_including_sequestration' => 'setWoolIncludingSequestration', + 'wool_excluding_sequestration' => 'setWoolExcludingSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount_meat_produced' => 'getAmountMeatProduced', + 'amount_wool_produced' => 'getAmountWoolProduced', + 'goat_meat_breeding_including_sequestration' => 'getGoatMeatBreedingIncludingSequestration', + 'goat_meat_breeding_excluding_sequestration' => 'getGoatMeatBreedingExcludingSequestration', + 'wool_including_sequestration' => 'getWoolIncludingSequestration', + 'wool_excluding_sequestration' => 'getWoolExcludingSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('amount_meat_produced', $data ?? [], null); + $this->setIfExists('amount_wool_produced', $data ?? [], null); + $this->setIfExists('goat_meat_breeding_including_sequestration', $data ?? [], null); + $this->setIfExists('goat_meat_breeding_excluding_sequestration', $data ?? [], null); + $this->setIfExists('wool_including_sequestration', $data ?? [], null); + $this->setIfExists('wool_excluding_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['amount_meat_produced'] === null) { + $invalidProperties[] = "'amount_meat_produced' can't be null"; + } + if ($this->container['amount_wool_produced'] === null) { + $invalidProperties[] = "'amount_wool_produced' can't be null"; + } + if ($this->container['goat_meat_breeding_including_sequestration'] === null) { + $invalidProperties[] = "'goat_meat_breeding_including_sequestration' can't be null"; + } + if ($this->container['goat_meat_breeding_excluding_sequestration'] === null) { + $invalidProperties[] = "'goat_meat_breeding_excluding_sequestration' can't be null"; + } + if ($this->container['wool_including_sequestration'] === null) { + $invalidProperties[] = "'wool_including_sequestration' can't be null"; + } + if ($this->container['wool_excluding_sequestration'] === null) { + $invalidProperties[] = "'wool_excluding_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets amount_meat_produced + * + * @return float + */ + public function getAmountMeatProduced() + { + return $this->container['amount_meat_produced']; + } + + /** + * Sets amount_meat_produced + * + * @param float $amount_meat_produced Amount of goat meat produced in kg liveweight + * + * @return self + */ + public function setAmountMeatProduced($amount_meat_produced) + { + if (is_null($amount_meat_produced)) { + throw new \InvalidArgumentException('non-nullable amount_meat_produced cannot be null'); + } + $this->container['amount_meat_produced'] = $amount_meat_produced; + + return $this; + } + + /** + * Gets amount_wool_produced + * + * @return float + */ + public function getAmountWoolProduced() + { + return $this->container['amount_wool_produced']; + } + + /** + * Sets amount_wool_produced + * + * @param float $amount_wool_produced Amount of wool produced in kg greasy + * + * @return self + */ + public function setAmountWoolProduced($amount_wool_produced) + { + if (is_null($amount_wool_produced)) { + throw new \InvalidArgumentException('non-nullable amount_wool_produced cannot be null'); + } + $this->container['amount_wool_produced'] = $amount_wool_produced; + + return $this; + } + + /** + * Gets goat_meat_breeding_including_sequestration + * + * @return float + */ + public function getGoatMeatBreedingIncludingSequestration() + { + return $this->container['goat_meat_breeding_including_sequestration']; + } + + /** + * Sets goat_meat_breeding_including_sequestration + * + * @param float $goat_meat_breeding_including_sequestration Goat meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setGoatMeatBreedingIncludingSequestration($goat_meat_breeding_including_sequestration) + { + if (is_null($goat_meat_breeding_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable goat_meat_breeding_including_sequestration cannot be null'); + } + $this->container['goat_meat_breeding_including_sequestration'] = $goat_meat_breeding_including_sequestration; + + return $this; + } + + /** + * Gets goat_meat_breeding_excluding_sequestration + * + * @return float + */ + public function getGoatMeatBreedingExcludingSequestration() + { + return $this->container['goat_meat_breeding_excluding_sequestration']; + } + + /** + * Sets goat_meat_breeding_excluding_sequestration + * + * @param float $goat_meat_breeding_excluding_sequestration Goat meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setGoatMeatBreedingExcludingSequestration($goat_meat_breeding_excluding_sequestration) + { + if (is_null($goat_meat_breeding_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable goat_meat_breeding_excluding_sequestration cannot be null'); + } + $this->container['goat_meat_breeding_excluding_sequestration'] = $goat_meat_breeding_excluding_sequestration; + + return $this; + } + + /** + * Gets wool_including_sequestration + * + * @return float + */ + public function getWoolIncludingSequestration() + { + return $this->container['wool_including_sequestration']; + } + + /** + * Sets wool_including_sequestration + * + * @param float $wool_including_sequestration Wool production including carbon sequestration, in kg-CO2e/kg greasy + * + * @return self + */ + public function setWoolIncludingSequestration($wool_including_sequestration) + { + if (is_null($wool_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable wool_including_sequestration cannot be null'); + } + $this->container['wool_including_sequestration'] = $wool_including_sequestration; + + return $this; + } + + /** + * Gets wool_excluding_sequestration + * + * @return float + */ + public function getWoolExcludingSequestration() + { + return $this->container['wool_excluding_sequestration']; + } + + /** + * Sets wool_excluding_sequestration + * + * @param float $wool_excluding_sequestration Wool production excluding carbon sequestration, in kg-CO2e/kg greasy + * + * @return self + */ + public function setWoolExcludingSequestration($wool_excluding_sequestration) + { + if (is_null($wool_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable wool_excluding_sequestration cannot be null'); + } + $this->container['wool_excluding_sequestration'] = $wool_excluding_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoat200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostGoat200ResponseIntermediateInner.php new file mode 100644 index 00000000..f05c1562 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoat200ResponseIntermediateInner.php @@ -0,0 +1,636 @@ + + */ +class PostGoat200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostBuffalo200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostBeef200ResponseScope3', + 'net' => '\OpenAPI\Client\Model\PostGoat200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostGoat200ResponseIntensities', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'net' => null, + 'intensities' => null, + 'carbon_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'net' => false, + 'intensities' => false, + 'carbon_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'net' => 'net', + 'intensities' => 'intensities', + 'carbon_sequestration' => 'carbonSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'net' => 'setNet', + 'intensities' => 'setIntensities', + 'carbon_sequestration' => 'setCarbonSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'net' => 'getNet', + 'intensities' => 'getIntensities', + 'carbon_sequestration' => 'getCarbonSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostGoat200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostGoat200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostGoat200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostGoat200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoat200ResponseNet.php b/examples/php-api-client/api-client/lib/Model/PostGoat200ResponseNet.php new file mode 100644 index 00000000..179671d6 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoat200ResponseNet.php @@ -0,0 +1,414 @@ + + */ +class PostGoat200ResponseNet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_200_response_net'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total total + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequest.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequest.php new file mode 100644 index 00000000..d231f02b --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequest.php @@ -0,0 +1,573 @@ + + */ +class PostGoatRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'rainfall_above600' => 'bool', + 'goats' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInner[]', + 'vegetation' => '\OpenAPI\Client\Model\PostGoatRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'rainfall_above600' => null, + 'goats' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'rainfall_above600' => false, + 'goats' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'rainfall_above600' => 'rainfallAbove600', + 'goats' => 'goats', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'rainfall_above600' => 'setRainfallAbove600', + 'goats' => 'setGoats', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'rainfall_above600' => 'getRainfallAbove600', + 'goats' => 'getGoats', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('rainfall_above600', $data ?? [], null); + $this->setIfExists('goats', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['rainfall_above600'] === null) { + $invalidProperties[] = "'rainfall_above600' can't be null"; + } + if ($this->container['goats'] === null) { + $invalidProperties[] = "'goats' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets rainfall_above600 + * + * @return bool + */ + public function getRainfallAbove600() + { + return $this->container['rainfall_above600']; + } + + /** + * Sets rainfall_above600 + * + * @param bool $rainfall_above600 Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm + * + * @return self + */ + public function setRainfallAbove600($rainfall_above600) + { + if (is_null($rainfall_above600)) { + throw new \InvalidArgumentException('non-nullable rainfall_above600 cannot be null'); + } + $this->container['rainfall_above600'] = $rainfall_above600; + + return $this; + } + + /** + * Gets goats + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInner[] + */ + public function getGoats() + { + return $this->container['goats']; + } + + /** + * Sets goats + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInner[] $goats goats + * + * @return self + */ + public function setGoats($goats) + { + if (is_null($goats)) { + throw new \InvalidArgumentException('non-nullable goats cannot be null'); + } + $this->container['goats'] = $goats; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostGoatRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostGoatRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInner.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInner.php new file mode 100644 index 00000000..7d7e7f20 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInner.php @@ -0,0 +1,1015 @@ + + */ +class PostGoatRequestGoatsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'classes' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClasses', + 'limestone' => 'float', + 'limestone_fraction' => 'float', + 'fertiliser' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser', + 'diesel' => 'float', + 'petrol' => 'float', + 'lpg' => 'float', + 'mineral_supplementation' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation', + 'electricity_source' => 'string', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'grain_feed' => 'float', + 'hay_feed' => 'float', + 'herbicide' => 'float', + 'herbicide_other' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'classes' => null, + 'limestone' => null, + 'limestone_fraction' => null, + 'fertiliser' => null, + 'diesel' => null, + 'petrol' => null, + 'lpg' => null, + 'mineral_supplementation' => null, + 'electricity_source' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'grain_feed' => null, + 'hay_feed' => null, + 'herbicide' => null, + 'herbicide_other' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'classes' => false, + 'limestone' => false, + 'limestone_fraction' => false, + 'fertiliser' => false, + 'diesel' => false, + 'petrol' => false, + 'lpg' => false, + 'mineral_supplementation' => false, + 'electricity_source' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'grain_feed' => false, + 'hay_feed' => false, + 'herbicide' => false, + 'herbicide_other' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'classes' => 'classes', + 'limestone' => 'limestone', + 'limestone_fraction' => 'limestoneFraction', + 'fertiliser' => 'fertiliser', + 'diesel' => 'diesel', + 'petrol' => 'petrol', + 'lpg' => 'lpg', + 'mineral_supplementation' => 'mineralSupplementation', + 'electricity_source' => 'electricitySource', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'grain_feed' => 'grainFeed', + 'hay_feed' => 'hayFeed', + 'herbicide' => 'herbicide', + 'herbicide_other' => 'herbicideOther' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'classes' => 'setClasses', + 'limestone' => 'setLimestone', + 'limestone_fraction' => 'setLimestoneFraction', + 'fertiliser' => 'setFertiliser', + 'diesel' => 'setDiesel', + 'petrol' => 'setPetrol', + 'lpg' => 'setLpg', + 'mineral_supplementation' => 'setMineralSupplementation', + 'electricity_source' => 'setElectricitySource', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'grain_feed' => 'setGrainFeed', + 'hay_feed' => 'setHayFeed', + 'herbicide' => 'setHerbicide', + 'herbicide_other' => 'setHerbicideOther' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'classes' => 'getClasses', + 'limestone' => 'getLimestone', + 'limestone_fraction' => 'getLimestoneFraction', + 'fertiliser' => 'getFertiliser', + 'diesel' => 'getDiesel', + 'petrol' => 'getPetrol', + 'lpg' => 'getLpg', + 'mineral_supplementation' => 'getMineralSupplementation', + 'electricity_source' => 'getElectricitySource', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'grain_feed' => 'getGrainFeed', + 'hay_feed' => 'getHayFeed', + 'herbicide' => 'getHerbicide', + 'herbicide_other' => 'getHerbicideOther' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const ELECTRICITY_SOURCE_STATE_GRID = 'State Grid'; + public const ELECTRICITY_SOURCE_RENEWABLE = 'Renewable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getElectricitySourceAllowableValues() + { + return [ + self::ELECTRICITY_SOURCE_STATE_GRID, + self::ELECTRICITY_SOURCE_RENEWABLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('classes', $data ?? [], null); + $this->setIfExists('limestone', $data ?? [], null); + $this->setIfExists('limestone_fraction', $data ?? [], null); + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('diesel', $data ?? [], null); + $this->setIfExists('petrol', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + $this->setIfExists('mineral_supplementation', $data ?? [], null); + $this->setIfExists('electricity_source', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('grain_feed', $data ?? [], null); + $this->setIfExists('hay_feed', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('herbicide_other', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['classes'] === null) { + $invalidProperties[] = "'classes' can't be null"; + } + if ($this->container['limestone'] === null) { + $invalidProperties[] = "'limestone' can't be null"; + } + if ($this->container['limestone_fraction'] === null) { + $invalidProperties[] = "'limestone_fraction' can't be null"; + } + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['diesel'] === null) { + $invalidProperties[] = "'diesel' can't be null"; + } + if ($this->container['petrol'] === null) { + $invalidProperties[] = "'petrol' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + if ($this->container['mineral_supplementation'] === null) { + $invalidProperties[] = "'mineral_supplementation' can't be null"; + } + if ($this->container['electricity_source'] === null) { + $invalidProperties[] = "'electricity_source' can't be null"; + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!is_null($this->container['electricity_source']) && !in_array($this->container['electricity_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'electricity_source', must be one of '%s'", + $this->container['electricity_source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['grain_feed'] === null) { + $invalidProperties[] = "'grain_feed' can't be null"; + } + if ($this->container['hay_feed'] === null) { + $invalidProperties[] = "'hay_feed' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['herbicide_other'] === null) { + $invalidProperties[] = "'herbicide_other' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets classes + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClasses + */ + public function getClasses() + { + return $this->container['classes']; + } + + /** + * Sets classes + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClasses $classes classes + * + * @return self + */ + public function setClasses($classes) + { + if (is_null($classes)) { + throw new \InvalidArgumentException('non-nullable classes cannot be null'); + } + $this->container['classes'] = $classes; + + return $this; + } + + /** + * Gets limestone + * + * @return float + */ + public function getLimestone() + { + return $this->container['limestone']; + } + + /** + * Sets limestone + * + * @param float $limestone Lime applied in tonnes + * + * @return self + */ + public function setLimestone($limestone) + { + if (is_null($limestone)) { + throw new \InvalidArgumentException('non-nullable limestone cannot be null'); + } + $this->container['limestone'] = $limestone; + + return $this; + } + + /** + * Gets limestone_fraction + * + * @return float + */ + public function getLimestoneFraction() + { + return $this->container['limestone_fraction']; + } + + /** + * Sets limestone_fraction + * + * @param float $limestone_fraction Fraction of lime as limestone vs dolomite, between 0 and 1 + * + * @return self + */ + public function setLimestoneFraction($limestone_fraction) + { + if (is_null($limestone_fraction)) { + throw new \InvalidArgumentException('non-nullable limestone_fraction cannot be null'); + } + $this->container['limestone_fraction'] = $limestone_fraction; + + return $this; + } + + /** + * Gets fertiliser + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser $fertiliser fertiliser + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets diesel + * + * @return float + */ + public function getDiesel() + { + return $this->container['diesel']; + } + + /** + * Sets diesel + * + * @param float $diesel Diesel usage in L (litres) + * + * @return self + */ + public function setDiesel($diesel) + { + if (is_null($diesel)) { + throw new \InvalidArgumentException('non-nullable diesel cannot be null'); + } + $this->container['diesel'] = $diesel; + + return $this; + } + + /** + * Gets petrol + * + * @return float + */ + public function getPetrol() + { + return $this->container['petrol']; + } + + /** + * Sets petrol + * + * @param float $petrol Petrol usage in L (litres) + * + * @return self + */ + public function setPetrol($petrol) + { + if (is_null($petrol)) { + throw new \InvalidArgumentException('non-nullable petrol cannot be null'); + } + $this->container['petrol'] = $petrol; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + + /** + * Gets mineral_supplementation + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation + */ + public function getMineralSupplementation() + { + return $this->container['mineral_supplementation']; + } + + /** + * Sets mineral_supplementation + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation $mineral_supplementation mineral_supplementation + * + * @return self + */ + public function setMineralSupplementation($mineral_supplementation) + { + if (is_null($mineral_supplementation)) { + throw new \InvalidArgumentException('non-nullable mineral_supplementation cannot be null'); + } + $this->container['mineral_supplementation'] = $mineral_supplementation; + + return $this; + } + + /** + * Gets electricity_source + * + * @return string + */ + public function getElectricitySource() + { + return $this->container['electricity_source']; + } + + /** + * Sets electricity_source + * + * @param string $electricity_source Source of electricity + * + * @return self + */ + public function setElectricitySource($electricity_source) + { + if (is_null($electricity_source)) { + throw new \InvalidArgumentException('non-nullable electricity_source cannot be null'); + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!in_array($electricity_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'electricity_source', must be one of '%s'", + $electricity_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['electricity_source'] = $electricity_source; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostGoatRequestGoatsInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostGoatRequestGoatsInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets grain_feed + * + * @return float + */ + public function getGrainFeed() + { + return $this->container['grain_feed']; + } + + /** + * Sets grain_feed + * + * @param float $grain_feed Grain purchased for cattle feed in tonnes + * + * @return self + */ + public function setGrainFeed($grain_feed) + { + if (is_null($grain_feed)) { + throw new \InvalidArgumentException('non-nullable grain_feed cannot be null'); + } + $this->container['grain_feed'] = $grain_feed; + + return $this; + } + + /** + * Gets hay_feed + * + * @return float + */ + public function getHayFeed() + { + return $this->container['hay_feed']; + } + + /** + * Sets hay_feed + * + * @param float $hay_feed Hay purchased for cattle feed in tonnes + * + * @return self + */ + public function setHayFeed($hay_feed) + { + if (is_null($hay_feed)) { + throw new \InvalidArgumentException('non-nullable hay_feed cannot be null'); + } + $this->container['hay_feed'] = $hay_feed; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets herbicide_other + * + * @return float + */ + public function getHerbicideOther() + { + return $this->container['herbicide_other']; + } + + /** + * Sets herbicide_other + * + * @param float $herbicide_other Total amount of active ingredients of from other herbicides in kg (kilograms) + * + * @return self + */ + public function setHerbicideOther($herbicide_other) + { + if (is_null($herbicide_other)) { + throw new \InvalidArgumentException('non-nullable herbicide_other cannot be null'); + } + $this->container['herbicide_other'] = $herbicide_other; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClasses.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClasses.php new file mode 100644 index 00000000..a0be7fd6 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClasses.php @@ -0,0 +1,821 @@ + + */ +class PostGoatRequestGoatsInnerClasses implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner_classes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bucks_billy' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesBucksBilly', + 'trade_bucks' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeBucks', + 'wethers' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesWethers', + 'trade_wethers' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeWethers', + 'maiden_breeding_does_nannies' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies', + 'trade_maiden_breeding_does_nannies' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies', + 'breeding_does_nannies' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesBreedingDoesNannies', + 'trade_breeding_does_nannies' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies', + 'other_does_culled_females' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales', + 'trade_other_does_culled_females' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales', + 'kids' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesKids', + 'trade_kids' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeKids', + 'trade_does' => '\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeDoes' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'bucks_billy' => null, + 'trade_bucks' => null, + 'wethers' => null, + 'trade_wethers' => null, + 'maiden_breeding_does_nannies' => null, + 'trade_maiden_breeding_does_nannies' => null, + 'breeding_does_nannies' => null, + 'trade_breeding_does_nannies' => null, + 'other_does_culled_females' => null, + 'trade_other_does_culled_females' => null, + 'kids' => null, + 'trade_kids' => null, + 'trade_does' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'bucks_billy' => false, + 'trade_bucks' => false, + 'wethers' => false, + 'trade_wethers' => false, + 'maiden_breeding_does_nannies' => false, + 'trade_maiden_breeding_does_nannies' => false, + 'breeding_does_nannies' => false, + 'trade_breeding_does_nannies' => false, + 'other_does_culled_females' => false, + 'trade_other_does_culled_females' => false, + 'kids' => false, + 'trade_kids' => false, + 'trade_does' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'bucks_billy' => 'bucksBilly', + 'trade_bucks' => 'tradeBucks', + 'wethers' => 'wethers', + 'trade_wethers' => 'tradeWethers', + 'maiden_breeding_does_nannies' => 'maidenBreedingDoesNannies', + 'trade_maiden_breeding_does_nannies' => 'tradeMaidenBreedingDoesNannies', + 'breeding_does_nannies' => 'breedingDoesNannies', + 'trade_breeding_does_nannies' => 'tradeBreedingDoesNannies', + 'other_does_culled_females' => 'otherDoesCulledFemales', + 'trade_other_does_culled_females' => 'tradeOtherDoesCulledFemales', + 'kids' => 'kids', + 'trade_kids' => 'tradeKids', + 'trade_does' => 'tradeDoes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bucks_billy' => 'setBucksBilly', + 'trade_bucks' => 'setTradeBucks', + 'wethers' => 'setWethers', + 'trade_wethers' => 'setTradeWethers', + 'maiden_breeding_does_nannies' => 'setMaidenBreedingDoesNannies', + 'trade_maiden_breeding_does_nannies' => 'setTradeMaidenBreedingDoesNannies', + 'breeding_does_nannies' => 'setBreedingDoesNannies', + 'trade_breeding_does_nannies' => 'setTradeBreedingDoesNannies', + 'other_does_culled_females' => 'setOtherDoesCulledFemales', + 'trade_other_does_culled_females' => 'setTradeOtherDoesCulledFemales', + 'kids' => 'setKids', + 'trade_kids' => 'setTradeKids', + 'trade_does' => 'setTradeDoes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bucks_billy' => 'getBucksBilly', + 'trade_bucks' => 'getTradeBucks', + 'wethers' => 'getWethers', + 'trade_wethers' => 'getTradeWethers', + 'maiden_breeding_does_nannies' => 'getMaidenBreedingDoesNannies', + 'trade_maiden_breeding_does_nannies' => 'getTradeMaidenBreedingDoesNannies', + 'breeding_does_nannies' => 'getBreedingDoesNannies', + 'trade_breeding_does_nannies' => 'getTradeBreedingDoesNannies', + 'other_does_culled_females' => 'getOtherDoesCulledFemales', + 'trade_other_does_culled_females' => 'getTradeOtherDoesCulledFemales', + 'kids' => 'getKids', + 'trade_kids' => 'getTradeKids', + 'trade_does' => 'getTradeDoes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('bucks_billy', $data ?? [], null); + $this->setIfExists('trade_bucks', $data ?? [], null); + $this->setIfExists('wethers', $data ?? [], null); + $this->setIfExists('trade_wethers', $data ?? [], null); + $this->setIfExists('maiden_breeding_does_nannies', $data ?? [], null); + $this->setIfExists('trade_maiden_breeding_does_nannies', $data ?? [], null); + $this->setIfExists('breeding_does_nannies', $data ?? [], null); + $this->setIfExists('trade_breeding_does_nannies', $data ?? [], null); + $this->setIfExists('other_does_culled_females', $data ?? [], null); + $this->setIfExists('trade_other_does_culled_females', $data ?? [], null); + $this->setIfExists('kids', $data ?? [], null); + $this->setIfExists('trade_kids', $data ?? [], null); + $this->setIfExists('trade_does', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets bucks_billy + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesBucksBilly|null + */ + public function getBucksBilly() + { + return $this->container['bucks_billy']; + } + + /** + * Sets bucks_billy + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesBucksBilly|null $bucks_billy bucks_billy + * + * @return self + */ + public function setBucksBilly($bucks_billy) + { + if (is_null($bucks_billy)) { + throw new \InvalidArgumentException('non-nullable bucks_billy cannot be null'); + } + $this->container['bucks_billy'] = $bucks_billy; + + return $this; + } + + /** + * Gets trade_bucks + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeBucks|null + */ + public function getTradeBucks() + { + return $this->container['trade_bucks']; + } + + /** + * Sets trade_bucks + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeBucks|null $trade_bucks trade_bucks + * + * @return self + */ + public function setTradeBucks($trade_bucks) + { + if (is_null($trade_bucks)) { + throw new \InvalidArgumentException('non-nullable trade_bucks cannot be null'); + } + $this->container['trade_bucks'] = $trade_bucks; + + return $this; + } + + /** + * Gets wethers + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesWethers|null + */ + public function getWethers() + { + return $this->container['wethers']; + } + + /** + * Sets wethers + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesWethers|null $wethers wethers + * + * @return self + */ + public function setWethers($wethers) + { + if (is_null($wethers)) { + throw new \InvalidArgumentException('non-nullable wethers cannot be null'); + } + $this->container['wethers'] = $wethers; + + return $this; + } + + /** + * Gets trade_wethers + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeWethers|null + */ + public function getTradeWethers() + { + return $this->container['trade_wethers']; + } + + /** + * Sets trade_wethers + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeWethers|null $trade_wethers trade_wethers + * + * @return self + */ + public function setTradeWethers($trade_wethers) + { + if (is_null($trade_wethers)) { + throw new \InvalidArgumentException('non-nullable trade_wethers cannot be null'); + } + $this->container['trade_wethers'] = $trade_wethers; + + return $this; + } + + /** + * Gets maiden_breeding_does_nannies + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies|null + */ + public function getMaidenBreedingDoesNannies() + { + return $this->container['maiden_breeding_does_nannies']; + } + + /** + * Sets maiden_breeding_does_nannies + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies|null $maiden_breeding_does_nannies maiden_breeding_does_nannies + * + * @return self + */ + public function setMaidenBreedingDoesNannies($maiden_breeding_does_nannies) + { + if (is_null($maiden_breeding_does_nannies)) { + throw new \InvalidArgumentException('non-nullable maiden_breeding_does_nannies cannot be null'); + } + $this->container['maiden_breeding_does_nannies'] = $maiden_breeding_does_nannies; + + return $this; + } + + /** + * Gets trade_maiden_breeding_does_nannies + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies|null + */ + public function getTradeMaidenBreedingDoesNannies() + { + return $this->container['trade_maiden_breeding_does_nannies']; + } + + /** + * Sets trade_maiden_breeding_does_nannies + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies|null $trade_maiden_breeding_does_nannies trade_maiden_breeding_does_nannies + * + * @return self + */ + public function setTradeMaidenBreedingDoesNannies($trade_maiden_breeding_does_nannies) + { + if (is_null($trade_maiden_breeding_does_nannies)) { + throw new \InvalidArgumentException('non-nullable trade_maiden_breeding_does_nannies cannot be null'); + } + $this->container['trade_maiden_breeding_does_nannies'] = $trade_maiden_breeding_does_nannies; + + return $this; + } + + /** + * Gets breeding_does_nannies + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesBreedingDoesNannies|null + */ + public function getBreedingDoesNannies() + { + return $this->container['breeding_does_nannies']; + } + + /** + * Sets breeding_does_nannies + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesBreedingDoesNannies|null $breeding_does_nannies breeding_does_nannies + * + * @return self + */ + public function setBreedingDoesNannies($breeding_does_nannies) + { + if (is_null($breeding_does_nannies)) { + throw new \InvalidArgumentException('non-nullable breeding_does_nannies cannot be null'); + } + $this->container['breeding_does_nannies'] = $breeding_does_nannies; + + return $this; + } + + /** + * Gets trade_breeding_does_nannies + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies|null + */ + public function getTradeBreedingDoesNannies() + { + return $this->container['trade_breeding_does_nannies']; + } + + /** + * Sets trade_breeding_does_nannies + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies|null $trade_breeding_does_nannies trade_breeding_does_nannies + * + * @return self + */ + public function setTradeBreedingDoesNannies($trade_breeding_does_nannies) + { + if (is_null($trade_breeding_does_nannies)) { + throw new \InvalidArgumentException('non-nullable trade_breeding_does_nannies cannot be null'); + } + $this->container['trade_breeding_does_nannies'] = $trade_breeding_does_nannies; + + return $this; + } + + /** + * Gets other_does_culled_females + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales|null + */ + public function getOtherDoesCulledFemales() + { + return $this->container['other_does_culled_females']; + } + + /** + * Sets other_does_culled_females + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales|null $other_does_culled_females other_does_culled_females + * + * @return self + */ + public function setOtherDoesCulledFemales($other_does_culled_females) + { + if (is_null($other_does_culled_females)) { + throw new \InvalidArgumentException('non-nullable other_does_culled_females cannot be null'); + } + $this->container['other_does_culled_females'] = $other_does_culled_females; + + return $this; + } + + /** + * Gets trade_other_does_culled_females + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales|null + */ + public function getTradeOtherDoesCulledFemales() + { + return $this->container['trade_other_does_culled_females']; + } + + /** + * Sets trade_other_does_culled_females + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales|null $trade_other_does_culled_females trade_other_does_culled_females + * + * @return self + */ + public function setTradeOtherDoesCulledFemales($trade_other_does_culled_females) + { + if (is_null($trade_other_does_culled_females)) { + throw new \InvalidArgumentException('non-nullable trade_other_does_culled_females cannot be null'); + } + $this->container['trade_other_does_culled_females'] = $trade_other_does_culled_females; + + return $this; + } + + /** + * Gets kids + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesKids|null + */ + public function getKids() + { + return $this->container['kids']; + } + + /** + * Sets kids + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesKids|null $kids kids + * + * @return self + */ + public function setKids($kids) + { + if (is_null($kids)) { + throw new \InvalidArgumentException('non-nullable kids cannot be null'); + } + $this->container['kids'] = $kids; + + return $this; + } + + /** + * Gets trade_kids + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeKids|null + */ + public function getTradeKids() + { + return $this->container['trade_kids']; + } + + /** + * Sets trade_kids + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeKids|null $trade_kids trade_kids + * + * @return self + */ + public function setTradeKids($trade_kids) + { + if (is_null($trade_kids)) { + throw new \InvalidArgumentException('non-nullable trade_kids cannot be null'); + } + $this->container['trade_kids'] = $trade_kids; + + return $this; + } + + /** + * Gets trade_does + * + * @return \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeDoes|null + * @deprecated + */ + public function getTradeDoes() + { + return $this->container['trade_does']; + } + + /** + * Sets trade_does + * + * @param \OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeDoes|null $trade_does trade_does + * + * @return self + * @deprecated + */ + public function setTradeDoes($trade_does) + { + if (is_null($trade_does)) { + throw new \InvalidArgumentException('non-nullable trade_does cannot be null'); + } + $this->container['trade_does'] = $trade_does; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.php new file mode 100644 index 00000000..25477e86 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.php @@ -0,0 +1,816 @@ + + */ +class PostGoatRequestGoatsInnerClassesBreedingDoesNannies implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner_classes_breedingDoesNannies'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of goat shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesBucksBilly.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesBucksBilly.php new file mode 100644 index 00000000..eac12a68 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesBucksBilly.php @@ -0,0 +1,816 @@ + + */ +class PostGoatRequestGoatsInnerClassesBucksBilly implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner_classes_bucksBilly'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of goat shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesKids.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesKids.php new file mode 100644 index 00000000..76688b2a --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesKids.php @@ -0,0 +1,816 @@ + + */ +class PostGoatRequestGoatsInnerClassesKids implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner_classes_kids'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of goat shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.php new file mode 100644 index 00000000..395e9a04 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.php @@ -0,0 +1,816 @@ + + */ +class PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner_classes_maidenBreedingDoesNannies'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of goat shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.php new file mode 100644 index 00000000..aea95518 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.php @@ -0,0 +1,816 @@ + + */ +class PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner_classes_otherDoesCulledFemales'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of goat shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.php new file mode 100644 index 00000000..563968aa --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.php @@ -0,0 +1,816 @@ + + */ +class PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner_classes_tradeBreedingDoesNannies'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of goat shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeBucks.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeBucks.php new file mode 100644 index 00000000..763bb086 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeBucks.php @@ -0,0 +1,816 @@ + + */ +class PostGoatRequestGoatsInnerClassesTradeBucks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner_classes_tradeBucks'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of goat shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeDoes.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeDoes.php new file mode 100644 index 00000000..29b8075d --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeDoes.php @@ -0,0 +1,816 @@ + + */ +class PostGoatRequestGoatsInnerClassesTradeDoes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner_classes_tradeDoes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of goat shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeKids.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeKids.php new file mode 100644 index 00000000..d5b74bd4 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeKids.php @@ -0,0 +1,816 @@ + + */ +class PostGoatRequestGoatsInnerClassesTradeKids implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner_classes_tradeKids'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of goat shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.php new file mode 100644 index 00000000..6e2153f2 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.php @@ -0,0 +1,816 @@ + + */ +class PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner_classes_tradeMaidenBreedingDoesNannies'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of goat shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.php new file mode 100644 index 00000000..b1f1d6c8 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.php @@ -0,0 +1,816 @@ + + */ +class PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner_classes_tradeOtherDoesCulledFemales'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of goat shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeWethers.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeWethers.php new file mode 100644 index 00000000..0e485326 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesTradeWethers.php @@ -0,0 +1,816 @@ + + */ +class PostGoatRequestGoatsInnerClassesTradeWethers implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner_classes_tradeWethers'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of goat shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesWethers.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesWethers.php new file mode 100644 index 00000000..de0bc28a --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestGoatsInnerClassesWethers.php @@ -0,0 +1,816 @@ + + */ +class PostGoatRequestGoatsInnerClassesWethers implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_goats_inner_classes_wethers'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of goat shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGoatRequestVegetationInner.php b/examples/php-api-client/api-client/lib/Model/PostGoatRequestVegetationInner.php new file mode 100644 index 00000000..2d6084e2 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGoatRequestVegetationInner.php @@ -0,0 +1,451 @@ + + */ +class PostGoatRequestVegetationInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_goat_request_vegetation_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'vegetation' => '\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation', + 'goat_proportion' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'vegetation' => null, + 'goat_proportion' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'vegetation' => false, + 'goat_proportion' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vegetation' => 'vegetation', + 'goat_proportion' => 'goatProportion' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vegetation' => 'setVegetation', + 'goat_proportion' => 'setGoatProportion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vegetation' => 'getVegetation', + 'goat_proportion' => 'getGoatProportion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('vegetation', $data ?? [], null); + $this->setIfExists('goat_proportion', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + if ($this->container['goat_proportion'] === null) { + $invalidProperties[] = "'goat_proportion' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + + /** + * Gets goat_proportion + * + * @return float[] + */ + public function getGoatProportion() + { + return $this->container['goat_proportion']; + } + + /** + * Sets goat_proportion + * + * @param float[] $goat_proportion The proportion of the sequestration that is allocated to goat + * + * @return self + */ + public function setGoatProportion($goat_proportion) + { + if (is_null($goat_proportion)) { + throw new \InvalidArgumentException('non-nullable goat_proportion cannot be null'); + } + $this->container['goat_proportion'] = $goat_proportion; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGrains200Response.php b/examples/php-api-client/api-client/lib/Model/PostGrains200Response.php new file mode 100644 index 00000000..3e0b707f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGrains200Response.php @@ -0,0 +1,673 @@ + + */ +class PostGrains200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_grains_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostCotton200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostCotton200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'intermediate' => '\OpenAPI\Client\Model\PostGrains200ResponseIntermediateInner[]', + 'net' => '\OpenAPI\Client\Model\PostCotton200ResponseNet', + 'intensities_with_sequestration' => '\OpenAPI\Client\Model\PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration[]', + 'intensities' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intermediate' => null, + 'net' => null, + 'intensities_with_sequestration' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intermediate' => false, + 'net' => false, + 'intensities_with_sequestration' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intermediate' => 'intermediate', + 'net' => 'net', + 'intensities_with_sequestration' => 'intensitiesWithSequestration', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intermediate' => 'setIntermediate', + 'net' => 'setNet', + 'intensities_with_sequestration' => 'setIntensitiesWithSequestration', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intermediate' => 'getIntermediate', + 'net' => 'getNet', + 'intensities_with_sequestration' => 'getIntensitiesWithSequestration', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities_with_sequestration', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities_with_sequestration'] === null) { + $invalidProperties[] = "'intensities_with_sequestration' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostGrains200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostGrains200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities_with_sequestration + * + * @return \OpenAPI\Client\Model\PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration[] + */ + public function getIntensitiesWithSequestration() + { + return $this->container['intensities_with_sequestration']; + } + + /** + * Sets intensities_with_sequestration + * + * @param \OpenAPI\Client\Model\PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration[] $intensities_with_sequestration Emissions intensity for each crop (in order), in t-CO2e/t crop + * + * @return self + */ + public function setIntensitiesWithSequestration($intensities_with_sequestration) + { + if (is_null($intensities_with_sequestration)) { + throw new \InvalidArgumentException('non-nullable intensities_with_sequestration cannot be null'); + } + $this->container['intensities_with_sequestration'] = $intensities_with_sequestration; + + return $this; + } + + /** + * Gets intensities + * + * @return float[] + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param float[] $intensities Emissions intensity for each crop (in order), in t-CO2e/t crop + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGrains200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostGrains200ResponseIntermediateInner.php new file mode 100644 index 00000000..39662504 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGrains200ResponseIntermediateInner.php @@ -0,0 +1,636 @@ + + */ +class PostGrains200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_grains_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostCotton200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostCotton200ResponseScope3', + 'intensities_with_sequestration' => '\OpenAPI\Client\Model\PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'intensities_with_sequestration' => null, + 'net' => null, + 'carbon_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'intensities_with_sequestration' => false, + 'net' => false, + 'carbon_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'intensities_with_sequestration' => 'intensitiesWithSequestration', + 'net' => 'net', + 'carbon_sequestration' => 'carbonSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'intensities_with_sequestration' => 'setIntensitiesWithSequestration', + 'net' => 'setNet', + 'carbon_sequestration' => 'setCarbonSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'intensities_with_sequestration' => 'getIntensitiesWithSequestration', + 'net' => 'getNet', + 'carbon_sequestration' => 'getCarbonSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('intensities_with_sequestration', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['intensities_with_sequestration'] === null) { + $invalidProperties[] = "'intensities_with_sequestration' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets intensities_with_sequestration + * + * @return \OpenAPI\Client\Model\PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration + */ + public function getIntensitiesWithSequestration() + { + return $this->container['intensities_with_sequestration']; + } + + /** + * Sets intensities_with_sequestration + * + * @param \OpenAPI\Client\Model\PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration $intensities_with_sequestration intensities_with_sequestration + * + * @return self + */ + public function setIntensitiesWithSequestration($intensities_with_sequestration) + { + if (is_null($intensities_with_sequestration)) { + throw new \InvalidArgumentException('non-nullable intensities_with_sequestration cannot be null'); + } + $this->container['intensities_with_sequestration'] = $intensities_with_sequestration; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.php b/examples/php-api-client/api-client/lib/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.php new file mode 100644 index 00000000..0903b7cb --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.php @@ -0,0 +1,487 @@ + + */ +class PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_grains_200_response_intermediate_inner_intensitiesWithSequestration'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'grain_produced_tonnes' => 'float', + 'grains_excluding_sequestration' => 'float', + 'grains_including_sequestration' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'grain_produced_tonnes' => null, + 'grains_excluding_sequestration' => null, + 'grains_including_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'grain_produced_tonnes' => false, + 'grains_excluding_sequestration' => false, + 'grains_including_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'grain_produced_tonnes' => 'grainProducedTonnes', + 'grains_excluding_sequestration' => 'grainsExcludingSequestration', + 'grains_including_sequestration' => 'grainsIncludingSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'grain_produced_tonnes' => 'setGrainProducedTonnes', + 'grains_excluding_sequestration' => 'setGrainsExcludingSequestration', + 'grains_including_sequestration' => 'setGrainsIncludingSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'grain_produced_tonnes' => 'getGrainProducedTonnes', + 'grains_excluding_sequestration' => 'getGrainsExcludingSequestration', + 'grains_including_sequestration' => 'getGrainsIncludingSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('grain_produced_tonnes', $data ?? [], null); + $this->setIfExists('grains_excluding_sequestration', $data ?? [], null); + $this->setIfExists('grains_including_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['grain_produced_tonnes'] === null) { + $invalidProperties[] = "'grain_produced_tonnes' can't be null"; + } + if ($this->container['grains_excluding_sequestration'] === null) { + $invalidProperties[] = "'grains_excluding_sequestration' can't be null"; + } + if ($this->container['grains_including_sequestration'] === null) { + $invalidProperties[] = "'grains_including_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets grain_produced_tonnes + * + * @return float + */ + public function getGrainProducedTonnes() + { + return $this->container['grain_produced_tonnes']; + } + + /** + * Sets grain_produced_tonnes + * + * @param float $grain_produced_tonnes Grain produced in tonnes + * + * @return self + */ + public function setGrainProducedTonnes($grain_produced_tonnes) + { + if (is_null($grain_produced_tonnes)) { + throw new \InvalidArgumentException('non-nullable grain_produced_tonnes cannot be null'); + } + $this->container['grain_produced_tonnes'] = $grain_produced_tonnes; + + return $this; + } + + /** + * Gets grains_excluding_sequestration + * + * @return float + */ + public function getGrainsExcludingSequestration() + { + return $this->container['grains_excluding_sequestration']; + } + + /** + * Sets grains_excluding_sequestration + * + * @param float $grains_excluding_sequestration Grains excluding sequestration, in t-CO2e/t grain + * + * @return self + */ + public function setGrainsExcludingSequestration($grains_excluding_sequestration) + { + if (is_null($grains_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable grains_excluding_sequestration cannot be null'); + } + $this->container['grains_excluding_sequestration'] = $grains_excluding_sequestration; + + return $this; + } + + /** + * Gets grains_including_sequestration + * + * @return float + */ + public function getGrainsIncludingSequestration() + { + return $this->container['grains_including_sequestration']; + } + + /** + * Sets grains_including_sequestration + * + * @param float $grains_including_sequestration Grains including sequestration, in t-CO2e/t grain + * + * @return self + */ + public function setGrainsIncludingSequestration($grains_including_sequestration) + { + if (is_null($grains_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable grains_including_sequestration cannot be null'); + } + $this->container['grains_including_sequestration'] = $grains_including_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGrainsRequest.php b/examples/php-api-client/api-client/lib/Model/PostGrainsRequest.php new file mode 100644 index 00000000..e3f0c25e --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGrainsRequest.php @@ -0,0 +1,626 @@ + + */ +class PostGrainsRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_grains_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'crops' => '\OpenAPI\Client\Model\PostGrainsRequestCropsInner[]', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'vegetation' => '\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'crops' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'crops' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'crops' => 'crops', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'crops' => 'setCrops', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'crops' => 'getCrops', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('crops', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['crops'] === null) { + $invalidProperties[] = "'crops' can't be null"; + } + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets crops + * + * @return \OpenAPI\Client\Model\PostGrainsRequestCropsInner[] + */ + public function getCrops() + { + return $this->container['crops']; + } + + /** + * Sets crops + * + * @param \OpenAPI\Client\Model\PostGrainsRequestCropsInner[] $crops crops + * + * @return self + */ + public function setCrops($crops) + { + if (is_null($crops)) { + throw new \InvalidArgumentException('non-nullable crops cannot be null'); + } + $this->container['crops'] = $crops; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostGrainsRequest., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostGrainsRequest., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostCottonRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostCottonRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostGrainsRequestCropsInner.php b/examples/php-api-client/api-client/lib/Model/PostGrainsRequestCropsInner.php new file mode 100644 index 00000000..d4e6b2dd --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostGrainsRequestCropsInner.php @@ -0,0 +1,1347 @@ + + */ +class PostGrainsRequestCropsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_grains_request_crops_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'type' => 'string', + 'state' => 'string', + 'production_system' => 'string', + 'average_grain_yield' => 'float', + 'area_sown' => 'float', + 'non_urea_nitrogen' => 'float', + 'urea_application' => 'float', + 'urea_ammonium_nitrate' => 'float', + 'phosphorus_application' => 'float', + 'potassium_application' => 'float', + 'sulfur_application' => 'float', + 'rainfall_above600' => 'bool', + 'fraction_of_annual_crop_burnt' => 'float', + 'herbicide_use' => 'float', + 'glyphosate_other_herbicide_use' => 'float', + 'electricity_allocation' => 'float', + 'limestone' => 'float', + 'limestone_fraction' => 'float', + 'diesel_use' => 'float', + 'petrol_use' => 'float', + 'lpg' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'type' => null, + 'state' => null, + 'production_system' => null, + 'average_grain_yield' => null, + 'area_sown' => null, + 'non_urea_nitrogen' => null, + 'urea_application' => null, + 'urea_ammonium_nitrate' => null, + 'phosphorus_application' => null, + 'potassium_application' => null, + 'sulfur_application' => null, + 'rainfall_above600' => null, + 'fraction_of_annual_crop_burnt' => null, + 'herbicide_use' => null, + 'glyphosate_other_herbicide_use' => null, + 'electricity_allocation' => null, + 'limestone' => null, + 'limestone_fraction' => null, + 'diesel_use' => null, + 'petrol_use' => null, + 'lpg' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'type' => false, + 'state' => false, + 'production_system' => false, + 'average_grain_yield' => false, + 'area_sown' => false, + 'non_urea_nitrogen' => false, + 'urea_application' => false, + 'urea_ammonium_nitrate' => false, + 'phosphorus_application' => false, + 'potassium_application' => false, + 'sulfur_application' => false, + 'rainfall_above600' => false, + 'fraction_of_annual_crop_burnt' => false, + 'herbicide_use' => false, + 'glyphosate_other_herbicide_use' => false, + 'electricity_allocation' => false, + 'limestone' => false, + 'limestone_fraction' => false, + 'diesel_use' => false, + 'petrol_use' => false, + 'lpg' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'type' => 'type', + 'state' => 'state', + 'production_system' => 'productionSystem', + 'average_grain_yield' => 'averageGrainYield', + 'area_sown' => 'areaSown', + 'non_urea_nitrogen' => 'nonUreaNitrogen', + 'urea_application' => 'ureaApplication', + 'urea_ammonium_nitrate' => 'ureaAmmoniumNitrate', + 'phosphorus_application' => 'phosphorusApplication', + 'potassium_application' => 'potassiumApplication', + 'sulfur_application' => 'sulfurApplication', + 'rainfall_above600' => 'rainfallAbove600', + 'fraction_of_annual_crop_burnt' => 'fractionOfAnnualCropBurnt', + 'herbicide_use' => 'herbicideUse', + 'glyphosate_other_herbicide_use' => 'glyphosateOtherHerbicideUse', + 'electricity_allocation' => 'electricityAllocation', + 'limestone' => 'limestone', + 'limestone_fraction' => 'limestoneFraction', + 'diesel_use' => 'dieselUse', + 'petrol_use' => 'petrolUse', + 'lpg' => 'lpg' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'type' => 'setType', + 'state' => 'setState', + 'production_system' => 'setProductionSystem', + 'average_grain_yield' => 'setAverageGrainYield', + 'area_sown' => 'setAreaSown', + 'non_urea_nitrogen' => 'setNonUreaNitrogen', + 'urea_application' => 'setUreaApplication', + 'urea_ammonium_nitrate' => 'setUreaAmmoniumNitrate', + 'phosphorus_application' => 'setPhosphorusApplication', + 'potassium_application' => 'setPotassiumApplication', + 'sulfur_application' => 'setSulfurApplication', + 'rainfall_above600' => 'setRainfallAbove600', + 'fraction_of_annual_crop_burnt' => 'setFractionOfAnnualCropBurnt', + 'herbicide_use' => 'setHerbicideUse', + 'glyphosate_other_herbicide_use' => 'setGlyphosateOtherHerbicideUse', + 'electricity_allocation' => 'setElectricityAllocation', + 'limestone' => 'setLimestone', + 'limestone_fraction' => 'setLimestoneFraction', + 'diesel_use' => 'setDieselUse', + 'petrol_use' => 'setPetrolUse', + 'lpg' => 'setLpg' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'type' => 'getType', + 'state' => 'getState', + 'production_system' => 'getProductionSystem', + 'average_grain_yield' => 'getAverageGrainYield', + 'area_sown' => 'getAreaSown', + 'non_urea_nitrogen' => 'getNonUreaNitrogen', + 'urea_application' => 'getUreaApplication', + 'urea_ammonium_nitrate' => 'getUreaAmmoniumNitrate', + 'phosphorus_application' => 'getPhosphorusApplication', + 'potassium_application' => 'getPotassiumApplication', + 'sulfur_application' => 'getSulfurApplication', + 'rainfall_above600' => 'getRainfallAbove600', + 'fraction_of_annual_crop_burnt' => 'getFractionOfAnnualCropBurnt', + 'herbicide_use' => 'getHerbicideUse', + 'glyphosate_other_herbicide_use' => 'getGlyphosateOtherHerbicideUse', + 'electricity_allocation' => 'getElectricityAllocation', + 'limestone' => 'getLimestone', + 'limestone_fraction' => 'getLimestoneFraction', + 'diesel_use' => 'getDieselUse', + 'petrol_use' => 'getPetrolUse', + 'lpg' => 'getLpg' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_WHEAT = 'Wheat'; + public const TYPE_BARLEY = 'Barley'; + public const TYPE_MAIZE = 'Maize'; + public const TYPE_OATS = 'Oats'; + public const TYPE_RICE = 'Rice'; + public const TYPE_SORGHUM = 'Sorghum'; + public const TYPE_TRITICALE = 'Triticale'; + public const TYPE_OTHER_CEREALS = 'Other Cereals'; + public const TYPE_PULSES = 'Pulses'; + public const TYPE_TUBER_AND_ROOTS = 'Tuber and Roots'; + public const TYPE_PEANUTS = 'Peanuts'; + public const TYPE_SUGAR_CANE = 'Sugar Cane'; + public const TYPE_COTTON = 'Cotton'; + public const TYPE_HOPS = 'Hops'; + public const TYPE_OILSEEDS = 'Oilseeds'; + public const TYPE_FORAGE_CROPS = 'Forage Crops'; + public const TYPE_LUCERNE = 'Lucerne'; + public const TYPE_OTHER_LEGUME = 'Other legume'; + public const TYPE_ANNUAL_GRASS = 'Annual grass'; + public const TYPE_GRASS_CLOVER_MIXTURE = 'Grass clover mixture'; + public const TYPE_PERENNIAL_PASTURE = 'Perennial pasture'; + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + public const PRODUCTION_SYSTEM_NON_IRRIGATED_CROP = 'Non-irrigated crop'; + public const PRODUCTION_SYSTEM_IRRIGATED_CROP = 'Irrigated crop'; + public const PRODUCTION_SYSTEM_SUGAR_CANE = 'Sugar cane'; + public const PRODUCTION_SYSTEM_COTTON = 'Cotton'; + public const PRODUCTION_SYSTEM_HORTICULTURE = 'Horticulture'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_WHEAT, + self::TYPE_BARLEY, + self::TYPE_MAIZE, + self::TYPE_OATS, + self::TYPE_RICE, + self::TYPE_SORGHUM, + self::TYPE_TRITICALE, + self::TYPE_OTHER_CEREALS, + self::TYPE_PULSES, + self::TYPE_TUBER_AND_ROOTS, + self::TYPE_PEANUTS, + self::TYPE_SUGAR_CANE, + self::TYPE_COTTON, + self::TYPE_HOPS, + self::TYPE_OILSEEDS, + self::TYPE_FORAGE_CROPS, + self::TYPE_LUCERNE, + self::TYPE_OTHER_LEGUME, + self::TYPE_ANNUAL_GRASS, + self::TYPE_GRASS_CLOVER_MIXTURE, + self::TYPE_PERENNIAL_PASTURE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getProductionSystemAllowableValues() + { + return [ + self::PRODUCTION_SYSTEM_NON_IRRIGATED_CROP, + self::PRODUCTION_SYSTEM_IRRIGATED_CROP, + self::PRODUCTION_SYSTEM_SUGAR_CANE, + self::PRODUCTION_SYSTEM_COTTON, + self::PRODUCTION_SYSTEM_HORTICULTURE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('production_system', $data ?? [], null); + $this->setIfExists('average_grain_yield', $data ?? [], null); + $this->setIfExists('area_sown', $data ?? [], null); + $this->setIfExists('non_urea_nitrogen', $data ?? [], null); + $this->setIfExists('urea_application', $data ?? [], null); + $this->setIfExists('urea_ammonium_nitrate', $data ?? [], null); + $this->setIfExists('phosphorus_application', $data ?? [], null); + $this->setIfExists('potassium_application', $data ?? [], null); + $this->setIfExists('sulfur_application', $data ?? [], null); + $this->setIfExists('rainfall_above600', $data ?? [], null); + $this->setIfExists('fraction_of_annual_crop_burnt', $data ?? [], null); + $this->setIfExists('herbicide_use', $data ?? [], null); + $this->setIfExists('glyphosate_other_herbicide_use', $data ?? [], null); + $this->setIfExists('electricity_allocation', $data ?? [], null); + $this->setIfExists('limestone', $data ?? [], null); + $this->setIfExists('limestone_fraction', $data ?? [], null); + $this->setIfExists('diesel_use', $data ?? [], null); + $this->setIfExists('petrol_use', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['production_system'] === null) { + $invalidProperties[] = "'production_system' can't be null"; + } + $allowedValues = $this->getProductionSystemAllowableValues(); + if (!is_null($this->container['production_system']) && !in_array($this->container['production_system'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'production_system', must be one of '%s'", + $this->container['production_system'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['average_grain_yield'] === null) { + $invalidProperties[] = "'average_grain_yield' can't be null"; + } + if ($this->container['area_sown'] === null) { + $invalidProperties[] = "'area_sown' can't be null"; + } + if ($this->container['non_urea_nitrogen'] === null) { + $invalidProperties[] = "'non_urea_nitrogen' can't be null"; + } + if ($this->container['urea_application'] === null) { + $invalidProperties[] = "'urea_application' can't be null"; + } + if ($this->container['urea_ammonium_nitrate'] === null) { + $invalidProperties[] = "'urea_ammonium_nitrate' can't be null"; + } + if ($this->container['phosphorus_application'] === null) { + $invalidProperties[] = "'phosphorus_application' can't be null"; + } + if ($this->container['potassium_application'] === null) { + $invalidProperties[] = "'potassium_application' can't be null"; + } + if ($this->container['sulfur_application'] === null) { + $invalidProperties[] = "'sulfur_application' can't be null"; + } + if ($this->container['rainfall_above600'] === null) { + $invalidProperties[] = "'rainfall_above600' can't be null"; + } + if ($this->container['fraction_of_annual_crop_burnt'] === null) { + $invalidProperties[] = "'fraction_of_annual_crop_burnt' can't be null"; + } + if ($this->container['herbicide_use'] === null) { + $invalidProperties[] = "'herbicide_use' can't be null"; + } + if ($this->container['glyphosate_other_herbicide_use'] === null) { + $invalidProperties[] = "'glyphosate_other_herbicide_use' can't be null"; + } + if ($this->container['electricity_allocation'] === null) { + $invalidProperties[] = "'electricity_allocation' can't be null"; + } + if ($this->container['limestone'] === null) { + $invalidProperties[] = "'limestone' can't be null"; + } + if ($this->container['limestone_fraction'] === null) { + $invalidProperties[] = "'limestone_fraction' can't be null"; + } + if ($this->container['diesel_use'] === null) { + $invalidProperties[] = "'diesel_use' can't be null"; + } + if ($this->container['petrol_use'] === null) { + $invalidProperties[] = "'petrol_use' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Crop type. Note that the following crop types are now deprecated, the relevant full calculator should be used instead: 'Cotton', 'Rice', 'Sugar Cane' + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets production_system + * + * @return string + */ + public function getProductionSystem() + { + return $this->container['production_system']; + } + + /** + * Sets production_system + * + * @param string $production_system Production system of this crop. Note that the following production systems are now deprecated, the relevant full calculator should be used instead: 'Cotton', 'Rice', 'Sugar cane' + * + * @return self + */ + public function setProductionSystem($production_system) + { + if (is_null($production_system)) { + throw new \InvalidArgumentException('non-nullable production_system cannot be null'); + } + $allowedValues = $this->getProductionSystemAllowableValues(); + if (!in_array($production_system, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'production_system', must be one of '%s'", + $production_system, + implode("', '", $allowedValues) + ) + ); + } + $this->container['production_system'] = $production_system; + + return $this; + } + + /** + * Gets average_grain_yield + * + * @return float + */ + public function getAverageGrainYield() + { + return $this->container['average_grain_yield']; + } + + /** + * Sets average_grain_yield + * + * @param float $average_grain_yield Average grain yield, in t/ha (tonnes per hectare) + * + * @return self + */ + public function setAverageGrainYield($average_grain_yield) + { + if (is_null($average_grain_yield)) { + throw new \InvalidArgumentException('non-nullable average_grain_yield cannot be null'); + } + $this->container['average_grain_yield'] = $average_grain_yield; + + return $this; + } + + /** + * Gets area_sown + * + * @return float + */ + public function getAreaSown() + { + return $this->container['area_sown']; + } + + /** + * Sets area_sown + * + * @param float $area_sown Area sown, in ha (hectares) + * + * @return self + */ + public function setAreaSown($area_sown) + { + if (is_null($area_sown)) { + throw new \InvalidArgumentException('non-nullable area_sown cannot be null'); + } + $this->container['area_sown'] = $area_sown; + + return $this; + } + + /** + * Gets non_urea_nitrogen + * + * @return float + */ + public function getNonUreaNitrogen() + { + return $this->container['non_urea_nitrogen']; + } + + /** + * Sets non_urea_nitrogen + * + * @param float $non_urea_nitrogen Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) + * + * @return self + */ + public function setNonUreaNitrogen($non_urea_nitrogen) + { + if (is_null($non_urea_nitrogen)) { + throw new \InvalidArgumentException('non-nullable non_urea_nitrogen cannot be null'); + } + $this->container['non_urea_nitrogen'] = $non_urea_nitrogen; + + return $this; + } + + /** + * Gets urea_application + * + * @return float + */ + public function getUreaApplication() + { + return $this->container['urea_application']; + } + + /** + * Sets urea_application + * + * @param float $urea_application Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) + * + * @return self + */ + public function setUreaApplication($urea_application) + { + if (is_null($urea_application)) { + throw new \InvalidArgumentException('non-nullable urea_application cannot be null'); + } + $this->container['urea_application'] = $urea_application; + + return $this; + } + + /** + * Gets urea_ammonium_nitrate + * + * @return float + */ + public function getUreaAmmoniumNitrate() + { + return $this->container['urea_ammonium_nitrate']; + } + + /** + * Sets urea_ammonium_nitrate + * + * @param float $urea_ammonium_nitrate Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) + * + * @return self + */ + public function setUreaAmmoniumNitrate($urea_ammonium_nitrate) + { + if (is_null($urea_ammonium_nitrate)) { + throw new \InvalidArgumentException('non-nullable urea_ammonium_nitrate cannot be null'); + } + $this->container['urea_ammonium_nitrate'] = $urea_ammonium_nitrate; + + return $this; + } + + /** + * Gets phosphorus_application + * + * @return float + */ + public function getPhosphorusApplication() + { + return $this->container['phosphorus_application']; + } + + /** + * Sets phosphorus_application + * + * @param float $phosphorus_application Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) + * + * @return self + */ + public function setPhosphorusApplication($phosphorus_application) + { + if (is_null($phosphorus_application)) { + throw new \InvalidArgumentException('non-nullable phosphorus_application cannot be null'); + } + $this->container['phosphorus_application'] = $phosphorus_application; + + return $this; + } + + /** + * Gets potassium_application + * + * @return float + */ + public function getPotassiumApplication() + { + return $this->container['potassium_application']; + } + + /** + * Sets potassium_application + * + * @param float $potassium_application Potassium application, in kg K/ha (kilograms of potassium per hectare) + * + * @return self + */ + public function setPotassiumApplication($potassium_application) + { + if (is_null($potassium_application)) { + throw new \InvalidArgumentException('non-nullable potassium_application cannot be null'); + } + $this->container['potassium_application'] = $potassium_application; + + return $this; + } + + /** + * Gets sulfur_application + * + * @return float + */ + public function getSulfurApplication() + { + return $this->container['sulfur_application']; + } + + /** + * Sets sulfur_application + * + * @param float $sulfur_application Sulfur application, in kg S/ha (kilograms of sulfur per hectare) + * + * @return self + */ + public function setSulfurApplication($sulfur_application) + { + if (is_null($sulfur_application)) { + throw new \InvalidArgumentException('non-nullable sulfur_application cannot be null'); + } + $this->container['sulfur_application'] = $sulfur_application; + + return $this; + } + + /** + * Gets rainfall_above600 + * + * @return bool + */ + public function getRainfallAbove600() + { + return $this->container['rainfall_above600']; + } + + /** + * Sets rainfall_above600 + * + * @param bool $rainfall_above600 Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm + * + * @return self + */ + public function setRainfallAbove600($rainfall_above600) + { + if (is_null($rainfall_above600)) { + throw new \InvalidArgumentException('non-nullable rainfall_above600 cannot be null'); + } + $this->container['rainfall_above600'] = $rainfall_above600; + + return $this; + } + + /** + * Gets fraction_of_annual_crop_burnt + * + * @return float + */ + public function getFractionOfAnnualCropBurnt() + { + return $this->container['fraction_of_annual_crop_burnt']; + } + + /** + * Sets fraction_of_annual_crop_burnt + * + * @param float $fraction_of_annual_crop_burnt Fraction of annual production of crop that is burnt, from 0 to 1 + * + * @return self + */ + public function setFractionOfAnnualCropBurnt($fraction_of_annual_crop_burnt) + { + if (is_null($fraction_of_annual_crop_burnt)) { + throw new \InvalidArgumentException('non-nullable fraction_of_annual_crop_burnt cannot be null'); + } + $this->container['fraction_of_annual_crop_burnt'] = $fraction_of_annual_crop_burnt; + + return $this; + } + + /** + * Gets herbicide_use + * + * @return float + */ + public function getHerbicideUse() + { + return $this->container['herbicide_use']; + } + + /** + * Sets herbicide_use + * + * @param float $herbicide_use Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) + * + * @return self + */ + public function setHerbicideUse($herbicide_use) + { + if (is_null($herbicide_use)) { + throw new \InvalidArgumentException('non-nullable herbicide_use cannot be null'); + } + $this->container['herbicide_use'] = $herbicide_use; + + return $this; + } + + /** + * Gets glyphosate_other_herbicide_use + * + * @return float + */ + public function getGlyphosateOtherHerbicideUse() + { + return $this->container['glyphosate_other_herbicide_use']; + } + + /** + * Sets glyphosate_other_herbicide_use + * + * @param float $glyphosate_other_herbicide_use Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) + * + * @return self + */ + public function setGlyphosateOtherHerbicideUse($glyphosate_other_herbicide_use) + { + if (is_null($glyphosate_other_herbicide_use)) { + throw new \InvalidArgumentException('non-nullable glyphosate_other_herbicide_use cannot be null'); + } + $this->container['glyphosate_other_herbicide_use'] = $glyphosate_other_herbicide_use; + + return $this; + } + + /** + * Gets electricity_allocation + * + * @return float + */ + public function getElectricityAllocation() + { + return $this->container['electricity_allocation']; + } + + /** + * Sets electricity_allocation + * + * @param float $electricity_allocation Percentage of electricity use to allocate to this crop, from 0 to 1 + * + * @return self + */ + public function setElectricityAllocation($electricity_allocation) + { + if (is_null($electricity_allocation)) { + throw new \InvalidArgumentException('non-nullable electricity_allocation cannot be null'); + } + $this->container['electricity_allocation'] = $electricity_allocation; + + return $this; + } + + /** + * Gets limestone + * + * @return float + */ + public function getLimestone() + { + return $this->container['limestone']; + } + + /** + * Sets limestone + * + * @param float $limestone Lime applied in tonnes + * + * @return self + */ + public function setLimestone($limestone) + { + if (is_null($limestone)) { + throw new \InvalidArgumentException('non-nullable limestone cannot be null'); + } + $this->container['limestone'] = $limestone; + + return $this; + } + + /** + * Gets limestone_fraction + * + * @return float + */ + public function getLimestoneFraction() + { + return $this->container['limestone_fraction']; + } + + /** + * Sets limestone_fraction + * + * @param float $limestone_fraction Fraction of lime as limestone vs dolomite, between 0 and 1 + * + * @return self + */ + public function setLimestoneFraction($limestone_fraction) + { + if (is_null($limestone_fraction)) { + throw new \InvalidArgumentException('non-nullable limestone_fraction cannot be null'); + } + $this->container['limestone_fraction'] = $limestone_fraction; + + return $this; + } + + /** + * Gets diesel_use + * + * @return float + */ + public function getDieselUse() + { + return $this->container['diesel_use']; + } + + /** + * Sets diesel_use + * + * @param float $diesel_use Diesel usage in L (litres) + * + * @return self + */ + public function setDieselUse($diesel_use) + { + if (is_null($diesel_use)) { + throw new \InvalidArgumentException('non-nullable diesel_use cannot be null'); + } + $this->container['diesel_use'] = $diesel_use; + + return $this; + } + + /** + * Gets petrol_use + * + * @return float + */ + public function getPetrolUse() + { + return $this->container['petrol_use']; + } + + /** + * Sets petrol_use + * + * @param float $petrol_use Petrol usage in L (litres) + * + * @return self + */ + public function setPetrolUse($petrol_use) + { + if (is_null($petrol_use)) { + throw new \InvalidArgumentException('non-nullable petrol_use cannot be null'); + } + $this->container['petrol_use'] = $petrol_use; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostHorticulture200Response.php b/examples/php-api-client/api-client/lib/Model/PostHorticulture200Response.php new file mode 100644 index 00000000..a421e726 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostHorticulture200Response.php @@ -0,0 +1,636 @@ + + */ +class PostHorticulture200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_horticulture_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostHorticulture200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostCotton200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'intermediate' => '\OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInner[]', + 'net' => '\OpenAPI\Client\Model\PostCotton200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intermediate' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intermediate' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intermediate' => 'intermediate', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intermediate' => 'setIntermediate', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intermediate' => 'getIntermediate', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostHorticulture200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostHorticulture200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration[] + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration[] $intensities Emissions intensity for each crop (in order) + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostHorticulture200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostHorticulture200ResponseIntermediateInner.php new file mode 100644 index 00000000..1f843813 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostHorticulture200ResponseIntermediateInner.php @@ -0,0 +1,636 @@ + + */ +class PostHorticulture200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_horticulture_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostHorticulture200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostCotton200ResponseScope3', + 'intensities_with_sequestration' => '\OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'intensities_with_sequestration' => null, + 'net' => null, + 'carbon_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'intensities_with_sequestration' => false, + 'net' => false, + 'carbon_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'intensities_with_sequestration' => 'intensitiesWithSequestration', + 'net' => 'net', + 'carbon_sequestration' => 'carbonSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'intensities_with_sequestration' => 'setIntensitiesWithSequestration', + 'net' => 'setNet', + 'carbon_sequestration' => 'setCarbonSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'intensities_with_sequestration' => 'getIntensitiesWithSequestration', + 'net' => 'getNet', + 'carbon_sequestration' => 'getCarbonSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('intensities_with_sequestration', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['intensities_with_sequestration'] === null) { + $invalidProperties[] = "'intensities_with_sequestration' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostHorticulture200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostHorticulture200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets intensities_with_sequestration + * + * @return \OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration + */ + public function getIntensitiesWithSequestration() + { + return $this->container['intensities_with_sequestration']; + } + + /** + * Sets intensities_with_sequestration + * + * @param \OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration $intensities_with_sequestration intensities_with_sequestration + * + * @return self + */ + public function setIntensitiesWithSequestration($intensities_with_sequestration) + { + if (is_null($intensities_with_sequestration)) { + throw new \InvalidArgumentException('non-nullable intensities_with_sequestration cannot be null'); + } + $this->container['intensities_with_sequestration'] = $intensities_with_sequestration; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.php b/examples/php-api-client/api-client/lib/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.php new file mode 100644 index 00000000..fb18ad13 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.php @@ -0,0 +1,488 @@ + + */ +class PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_horticulture_200_response_intermediate_inner_intensitiesWithSequestration'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'crop_produced_tonnes' => 'float', + 'tonnes_crop_excluding_sequestration' => 'float', + 'tonnes_crop_including_sequestration' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'crop_produced_tonnes' => null, + 'tonnes_crop_excluding_sequestration' => null, + 'tonnes_crop_including_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'crop_produced_tonnes' => false, + 'tonnes_crop_excluding_sequestration' => false, + 'tonnes_crop_including_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'crop_produced_tonnes' => 'cropProducedTonnes', + 'tonnes_crop_excluding_sequestration' => 'tonnesCropExcludingSequestration', + 'tonnes_crop_including_sequestration' => 'tonnesCropIncludingSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'crop_produced_tonnes' => 'setCropProducedTonnes', + 'tonnes_crop_excluding_sequestration' => 'setTonnesCropExcludingSequestration', + 'tonnes_crop_including_sequestration' => 'setTonnesCropIncludingSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'crop_produced_tonnes' => 'getCropProducedTonnes', + 'tonnes_crop_excluding_sequestration' => 'getTonnesCropExcludingSequestration', + 'tonnes_crop_including_sequestration' => 'getTonnesCropIncludingSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('crop_produced_tonnes', $data ?? [], null); + $this->setIfExists('tonnes_crop_excluding_sequestration', $data ?? [], null); + $this->setIfExists('tonnes_crop_including_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['crop_produced_tonnes'] === null) { + $invalidProperties[] = "'crop_produced_tonnes' can't be null"; + } + if ($this->container['tonnes_crop_excluding_sequestration'] === null) { + $invalidProperties[] = "'tonnes_crop_excluding_sequestration' can't be null"; + } + if ($this->container['tonnes_crop_including_sequestration'] === null) { + $invalidProperties[] = "'tonnes_crop_including_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets crop_produced_tonnes + * + * @return float + */ + public function getCropProducedTonnes() + { + return $this->container['crop_produced_tonnes']; + } + + /** + * Sets crop_produced_tonnes + * + * @param float $crop_produced_tonnes Horticultural crop produced in tonnes + * + * @return self + */ + public function setCropProducedTonnes($crop_produced_tonnes) + { + if (is_null($crop_produced_tonnes)) { + throw new \InvalidArgumentException('non-nullable crop_produced_tonnes cannot be null'); + } + $this->container['crop_produced_tonnes'] = $crop_produced_tonnes; + + return $this; + } + + /** + * Gets tonnes_crop_excluding_sequestration + * + * @return float + */ + public function getTonnesCropExcludingSequestration() + { + return $this->container['tonnes_crop_excluding_sequestration']; + } + + /** + * Sets tonnes_crop_excluding_sequestration + * + * @param float $tonnes_crop_excluding_sequestration Emissions intensity excluding sequestration, in t-CO2e/t crop + * + * @return self + */ + public function setTonnesCropExcludingSequestration($tonnes_crop_excluding_sequestration) + { + if (is_null($tonnes_crop_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable tonnes_crop_excluding_sequestration cannot be null'); + } + $this->container['tonnes_crop_excluding_sequestration'] = $tonnes_crop_excluding_sequestration; + + return $this; + } + + /** + * Gets tonnes_crop_including_sequestration + * + * @return float + */ + public function getTonnesCropIncludingSequestration() + { + return $this->container['tonnes_crop_including_sequestration']; + } + + /** + * Sets tonnes_crop_including_sequestration + * + * @param float $tonnes_crop_including_sequestration Emissions intensity including sequestration, in t-CO2e/t crop + * + * @return self + */ + public function setTonnesCropIncludingSequestration($tonnes_crop_including_sequestration) + { + if (is_null($tonnes_crop_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable tonnes_crop_including_sequestration cannot be null'); + } + $this->container['tonnes_crop_including_sequestration'] = $tonnes_crop_including_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostHorticulture200ResponseScope1.php b/examples/php-api-client/api-client/lib/Model/PostHorticulture200ResponseScope1.php new file mode 100644 index 00000000..10bc3a8e --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostHorticulture200ResponseScope1.php @@ -0,0 +1,1006 @@ + + */ +class PostHorticulture200ResponseScope1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_horticulture_200_response_scope1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel_co2' => 'float', + 'fuel_ch4' => 'float', + 'fuel_n2_o' => 'float', + 'urea_co2' => 'float', + 'lime_co2' => 'float', + 'fertiliser_n2_o' => 'float', + 'atmospheric_deposition_n2_o' => 'float', + 'leaching_and_runoff_n2_o' => 'float', + 'crop_residue_n2_o' => 'float', + 'field_burning_n2_o' => 'float', + 'field_burning_ch4' => 'float', + 'hfcs_refrigerant_leakage' => 'float', + 'total_co2' => 'float', + 'total_ch4' => 'float', + 'total_n2_o' => 'float', + 'total_hfcs' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel_co2' => null, + 'fuel_ch4' => null, + 'fuel_n2_o' => null, + 'urea_co2' => null, + 'lime_co2' => null, + 'fertiliser_n2_o' => null, + 'atmospheric_deposition_n2_o' => null, + 'leaching_and_runoff_n2_o' => null, + 'crop_residue_n2_o' => null, + 'field_burning_n2_o' => null, + 'field_burning_ch4' => null, + 'hfcs_refrigerant_leakage' => null, + 'total_co2' => null, + 'total_ch4' => null, + 'total_n2_o' => null, + 'total_hfcs' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel_co2' => false, + 'fuel_ch4' => false, + 'fuel_n2_o' => false, + 'urea_co2' => false, + 'lime_co2' => false, + 'fertiliser_n2_o' => false, + 'atmospheric_deposition_n2_o' => false, + 'leaching_and_runoff_n2_o' => false, + 'crop_residue_n2_o' => false, + 'field_burning_n2_o' => false, + 'field_burning_ch4' => false, + 'hfcs_refrigerant_leakage' => false, + 'total_co2' => false, + 'total_ch4' => false, + 'total_n2_o' => false, + 'total_hfcs' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel_co2' => 'fuelCO2', + 'fuel_ch4' => 'fuelCH4', + 'fuel_n2_o' => 'fuelN2O', + 'urea_co2' => 'ureaCO2', + 'lime_co2' => 'limeCO2', + 'fertiliser_n2_o' => 'fertiliserN2O', + 'atmospheric_deposition_n2_o' => 'atmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'leachingAndRunoffN2O', + 'crop_residue_n2_o' => 'cropResidueN2O', + 'field_burning_n2_o' => 'fieldBurningN2O', + 'field_burning_ch4' => 'fieldBurningCH4', + 'hfcs_refrigerant_leakage' => 'hfcsRefrigerantLeakage', + 'total_co2' => 'totalCO2', + 'total_ch4' => 'totalCH4', + 'total_n2_o' => 'totalN2O', + 'total_hfcs' => 'totalHFCs', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel_co2' => 'setFuelCo2', + 'fuel_ch4' => 'setFuelCh4', + 'fuel_n2_o' => 'setFuelN2O', + 'urea_co2' => 'setUreaCo2', + 'lime_co2' => 'setLimeCo2', + 'fertiliser_n2_o' => 'setFertiliserN2O', + 'atmospheric_deposition_n2_o' => 'setAtmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'setLeachingAndRunoffN2O', + 'crop_residue_n2_o' => 'setCropResidueN2O', + 'field_burning_n2_o' => 'setFieldBurningN2O', + 'field_burning_ch4' => 'setFieldBurningCh4', + 'hfcs_refrigerant_leakage' => 'setHfcsRefrigerantLeakage', + 'total_co2' => 'setTotalCo2', + 'total_ch4' => 'setTotalCh4', + 'total_n2_o' => 'setTotalN2O', + 'total_hfcs' => 'setTotalHfcs', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel_co2' => 'getFuelCo2', + 'fuel_ch4' => 'getFuelCh4', + 'fuel_n2_o' => 'getFuelN2O', + 'urea_co2' => 'getUreaCo2', + 'lime_co2' => 'getLimeCo2', + 'fertiliser_n2_o' => 'getFertiliserN2O', + 'atmospheric_deposition_n2_o' => 'getAtmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'getLeachingAndRunoffN2O', + 'crop_residue_n2_o' => 'getCropResidueN2O', + 'field_burning_n2_o' => 'getFieldBurningN2O', + 'field_burning_ch4' => 'getFieldBurningCh4', + 'hfcs_refrigerant_leakage' => 'getHfcsRefrigerantLeakage', + 'total_co2' => 'getTotalCo2', + 'total_ch4' => 'getTotalCh4', + 'total_n2_o' => 'getTotalN2O', + 'total_hfcs' => 'getTotalHfcs', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel_co2', $data ?? [], null); + $this->setIfExists('fuel_ch4', $data ?? [], null); + $this->setIfExists('fuel_n2_o', $data ?? [], null); + $this->setIfExists('urea_co2', $data ?? [], null); + $this->setIfExists('lime_co2', $data ?? [], null); + $this->setIfExists('fertiliser_n2_o', $data ?? [], null); + $this->setIfExists('atmospheric_deposition_n2_o', $data ?? [], null); + $this->setIfExists('leaching_and_runoff_n2_o', $data ?? [], null); + $this->setIfExists('crop_residue_n2_o', $data ?? [], null); + $this->setIfExists('field_burning_n2_o', $data ?? [], null); + $this->setIfExists('field_burning_ch4', $data ?? [], null); + $this->setIfExists('hfcs_refrigerant_leakage', $data ?? [], null); + $this->setIfExists('total_co2', $data ?? [], null); + $this->setIfExists('total_ch4', $data ?? [], null); + $this->setIfExists('total_n2_o', $data ?? [], null); + $this->setIfExists('total_hfcs', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel_co2'] === null) { + $invalidProperties[] = "'fuel_co2' can't be null"; + } + if ($this->container['fuel_ch4'] === null) { + $invalidProperties[] = "'fuel_ch4' can't be null"; + } + if ($this->container['fuel_n2_o'] === null) { + $invalidProperties[] = "'fuel_n2_o' can't be null"; + } + if ($this->container['urea_co2'] === null) { + $invalidProperties[] = "'urea_co2' can't be null"; + } + if ($this->container['lime_co2'] === null) { + $invalidProperties[] = "'lime_co2' can't be null"; + } + if ($this->container['fertiliser_n2_o'] === null) { + $invalidProperties[] = "'fertiliser_n2_o' can't be null"; + } + if ($this->container['atmospheric_deposition_n2_o'] === null) { + $invalidProperties[] = "'atmospheric_deposition_n2_o' can't be null"; + } + if ($this->container['leaching_and_runoff_n2_o'] === null) { + $invalidProperties[] = "'leaching_and_runoff_n2_o' can't be null"; + } + if ($this->container['crop_residue_n2_o'] === null) { + $invalidProperties[] = "'crop_residue_n2_o' can't be null"; + } + if ($this->container['field_burning_n2_o'] === null) { + $invalidProperties[] = "'field_burning_n2_o' can't be null"; + } + if ($this->container['field_burning_ch4'] === null) { + $invalidProperties[] = "'field_burning_ch4' can't be null"; + } + if ($this->container['hfcs_refrigerant_leakage'] === null) { + $invalidProperties[] = "'hfcs_refrigerant_leakage' can't be null"; + } + if ($this->container['total_co2'] === null) { + $invalidProperties[] = "'total_co2' can't be null"; + } + if ($this->container['total_ch4'] === null) { + $invalidProperties[] = "'total_ch4' can't be null"; + } + if ($this->container['total_n2_o'] === null) { + $invalidProperties[] = "'total_n2_o' can't be null"; + } + if ($this->container['total_hfcs'] === null) { + $invalidProperties[] = "'total_hfcs' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel_co2 + * + * @return float + */ + public function getFuelCo2() + { + return $this->container['fuel_co2']; + } + + /** + * Sets fuel_co2 + * + * @param float $fuel_co2 CO2 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCo2($fuel_co2) + { + if (is_null($fuel_co2)) { + throw new \InvalidArgumentException('non-nullable fuel_co2 cannot be null'); + } + $this->container['fuel_co2'] = $fuel_co2; + + return $this; + } + + /** + * Gets fuel_ch4 + * + * @return float + */ + public function getFuelCh4() + { + return $this->container['fuel_ch4']; + } + + /** + * Sets fuel_ch4 + * + * @param float $fuel_ch4 CH4 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCh4($fuel_ch4) + { + if (is_null($fuel_ch4)) { + throw new \InvalidArgumentException('non-nullable fuel_ch4 cannot be null'); + } + $this->container['fuel_ch4'] = $fuel_ch4; + + return $this; + } + + /** + * Gets fuel_n2_o + * + * @return float + */ + public function getFuelN2O() + { + return $this->container['fuel_n2_o']; + } + + /** + * Sets fuel_n2_o + * + * @param float $fuel_n2_o N2O emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelN2O($fuel_n2_o) + { + if (is_null($fuel_n2_o)) { + throw new \InvalidArgumentException('non-nullable fuel_n2_o cannot be null'); + } + $this->container['fuel_n2_o'] = $fuel_n2_o; + + return $this; + } + + /** + * Gets urea_co2 + * + * @return float + */ + public function getUreaCo2() + { + return $this->container['urea_co2']; + } + + /** + * Sets urea_co2 + * + * @param float $urea_co2 CO2 emissions from urea, in tonnes-CO2e + * + * @return self + */ + public function setUreaCo2($urea_co2) + { + if (is_null($urea_co2)) { + throw new \InvalidArgumentException('non-nullable urea_co2 cannot be null'); + } + $this->container['urea_co2'] = $urea_co2; + + return $this; + } + + /** + * Gets lime_co2 + * + * @return float + */ + public function getLimeCo2() + { + return $this->container['lime_co2']; + } + + /** + * Sets lime_co2 + * + * @param float $lime_co2 CO2 emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLimeCo2($lime_co2) + { + if (is_null($lime_co2)) { + throw new \InvalidArgumentException('non-nullable lime_co2 cannot be null'); + } + $this->container['lime_co2'] = $lime_co2; + + return $this; + } + + /** + * Gets fertiliser_n2_o + * + * @return float + */ + public function getFertiliserN2O() + { + return $this->container['fertiliser_n2_o']; + } + + /** + * Sets fertiliser_n2_o + * + * @param float $fertiliser_n2_o N2O emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliserN2O($fertiliser_n2_o) + { + if (is_null($fertiliser_n2_o)) { + throw new \InvalidArgumentException('non-nullable fertiliser_n2_o cannot be null'); + } + $this->container['fertiliser_n2_o'] = $fertiliser_n2_o; + + return $this; + } + + /** + * Gets atmospheric_deposition_n2_o + * + * @return float + */ + public function getAtmosphericDepositionN2O() + { + return $this->container['atmospheric_deposition_n2_o']; + } + + /** + * Sets atmospheric_deposition_n2_o + * + * @param float $atmospheric_deposition_n2_o N2O emissions from atmospheric deposition, in tonnes-CO2e + * + * @return self + */ + public function setAtmosphericDepositionN2O($atmospheric_deposition_n2_o) + { + if (is_null($atmospheric_deposition_n2_o)) { + throw new \InvalidArgumentException('non-nullable atmospheric_deposition_n2_o cannot be null'); + } + $this->container['atmospheric_deposition_n2_o'] = $atmospheric_deposition_n2_o; + + return $this; + } + + /** + * Gets leaching_and_runoff_n2_o + * + * @return float + */ + public function getLeachingAndRunoffN2O() + { + return $this->container['leaching_and_runoff_n2_o']; + } + + /** + * Sets leaching_and_runoff_n2_o + * + * @param float $leaching_and_runoff_n2_o N2O emissions from leeching and runoff, in tonnes-CO2e + * + * @return self + */ + public function setLeachingAndRunoffN2O($leaching_and_runoff_n2_o) + { + if (is_null($leaching_and_runoff_n2_o)) { + throw new \InvalidArgumentException('non-nullable leaching_and_runoff_n2_o cannot be null'); + } + $this->container['leaching_and_runoff_n2_o'] = $leaching_and_runoff_n2_o; + + return $this; + } + + /** + * Gets crop_residue_n2_o + * + * @return float + */ + public function getCropResidueN2O() + { + return $this->container['crop_residue_n2_o']; + } + + /** + * Sets crop_residue_n2_o + * + * @param float $crop_residue_n2_o N2O emissions from crop residue, in tonnes-CO2e + * + * @return self + */ + public function setCropResidueN2O($crop_residue_n2_o) + { + if (is_null($crop_residue_n2_o)) { + throw new \InvalidArgumentException('non-nullable crop_residue_n2_o cannot be null'); + } + $this->container['crop_residue_n2_o'] = $crop_residue_n2_o; + + return $this; + } + + /** + * Gets field_burning_n2_o + * + * @return float + */ + public function getFieldBurningN2O() + { + return $this->container['field_burning_n2_o']; + } + + /** + * Sets field_burning_n2_o + * + * @param float $field_burning_n2_o N2O emissions from field burning, in tonnes-CO2e + * + * @return self + */ + public function setFieldBurningN2O($field_burning_n2_o) + { + if (is_null($field_burning_n2_o)) { + throw new \InvalidArgumentException('non-nullable field_burning_n2_o cannot be null'); + } + $this->container['field_burning_n2_o'] = $field_burning_n2_o; + + return $this; + } + + /** + * Gets field_burning_ch4 + * + * @return float + */ + public function getFieldBurningCh4() + { + return $this->container['field_burning_ch4']; + } + + /** + * Sets field_burning_ch4 + * + * @param float $field_burning_ch4 CH4 emissions from field burning, in tonnes-CO2e + * + * @return self + */ + public function setFieldBurningCh4($field_burning_ch4) + { + if (is_null($field_burning_ch4)) { + throw new \InvalidArgumentException('non-nullable field_burning_ch4 cannot be null'); + } + $this->container['field_burning_ch4'] = $field_burning_ch4; + + return $this; + } + + /** + * Gets hfcs_refrigerant_leakage + * + * @return float + */ + public function getHfcsRefrigerantLeakage() + { + return $this->container['hfcs_refrigerant_leakage']; + } + + /** + * Sets hfcs_refrigerant_leakage + * + * @param float $hfcs_refrigerant_leakage Emissions from refrigerant leakage, in tonnes-HFCs + * + * @return self + */ + public function setHfcsRefrigerantLeakage($hfcs_refrigerant_leakage) + { + if (is_null($hfcs_refrigerant_leakage)) { + throw new \InvalidArgumentException('non-nullable hfcs_refrigerant_leakage cannot be null'); + } + $this->container['hfcs_refrigerant_leakage'] = $hfcs_refrigerant_leakage; + + return $this; + } + + /** + * Gets total_co2 + * + * @return float + */ + public function getTotalCo2() + { + return $this->container['total_co2']; + } + + /** + * Sets total_co2 + * + * @param float $total_co2 Total CO2 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCo2($total_co2) + { + if (is_null($total_co2)) { + throw new \InvalidArgumentException('non-nullable total_co2 cannot be null'); + } + $this->container['total_co2'] = $total_co2; + + return $this; + } + + /** + * Gets total_ch4 + * + * @return float + */ + public function getTotalCh4() + { + return $this->container['total_ch4']; + } + + /** + * Sets total_ch4 + * + * @param float $total_ch4 Total CH4 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCh4($total_ch4) + { + if (is_null($total_ch4)) { + throw new \InvalidArgumentException('non-nullable total_ch4 cannot be null'); + } + $this->container['total_ch4'] = $total_ch4; + + return $this; + } + + /** + * Gets total_n2_o + * + * @return float + */ + public function getTotalN2O() + { + return $this->container['total_n2_o']; + } + + /** + * Sets total_n2_o + * + * @param float $total_n2_o Total N2O scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalN2O($total_n2_o) + { + if (is_null($total_n2_o)) { + throw new \InvalidArgumentException('non-nullable total_n2_o cannot be null'); + } + $this->container['total_n2_o'] = $total_n2_o; + + return $this; + } + + /** + * Gets total_hfcs + * + * @return float + */ + public function getTotalHfcs() + { + return $this->container['total_hfcs']; + } + + /** + * Sets total_hfcs + * + * @param float $total_hfcs Total HFCs scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalHfcs($total_hfcs) + { + if (is_null($total_hfcs)) { + throw new \InvalidArgumentException('non-nullable total_hfcs cannot be null'); + } + $this->container['total_hfcs'] = $total_hfcs; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostHorticultureRequest.php b/examples/php-api-client/api-client/lib/Model/PostHorticultureRequest.php new file mode 100644 index 00000000..6657a9cd --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostHorticultureRequest.php @@ -0,0 +1,626 @@ + + */ +class PostHorticultureRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_horticulture_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'crops' => '\OpenAPI\Client\Model\PostHorticultureRequestCropsInner[]', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'vegetation' => '\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'crops' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'crops' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'crops' => 'crops', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'crops' => 'setCrops', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'crops' => 'getCrops', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('crops', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['crops'] === null) { + $invalidProperties[] = "'crops' can't be null"; + } + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets crops + * + * @return \OpenAPI\Client\Model\PostHorticultureRequestCropsInner[] + */ + public function getCrops() + { + return $this->container['crops']; + } + + /** + * Sets crops + * + * @param \OpenAPI\Client\Model\PostHorticultureRequestCropsInner[] $crops crops + * + * @return self + */ + public function setCrops($crops) + { + if (is_null($crops)) { + throw new \InvalidArgumentException('non-nullable crops cannot be null'); + } + $this->container['crops'] = $crops; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostHorticultureRequest., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostHorticultureRequest., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostCottonRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostCottonRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostHorticultureRequestCropsInner.php b/examples/php-api-client/api-client/lib/Model/PostHorticultureRequestCropsInner.php new file mode 100644 index 00000000..fa54f993 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostHorticultureRequestCropsInner.php @@ -0,0 +1,1264 @@ + + */ +class PostHorticultureRequestCropsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_horticulture_request_crops_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'type' => 'string', + 'average_yield' => 'float', + 'area_sown' => 'float', + 'urea_application' => 'float', + 'non_urea_nitrogen' => 'float', + 'urea_ammonium_nitrate' => 'float', + 'phosphorus_application' => 'float', + 'potassium_application' => 'float', + 'sulfur_application' => 'float', + 'rainfall_above600' => 'bool', + 'urease_inhibitor_used' => 'bool', + 'nitrification_inhibitor_used' => 'bool', + 'fraction_of_annual_crop_burnt' => 'float', + 'herbicide_use' => 'float', + 'glyphosate_other_herbicide_use' => 'float', + 'electricity_allocation' => 'float', + 'limestone' => 'float', + 'limestone_fraction' => 'float', + 'diesel_use' => 'float', + 'petrol_use' => 'float', + 'lpg' => 'float', + 'refrigerants' => '\OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'type' => null, + 'average_yield' => null, + 'area_sown' => null, + 'urea_application' => null, + 'non_urea_nitrogen' => null, + 'urea_ammonium_nitrate' => null, + 'phosphorus_application' => null, + 'potassium_application' => null, + 'sulfur_application' => null, + 'rainfall_above600' => null, + 'urease_inhibitor_used' => null, + 'nitrification_inhibitor_used' => null, + 'fraction_of_annual_crop_burnt' => null, + 'herbicide_use' => null, + 'glyphosate_other_herbicide_use' => null, + 'electricity_allocation' => null, + 'limestone' => null, + 'limestone_fraction' => null, + 'diesel_use' => null, + 'petrol_use' => null, + 'lpg' => null, + 'refrigerants' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'type' => false, + 'average_yield' => false, + 'area_sown' => false, + 'urea_application' => false, + 'non_urea_nitrogen' => false, + 'urea_ammonium_nitrate' => false, + 'phosphorus_application' => false, + 'potassium_application' => false, + 'sulfur_application' => false, + 'rainfall_above600' => false, + 'urease_inhibitor_used' => false, + 'nitrification_inhibitor_used' => false, + 'fraction_of_annual_crop_burnt' => false, + 'herbicide_use' => false, + 'glyphosate_other_herbicide_use' => false, + 'electricity_allocation' => false, + 'limestone' => false, + 'limestone_fraction' => false, + 'diesel_use' => false, + 'petrol_use' => false, + 'lpg' => false, + 'refrigerants' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'type' => 'type', + 'average_yield' => 'averageYield', + 'area_sown' => 'areaSown', + 'urea_application' => 'ureaApplication', + 'non_urea_nitrogen' => 'nonUreaNitrogen', + 'urea_ammonium_nitrate' => 'ureaAmmoniumNitrate', + 'phosphorus_application' => 'phosphorusApplication', + 'potassium_application' => 'potassiumApplication', + 'sulfur_application' => 'sulfurApplication', + 'rainfall_above600' => 'rainfallAbove600', + 'urease_inhibitor_used' => 'ureaseInhibitorUsed', + 'nitrification_inhibitor_used' => 'nitrificationInhibitorUsed', + 'fraction_of_annual_crop_burnt' => 'fractionOfAnnualCropBurnt', + 'herbicide_use' => 'herbicideUse', + 'glyphosate_other_herbicide_use' => 'glyphosateOtherHerbicideUse', + 'electricity_allocation' => 'electricityAllocation', + 'limestone' => 'limestone', + 'limestone_fraction' => 'limestoneFraction', + 'diesel_use' => 'dieselUse', + 'petrol_use' => 'petrolUse', + 'lpg' => 'lpg', + 'refrigerants' => 'refrigerants' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'type' => 'setType', + 'average_yield' => 'setAverageYield', + 'area_sown' => 'setAreaSown', + 'urea_application' => 'setUreaApplication', + 'non_urea_nitrogen' => 'setNonUreaNitrogen', + 'urea_ammonium_nitrate' => 'setUreaAmmoniumNitrate', + 'phosphorus_application' => 'setPhosphorusApplication', + 'potassium_application' => 'setPotassiumApplication', + 'sulfur_application' => 'setSulfurApplication', + 'rainfall_above600' => 'setRainfallAbove600', + 'urease_inhibitor_used' => 'setUreaseInhibitorUsed', + 'nitrification_inhibitor_used' => 'setNitrificationInhibitorUsed', + 'fraction_of_annual_crop_burnt' => 'setFractionOfAnnualCropBurnt', + 'herbicide_use' => 'setHerbicideUse', + 'glyphosate_other_herbicide_use' => 'setGlyphosateOtherHerbicideUse', + 'electricity_allocation' => 'setElectricityAllocation', + 'limestone' => 'setLimestone', + 'limestone_fraction' => 'setLimestoneFraction', + 'diesel_use' => 'setDieselUse', + 'petrol_use' => 'setPetrolUse', + 'lpg' => 'setLpg', + 'refrigerants' => 'setRefrigerants' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'type' => 'getType', + 'average_yield' => 'getAverageYield', + 'area_sown' => 'getAreaSown', + 'urea_application' => 'getUreaApplication', + 'non_urea_nitrogen' => 'getNonUreaNitrogen', + 'urea_ammonium_nitrate' => 'getUreaAmmoniumNitrate', + 'phosphorus_application' => 'getPhosphorusApplication', + 'potassium_application' => 'getPotassiumApplication', + 'sulfur_application' => 'getSulfurApplication', + 'rainfall_above600' => 'getRainfallAbove600', + 'urease_inhibitor_used' => 'getUreaseInhibitorUsed', + 'nitrification_inhibitor_used' => 'getNitrificationInhibitorUsed', + 'fraction_of_annual_crop_burnt' => 'getFractionOfAnnualCropBurnt', + 'herbicide_use' => 'getHerbicideUse', + 'glyphosate_other_herbicide_use' => 'getGlyphosateOtherHerbicideUse', + 'electricity_allocation' => 'getElectricityAllocation', + 'limestone' => 'getLimestone', + 'limestone_fraction' => 'getLimestoneFraction', + 'diesel_use' => 'getDieselUse', + 'petrol_use' => 'getPetrolUse', + 'lpg' => 'getLpg', + 'refrigerants' => 'getRefrigerants' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_PULSES = 'Pulses'; + public const TYPE_TUBER_AND_ROOTS = 'Tuber and Roots'; + public const TYPE_PEANUTS = 'Peanuts'; + public const TYPE_HOPS = 'Hops'; + public const TYPE_PERENNIAL_HORT = 'Perennial Hort'; + public const TYPE_ANNUAL_HORT = 'Annual Hort'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PULSES, + self::TYPE_TUBER_AND_ROOTS, + self::TYPE_PEANUTS, + self::TYPE_HOPS, + self::TYPE_PERENNIAL_HORT, + self::TYPE_ANNUAL_HORT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('average_yield', $data ?? [], null); + $this->setIfExists('area_sown', $data ?? [], null); + $this->setIfExists('urea_application', $data ?? [], null); + $this->setIfExists('non_urea_nitrogen', $data ?? [], null); + $this->setIfExists('urea_ammonium_nitrate', $data ?? [], null); + $this->setIfExists('phosphorus_application', $data ?? [], null); + $this->setIfExists('potassium_application', $data ?? [], null); + $this->setIfExists('sulfur_application', $data ?? [], null); + $this->setIfExists('rainfall_above600', $data ?? [], null); + $this->setIfExists('urease_inhibitor_used', $data ?? [], null); + $this->setIfExists('nitrification_inhibitor_used', $data ?? [], null); + $this->setIfExists('fraction_of_annual_crop_burnt', $data ?? [], null); + $this->setIfExists('herbicide_use', $data ?? [], null); + $this->setIfExists('glyphosate_other_herbicide_use', $data ?? [], null); + $this->setIfExists('electricity_allocation', $data ?? [], null); + $this->setIfExists('limestone', $data ?? [], null); + $this->setIfExists('limestone_fraction', $data ?? [], null); + $this->setIfExists('diesel_use', $data ?? [], null); + $this->setIfExists('petrol_use', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + $this->setIfExists('refrigerants', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['average_yield'] === null) { + $invalidProperties[] = "'average_yield' can't be null"; + } + if ($this->container['area_sown'] === null) { + $invalidProperties[] = "'area_sown' can't be null"; + } + if ($this->container['urea_application'] === null) { + $invalidProperties[] = "'urea_application' can't be null"; + } + if ($this->container['non_urea_nitrogen'] === null) { + $invalidProperties[] = "'non_urea_nitrogen' can't be null"; + } + if ($this->container['urea_ammonium_nitrate'] === null) { + $invalidProperties[] = "'urea_ammonium_nitrate' can't be null"; + } + if ($this->container['phosphorus_application'] === null) { + $invalidProperties[] = "'phosphorus_application' can't be null"; + } + if ($this->container['potassium_application'] === null) { + $invalidProperties[] = "'potassium_application' can't be null"; + } + if ($this->container['sulfur_application'] === null) { + $invalidProperties[] = "'sulfur_application' can't be null"; + } + if ($this->container['rainfall_above600'] === null) { + $invalidProperties[] = "'rainfall_above600' can't be null"; + } + if ($this->container['fraction_of_annual_crop_burnt'] === null) { + $invalidProperties[] = "'fraction_of_annual_crop_burnt' can't be null"; + } + if ($this->container['herbicide_use'] === null) { + $invalidProperties[] = "'herbicide_use' can't be null"; + } + if ($this->container['glyphosate_other_herbicide_use'] === null) { + $invalidProperties[] = "'glyphosate_other_herbicide_use' can't be null"; + } + if ($this->container['electricity_allocation'] === null) { + $invalidProperties[] = "'electricity_allocation' can't be null"; + } + if ($this->container['limestone'] === null) { + $invalidProperties[] = "'limestone' can't be null"; + } + if ($this->container['limestone_fraction'] === null) { + $invalidProperties[] = "'limestone_fraction' can't be null"; + } + if ($this->container['diesel_use'] === null) { + $invalidProperties[] = "'diesel_use' can't be null"; + } + if ($this->container['petrol_use'] === null) { + $invalidProperties[] = "'petrol_use' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + if ($this->container['refrigerants'] === null) { + $invalidProperties[] = "'refrigerants' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Crop type + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets average_yield + * + * @return float + */ + public function getAverageYield() + { + return $this->container['average_yield']; + } + + /** + * Sets average_yield + * + * @param float $average_yield Average crop yield, in t/ha (tonnes per hectare) + * + * @return self + */ + public function setAverageYield($average_yield) + { + if (is_null($average_yield)) { + throw new \InvalidArgumentException('non-nullable average_yield cannot be null'); + } + $this->container['average_yield'] = $average_yield; + + return $this; + } + + /** + * Gets area_sown + * + * @return float + */ + public function getAreaSown() + { + return $this->container['area_sown']; + } + + /** + * Sets area_sown + * + * @param float $area_sown Area sown, in ha (hectares) + * + * @return self + */ + public function setAreaSown($area_sown) + { + if (is_null($area_sown)) { + throw new \InvalidArgumentException('non-nullable area_sown cannot be null'); + } + $this->container['area_sown'] = $area_sown; + + return $this; + } + + /** + * Gets urea_application + * + * @return float + */ + public function getUreaApplication() + { + return $this->container['urea_application']; + } + + /** + * Sets urea_application + * + * @param float $urea_application Urea application, in kg Urea/ha (kilograms of urea per hectare) + * + * @return self + */ + public function setUreaApplication($urea_application) + { + if (is_null($urea_application)) { + throw new \InvalidArgumentException('non-nullable urea_application cannot be null'); + } + $this->container['urea_application'] = $urea_application; + + return $this; + } + + /** + * Gets non_urea_nitrogen + * + * @return float + */ + public function getNonUreaNitrogen() + { + return $this->container['non_urea_nitrogen']; + } + + /** + * Sets non_urea_nitrogen + * + * @param float $non_urea_nitrogen Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) + * + * @return self + */ + public function setNonUreaNitrogen($non_urea_nitrogen) + { + if (is_null($non_urea_nitrogen)) { + throw new \InvalidArgumentException('non-nullable non_urea_nitrogen cannot be null'); + } + $this->container['non_urea_nitrogen'] = $non_urea_nitrogen; + + return $this; + } + + /** + * Gets urea_ammonium_nitrate + * + * @return float + */ + public function getUreaAmmoniumNitrate() + { + return $this->container['urea_ammonium_nitrate']; + } + + /** + * Sets urea_ammonium_nitrate + * + * @param float $urea_ammonium_nitrate Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) + * + * @return self + */ + public function setUreaAmmoniumNitrate($urea_ammonium_nitrate) + { + if (is_null($urea_ammonium_nitrate)) { + throw new \InvalidArgumentException('non-nullable urea_ammonium_nitrate cannot be null'); + } + $this->container['urea_ammonium_nitrate'] = $urea_ammonium_nitrate; + + return $this; + } + + /** + * Gets phosphorus_application + * + * @return float + */ + public function getPhosphorusApplication() + { + return $this->container['phosphorus_application']; + } + + /** + * Sets phosphorus_application + * + * @param float $phosphorus_application Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) + * + * @return self + */ + public function setPhosphorusApplication($phosphorus_application) + { + if (is_null($phosphorus_application)) { + throw new \InvalidArgumentException('non-nullable phosphorus_application cannot be null'); + } + $this->container['phosphorus_application'] = $phosphorus_application; + + return $this; + } + + /** + * Gets potassium_application + * + * @return float + */ + public function getPotassiumApplication() + { + return $this->container['potassium_application']; + } + + /** + * Sets potassium_application + * + * @param float $potassium_application Potassium application, in kg K/ha (kilograms of potassium per hectare) + * + * @return self + */ + public function setPotassiumApplication($potassium_application) + { + if (is_null($potassium_application)) { + throw new \InvalidArgumentException('non-nullable potassium_application cannot be null'); + } + $this->container['potassium_application'] = $potassium_application; + + return $this; + } + + /** + * Gets sulfur_application + * + * @return float + */ + public function getSulfurApplication() + { + return $this->container['sulfur_application']; + } + + /** + * Sets sulfur_application + * + * @param float $sulfur_application Sulfur application, in kg S/ha (kilograms of sulfur per hectare) + * + * @return self + */ + public function setSulfurApplication($sulfur_application) + { + if (is_null($sulfur_application)) { + throw new \InvalidArgumentException('non-nullable sulfur_application cannot be null'); + } + $this->container['sulfur_application'] = $sulfur_application; + + return $this; + } + + /** + * Gets rainfall_above600 + * + * @return bool + */ + public function getRainfallAbove600() + { + return $this->container['rainfall_above600']; + } + + /** + * Sets rainfall_above600 + * + * @param bool $rainfall_above600 Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm + * + * @return self + */ + public function setRainfallAbove600($rainfall_above600) + { + if (is_null($rainfall_above600)) { + throw new \InvalidArgumentException('non-nullable rainfall_above600 cannot be null'); + } + $this->container['rainfall_above600'] = $rainfall_above600; + + return $this; + } + + /** + * Gets urease_inhibitor_used + * + * @return bool|null + * @deprecated + */ + public function getUreaseInhibitorUsed() + { + return $this->container['urease_inhibitor_used']; + } + + /** + * Sets urease_inhibitor_used + * + * @param bool|null $urease_inhibitor_used Urease inhibitor used. Deprecation note: No longer used (since v1.1.0) + * + * @return self + * @deprecated + */ + public function setUreaseInhibitorUsed($urease_inhibitor_used) + { + if (is_null($urease_inhibitor_used)) { + throw new \InvalidArgumentException('non-nullable urease_inhibitor_used cannot be null'); + } + $this->container['urease_inhibitor_used'] = $urease_inhibitor_used; + + return $this; + } + + /** + * Gets nitrification_inhibitor_used + * + * @return bool|null + * @deprecated + */ + public function getNitrificationInhibitorUsed() + { + return $this->container['nitrification_inhibitor_used']; + } + + /** + * Sets nitrification_inhibitor_used + * + * @param bool|null $nitrification_inhibitor_used Nitrification inhibitor used. Deprecation note: No longer used (since v1.1.0) + * + * @return self + * @deprecated + */ + public function setNitrificationInhibitorUsed($nitrification_inhibitor_used) + { + if (is_null($nitrification_inhibitor_used)) { + throw new \InvalidArgumentException('non-nullable nitrification_inhibitor_used cannot be null'); + } + $this->container['nitrification_inhibitor_used'] = $nitrification_inhibitor_used; + + return $this; + } + + /** + * Gets fraction_of_annual_crop_burnt + * + * @return float + */ + public function getFractionOfAnnualCropBurnt() + { + return $this->container['fraction_of_annual_crop_burnt']; + } + + /** + * Sets fraction_of_annual_crop_burnt + * + * @param float $fraction_of_annual_crop_burnt Fraction of annual production of crop that is burnt, from 0 to 1 + * + * @return self + */ + public function setFractionOfAnnualCropBurnt($fraction_of_annual_crop_burnt) + { + if (is_null($fraction_of_annual_crop_burnt)) { + throw new \InvalidArgumentException('non-nullable fraction_of_annual_crop_burnt cannot be null'); + } + $this->container['fraction_of_annual_crop_burnt'] = $fraction_of_annual_crop_burnt; + + return $this; + } + + /** + * Gets herbicide_use + * + * @return float + */ + public function getHerbicideUse() + { + return $this->container['herbicide_use']; + } + + /** + * Sets herbicide_use + * + * @param float $herbicide_use Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) + * + * @return self + */ + public function setHerbicideUse($herbicide_use) + { + if (is_null($herbicide_use)) { + throw new \InvalidArgumentException('non-nullable herbicide_use cannot be null'); + } + $this->container['herbicide_use'] = $herbicide_use; + + return $this; + } + + /** + * Gets glyphosate_other_herbicide_use + * + * @return float + */ + public function getGlyphosateOtherHerbicideUse() + { + return $this->container['glyphosate_other_herbicide_use']; + } + + /** + * Sets glyphosate_other_herbicide_use + * + * @param float $glyphosate_other_herbicide_use Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) + * + * @return self + */ + public function setGlyphosateOtherHerbicideUse($glyphosate_other_herbicide_use) + { + if (is_null($glyphosate_other_herbicide_use)) { + throw new \InvalidArgumentException('non-nullable glyphosate_other_herbicide_use cannot be null'); + } + $this->container['glyphosate_other_herbicide_use'] = $glyphosate_other_herbicide_use; + + return $this; + } + + /** + * Gets electricity_allocation + * + * @return float + */ + public function getElectricityAllocation() + { + return $this->container['electricity_allocation']; + } + + /** + * Sets electricity_allocation + * + * @param float $electricity_allocation Percentage of electricity use to allocate to this crop, from 0 to 1 + * + * @return self + */ + public function setElectricityAllocation($electricity_allocation) + { + if (is_null($electricity_allocation)) { + throw new \InvalidArgumentException('non-nullable electricity_allocation cannot be null'); + } + $this->container['electricity_allocation'] = $electricity_allocation; + + return $this; + } + + /** + * Gets limestone + * + * @return float + */ + public function getLimestone() + { + return $this->container['limestone']; + } + + /** + * Sets limestone + * + * @param float $limestone Lime applied in tonnes + * + * @return self + */ + public function setLimestone($limestone) + { + if (is_null($limestone)) { + throw new \InvalidArgumentException('non-nullable limestone cannot be null'); + } + $this->container['limestone'] = $limestone; + + return $this; + } + + /** + * Gets limestone_fraction + * + * @return float + */ + public function getLimestoneFraction() + { + return $this->container['limestone_fraction']; + } + + /** + * Sets limestone_fraction + * + * @param float $limestone_fraction Fraction of lime as limestone vs dolomite, between 0 and 1 + * + * @return self + */ + public function setLimestoneFraction($limestone_fraction) + { + if (is_null($limestone_fraction)) { + throw new \InvalidArgumentException('non-nullable limestone_fraction cannot be null'); + } + $this->container['limestone_fraction'] = $limestone_fraction; + + return $this; + } + + /** + * Gets diesel_use + * + * @return float + */ + public function getDieselUse() + { + return $this->container['diesel_use']; + } + + /** + * Sets diesel_use + * + * @param float $diesel_use Diesel usage in L (litres) + * + * @return self + */ + public function setDieselUse($diesel_use) + { + if (is_null($diesel_use)) { + throw new \InvalidArgumentException('non-nullable diesel_use cannot be null'); + } + $this->container['diesel_use'] = $diesel_use; + + return $this; + } + + /** + * Gets petrol_use + * + * @return float + */ + public function getPetrolUse() + { + return $this->container['petrol_use']; + } + + /** + * Sets petrol_use + * + * @param float $petrol_use Petrol usage in L (litres) + * + * @return self + */ + public function setPetrolUse($petrol_use) + { + if (is_null($petrol_use)) { + throw new \InvalidArgumentException('non-nullable petrol_use cannot be null'); + } + $this->container['petrol_use'] = $petrol_use; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + + /** + * Gets refrigerants + * + * @return \OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[] + */ + public function getRefrigerants() + { + return $this->container['refrigerants']; + } + + /** + * Sets refrigerants + * + * @param \OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[] $refrigerants refrigerants + * + * @return self + */ + public function setRefrigerants($refrigerants) + { + if (is_null($refrigerants)) { + throw new \InvalidArgumentException('non-nullable refrigerants cannot be null'); + } + $this->container['refrigerants'] = $refrigerants; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.php b/examples/php-api-client/api-client/lib/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.php new file mode 100644 index 00000000..c85344d3 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.php @@ -0,0 +1,666 @@ + + */ +class PostHorticultureRequestCropsInnerRefrigerantsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_horticulture_request_crops_inner_refrigerants_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'refrigerant' => 'string', + 'charge_size' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'refrigerant' => null, + 'charge_size' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'refrigerant' => false, + 'charge_size' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'refrigerant' => 'refrigerant', + 'charge_size' => 'chargeSize' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'refrigerant' => 'setRefrigerant', + 'charge_size' => 'setChargeSize' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'refrigerant' => 'getRefrigerant', + 'charge_size' => 'getChargeSize' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const REFRIGERANT_HFC_23 = 'HFC-23'; + public const REFRIGERANT_HFC_32 = 'HFC-32'; + public const REFRIGERANT_HFC_41 = 'HFC-41'; + public const REFRIGERANT_HFC_43_10MEE = 'HFC-43-10mee'; + public const REFRIGERANT_HFC_125 = 'HFC-125'; + public const REFRIGERANT_HFC_134 = 'HFC-134'; + public const REFRIGERANT_HFC_134A = 'HFC-134a'; + public const REFRIGERANT_HFC_143 = 'HFC-143'; + public const REFRIGERANT_HFC_143A = 'HFC-143a'; + public const REFRIGERANT_HFC_152A = 'HFC-152a'; + public const REFRIGERANT_HFC_227EA = 'HFC-227ea'; + public const REFRIGERANT_HFC_236FA = 'HFC-236fa'; + public const REFRIGERANT_HFC_245CA = 'HFC-245ca'; + public const REFRIGERANT_HFC_245FA = 'HFC-245fa'; + public const REFRIGERANT_HFC_365MFC = 'HFC-365mfc'; + public const REFRIGERANT_R438_A = 'R438A'; + public const REFRIGERANT_R448_A = 'R448A'; + public const REFRIGERANT_R_22 = 'R-22'; + public const REFRIGERANT_AMMONIA__R_717 = 'Ammonia (R-717)'; + public const REFRIGERANT_R_11 = 'R-11'; + public const REFRIGERANT_R_12 = 'R-12'; + public const REFRIGERANT_R_13 = 'R-13'; + public const REFRIGERANT_R_23 = 'R-23'; + public const REFRIGERANT_R_32 = 'R-32'; + public const REFRIGERANT_R_113 = 'R-113'; + public const REFRIGERANT_R_114 = 'R-114'; + public const REFRIGERANT_R_115 = 'R-115'; + public const REFRIGERANT_R_116 = 'R-116'; + public const REFRIGERANT_R_123 = 'R-123'; + public const REFRIGERANT_R_124 = 'R-124'; + public const REFRIGERANT_R_125 = 'R-125'; + public const REFRIGERANT_R_134A = 'R-134a'; + public const REFRIGERANT_R_141B = 'R-141b'; + public const REFRIGERANT_R_142B = 'R-142b'; + public const REFRIGERANT_R_143A = 'R-143a'; + public const REFRIGERANT_R_152A = 'R-152a'; + public const REFRIGERANT_R_218 = 'R-218'; + public const REFRIGERANT_R_227EA = 'R-227ea'; + public const REFRIGERANT_R_236FA = 'R-236fa'; + public const REFRIGERANT_R_245CA = 'R-245ca'; + public const REFRIGERANT_R_245FA = 'R-245fa'; + public const REFRIGERANT_R_C318 = 'R-C318'; + public const REFRIGERANT_R_401_A = 'R-401A'; + public const REFRIGERANT_R_401_B = 'R-401B'; + public const REFRIGERANT_R_401_C = 'R-401C'; + public const REFRIGERANT_R_402_A = 'R-402A'; + public const REFRIGERANT_R_402_B = 'R-402B'; + public const REFRIGERANT_R_403_A = 'R-403A'; + public const REFRIGERANT_R_403_B = 'R-403B'; + public const REFRIGERANT_R_404_A = 'R-404A'; + public const REFRIGERANT_R_405_A = 'R-405A'; + public const REFRIGERANT_R_406_A = 'R-406A'; + public const REFRIGERANT_R_407_A = 'R-407A'; + public const REFRIGERANT_R_407_B = 'R-407B'; + public const REFRIGERANT_R_407_C = 'R-407C'; + public const REFRIGERANT_R_407_D = 'R-407D'; + public const REFRIGERANT_R_407_E = 'R-407E'; + public const REFRIGERANT_R_408_A = 'R-408A'; + public const REFRIGERANT_R_409_A = 'R-409A'; + public const REFRIGERANT_R_409_B = 'R-409B'; + public const REFRIGERANT_R_410_A = 'R-410A'; + public const REFRIGERANT_R_411_A = 'R-411A'; + public const REFRIGERANT_R_411_B = 'R-411B'; + public const REFRIGERANT_R_412_A = 'R-412A'; + public const REFRIGERANT_R_413_A = 'R-413A'; + public const REFRIGERANT_R_414_A = 'R-414A'; + public const REFRIGERANT_R_414_B = 'R-414B'; + public const REFRIGERANT_R_415_A = 'R-415A'; + public const REFRIGERANT_R_415_B = 'R-415B'; + public const REFRIGERANT_R_416_A = 'R-416A'; + public const REFRIGERANT_R_417_A = 'R-417A'; + public const REFRIGERANT_R_418_A = 'R-418A'; + public const REFRIGERANT_R_419_A = 'R-419A'; + public const REFRIGERANT_R_420_A = 'R-420A'; + public const REFRIGERANT_R_421_A = 'R-421A'; + public const REFRIGERANT_R_421_B = 'R-421B'; + public const REFRIGERANT_R_422_A = 'R-422A'; + public const REFRIGERANT_R_422_B = 'R-422B'; + public const REFRIGERANT_R_422_C = 'R-422C'; + public const REFRIGERANT_R_422_D = 'R-422D'; + public const REFRIGERANT_R_423_A = 'R-423A'; + public const REFRIGERANT_R_424_A = 'R-424A'; + public const REFRIGERANT_R_425_A = 'R-425A'; + public const REFRIGERANT_R_426_A = 'R-426A'; + public const REFRIGERANT_R_427_A = 'R-427A'; + public const REFRIGERANT_R_428_A = 'R-428A'; + public const REFRIGERANT_R_500 = 'R-500'; + public const REFRIGERANT_R_502 = 'R-502'; + public const REFRIGERANT_R_503 = 'R-503'; + public const REFRIGERANT_R_507_A = 'R-507A'; + public const REFRIGERANT_R_508_A = 'R-508A'; + public const REFRIGERANT_R_508_B = 'R-508B'; + public const REFRIGERANT_R_509_A = 'R-509A'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRefrigerantAllowableValues() + { + return [ + self::REFRIGERANT_HFC_23, + self::REFRIGERANT_HFC_32, + self::REFRIGERANT_HFC_41, + self::REFRIGERANT_HFC_43_10MEE, + self::REFRIGERANT_HFC_125, + self::REFRIGERANT_HFC_134, + self::REFRIGERANT_HFC_134A, + self::REFRIGERANT_HFC_143, + self::REFRIGERANT_HFC_143A, + self::REFRIGERANT_HFC_152A, + self::REFRIGERANT_HFC_227EA, + self::REFRIGERANT_HFC_236FA, + self::REFRIGERANT_HFC_245CA, + self::REFRIGERANT_HFC_245FA, + self::REFRIGERANT_HFC_365MFC, + self::REFRIGERANT_R438_A, + self::REFRIGERANT_R448_A, + self::REFRIGERANT_R_22, + self::REFRIGERANT_AMMONIA__R_717, + self::REFRIGERANT_R_11, + self::REFRIGERANT_R_12, + self::REFRIGERANT_R_13, + self::REFRIGERANT_R_23, + self::REFRIGERANT_R_32, + self::REFRIGERANT_R_113, + self::REFRIGERANT_R_114, + self::REFRIGERANT_R_115, + self::REFRIGERANT_R_116, + self::REFRIGERANT_R_123, + self::REFRIGERANT_R_124, + self::REFRIGERANT_R_125, + self::REFRIGERANT_R_134A, + self::REFRIGERANT_R_141B, + self::REFRIGERANT_R_142B, + self::REFRIGERANT_R_143A, + self::REFRIGERANT_R_152A, + self::REFRIGERANT_R_218, + self::REFRIGERANT_R_227EA, + self::REFRIGERANT_R_236FA, + self::REFRIGERANT_R_245CA, + self::REFRIGERANT_R_245FA, + self::REFRIGERANT_R_C318, + self::REFRIGERANT_R_401_A, + self::REFRIGERANT_R_401_B, + self::REFRIGERANT_R_401_C, + self::REFRIGERANT_R_402_A, + self::REFRIGERANT_R_402_B, + self::REFRIGERANT_R_403_A, + self::REFRIGERANT_R_403_B, + self::REFRIGERANT_R_404_A, + self::REFRIGERANT_R_405_A, + self::REFRIGERANT_R_406_A, + self::REFRIGERANT_R_407_A, + self::REFRIGERANT_R_407_B, + self::REFRIGERANT_R_407_C, + self::REFRIGERANT_R_407_D, + self::REFRIGERANT_R_407_E, + self::REFRIGERANT_R_408_A, + self::REFRIGERANT_R_409_A, + self::REFRIGERANT_R_409_B, + self::REFRIGERANT_R_410_A, + self::REFRIGERANT_R_411_A, + self::REFRIGERANT_R_411_B, + self::REFRIGERANT_R_412_A, + self::REFRIGERANT_R_413_A, + self::REFRIGERANT_R_414_A, + self::REFRIGERANT_R_414_B, + self::REFRIGERANT_R_415_A, + self::REFRIGERANT_R_415_B, + self::REFRIGERANT_R_416_A, + self::REFRIGERANT_R_417_A, + self::REFRIGERANT_R_418_A, + self::REFRIGERANT_R_419_A, + self::REFRIGERANT_R_420_A, + self::REFRIGERANT_R_421_A, + self::REFRIGERANT_R_421_B, + self::REFRIGERANT_R_422_A, + self::REFRIGERANT_R_422_B, + self::REFRIGERANT_R_422_C, + self::REFRIGERANT_R_422_D, + self::REFRIGERANT_R_423_A, + self::REFRIGERANT_R_424_A, + self::REFRIGERANT_R_425_A, + self::REFRIGERANT_R_426_A, + self::REFRIGERANT_R_427_A, + self::REFRIGERANT_R_428_A, + self::REFRIGERANT_R_500, + self::REFRIGERANT_R_502, + self::REFRIGERANT_R_503, + self::REFRIGERANT_R_507_A, + self::REFRIGERANT_R_508_A, + self::REFRIGERANT_R_508_B, + self::REFRIGERANT_R_509_A, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('refrigerant', $data ?? [], null); + $this->setIfExists('charge_size', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['refrigerant'] === null) { + $invalidProperties[] = "'refrigerant' can't be null"; + } + $allowedValues = $this->getRefrigerantAllowableValues(); + if (!is_null($this->container['refrigerant']) && !in_array($this->container['refrigerant'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'refrigerant', must be one of '%s'", + $this->container['refrigerant'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['charge_size'] === null) { + $invalidProperties[] = "'charge_size' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets refrigerant + * + * @return string + */ + public function getRefrigerant() + { + return $this->container['refrigerant']; + } + + /** + * Sets refrigerant + * + * @param string $refrigerant Refrigerant type + * + * @return self + */ + public function setRefrigerant($refrigerant) + { + if (is_null($refrigerant)) { + throw new \InvalidArgumentException('non-nullable refrigerant cannot be null'); + } + $allowedValues = $this->getRefrigerantAllowableValues(); + if (!in_array($refrigerant, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'refrigerant', must be one of '%s'", + $refrigerant, + implode("', '", $allowedValues) + ) + ); + } + $this->container['refrigerant'] = $refrigerant; + + return $this; + } + + /** + * Gets charge_size + * + * @return float + */ + public function getChargeSize() + { + return $this->container['charge_size']; + } + + /** + * Sets charge_size + * + * @param float $charge_size Amount of refrigerant contained in the appliance, in kg + * + * @return self + */ + public function setChargeSize($charge_size) + { + if (is_null($charge_size)) { + throw new \InvalidArgumentException('non-nullable charge_size cannot be null'); + } + $this->container['charge_size'] = $charge_size; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPork200Response.php b/examples/php-api-client/api-client/lib/Model/PostPork200Response.php new file mode 100644 index 00000000..c2c1e850 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPork200Response.php @@ -0,0 +1,636 @@ + + */ +class PostPork200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostPork200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostPork200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'net' => '\OpenAPI\Client\Model\PostPork200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostPork200ResponseIntensities', + 'intermediate' => '\OpenAPI\Client\Model\PostPork200ResponseIntermediateInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'net' => null, + 'intensities' => null, + 'intermediate' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'net' => false, + 'intensities' => false, + 'intermediate' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'net' => 'net', + 'intensities' => 'intensities', + 'intermediate' => 'intermediate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'net' => 'setNet', + 'intensities' => 'setIntensities', + 'intermediate' => 'setIntermediate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'net' => 'getNet', + 'intensities' => 'getIntensities', + 'intermediate' => 'getIntermediate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostPork200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostPork200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostPork200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostPork200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostPork200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostPork200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostPork200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostPork200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostPork200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostPork200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPork200ResponseIntensities.php b/examples/php-api-client/api-client/lib/Model/PostPork200ResponseIntensities.php new file mode 100644 index 00000000..b5ddebce --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPork200ResponseIntensities.php @@ -0,0 +1,487 @@ + + */ +class PostPork200ResponseIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_200_response_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'pork_meat_including_sequestration' => 'float', + 'pork_meat_excluding_sequestration' => 'float', + 'liveweight_produced_kg' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'pork_meat_including_sequestration' => null, + 'pork_meat_excluding_sequestration' => null, + 'liveweight_produced_kg' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'pork_meat_including_sequestration' => false, + 'pork_meat_excluding_sequestration' => false, + 'liveweight_produced_kg' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'pork_meat_including_sequestration' => 'porkMeatIncludingSequestration', + 'pork_meat_excluding_sequestration' => 'porkMeatExcludingSequestration', + 'liveweight_produced_kg' => 'liveweightProducedKg' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'pork_meat_including_sequestration' => 'setPorkMeatIncludingSequestration', + 'pork_meat_excluding_sequestration' => 'setPorkMeatExcludingSequestration', + 'liveweight_produced_kg' => 'setLiveweightProducedKg' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'pork_meat_including_sequestration' => 'getPorkMeatIncludingSequestration', + 'pork_meat_excluding_sequestration' => 'getPorkMeatExcludingSequestration', + 'liveweight_produced_kg' => 'getLiveweightProducedKg' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('pork_meat_including_sequestration', $data ?? [], null); + $this->setIfExists('pork_meat_excluding_sequestration', $data ?? [], null); + $this->setIfExists('liveweight_produced_kg', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['pork_meat_including_sequestration'] === null) { + $invalidProperties[] = "'pork_meat_including_sequestration' can't be null"; + } + if ($this->container['pork_meat_excluding_sequestration'] === null) { + $invalidProperties[] = "'pork_meat_excluding_sequestration' can't be null"; + } + if ($this->container['liveweight_produced_kg'] === null) { + $invalidProperties[] = "'liveweight_produced_kg' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets pork_meat_including_sequestration + * + * @return float + */ + public function getPorkMeatIncludingSequestration() + { + return $this->container['pork_meat_including_sequestration']; + } + + /** + * Sets pork_meat_including_sequestration + * + * @param float $pork_meat_including_sequestration Pork meat including carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setPorkMeatIncludingSequestration($pork_meat_including_sequestration) + { + if (is_null($pork_meat_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable pork_meat_including_sequestration cannot be null'); + } + $this->container['pork_meat_including_sequestration'] = $pork_meat_including_sequestration; + + return $this; + } + + /** + * Gets pork_meat_excluding_sequestration + * + * @return float + */ + public function getPorkMeatExcludingSequestration() + { + return $this->container['pork_meat_excluding_sequestration']; + } + + /** + * Sets pork_meat_excluding_sequestration + * + * @param float $pork_meat_excluding_sequestration Pork meat excluding carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setPorkMeatExcludingSequestration($pork_meat_excluding_sequestration) + { + if (is_null($pork_meat_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable pork_meat_excluding_sequestration cannot be null'); + } + $this->container['pork_meat_excluding_sequestration'] = $pork_meat_excluding_sequestration; + + return $this; + } + + /** + * Gets liveweight_produced_kg + * + * @return float + */ + public function getLiveweightProducedKg() + { + return $this->container['liveweight_produced_kg']; + } + + /** + * Sets liveweight_produced_kg + * + * @param float $liveweight_produced_kg Pork meat produced in kg liveweight + * + * @return self + */ + public function setLiveweightProducedKg($liveweight_produced_kg) + { + if (is_null($liveweight_produced_kg)) { + throw new \InvalidArgumentException('non-nullable liveweight_produced_kg cannot be null'); + } + $this->container['liveweight_produced_kg'] = $liveweight_produced_kg; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPork200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostPork200ResponseIntermediateInner.php new file mode 100644 index 00000000..4df426bb --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPork200ResponseIntermediateInner.php @@ -0,0 +1,635 @@ + + */ +class PostPork200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostPork200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostPork200ResponseScope3', + 'carbon_sequestration' => 'float', + 'net' => '\OpenAPI\Client\Model\PostPork200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostPork200ResponseIntensities' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostPork200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostPork200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostPork200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostPork200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return float + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param float $carbon_sequestration Carbon sequestration, in tonnes-CO2e + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostPork200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostPork200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostPork200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostPork200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPork200ResponseNet.php b/examples/php-api-client/api-client/lib/Model/PostPork200ResponseNet.php new file mode 100644 index 00000000..d4383217 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPork200ResponseNet.php @@ -0,0 +1,414 @@ + + */ +class PostPork200ResponseNet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_200_response_net'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total total + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPork200ResponseScope1.php b/examples/php-api-client/api-client/lib/Model/PostPork200ResponseScope1.php new file mode 100644 index 00000000..062f3837 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPork200ResponseScope1.php @@ -0,0 +1,1006 @@ + + */ +class PostPork200ResponseScope1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_200_response_scope1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel_co2' => 'float', + 'fuel_ch4' => 'float', + 'fuel_n2_o' => 'float', + 'urea_co2' => 'float', + 'lime_co2' => 'float', + 'fertiliser_n2_o' => 'float', + 'enteric_ch4' => 'float', + 'manure_management_ch4' => 'float', + 'manure_management_direct_n2_o' => 'float', + 'atmospheric_deposition_n2_o' => 'float', + 'atmospheric_deposition_indirect_n2_o' => 'float', + 'leaching_and_runoff_soil_n2_o' => 'float', + 'leaching_and_runoff_mmsn2_o' => 'float', + 'total_co2' => 'float', + 'total_ch4' => 'float', + 'total_n2_o' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel_co2' => null, + 'fuel_ch4' => null, + 'fuel_n2_o' => null, + 'urea_co2' => null, + 'lime_co2' => null, + 'fertiliser_n2_o' => null, + 'enteric_ch4' => null, + 'manure_management_ch4' => null, + 'manure_management_direct_n2_o' => null, + 'atmospheric_deposition_n2_o' => null, + 'atmospheric_deposition_indirect_n2_o' => null, + 'leaching_and_runoff_soil_n2_o' => null, + 'leaching_and_runoff_mmsn2_o' => null, + 'total_co2' => null, + 'total_ch4' => null, + 'total_n2_o' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel_co2' => false, + 'fuel_ch4' => false, + 'fuel_n2_o' => false, + 'urea_co2' => false, + 'lime_co2' => false, + 'fertiliser_n2_o' => false, + 'enteric_ch4' => false, + 'manure_management_ch4' => false, + 'manure_management_direct_n2_o' => false, + 'atmospheric_deposition_n2_o' => false, + 'atmospheric_deposition_indirect_n2_o' => false, + 'leaching_and_runoff_soil_n2_o' => false, + 'leaching_and_runoff_mmsn2_o' => false, + 'total_co2' => false, + 'total_ch4' => false, + 'total_n2_o' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel_co2' => 'fuelCO2', + 'fuel_ch4' => 'fuelCH4', + 'fuel_n2_o' => 'fuelN2O', + 'urea_co2' => 'ureaCO2', + 'lime_co2' => 'limeCO2', + 'fertiliser_n2_o' => 'fertiliserN2O', + 'enteric_ch4' => 'entericCH4', + 'manure_management_ch4' => 'manureManagementCH4', + 'manure_management_direct_n2_o' => 'manureManagementDirectN2O', + 'atmospheric_deposition_n2_o' => 'atmosphericDepositionN2O', + 'atmospheric_deposition_indirect_n2_o' => 'atmosphericDepositionIndirectN2O', + 'leaching_and_runoff_soil_n2_o' => 'leachingAndRunoffSoilN2O', + 'leaching_and_runoff_mmsn2_o' => 'leachingAndRunoffMMSN2O', + 'total_co2' => 'totalCO2', + 'total_ch4' => 'totalCH4', + 'total_n2_o' => 'totalN2O', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel_co2' => 'setFuelCo2', + 'fuel_ch4' => 'setFuelCh4', + 'fuel_n2_o' => 'setFuelN2O', + 'urea_co2' => 'setUreaCo2', + 'lime_co2' => 'setLimeCo2', + 'fertiliser_n2_o' => 'setFertiliserN2O', + 'enteric_ch4' => 'setEntericCh4', + 'manure_management_ch4' => 'setManureManagementCh4', + 'manure_management_direct_n2_o' => 'setManureManagementDirectN2O', + 'atmospheric_deposition_n2_o' => 'setAtmosphericDepositionN2O', + 'atmospheric_deposition_indirect_n2_o' => 'setAtmosphericDepositionIndirectN2O', + 'leaching_and_runoff_soil_n2_o' => 'setLeachingAndRunoffSoilN2O', + 'leaching_and_runoff_mmsn2_o' => 'setLeachingAndRunoffMmsn2O', + 'total_co2' => 'setTotalCo2', + 'total_ch4' => 'setTotalCh4', + 'total_n2_o' => 'setTotalN2O', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel_co2' => 'getFuelCo2', + 'fuel_ch4' => 'getFuelCh4', + 'fuel_n2_o' => 'getFuelN2O', + 'urea_co2' => 'getUreaCo2', + 'lime_co2' => 'getLimeCo2', + 'fertiliser_n2_o' => 'getFertiliserN2O', + 'enteric_ch4' => 'getEntericCh4', + 'manure_management_ch4' => 'getManureManagementCh4', + 'manure_management_direct_n2_o' => 'getManureManagementDirectN2O', + 'atmospheric_deposition_n2_o' => 'getAtmosphericDepositionN2O', + 'atmospheric_deposition_indirect_n2_o' => 'getAtmosphericDepositionIndirectN2O', + 'leaching_and_runoff_soil_n2_o' => 'getLeachingAndRunoffSoilN2O', + 'leaching_and_runoff_mmsn2_o' => 'getLeachingAndRunoffMmsn2O', + 'total_co2' => 'getTotalCo2', + 'total_ch4' => 'getTotalCh4', + 'total_n2_o' => 'getTotalN2O', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel_co2', $data ?? [], null); + $this->setIfExists('fuel_ch4', $data ?? [], null); + $this->setIfExists('fuel_n2_o', $data ?? [], null); + $this->setIfExists('urea_co2', $data ?? [], null); + $this->setIfExists('lime_co2', $data ?? [], null); + $this->setIfExists('fertiliser_n2_o', $data ?? [], null); + $this->setIfExists('enteric_ch4', $data ?? [], null); + $this->setIfExists('manure_management_ch4', $data ?? [], null); + $this->setIfExists('manure_management_direct_n2_o', $data ?? [], null); + $this->setIfExists('atmospheric_deposition_n2_o', $data ?? [], null); + $this->setIfExists('atmospheric_deposition_indirect_n2_o', $data ?? [], null); + $this->setIfExists('leaching_and_runoff_soil_n2_o', $data ?? [], null); + $this->setIfExists('leaching_and_runoff_mmsn2_o', $data ?? [], null); + $this->setIfExists('total_co2', $data ?? [], null); + $this->setIfExists('total_ch4', $data ?? [], null); + $this->setIfExists('total_n2_o', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel_co2'] === null) { + $invalidProperties[] = "'fuel_co2' can't be null"; + } + if ($this->container['fuel_ch4'] === null) { + $invalidProperties[] = "'fuel_ch4' can't be null"; + } + if ($this->container['fuel_n2_o'] === null) { + $invalidProperties[] = "'fuel_n2_o' can't be null"; + } + if ($this->container['urea_co2'] === null) { + $invalidProperties[] = "'urea_co2' can't be null"; + } + if ($this->container['lime_co2'] === null) { + $invalidProperties[] = "'lime_co2' can't be null"; + } + if ($this->container['fertiliser_n2_o'] === null) { + $invalidProperties[] = "'fertiliser_n2_o' can't be null"; + } + if ($this->container['enteric_ch4'] === null) { + $invalidProperties[] = "'enteric_ch4' can't be null"; + } + if ($this->container['manure_management_ch4'] === null) { + $invalidProperties[] = "'manure_management_ch4' can't be null"; + } + if ($this->container['manure_management_direct_n2_o'] === null) { + $invalidProperties[] = "'manure_management_direct_n2_o' can't be null"; + } + if ($this->container['atmospheric_deposition_n2_o'] === null) { + $invalidProperties[] = "'atmospheric_deposition_n2_o' can't be null"; + } + if ($this->container['atmospheric_deposition_indirect_n2_o'] === null) { + $invalidProperties[] = "'atmospheric_deposition_indirect_n2_o' can't be null"; + } + if ($this->container['leaching_and_runoff_soil_n2_o'] === null) { + $invalidProperties[] = "'leaching_and_runoff_soil_n2_o' can't be null"; + } + if ($this->container['leaching_and_runoff_mmsn2_o'] === null) { + $invalidProperties[] = "'leaching_and_runoff_mmsn2_o' can't be null"; + } + if ($this->container['total_co2'] === null) { + $invalidProperties[] = "'total_co2' can't be null"; + } + if ($this->container['total_ch4'] === null) { + $invalidProperties[] = "'total_ch4' can't be null"; + } + if ($this->container['total_n2_o'] === null) { + $invalidProperties[] = "'total_n2_o' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel_co2 + * + * @return float + */ + public function getFuelCo2() + { + return $this->container['fuel_co2']; + } + + /** + * Sets fuel_co2 + * + * @param float $fuel_co2 CO2 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCo2($fuel_co2) + { + if (is_null($fuel_co2)) { + throw new \InvalidArgumentException('non-nullable fuel_co2 cannot be null'); + } + $this->container['fuel_co2'] = $fuel_co2; + + return $this; + } + + /** + * Gets fuel_ch4 + * + * @return float + */ + public function getFuelCh4() + { + return $this->container['fuel_ch4']; + } + + /** + * Sets fuel_ch4 + * + * @param float $fuel_ch4 CH4 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCh4($fuel_ch4) + { + if (is_null($fuel_ch4)) { + throw new \InvalidArgumentException('non-nullable fuel_ch4 cannot be null'); + } + $this->container['fuel_ch4'] = $fuel_ch4; + + return $this; + } + + /** + * Gets fuel_n2_o + * + * @return float + */ + public function getFuelN2O() + { + return $this->container['fuel_n2_o']; + } + + /** + * Sets fuel_n2_o + * + * @param float $fuel_n2_o N2O emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelN2O($fuel_n2_o) + { + if (is_null($fuel_n2_o)) { + throw new \InvalidArgumentException('non-nullable fuel_n2_o cannot be null'); + } + $this->container['fuel_n2_o'] = $fuel_n2_o; + + return $this; + } + + /** + * Gets urea_co2 + * + * @return float + */ + public function getUreaCo2() + { + return $this->container['urea_co2']; + } + + /** + * Sets urea_co2 + * + * @param float $urea_co2 CO2 emissions from urea, in tonnes-CO2e + * + * @return self + */ + public function setUreaCo2($urea_co2) + { + if (is_null($urea_co2)) { + throw new \InvalidArgumentException('non-nullable urea_co2 cannot be null'); + } + $this->container['urea_co2'] = $urea_co2; + + return $this; + } + + /** + * Gets lime_co2 + * + * @return float + */ + public function getLimeCo2() + { + return $this->container['lime_co2']; + } + + /** + * Sets lime_co2 + * + * @param float $lime_co2 CO2 emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLimeCo2($lime_co2) + { + if (is_null($lime_co2)) { + throw new \InvalidArgumentException('non-nullable lime_co2 cannot be null'); + } + $this->container['lime_co2'] = $lime_co2; + + return $this; + } + + /** + * Gets fertiliser_n2_o + * + * @return float + */ + public function getFertiliserN2O() + { + return $this->container['fertiliser_n2_o']; + } + + /** + * Sets fertiliser_n2_o + * + * @param float $fertiliser_n2_o N2O emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliserN2O($fertiliser_n2_o) + { + if (is_null($fertiliser_n2_o)) { + throw new \InvalidArgumentException('non-nullable fertiliser_n2_o cannot be null'); + } + $this->container['fertiliser_n2_o'] = $fertiliser_n2_o; + + return $this; + } + + /** + * Gets enteric_ch4 + * + * @return float + */ + public function getEntericCh4() + { + return $this->container['enteric_ch4']; + } + + /** + * Sets enteric_ch4 + * + * @param float $enteric_ch4 CH4 emissions from enteric fermentation, in tonnes-CO2e + * + * @return self + */ + public function setEntericCh4($enteric_ch4) + { + if (is_null($enteric_ch4)) { + throw new \InvalidArgumentException('non-nullable enteric_ch4 cannot be null'); + } + $this->container['enteric_ch4'] = $enteric_ch4; + + return $this; + } + + /** + * Gets manure_management_ch4 + * + * @return float + */ + public function getManureManagementCh4() + { + return $this->container['manure_management_ch4']; + } + + /** + * Sets manure_management_ch4 + * + * @param float $manure_management_ch4 CH4 emissions from manure management, in tonnes-CO2e + * + * @return self + */ + public function setManureManagementCh4($manure_management_ch4) + { + if (is_null($manure_management_ch4)) { + throw new \InvalidArgumentException('non-nullable manure_management_ch4 cannot be null'); + } + $this->container['manure_management_ch4'] = $manure_management_ch4; + + return $this; + } + + /** + * Gets manure_management_direct_n2_o + * + * @return float + */ + public function getManureManagementDirectN2O() + { + return $this->container['manure_management_direct_n2_o']; + } + + /** + * Sets manure_management_direct_n2_o + * + * @param float $manure_management_direct_n2_o CH4 emissions from manure management (direct), in tonnes-CO2e + * + * @return self + */ + public function setManureManagementDirectN2O($manure_management_direct_n2_o) + { + if (is_null($manure_management_direct_n2_o)) { + throw new \InvalidArgumentException('non-nullable manure_management_direct_n2_o cannot be null'); + } + $this->container['manure_management_direct_n2_o'] = $manure_management_direct_n2_o; + + return $this; + } + + /** + * Gets atmospheric_deposition_n2_o + * + * @return float + */ + public function getAtmosphericDepositionN2O() + { + return $this->container['atmospheric_deposition_n2_o']; + } + + /** + * Sets atmospheric_deposition_n2_o + * + * @param float $atmospheric_deposition_n2_o N2O emissions from atmospheric deposition, in tonnes-CO2e + * + * @return self + */ + public function setAtmosphericDepositionN2O($atmospheric_deposition_n2_o) + { + if (is_null($atmospheric_deposition_n2_o)) { + throw new \InvalidArgumentException('non-nullable atmospheric_deposition_n2_o cannot be null'); + } + $this->container['atmospheric_deposition_n2_o'] = $atmospheric_deposition_n2_o; + + return $this; + } + + /** + * Gets atmospheric_deposition_indirect_n2_o + * + * @return float + */ + public function getAtmosphericDepositionIndirectN2O() + { + return $this->container['atmospheric_deposition_indirect_n2_o']; + } + + /** + * Sets atmospheric_deposition_indirect_n2_o + * + * @param float $atmospheric_deposition_indirect_n2_o N2O emissions from atmospheric deposition indirect, in tonnes-CO2e + * + * @return self + */ + public function setAtmosphericDepositionIndirectN2O($atmospheric_deposition_indirect_n2_o) + { + if (is_null($atmospheric_deposition_indirect_n2_o)) { + throw new \InvalidArgumentException('non-nullable atmospheric_deposition_indirect_n2_o cannot be null'); + } + $this->container['atmospheric_deposition_indirect_n2_o'] = $atmospheric_deposition_indirect_n2_o; + + return $this; + } + + /** + * Gets leaching_and_runoff_soil_n2_o + * + * @return float + */ + public function getLeachingAndRunoffSoilN2O() + { + return $this->container['leaching_and_runoff_soil_n2_o']; + } + + /** + * Sets leaching_and_runoff_soil_n2_o + * + * @param float $leaching_and_runoff_soil_n2_o N2O emissions from leeching and runoff, in tonnes-CO2e + * + * @return self + */ + public function setLeachingAndRunoffSoilN2O($leaching_and_runoff_soil_n2_o) + { + if (is_null($leaching_and_runoff_soil_n2_o)) { + throw new \InvalidArgumentException('non-nullable leaching_and_runoff_soil_n2_o cannot be null'); + } + $this->container['leaching_and_runoff_soil_n2_o'] = $leaching_and_runoff_soil_n2_o; + + return $this; + } + + /** + * Gets leaching_and_runoff_mmsn2_o + * + * @return float + */ + public function getLeachingAndRunoffMmsn2O() + { + return $this->container['leaching_and_runoff_mmsn2_o']; + } + + /** + * Sets leaching_and_runoff_mmsn2_o + * + * @param float $leaching_and_runoff_mmsn2_o N2O emissions from leeching and runoff, in tonnes-CO2e + * + * @return self + */ + public function setLeachingAndRunoffMmsn2O($leaching_and_runoff_mmsn2_o) + { + if (is_null($leaching_and_runoff_mmsn2_o)) { + throw new \InvalidArgumentException('non-nullable leaching_and_runoff_mmsn2_o cannot be null'); + } + $this->container['leaching_and_runoff_mmsn2_o'] = $leaching_and_runoff_mmsn2_o; + + return $this; + } + + /** + * Gets total_co2 + * + * @return float + */ + public function getTotalCo2() + { + return $this->container['total_co2']; + } + + /** + * Sets total_co2 + * + * @param float $total_co2 Total CO2 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCo2($total_co2) + { + if (is_null($total_co2)) { + throw new \InvalidArgumentException('non-nullable total_co2 cannot be null'); + } + $this->container['total_co2'] = $total_co2; + + return $this; + } + + /** + * Gets total_ch4 + * + * @return float + */ + public function getTotalCh4() + { + return $this->container['total_ch4']; + } + + /** + * Sets total_ch4 + * + * @param float $total_ch4 Total CH4 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCh4($total_ch4) + { + if (is_null($total_ch4)) { + throw new \InvalidArgumentException('non-nullable total_ch4 cannot be null'); + } + $this->container['total_ch4'] = $total_ch4; + + return $this; + } + + /** + * Gets total_n2_o + * + * @return float + */ + public function getTotalN2O() + { + return $this->container['total_n2_o']; + } + + /** + * Sets total_n2_o + * + * @param float $total_n2_o Total N2O scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalN2O($total_n2_o) + { + if (is_null($total_n2_o)) { + throw new \InvalidArgumentException('non-nullable total_n2_o cannot be null'); + } + $this->container['total_n2_o'] = $total_n2_o; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPork200ResponseScope3.php b/examples/php-api-client/api-client/lib/Model/PostPork200ResponseScope3.php new file mode 100644 index 00000000..43b55b71 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPork200ResponseScope3.php @@ -0,0 +1,710 @@ + + */ +class PostPork200ResponseScope3 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_200_response_scope3'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fertiliser' => 'float', + 'purchased_feed' => 'float', + 'herbicide' => 'float', + 'electricity' => 'float', + 'fuel' => 'float', + 'lime' => 'float', + 'purchased_livestock' => 'float', + 'bedding' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fertiliser' => null, + 'purchased_feed' => null, + 'herbicide' => null, + 'electricity' => null, + 'fuel' => null, + 'lime' => null, + 'purchased_livestock' => null, + 'bedding' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fertiliser' => false, + 'purchased_feed' => false, + 'herbicide' => false, + 'electricity' => false, + 'fuel' => false, + 'lime' => false, + 'purchased_livestock' => false, + 'bedding' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fertiliser' => 'fertiliser', + 'purchased_feed' => 'purchasedFeed', + 'herbicide' => 'herbicide', + 'electricity' => 'electricity', + 'fuel' => 'fuel', + 'lime' => 'lime', + 'purchased_livestock' => 'purchasedLivestock', + 'bedding' => 'bedding', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fertiliser' => 'setFertiliser', + 'purchased_feed' => 'setPurchasedFeed', + 'herbicide' => 'setHerbicide', + 'electricity' => 'setElectricity', + 'fuel' => 'setFuel', + 'lime' => 'setLime', + 'purchased_livestock' => 'setPurchasedLivestock', + 'bedding' => 'setBedding', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fertiliser' => 'getFertiliser', + 'purchased_feed' => 'getPurchasedFeed', + 'herbicide' => 'getHerbicide', + 'electricity' => 'getElectricity', + 'fuel' => 'getFuel', + 'lime' => 'getLime', + 'purchased_livestock' => 'getPurchasedLivestock', + 'bedding' => 'getBedding', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('purchased_feed', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('electricity', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('lime', $data ?? [], null); + $this->setIfExists('purchased_livestock', $data ?? [], null); + $this->setIfExists('bedding', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['purchased_feed'] === null) { + $invalidProperties[] = "'purchased_feed' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['electricity'] === null) { + $invalidProperties[] = "'electricity' can't be null"; + } + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['lime'] === null) { + $invalidProperties[] = "'lime' can't be null"; + } + if ($this->container['purchased_livestock'] === null) { + $invalidProperties[] = "'purchased_livestock' can't be null"; + } + if ($this->container['bedding'] === null) { + $invalidProperties[] = "'bedding' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fertiliser + * + * @return float + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param float $fertiliser Emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets purchased_feed + * + * @return float + */ + public function getPurchasedFeed() + { + return $this->container['purchased_feed']; + } + + /** + * Sets purchased_feed + * + * @param float $purchased_feed Emissions from purchased feed, in tonnes-CO2e + * + * @return self + */ + public function setPurchasedFeed($purchased_feed) + { + if (is_null($purchased_feed)) { + throw new \InvalidArgumentException('non-nullable purchased_feed cannot be null'); + } + $this->container['purchased_feed'] = $purchased_feed; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Emissions from herbicide, in tonnes-CO2e + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets electricity + * + * @return float + */ + public function getElectricity() + { + return $this->container['electricity']; + } + + /** + * Sets electricity + * + * @param float $electricity Emissions from electricity, in tonnes-CO2e + * + * @return self + */ + public function setElectricity($electricity) + { + if (is_null($electricity)) { + throw new \InvalidArgumentException('non-nullable electricity cannot be null'); + } + $this->container['electricity'] = $electricity; + + return $this; + } + + /** + * Gets fuel + * + * @return float + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param float $fuel Emissions from fuel, in tonnes-CO2e + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets lime + * + * @return float + */ + public function getLime() + { + return $this->container['lime']; + } + + /** + * Sets lime + * + * @param float $lime Emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLime($lime) + { + if (is_null($lime)) { + throw new \InvalidArgumentException('non-nullable lime cannot be null'); + } + $this->container['lime'] = $lime; + + return $this; + } + + /** + * Gets purchased_livestock + * + * @return float + */ + public function getPurchasedLivestock() + { + return $this->container['purchased_livestock']; + } + + /** + * Sets purchased_livestock + * + * @param float $purchased_livestock Emissions from purchased pigs, in tonnes-CO2e + * + * @return self + */ + public function setPurchasedLivestock($purchased_livestock) + { + if (is_null($purchased_livestock)) { + throw new \InvalidArgumentException('non-nullable purchased_livestock cannot be null'); + } + $this->container['purchased_livestock'] = $purchased_livestock; + + return $this; + } + + /** + * Gets bedding + * + * @return float + */ + public function getBedding() + { + return $this->container['bedding']; + } + + /** + * Sets bedding + * + * @param float $bedding Emissions from purchased bedding, in tonnes-CO2e + * + * @return self + */ + public function setBedding($bedding) + { + if (is_null($bedding)) { + throw new \InvalidArgumentException('non-nullable bedding cannot be null'); + } + $this->container['bedding'] = $bedding; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 3 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequest.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequest.php new file mode 100644 index 00000000..9a6d4965 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequest.php @@ -0,0 +1,612 @@ + + */ +class PostPorkRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'north_of_tropic_of_capricorn' => 'bool', + 'rainfall_above600' => 'bool', + 'pork' => '\OpenAPI\Client\Model\PostPorkRequestPorkInner[]', + 'vegetation' => '\OpenAPI\Client\Model\PostPorkRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'north_of_tropic_of_capricorn' => null, + 'rainfall_above600' => null, + 'pork' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'north_of_tropic_of_capricorn' => false, + 'rainfall_above600' => false, + 'pork' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'north_of_tropic_of_capricorn' => 'northOfTropicOfCapricorn', + 'rainfall_above600' => 'rainfallAbove600', + 'pork' => 'pork', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'north_of_tropic_of_capricorn' => 'setNorthOfTropicOfCapricorn', + 'rainfall_above600' => 'setRainfallAbove600', + 'pork' => 'setPork', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'north_of_tropic_of_capricorn' => 'getNorthOfTropicOfCapricorn', + 'rainfall_above600' => 'getRainfallAbove600', + 'pork' => 'getPork', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('north_of_tropic_of_capricorn', $data ?? [], null); + $this->setIfExists('rainfall_above600', $data ?? [], null); + $this->setIfExists('pork', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['north_of_tropic_of_capricorn'] === null) { + $invalidProperties[] = "'north_of_tropic_of_capricorn' can't be null"; + } + if ($this->container['rainfall_above600'] === null) { + $invalidProperties[] = "'rainfall_above600' can't be null"; + } + if ($this->container['pork'] === null) { + $invalidProperties[] = "'pork' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets north_of_tropic_of_capricorn + * + * @return bool + * @deprecated + */ + public function getNorthOfTropicOfCapricorn() + { + return $this->container['north_of_tropic_of_capricorn']; + } + + /** + * Sets north_of_tropic_of_capricorn + * + * @param bool $north_of_tropic_of_capricorn Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude. Deprecation note: This field is deprecated + * + * @return self + * @deprecated + */ + public function setNorthOfTropicOfCapricorn($north_of_tropic_of_capricorn) + { + if (is_null($north_of_tropic_of_capricorn)) { + throw new \InvalidArgumentException('non-nullable north_of_tropic_of_capricorn cannot be null'); + } + $this->container['north_of_tropic_of_capricorn'] = $north_of_tropic_of_capricorn; + + return $this; + } + + /** + * Gets rainfall_above600 + * + * @return bool + */ + public function getRainfallAbove600() + { + return $this->container['rainfall_above600']; + } + + /** + * Sets rainfall_above600 + * + * @param bool $rainfall_above600 Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm + * + * @return self + */ + public function setRainfallAbove600($rainfall_above600) + { + if (is_null($rainfall_above600)) { + throw new \InvalidArgumentException('non-nullable rainfall_above600 cannot be null'); + } + $this->container['rainfall_above600'] = $rainfall_above600; + + return $this; + } + + /** + * Gets pork + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInner[] + */ + public function getPork() + { + return $this->container['pork']; + } + + /** + * Sets pork + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInner[] $pork pork + * + * @return self + */ + public function setPork($pork) + { + if (is_null($pork)) { + throw new \InvalidArgumentException('non-nullable pork cannot be null'); + } + $this->container['pork'] = $pork; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostPorkRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostPorkRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInner.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInner.php new file mode 100644 index 00000000..588d06b6 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInner.php @@ -0,0 +1,978 @@ + + */ +class PostPorkRequestPorkInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request_pork_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'classes' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClasses', + 'limestone' => 'float', + 'limestone_fraction' => 'float', + 'fertiliser' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser', + 'diesel' => 'float', + 'petrol' => 'float', + 'lpg' => 'float', + 'electricity_source' => 'string', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'herbicide' => 'float', + 'herbicide_other' => 'float', + 'bedding_hay_barley_straw' => 'float', + 'feed_products' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerFeedProductsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'classes' => null, + 'limestone' => null, + 'limestone_fraction' => null, + 'fertiliser' => null, + 'diesel' => null, + 'petrol' => null, + 'lpg' => null, + 'electricity_source' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'herbicide' => null, + 'herbicide_other' => null, + 'bedding_hay_barley_straw' => null, + 'feed_products' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'classes' => false, + 'limestone' => false, + 'limestone_fraction' => false, + 'fertiliser' => false, + 'diesel' => false, + 'petrol' => false, + 'lpg' => false, + 'electricity_source' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'herbicide' => false, + 'herbicide_other' => false, + 'bedding_hay_barley_straw' => false, + 'feed_products' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'classes' => 'classes', + 'limestone' => 'limestone', + 'limestone_fraction' => 'limestoneFraction', + 'fertiliser' => 'fertiliser', + 'diesel' => 'diesel', + 'petrol' => 'petrol', + 'lpg' => 'lpg', + 'electricity_source' => 'electricitySource', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'herbicide' => 'herbicide', + 'herbicide_other' => 'herbicideOther', + 'bedding_hay_barley_straw' => 'beddingHayBarleyStraw', + 'feed_products' => 'feedProducts' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'classes' => 'setClasses', + 'limestone' => 'setLimestone', + 'limestone_fraction' => 'setLimestoneFraction', + 'fertiliser' => 'setFertiliser', + 'diesel' => 'setDiesel', + 'petrol' => 'setPetrol', + 'lpg' => 'setLpg', + 'electricity_source' => 'setElectricitySource', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'herbicide' => 'setHerbicide', + 'herbicide_other' => 'setHerbicideOther', + 'bedding_hay_barley_straw' => 'setBeddingHayBarleyStraw', + 'feed_products' => 'setFeedProducts' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'classes' => 'getClasses', + 'limestone' => 'getLimestone', + 'limestone_fraction' => 'getLimestoneFraction', + 'fertiliser' => 'getFertiliser', + 'diesel' => 'getDiesel', + 'petrol' => 'getPetrol', + 'lpg' => 'getLpg', + 'electricity_source' => 'getElectricitySource', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'herbicide' => 'getHerbicide', + 'herbicide_other' => 'getHerbicideOther', + 'bedding_hay_barley_straw' => 'getBeddingHayBarleyStraw', + 'feed_products' => 'getFeedProducts' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const ELECTRICITY_SOURCE_STATE_GRID = 'State Grid'; + public const ELECTRICITY_SOURCE_RENEWABLE = 'Renewable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getElectricitySourceAllowableValues() + { + return [ + self::ELECTRICITY_SOURCE_STATE_GRID, + self::ELECTRICITY_SOURCE_RENEWABLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('classes', $data ?? [], null); + $this->setIfExists('limestone', $data ?? [], null); + $this->setIfExists('limestone_fraction', $data ?? [], null); + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('diesel', $data ?? [], null); + $this->setIfExists('petrol', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + $this->setIfExists('electricity_source', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('herbicide_other', $data ?? [], null); + $this->setIfExists('bedding_hay_barley_straw', $data ?? [], null); + $this->setIfExists('feed_products', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['classes'] === null) { + $invalidProperties[] = "'classes' can't be null"; + } + if ($this->container['limestone'] === null) { + $invalidProperties[] = "'limestone' can't be null"; + } + if ($this->container['limestone_fraction'] === null) { + $invalidProperties[] = "'limestone_fraction' can't be null"; + } + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['diesel'] === null) { + $invalidProperties[] = "'diesel' can't be null"; + } + if ($this->container['petrol'] === null) { + $invalidProperties[] = "'petrol' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + if ($this->container['electricity_source'] === null) { + $invalidProperties[] = "'electricity_source' can't be null"; + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!is_null($this->container['electricity_source']) && !in_array($this->container['electricity_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'electricity_source', must be one of '%s'", + $this->container['electricity_source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['herbicide_other'] === null) { + $invalidProperties[] = "'herbicide_other' can't be null"; + } + if ($this->container['bedding_hay_barley_straw'] === null) { + $invalidProperties[] = "'bedding_hay_barley_straw' can't be null"; + } + if ($this->container['feed_products'] === null) { + $invalidProperties[] = "'feed_products' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets classes + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClasses + */ + public function getClasses() + { + return $this->container['classes']; + } + + /** + * Sets classes + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClasses $classes classes + * + * @return self + */ + public function setClasses($classes) + { + if (is_null($classes)) { + throw new \InvalidArgumentException('non-nullable classes cannot be null'); + } + $this->container['classes'] = $classes; + + return $this; + } + + /** + * Gets limestone + * + * @return float + */ + public function getLimestone() + { + return $this->container['limestone']; + } + + /** + * Sets limestone + * + * @param float $limestone Lime applied in tonnes + * + * @return self + */ + public function setLimestone($limestone) + { + if (is_null($limestone)) { + throw new \InvalidArgumentException('non-nullable limestone cannot be null'); + } + $this->container['limestone'] = $limestone; + + return $this; + } + + /** + * Gets limestone_fraction + * + * @return float + */ + public function getLimestoneFraction() + { + return $this->container['limestone_fraction']; + } + + /** + * Sets limestone_fraction + * + * @param float $limestone_fraction Fraction of lime as limestone vs dolomite, between 0 and 1 + * + * @return self + */ + public function setLimestoneFraction($limestone_fraction) + { + if (is_null($limestone_fraction)) { + throw new \InvalidArgumentException('non-nullable limestone_fraction cannot be null'); + } + $this->container['limestone_fraction'] = $limestone_fraction; + + return $this; + } + + /** + * Gets fertiliser + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser $fertiliser fertiliser + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets diesel + * + * @return float + */ + public function getDiesel() + { + return $this->container['diesel']; + } + + /** + * Sets diesel + * + * @param float $diesel Diesel usage in L (litres) + * + * @return self + */ + public function setDiesel($diesel) + { + if (is_null($diesel)) { + throw new \InvalidArgumentException('non-nullable diesel cannot be null'); + } + $this->container['diesel'] = $diesel; + + return $this; + } + + /** + * Gets petrol + * + * @return float + */ + public function getPetrol() + { + return $this->container['petrol']; + } + + /** + * Sets petrol + * + * @param float $petrol Petrol usage in L (litres) + * + * @return self + */ + public function setPetrol($petrol) + { + if (is_null($petrol)) { + throw new \InvalidArgumentException('non-nullable petrol cannot be null'); + } + $this->container['petrol'] = $petrol; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + + /** + * Gets electricity_source + * + * @return string + */ + public function getElectricitySource() + { + return $this->container['electricity_source']; + } + + /** + * Sets electricity_source + * + * @param string $electricity_source Source of electricity + * + * @return self + */ + public function setElectricitySource($electricity_source) + { + if (is_null($electricity_source)) { + throw new \InvalidArgumentException('non-nullable electricity_source cannot be null'); + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!in_array($electricity_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'electricity_source', must be one of '%s'", + $electricity_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['electricity_source'] = $electricity_source; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostPorkRequestPorkInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostPorkRequestPorkInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets herbicide_other + * + * @return float + */ + public function getHerbicideOther() + { + return $this->container['herbicide_other']; + } + + /** + * Sets herbicide_other + * + * @param float $herbicide_other Total amount of active ingredients of from other herbicides in kg (kilograms) + * + * @return self + */ + public function setHerbicideOther($herbicide_other) + { + if (is_null($herbicide_other)) { + throw new \InvalidArgumentException('non-nullable herbicide_other cannot be null'); + } + $this->container['herbicide_other'] = $herbicide_other; + + return $this; + } + + /** + * Gets bedding_hay_barley_straw + * + * @return float + */ + public function getBeddingHayBarleyStraw() + { + return $this->container['bedding_hay_barley_straw']; + } + + /** + * Sets bedding_hay_barley_straw + * + * @param float $bedding_hay_barley_straw Hay, barley, straw, etc. purchased for pig bedding, in tonnes + * + * @return self + */ + public function setBeddingHayBarleyStraw($bedding_hay_barley_straw) + { + if (is_null($bedding_hay_barley_straw)) { + throw new \InvalidArgumentException('non-nullable bedding_hay_barley_straw cannot be null'); + } + $this->container['bedding_hay_barley_straw'] = $bedding_hay_barley_straw; + + return $this; + } + + /** + * Gets feed_products + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerFeedProductsInner[] + */ + public function getFeedProducts() + { + return $this->container['feed_products']; + } + + /** + * Sets feed_products + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerFeedProductsInner[] $feed_products feed_products + * + * @return self + */ + public function setFeedProducts($feed_products) + { + if (is_null($feed_products)) { + throw new \InvalidArgumentException('non-nullable feed_products cannot be null'); + } + $this->container['feed_products'] = $feed_products; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClasses.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClasses.php new file mode 100644 index 00000000..95c1624d --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClasses.php @@ -0,0 +1,615 @@ + + */ +class PostPorkRequestPorkInnerClasses implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request_pork_inner_classes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'sows' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSows', + 'boars' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesBoars', + 'gilts' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesGilts', + 'suckers' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSuckers', + 'weaners' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesWeaners', + 'growers' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesGrowers', + 'slaughter_pigs' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSlaughterPigs' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'sows' => null, + 'boars' => null, + 'gilts' => null, + 'suckers' => null, + 'weaners' => null, + 'growers' => null, + 'slaughter_pigs' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'sows' => false, + 'boars' => false, + 'gilts' => false, + 'suckers' => false, + 'weaners' => false, + 'growers' => false, + 'slaughter_pigs' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sows' => 'sows', + 'boars' => 'boars', + 'gilts' => 'gilts', + 'suckers' => 'suckers', + 'weaners' => 'weaners', + 'growers' => 'growers', + 'slaughter_pigs' => 'slaughterPigs' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sows' => 'setSows', + 'boars' => 'setBoars', + 'gilts' => 'setGilts', + 'suckers' => 'setSuckers', + 'weaners' => 'setWeaners', + 'growers' => 'setGrowers', + 'slaughter_pigs' => 'setSlaughterPigs' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sows' => 'getSows', + 'boars' => 'getBoars', + 'gilts' => 'getGilts', + 'suckers' => 'getSuckers', + 'weaners' => 'getWeaners', + 'growers' => 'getGrowers', + 'slaughter_pigs' => 'getSlaughterPigs' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('sows', $data ?? [], null); + $this->setIfExists('boars', $data ?? [], null); + $this->setIfExists('gilts', $data ?? [], null); + $this->setIfExists('suckers', $data ?? [], null); + $this->setIfExists('weaners', $data ?? [], null); + $this->setIfExists('growers', $data ?? [], null); + $this->setIfExists('slaughter_pigs', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sows + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSows|null + */ + public function getSows() + { + return $this->container['sows']; + } + + /** + * Sets sows + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSows|null $sows sows + * + * @return self + */ + public function setSows($sows) + { + if (is_null($sows)) { + throw new \InvalidArgumentException('non-nullable sows cannot be null'); + } + $this->container['sows'] = $sows; + + return $this; + } + + /** + * Gets boars + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesBoars|null + */ + public function getBoars() + { + return $this->container['boars']; + } + + /** + * Sets boars + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesBoars|null $boars boars + * + * @return self + */ + public function setBoars($boars) + { + if (is_null($boars)) { + throw new \InvalidArgumentException('non-nullable boars cannot be null'); + } + $this->container['boars'] = $boars; + + return $this; + } + + /** + * Gets gilts + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesGilts|null + */ + public function getGilts() + { + return $this->container['gilts']; + } + + /** + * Sets gilts + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesGilts|null $gilts gilts + * + * @return self + */ + public function setGilts($gilts) + { + if (is_null($gilts)) { + throw new \InvalidArgumentException('non-nullable gilts cannot be null'); + } + $this->container['gilts'] = $gilts; + + return $this; + } + + /** + * Gets suckers + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSuckers|null + */ + public function getSuckers() + { + return $this->container['suckers']; + } + + /** + * Sets suckers + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSuckers|null $suckers suckers + * + * @return self + */ + public function setSuckers($suckers) + { + if (is_null($suckers)) { + throw new \InvalidArgumentException('non-nullable suckers cannot be null'); + } + $this->container['suckers'] = $suckers; + + return $this; + } + + /** + * Gets weaners + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesWeaners|null + */ + public function getWeaners() + { + return $this->container['weaners']; + } + + /** + * Sets weaners + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesWeaners|null $weaners weaners + * + * @return self + */ + public function setWeaners($weaners) + { + if (is_null($weaners)) { + throw new \InvalidArgumentException('non-nullable weaners cannot be null'); + } + $this->container['weaners'] = $weaners; + + return $this; + } + + /** + * Gets growers + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesGrowers|null + */ + public function getGrowers() + { + return $this->container['growers']; + } + + /** + * Sets growers + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesGrowers|null $growers growers + * + * @return self + */ + public function setGrowers($growers) + { + if (is_null($growers)) { + throw new \InvalidArgumentException('non-nullable growers cannot be null'); + } + $this->container['growers'] = $growers; + + return $this; + } + + /** + * Gets slaughter_pigs + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSlaughterPigs|null + */ + public function getSlaughterPigs() + { + return $this->container['slaughter_pigs']; + } + + /** + * Sets slaughter_pigs + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSlaughterPigs|null $slaughter_pigs slaughter_pigs + * + * @return self + */ + public function setSlaughterPigs($slaughter_pigs) + { + if (is_null($slaughter_pigs)) { + throw new \InvalidArgumentException('non-nullable slaughter_pigs cannot be null'); + } + $this->container['slaughter_pigs'] = $slaughter_pigs; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesBoars.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesBoars.php new file mode 100644 index 00000000..98a3bb18 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesBoars.php @@ -0,0 +1,742 @@ + + */ +class PostPorkRequestPorkInnerClassesBoars implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request_pork_inner_classes_boars'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => 'float', + 'winter' => 'float', + 'spring' => 'float', + 'summer' => 'float', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]', + 'manure' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null, + 'manure' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false, + 'manure' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases', + 'manure' => 'manure' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases', + 'manure' => 'setManure' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases', + 'manure' => 'getManure' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + $this->setIfExists('manure', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['manure'] === null) { + $invalidProperties[] = "'manure' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn Pig numbers in autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter Pig numbers in winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring Pig numbers in spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer Pig numbers in summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + + /** + * Gets manure + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure + */ + public function getManure() + { + return $this->container['manure']; + } + + /** + * Sets manure + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure $manure manure + * + * @return self + */ + public function setManure($manure) + { + if (is_null($manure)) { + throw new \InvalidArgumentException('non-nullable manure cannot be null'); + } + $this->container['manure'] = $manure; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesGilts.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesGilts.php new file mode 100644 index 00000000..ec0598ba --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesGilts.php @@ -0,0 +1,742 @@ + + */ +class PostPorkRequestPorkInnerClassesGilts implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request_pork_inner_classes_gilts'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => 'float', + 'winter' => 'float', + 'spring' => 'float', + 'summer' => 'float', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]', + 'manure' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null, + 'manure' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false, + 'manure' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases', + 'manure' => 'manure' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases', + 'manure' => 'setManure' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases', + 'manure' => 'getManure' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + $this->setIfExists('manure', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['manure'] === null) { + $invalidProperties[] = "'manure' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn Pig numbers in autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter Pig numbers in winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring Pig numbers in spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer Pig numbers in summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + + /** + * Gets manure + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure + */ + public function getManure() + { + return $this->container['manure']; + } + + /** + * Sets manure + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure $manure manure + * + * @return self + */ + public function setManure($manure) + { + if (is_null($manure)) { + throw new \InvalidArgumentException('non-nullable manure cannot be null'); + } + $this->container['manure'] = $manure; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesGrowers.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesGrowers.php new file mode 100644 index 00000000..b65421ad --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesGrowers.php @@ -0,0 +1,742 @@ + + */ +class PostPorkRequestPorkInnerClassesGrowers implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request_pork_inner_classes_growers'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => 'float', + 'winter' => 'float', + 'spring' => 'float', + 'summer' => 'float', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]', + 'manure' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null, + 'manure' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false, + 'manure' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases', + 'manure' => 'manure' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases', + 'manure' => 'setManure' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases', + 'manure' => 'getManure' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + $this->setIfExists('manure', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['manure'] === null) { + $invalidProperties[] = "'manure' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn Pig numbers in autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter Pig numbers in winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring Pig numbers in spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer Pig numbers in summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + + /** + * Gets manure + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure + */ + public function getManure() + { + return $this->container['manure']; + } + + /** + * Sets manure + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure $manure manure + * + * @return self + */ + public function setManure($manure) + { + if (is_null($manure)) { + throw new \InvalidArgumentException('non-nullable manure cannot be null'); + } + $this->container['manure'] = $manure; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.php new file mode 100644 index 00000000..787029d6 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.php @@ -0,0 +1,742 @@ + + */ +class PostPorkRequestPorkInnerClassesSlaughterPigs implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request_pork_inner_classes_slaughterPigs'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => 'float', + 'winter' => 'float', + 'spring' => 'float', + 'summer' => 'float', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]', + 'manure' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null, + 'manure' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false, + 'manure' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases', + 'manure' => 'manure' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases', + 'manure' => 'setManure' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases', + 'manure' => 'getManure' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + $this->setIfExists('manure', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['manure'] === null) { + $invalidProperties[] = "'manure' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn Pig numbers in autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter Pig numbers in winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring Pig numbers in spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer Pig numbers in summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + + /** + * Gets manure + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure + */ + public function getManure() + { + return $this->container['manure']; + } + + /** + * Sets manure + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure $manure manure + * + * @return self + */ + public function setManure($manure) + { + if (is_null($manure)) { + throw new \InvalidArgumentException('non-nullable manure cannot be null'); + } + $this->container['manure'] = $manure; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSows.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSows.php new file mode 100644 index 00000000..e78894f0 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSows.php @@ -0,0 +1,742 @@ + + */ +class PostPorkRequestPorkInnerClassesSows implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request_pork_inner_classes_sows'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => 'float', + 'winter' => 'float', + 'spring' => 'float', + 'summer' => 'float', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]', + 'manure' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null, + 'manure' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false, + 'manure' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases', + 'manure' => 'manure' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases', + 'manure' => 'setManure' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases', + 'manure' => 'getManure' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + $this->setIfExists('manure', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['manure'] === null) { + $invalidProperties[] = "'manure' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn Pig numbers in autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter Pig numbers in winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring Pig numbers in spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer Pig numbers in summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + + /** + * Gets manure + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure + */ + public function getManure() + { + return $this->container['manure']; + } + + /** + * Sets manure + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure $manure manure + * + * @return self + */ + public function setManure($manure) + { + if (is_null($manure)) { + throw new \InvalidArgumentException('non-nullable manure cannot be null'); + } + $this->container['manure'] = $manure; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSowsManure.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSowsManure.php new file mode 100644 index 00000000..0cf64a7c --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSowsManure.php @@ -0,0 +1,524 @@ + + */ +class PostPorkRequestPorkInnerClassesSowsManure implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request_pork_inner_classes_sows_manure'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'spring' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring', + 'summer' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring', + 'autumn' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring', + 'winter' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'spring' => null, + 'summer' => null, + 'autumn' => null, + 'winter' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'spring' => false, + 'summer' => false, + 'autumn' => false, + 'winter' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'spring' => 'spring', + 'summer' => 'summer', + 'autumn' => 'autumn', + 'winter' => 'winter' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'autumn' => 'setAutumn', + 'winter' => 'setWinter' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'autumn' => 'getAutumn', + 'winter' => 'getWinter' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.php new file mode 100644 index 00000000..9885e2f7 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.php @@ -0,0 +1,546 @@ + + */ +class PostPorkRequestPorkInnerClassesSowsManureSpring implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request_pork_inner_classes_sows_manure_spring'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'outdoor_systems' => 'float', + 'covered_anaerobic_pond' => 'float', + 'uncovered_anaerobic_pond' => 'float', + 'deep_litter' => 'float', + 'undefined_system' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'outdoor_systems' => null, + 'covered_anaerobic_pond' => null, + 'uncovered_anaerobic_pond' => null, + 'deep_litter' => null, + 'undefined_system' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'outdoor_systems' => false, + 'covered_anaerobic_pond' => false, + 'uncovered_anaerobic_pond' => false, + 'deep_litter' => false, + 'undefined_system' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'outdoor_systems' => 'outdoorSystems', + 'covered_anaerobic_pond' => 'coveredAnaerobicPond', + 'uncovered_anaerobic_pond' => 'uncoveredAnaerobicPond', + 'deep_litter' => 'deepLitter', + 'undefined_system' => 'undefinedSystem' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'outdoor_systems' => 'setOutdoorSystems', + 'covered_anaerobic_pond' => 'setCoveredAnaerobicPond', + 'uncovered_anaerobic_pond' => 'setUncoveredAnaerobicPond', + 'deep_litter' => 'setDeepLitter', + 'undefined_system' => 'setUndefinedSystem' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'outdoor_systems' => 'getOutdoorSystems', + 'covered_anaerobic_pond' => 'getCoveredAnaerobicPond', + 'uncovered_anaerobic_pond' => 'getUncoveredAnaerobicPond', + 'deep_litter' => 'getDeepLitter', + 'undefined_system' => 'getUndefinedSystem' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('outdoor_systems', $data ?? [], null); + $this->setIfExists('covered_anaerobic_pond', $data ?? [], null); + $this->setIfExists('uncovered_anaerobic_pond', $data ?? [], null); + $this->setIfExists('deep_litter', $data ?? [], null); + $this->setIfExists('undefined_system', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets outdoor_systems + * + * @return float|null + */ + public function getOutdoorSystems() + { + return $this->container['outdoor_systems']; + } + + /** + * Sets outdoor_systems + * + * @param float|null $outdoor_systems Amount of volatile solids sent to outoor systems in t (tonnes) + * + * @return self + */ + public function setOutdoorSystems($outdoor_systems) + { + if (is_null($outdoor_systems)) { + throw new \InvalidArgumentException('non-nullable outdoor_systems cannot be null'); + } + $this->container['outdoor_systems'] = $outdoor_systems; + + return $this; + } + + /** + * Gets covered_anaerobic_pond + * + * @return float|null + */ + public function getCoveredAnaerobicPond() + { + return $this->container['covered_anaerobic_pond']; + } + + /** + * Sets covered_anaerobic_pond + * + * @param float|null $covered_anaerobic_pond Amount of volatile solids sent to covered anaerobic pond in t (tonnes) + * + * @return self + */ + public function setCoveredAnaerobicPond($covered_anaerobic_pond) + { + if (is_null($covered_anaerobic_pond)) { + throw new \InvalidArgumentException('non-nullable covered_anaerobic_pond cannot be null'); + } + $this->container['covered_anaerobic_pond'] = $covered_anaerobic_pond; + + return $this; + } + + /** + * Gets uncovered_anaerobic_pond + * + * @return float|null + */ + public function getUncoveredAnaerobicPond() + { + return $this->container['uncovered_anaerobic_pond']; + } + + /** + * Sets uncovered_anaerobic_pond + * + * @param float|null $uncovered_anaerobic_pond Amount of volatile solids sent to uncovered anaerobic pond in t (tonnes) + * + * @return self + */ + public function setUncoveredAnaerobicPond($uncovered_anaerobic_pond) + { + if (is_null($uncovered_anaerobic_pond)) { + throw new \InvalidArgumentException('non-nullable uncovered_anaerobic_pond cannot be null'); + } + $this->container['uncovered_anaerobic_pond'] = $uncovered_anaerobic_pond; + + return $this; + } + + /** + * Gets deep_litter + * + * @return float|null + */ + public function getDeepLitter() + { + return $this->container['deep_litter']; + } + + /** + * Sets deep_litter + * + * @param float|null $deep_litter Amount of volatile solids sent to deep litter in t (tonnes) + * + * @return self + */ + public function setDeepLitter($deep_litter) + { + if (is_null($deep_litter)) { + throw new \InvalidArgumentException('non-nullable deep_litter cannot be null'); + } + $this->container['deep_litter'] = $deep_litter; + + return $this; + } + + /** + * Gets undefined_system + * + * @return float|null + */ + public function getUndefinedSystem() + { + return $this->container['undefined_system']; + } + + /** + * Sets undefined_system + * + * @param float|null $undefined_system Amount of volatile solids where manure management system is not known or defined, in t (tonnes) + * + * @return self + */ + public function setUndefinedSystem($undefined_system) + { + if (is_null($undefined_system)) { + throw new \InvalidArgumentException('non-nullable undefined_system cannot be null'); + } + $this->container['undefined_system'] = $undefined_system; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSuckers.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSuckers.php new file mode 100644 index 00000000..9c0390e4 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesSuckers.php @@ -0,0 +1,742 @@ + + */ +class PostPorkRequestPorkInnerClassesSuckers implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request_pork_inner_classes_suckers'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => 'float', + 'winter' => 'float', + 'spring' => 'float', + 'summer' => 'float', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]', + 'manure' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null, + 'manure' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false, + 'manure' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases', + 'manure' => 'manure' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases', + 'manure' => 'setManure' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases', + 'manure' => 'getManure' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + $this->setIfExists('manure', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['manure'] === null) { + $invalidProperties[] = "'manure' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn Pig numbers in autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter Pig numbers in winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring Pig numbers in spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer Pig numbers in summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + + /** + * Gets manure + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure + */ + public function getManure() + { + return $this->container['manure']; + } + + /** + * Sets manure + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure $manure manure + * + * @return self + */ + public function setManure($manure) + { + if (is_null($manure)) { + throw new \InvalidArgumentException('non-nullable manure cannot be null'); + } + $this->container['manure'] = $manure; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesWeaners.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesWeaners.php new file mode 100644 index 00000000..3aa2aa50 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerClassesWeaners.php @@ -0,0 +1,742 @@ + + */ +class PostPorkRequestPorkInnerClassesWeaners implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request_pork_inner_classes_weaners'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => 'float', + 'winter' => 'float', + 'spring' => 'float', + 'summer' => 'float', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]', + 'manure' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null, + 'manure' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false, + 'manure' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases', + 'manure' => 'manure' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases', + 'manure' => 'setManure' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases', + 'manure' => 'getManure' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + $this->setIfExists('manure', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + if ($this->container['manure'] === null) { + $invalidProperties[] = "'manure' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn Pig numbers in autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter Pig numbers in winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring Pig numbers in spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer Pig numbers in summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + + /** + * Gets manure + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure + */ + public function getManure() + { + return $this->container['manure']; + } + + /** + * Sets manure + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure $manure manure + * + * @return self + */ + public function setManure($manure) + { + if (is_null($manure)) { + throw new \InvalidArgumentException('non-nullable manure cannot be null'); + } + $this->container['manure'] = $manure; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerFeedProductsInner.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerFeedProductsInner.php new file mode 100644 index 00000000..137f3e38 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerFeedProductsInner.php @@ -0,0 +1,541 @@ + + */ +class PostPorkRequestPorkInnerFeedProductsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request_pork_inner_feedProducts_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'feed_purchased' => 'float', + 'additional_ingredients' => 'float', + 'emissions_intensity' => 'float', + 'ingredients' => '\OpenAPI\Client\Model\PostPorkRequestPorkInnerFeedProductsInnerIngredients' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'feed_purchased' => null, + 'additional_ingredients' => null, + 'emissions_intensity' => null, + 'ingredients' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'feed_purchased' => false, + 'additional_ingredients' => false, + 'emissions_intensity' => false, + 'ingredients' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'feed_purchased' => 'feedPurchased', + 'additional_ingredients' => 'additionalIngredients', + 'emissions_intensity' => 'emissionsIntensity', + 'ingredients' => 'ingredients' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'feed_purchased' => 'setFeedPurchased', + 'additional_ingredients' => 'setAdditionalIngredients', + 'emissions_intensity' => 'setEmissionsIntensity', + 'ingredients' => 'setIngredients' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'feed_purchased' => 'getFeedPurchased', + 'additional_ingredients' => 'getAdditionalIngredients', + 'emissions_intensity' => 'getEmissionsIntensity', + 'ingredients' => 'getIngredients' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('feed_purchased', $data ?? [], null); + $this->setIfExists('additional_ingredients', $data ?? [], null); + $this->setIfExists('emissions_intensity', $data ?? [], null); + $this->setIfExists('ingredients', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['feed_purchased'] === null) { + $invalidProperties[] = "'feed_purchased' can't be null"; + } + if ($this->container['additional_ingredients'] === null) { + $invalidProperties[] = "'additional_ingredients' can't be null"; + } + if (($this->container['additional_ingredients'] > 1)) { + $invalidProperties[] = "invalid value for 'additional_ingredients', must be smaller than or equal to 1."; + } + + if (($this->container['additional_ingredients'] < 0)) { + $invalidProperties[] = "invalid value for 'additional_ingredients', must be bigger than or equal to 0."; + } + + if ($this->container['emissions_intensity'] === null) { + $invalidProperties[] = "'emissions_intensity' can't be null"; + } + if ($this->container['ingredients'] === null) { + $invalidProperties[] = "'ingredients' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets feed_purchased + * + * @return float + */ + public function getFeedPurchased() + { + return $this->container['feed_purchased']; + } + + /** + * Sets feed_purchased + * + * @param float $feed_purchased Pig feed purchased, in tonnes + * + * @return self + */ + public function setFeedPurchased($feed_purchased) + { + if (is_null($feed_purchased)) { + throw new \InvalidArgumentException('non-nullable feed_purchased cannot be null'); + } + $this->container['feed_purchased'] = $feed_purchased; + + return $this; + } + + /** + * Gets additional_ingredients + * + * @return float + */ + public function getAdditionalIngredients() + { + return $this->container['additional_ingredients']; + } + + /** + * Sets additional_ingredients + * + * @param float $additional_ingredients Fraction of additional ingredient in feed mix, from 0 to 1 + * + * @return self + */ + public function setAdditionalIngredients($additional_ingredients) + { + if (is_null($additional_ingredients)) { + throw new \InvalidArgumentException('non-nullable additional_ingredients cannot be null'); + } + + if (($additional_ingredients > 1)) { + throw new \InvalidArgumentException('invalid value for $additional_ingredients when calling PostPorkRequestPorkInnerFeedProductsInner., must be smaller than or equal to 1.'); + } + if (($additional_ingredients < 0)) { + throw new \InvalidArgumentException('invalid value for $additional_ingredients when calling PostPorkRequestPorkInnerFeedProductsInner., must be bigger than or equal to 0.'); + } + + $this->container['additional_ingredients'] = $additional_ingredients; + + return $this; + } + + /** + * Gets emissions_intensity + * + * @return float + */ + public function getEmissionsIntensity() + { + return $this->container['emissions_intensity']; + } + + /** + * Sets emissions_intensity + * + * @param float $emissions_intensity Emissions intensity of feed product in GHG (kg CO2-e/kg input) + * + * @return self + */ + public function setEmissionsIntensity($emissions_intensity) + { + if (is_null($emissions_intensity)) { + throw new \InvalidArgumentException('non-nullable emissions_intensity cannot be null'); + } + $this->container['emissions_intensity'] = $emissions_intensity; + + return $this; + } + + /** + * Gets ingredients + * + * @return \OpenAPI\Client\Model\PostPorkRequestPorkInnerFeedProductsInnerIngredients + */ + public function getIngredients() + { + return $this->container['ingredients']; + } + + /** + * Sets ingredients + * + * @param \OpenAPI\Client\Model\PostPorkRequestPorkInnerFeedProductsInnerIngredients $ingredients ingredients + * + * @return self + */ + public function setIngredients($ingredients) + { + if (is_null($ingredients)) { + throw new \InvalidArgumentException('non-nullable ingredients cannot be null'); + } + $this->container['ingredients'] = $ingredients; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.php new file mode 100644 index 00000000..a65a8114 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.php @@ -0,0 +1,977 @@ + + */ +class PostPorkRequestPorkInnerFeedProductsInnerIngredients implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request_pork_inner_feedProducts_inner_ingredients'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'wheat' => 'float', + 'barley' => 'float', + 'whey_powder' => 'float', + 'canola_meal' => 'float', + 'soybean_meal' => 'float', + 'meat_meal' => 'float', + 'blood_meal' => 'float', + 'fishmeal' => 'float', + 'tallow' => 'float', + 'wheat_bran' => 'float', + 'beet_pulp' => 'float', + 'mill_mix' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'wheat' => null, + 'barley' => null, + 'whey_powder' => null, + 'canola_meal' => null, + 'soybean_meal' => null, + 'meat_meal' => null, + 'blood_meal' => null, + 'fishmeal' => null, + 'tallow' => null, + 'wheat_bran' => null, + 'beet_pulp' => null, + 'mill_mix' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'wheat' => false, + 'barley' => false, + 'whey_powder' => false, + 'canola_meal' => false, + 'soybean_meal' => false, + 'meat_meal' => false, + 'blood_meal' => false, + 'fishmeal' => false, + 'tallow' => false, + 'wheat_bran' => false, + 'beet_pulp' => false, + 'mill_mix' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'wheat' => 'wheat', + 'barley' => 'barley', + 'whey_powder' => 'wheyPowder', + 'canola_meal' => 'canolaMeal', + 'soybean_meal' => 'soybeanMeal', + 'meat_meal' => 'meatMeal', + 'blood_meal' => 'bloodMeal', + 'fishmeal' => 'fishmeal', + 'tallow' => 'tallow', + 'wheat_bran' => 'wheatBran', + 'beet_pulp' => 'beetPulp', + 'mill_mix' => 'millMix' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'wheat' => 'setWheat', + 'barley' => 'setBarley', + 'whey_powder' => 'setWheyPowder', + 'canola_meal' => 'setCanolaMeal', + 'soybean_meal' => 'setSoybeanMeal', + 'meat_meal' => 'setMeatMeal', + 'blood_meal' => 'setBloodMeal', + 'fishmeal' => 'setFishmeal', + 'tallow' => 'setTallow', + 'wheat_bran' => 'setWheatBran', + 'beet_pulp' => 'setBeetPulp', + 'mill_mix' => 'setMillMix' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'wheat' => 'getWheat', + 'barley' => 'getBarley', + 'whey_powder' => 'getWheyPowder', + 'canola_meal' => 'getCanolaMeal', + 'soybean_meal' => 'getSoybeanMeal', + 'meat_meal' => 'getMeatMeal', + 'blood_meal' => 'getBloodMeal', + 'fishmeal' => 'getFishmeal', + 'tallow' => 'getTallow', + 'wheat_bran' => 'getWheatBran', + 'beet_pulp' => 'getBeetPulp', + 'mill_mix' => 'getMillMix' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('wheat', $data ?? [], null); + $this->setIfExists('barley', $data ?? [], null); + $this->setIfExists('whey_powder', $data ?? [], null); + $this->setIfExists('canola_meal', $data ?? [], null); + $this->setIfExists('soybean_meal', $data ?? [], null); + $this->setIfExists('meat_meal', $data ?? [], null); + $this->setIfExists('blood_meal', $data ?? [], null); + $this->setIfExists('fishmeal', $data ?? [], null); + $this->setIfExists('tallow', $data ?? [], null); + $this->setIfExists('wheat_bran', $data ?? [], null); + $this->setIfExists('beet_pulp', $data ?? [], null); + $this->setIfExists('mill_mix', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!is_null($this->container['wheat']) && ($this->container['wheat'] > 1)) { + $invalidProperties[] = "invalid value for 'wheat', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['wheat']) && ($this->container['wheat'] < 0)) { + $invalidProperties[] = "invalid value for 'wheat', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['barley']) && ($this->container['barley'] > 1)) { + $invalidProperties[] = "invalid value for 'barley', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['barley']) && ($this->container['barley'] < 0)) { + $invalidProperties[] = "invalid value for 'barley', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['whey_powder']) && ($this->container['whey_powder'] > 1)) { + $invalidProperties[] = "invalid value for 'whey_powder', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['whey_powder']) && ($this->container['whey_powder'] < 0)) { + $invalidProperties[] = "invalid value for 'whey_powder', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['canola_meal']) && ($this->container['canola_meal'] > 1)) { + $invalidProperties[] = "invalid value for 'canola_meal', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['canola_meal']) && ($this->container['canola_meal'] < 0)) { + $invalidProperties[] = "invalid value for 'canola_meal', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['soybean_meal']) && ($this->container['soybean_meal'] > 1)) { + $invalidProperties[] = "invalid value for 'soybean_meal', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['soybean_meal']) && ($this->container['soybean_meal'] < 0)) { + $invalidProperties[] = "invalid value for 'soybean_meal', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['meat_meal']) && ($this->container['meat_meal'] > 1)) { + $invalidProperties[] = "invalid value for 'meat_meal', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['meat_meal']) && ($this->container['meat_meal'] < 0)) { + $invalidProperties[] = "invalid value for 'meat_meal', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['blood_meal']) && ($this->container['blood_meal'] > 1)) { + $invalidProperties[] = "invalid value for 'blood_meal', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['blood_meal']) && ($this->container['blood_meal'] < 0)) { + $invalidProperties[] = "invalid value for 'blood_meal', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['fishmeal']) && ($this->container['fishmeal'] > 1)) { + $invalidProperties[] = "invalid value for 'fishmeal', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['fishmeal']) && ($this->container['fishmeal'] < 0)) { + $invalidProperties[] = "invalid value for 'fishmeal', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['tallow']) && ($this->container['tallow'] > 1)) { + $invalidProperties[] = "invalid value for 'tallow', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['tallow']) && ($this->container['tallow'] < 0)) { + $invalidProperties[] = "invalid value for 'tallow', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['wheat_bran']) && ($this->container['wheat_bran'] > 1)) { + $invalidProperties[] = "invalid value for 'wheat_bran', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['wheat_bran']) && ($this->container['wheat_bran'] < 0)) { + $invalidProperties[] = "invalid value for 'wheat_bran', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['beet_pulp']) && ($this->container['beet_pulp'] > 1)) { + $invalidProperties[] = "invalid value for 'beet_pulp', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['beet_pulp']) && ($this->container['beet_pulp'] < 0)) { + $invalidProperties[] = "invalid value for 'beet_pulp', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['mill_mix']) && ($this->container['mill_mix'] > 1)) { + $invalidProperties[] = "invalid value for 'mill_mix', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['mill_mix']) && ($this->container['mill_mix'] < 0)) { + $invalidProperties[] = "invalid value for 'mill_mix', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets wheat + * + * @return float|null + */ + public function getWheat() + { + return $this->container['wheat']; + } + + /** + * Sets wheat + * + * @param float|null $wheat wheat + * + * @return self + */ + public function setWheat($wheat) + { + if (is_null($wheat)) { + throw new \InvalidArgumentException('non-nullable wheat cannot be null'); + } + + if (($wheat > 1)) { + throw new \InvalidArgumentException('invalid value for $wheat when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be smaller than or equal to 1.'); + } + if (($wheat < 0)) { + throw new \InvalidArgumentException('invalid value for $wheat when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be bigger than or equal to 0.'); + } + + $this->container['wheat'] = $wheat; + + return $this; + } + + /** + * Gets barley + * + * @return float|null + */ + public function getBarley() + { + return $this->container['barley']; + } + + /** + * Sets barley + * + * @param float|null $barley barley + * + * @return self + */ + public function setBarley($barley) + { + if (is_null($barley)) { + throw new \InvalidArgumentException('non-nullable barley cannot be null'); + } + + if (($barley > 1)) { + throw new \InvalidArgumentException('invalid value for $barley when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be smaller than or equal to 1.'); + } + if (($barley < 0)) { + throw new \InvalidArgumentException('invalid value for $barley when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be bigger than or equal to 0.'); + } + + $this->container['barley'] = $barley; + + return $this; + } + + /** + * Gets whey_powder + * + * @return float|null + */ + public function getWheyPowder() + { + return $this->container['whey_powder']; + } + + /** + * Sets whey_powder + * + * @param float|null $whey_powder whey_powder + * + * @return self + */ + public function setWheyPowder($whey_powder) + { + if (is_null($whey_powder)) { + throw new \InvalidArgumentException('non-nullable whey_powder cannot be null'); + } + + if (($whey_powder > 1)) { + throw new \InvalidArgumentException('invalid value for $whey_powder when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be smaller than or equal to 1.'); + } + if (($whey_powder < 0)) { + throw new \InvalidArgumentException('invalid value for $whey_powder when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be bigger than or equal to 0.'); + } + + $this->container['whey_powder'] = $whey_powder; + + return $this; + } + + /** + * Gets canola_meal + * + * @return float|null + */ + public function getCanolaMeal() + { + return $this->container['canola_meal']; + } + + /** + * Sets canola_meal + * + * @param float|null $canola_meal canola_meal + * + * @return self + */ + public function setCanolaMeal($canola_meal) + { + if (is_null($canola_meal)) { + throw new \InvalidArgumentException('non-nullable canola_meal cannot be null'); + } + + if (($canola_meal > 1)) { + throw new \InvalidArgumentException('invalid value for $canola_meal when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be smaller than or equal to 1.'); + } + if (($canola_meal < 0)) { + throw new \InvalidArgumentException('invalid value for $canola_meal when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be bigger than or equal to 0.'); + } + + $this->container['canola_meal'] = $canola_meal; + + return $this; + } + + /** + * Gets soybean_meal + * + * @return float|null + */ + public function getSoybeanMeal() + { + return $this->container['soybean_meal']; + } + + /** + * Sets soybean_meal + * + * @param float|null $soybean_meal soybean_meal + * + * @return self + */ + public function setSoybeanMeal($soybean_meal) + { + if (is_null($soybean_meal)) { + throw new \InvalidArgumentException('non-nullable soybean_meal cannot be null'); + } + + if (($soybean_meal > 1)) { + throw new \InvalidArgumentException('invalid value for $soybean_meal when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be smaller than or equal to 1.'); + } + if (($soybean_meal < 0)) { + throw new \InvalidArgumentException('invalid value for $soybean_meal when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be bigger than or equal to 0.'); + } + + $this->container['soybean_meal'] = $soybean_meal; + + return $this; + } + + /** + * Gets meat_meal + * + * @return float|null + */ + public function getMeatMeal() + { + return $this->container['meat_meal']; + } + + /** + * Sets meat_meal + * + * @param float|null $meat_meal meat_meal + * + * @return self + */ + public function setMeatMeal($meat_meal) + { + if (is_null($meat_meal)) { + throw new \InvalidArgumentException('non-nullable meat_meal cannot be null'); + } + + if (($meat_meal > 1)) { + throw new \InvalidArgumentException('invalid value for $meat_meal when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be smaller than or equal to 1.'); + } + if (($meat_meal < 0)) { + throw new \InvalidArgumentException('invalid value for $meat_meal when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be bigger than or equal to 0.'); + } + + $this->container['meat_meal'] = $meat_meal; + + return $this; + } + + /** + * Gets blood_meal + * + * @return float|null + */ + public function getBloodMeal() + { + return $this->container['blood_meal']; + } + + /** + * Sets blood_meal + * + * @param float|null $blood_meal blood_meal + * + * @return self + */ + public function setBloodMeal($blood_meal) + { + if (is_null($blood_meal)) { + throw new \InvalidArgumentException('non-nullable blood_meal cannot be null'); + } + + if (($blood_meal > 1)) { + throw new \InvalidArgumentException('invalid value for $blood_meal when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be smaller than or equal to 1.'); + } + if (($blood_meal < 0)) { + throw new \InvalidArgumentException('invalid value for $blood_meal when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be bigger than or equal to 0.'); + } + + $this->container['blood_meal'] = $blood_meal; + + return $this; + } + + /** + * Gets fishmeal + * + * @return float|null + */ + public function getFishmeal() + { + return $this->container['fishmeal']; + } + + /** + * Sets fishmeal + * + * @param float|null $fishmeal fishmeal + * + * @return self + */ + public function setFishmeal($fishmeal) + { + if (is_null($fishmeal)) { + throw new \InvalidArgumentException('non-nullable fishmeal cannot be null'); + } + + if (($fishmeal > 1)) { + throw new \InvalidArgumentException('invalid value for $fishmeal when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be smaller than or equal to 1.'); + } + if (($fishmeal < 0)) { + throw new \InvalidArgumentException('invalid value for $fishmeal when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be bigger than or equal to 0.'); + } + + $this->container['fishmeal'] = $fishmeal; + + return $this; + } + + /** + * Gets tallow + * + * @return float|null + */ + public function getTallow() + { + return $this->container['tallow']; + } + + /** + * Sets tallow + * + * @param float|null $tallow tallow + * + * @return self + */ + public function setTallow($tallow) + { + if (is_null($tallow)) { + throw new \InvalidArgumentException('non-nullable tallow cannot be null'); + } + + if (($tallow > 1)) { + throw new \InvalidArgumentException('invalid value for $tallow when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be smaller than or equal to 1.'); + } + if (($tallow < 0)) { + throw new \InvalidArgumentException('invalid value for $tallow when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be bigger than or equal to 0.'); + } + + $this->container['tallow'] = $tallow; + + return $this; + } + + /** + * Gets wheat_bran + * + * @return float|null + */ + public function getWheatBran() + { + return $this->container['wheat_bran']; + } + + /** + * Sets wheat_bran + * + * @param float|null $wheat_bran wheat_bran + * + * @return self + */ + public function setWheatBran($wheat_bran) + { + if (is_null($wheat_bran)) { + throw new \InvalidArgumentException('non-nullable wheat_bran cannot be null'); + } + + if (($wheat_bran > 1)) { + throw new \InvalidArgumentException('invalid value for $wheat_bran when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be smaller than or equal to 1.'); + } + if (($wheat_bran < 0)) { + throw new \InvalidArgumentException('invalid value for $wheat_bran when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be bigger than or equal to 0.'); + } + + $this->container['wheat_bran'] = $wheat_bran; + + return $this; + } + + /** + * Gets beet_pulp + * + * @return float|null + */ + public function getBeetPulp() + { + return $this->container['beet_pulp']; + } + + /** + * Sets beet_pulp + * + * @param float|null $beet_pulp beet_pulp + * + * @return self + */ + public function setBeetPulp($beet_pulp) + { + if (is_null($beet_pulp)) { + throw new \InvalidArgumentException('non-nullable beet_pulp cannot be null'); + } + + if (($beet_pulp > 1)) { + throw new \InvalidArgumentException('invalid value for $beet_pulp when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be smaller than or equal to 1.'); + } + if (($beet_pulp < 0)) { + throw new \InvalidArgumentException('invalid value for $beet_pulp when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be bigger than or equal to 0.'); + } + + $this->container['beet_pulp'] = $beet_pulp; + + return $this; + } + + /** + * Gets mill_mix + * + * @return float|null + */ + public function getMillMix() + { + return $this->container['mill_mix']; + } + + /** + * Sets mill_mix + * + * @param float|null $mill_mix mill_mix + * + * @return self + */ + public function setMillMix($mill_mix) + { + if (is_null($mill_mix)) { + throw new \InvalidArgumentException('non-nullable mill_mix cannot be null'); + } + + if (($mill_mix > 1)) { + throw new \InvalidArgumentException('invalid value for $mill_mix when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be smaller than or equal to 1.'); + } + if (($mill_mix < 0)) { + throw new \InvalidArgumentException('invalid value for $mill_mix when calling PostPorkRequestPorkInnerFeedProductsInnerIngredients., must be bigger than or equal to 0.'); + } + + $this->container['mill_mix'] = $mill_mix; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPorkRequestVegetationInner.php b/examples/php-api-client/api-client/lib/Model/PostPorkRequestVegetationInner.php new file mode 100644 index 00000000..72858454 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPorkRequestVegetationInner.php @@ -0,0 +1,451 @@ + + */ +class PostPorkRequestVegetationInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_pork_request_vegetation_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'vegetation' => '\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation', + 'allocated_proportion' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'vegetation' => null, + 'allocated_proportion' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'vegetation' => false, + 'allocated_proportion' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vegetation' => 'vegetation', + 'allocated_proportion' => 'allocatedProportion' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vegetation' => 'setVegetation', + 'allocated_proportion' => 'setAllocatedProportion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vegetation' => 'getVegetation', + 'allocated_proportion' => 'getAllocatedProportion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('vegetation', $data ?? [], null); + $this->setIfExists('allocated_proportion', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + if ($this->container['allocated_proportion'] === null) { + $invalidProperties[] = "'allocated_proportion' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + + /** + * Gets allocated_proportion + * + * @return float[] + */ + public function getAllocatedProportion() + { + return $this->container['allocated_proportion']; + } + + /** + * Sets allocated_proportion + * + * @param float[] $allocated_proportion The proportion of the sequestration that is allocated to the activity + * + * @return self + */ + public function setAllocatedProportion($allocated_proportion) + { + if (is_null($allocated_proportion)) { + throw new \InvalidArgumentException('non-nullable allocated_proportion cannot be null'); + } + $this->container['allocated_proportion'] = $allocated_proportion; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultry200Response.php b/examples/php-api-client/api-client/lib/Model/PostPoultry200Response.php new file mode 100644 index 00000000..5435637c --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultry200Response.php @@ -0,0 +1,673 @@ + + */ +class PostPoultry200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostPoultry200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostPoultry200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'intermediate_broilers' => '\OpenAPI\Client\Model\PostPoultry200ResponseIntermediateBroilersInner[]', + 'intermediate_layers' => '\OpenAPI\Client\Model\PostPoultry200ResponseIntermediateLayersInner[]', + 'net' => '\OpenAPI\Client\Model\PostPoultry200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostPoultry200ResponseIntensities' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intermediate_broilers' => null, + 'intermediate_layers' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intermediate_broilers' => false, + 'intermediate_layers' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intermediate_broilers' => 'intermediateBroilers', + 'intermediate_layers' => 'intermediateLayers', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intermediate_broilers' => 'setIntermediateBroilers', + 'intermediate_layers' => 'setIntermediateLayers', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intermediate_broilers' => 'getIntermediateBroilers', + 'intermediate_layers' => 'getIntermediateLayers', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intermediate_broilers', $data ?? [], null); + $this->setIfExists('intermediate_layers', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intermediate_broilers'] === null) { + $invalidProperties[] = "'intermediate_broilers' can't be null"; + } + if ($this->container['intermediate_layers'] === null) { + $invalidProperties[] = "'intermediate_layers' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostPoultry200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostPoultry200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostPoultry200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostPoultry200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intermediate_broilers + * + * @return \OpenAPI\Client\Model\PostPoultry200ResponseIntermediateBroilersInner[] + */ + public function getIntermediateBroilers() + { + return $this->container['intermediate_broilers']; + } + + /** + * Sets intermediate_broilers + * + * @param \OpenAPI\Client\Model\PostPoultry200ResponseIntermediateBroilersInner[] $intermediate_broilers intermediate_broilers + * + * @return self + */ + public function setIntermediateBroilers($intermediate_broilers) + { + if (is_null($intermediate_broilers)) { + throw new \InvalidArgumentException('non-nullable intermediate_broilers cannot be null'); + } + $this->container['intermediate_broilers'] = $intermediate_broilers; + + return $this; + } + + /** + * Gets intermediate_layers + * + * @return \OpenAPI\Client\Model\PostPoultry200ResponseIntermediateLayersInner[] + */ + public function getIntermediateLayers() + { + return $this->container['intermediate_layers']; + } + + /** + * Sets intermediate_layers + * + * @param \OpenAPI\Client\Model\PostPoultry200ResponseIntermediateLayersInner[] $intermediate_layers intermediate_layers + * + * @return self + */ + public function setIntermediateLayers($intermediate_layers) + { + if (is_null($intermediate_layers)) { + throw new \InvalidArgumentException('non-nullable intermediate_layers cannot be null'); + } + $this->container['intermediate_layers'] = $intermediate_layers; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostPoultry200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostPoultry200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostPoultry200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostPoultry200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntensities.php b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntensities.php new file mode 100644 index 00000000..0d5eddc6 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntensities.php @@ -0,0 +1,598 @@ + + */ +class PostPoultry200ResponseIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_200_response_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'poultry_meat_including_sequestration' => 'float', + 'poultry_meat_excluding_sequestration' => 'float', + 'poultry_eggs_including_sequestration' => 'float', + 'poultry_eggs_excluding_sequestration' => 'float', + 'meat_produced_kg' => 'float', + 'eggs_produced_kg' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'poultry_meat_including_sequestration' => null, + 'poultry_meat_excluding_sequestration' => null, + 'poultry_eggs_including_sequestration' => null, + 'poultry_eggs_excluding_sequestration' => null, + 'meat_produced_kg' => null, + 'eggs_produced_kg' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'poultry_meat_including_sequestration' => false, + 'poultry_meat_excluding_sequestration' => false, + 'poultry_eggs_including_sequestration' => false, + 'poultry_eggs_excluding_sequestration' => false, + 'meat_produced_kg' => false, + 'eggs_produced_kg' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'poultry_meat_including_sequestration' => 'poultryMeatIncludingSequestration', + 'poultry_meat_excluding_sequestration' => 'poultryMeatExcludingSequestration', + 'poultry_eggs_including_sequestration' => 'poultryEggsIncludingSequestration', + 'poultry_eggs_excluding_sequestration' => 'poultryEggsExcludingSequestration', + 'meat_produced_kg' => 'meatProducedKg', + 'eggs_produced_kg' => 'eggsProducedKg' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'poultry_meat_including_sequestration' => 'setPoultryMeatIncludingSequestration', + 'poultry_meat_excluding_sequestration' => 'setPoultryMeatExcludingSequestration', + 'poultry_eggs_including_sequestration' => 'setPoultryEggsIncludingSequestration', + 'poultry_eggs_excluding_sequestration' => 'setPoultryEggsExcludingSequestration', + 'meat_produced_kg' => 'setMeatProducedKg', + 'eggs_produced_kg' => 'setEggsProducedKg' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'poultry_meat_including_sequestration' => 'getPoultryMeatIncludingSequestration', + 'poultry_meat_excluding_sequestration' => 'getPoultryMeatExcludingSequestration', + 'poultry_eggs_including_sequestration' => 'getPoultryEggsIncludingSequestration', + 'poultry_eggs_excluding_sequestration' => 'getPoultryEggsExcludingSequestration', + 'meat_produced_kg' => 'getMeatProducedKg', + 'eggs_produced_kg' => 'getEggsProducedKg' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('poultry_meat_including_sequestration', $data ?? [], null); + $this->setIfExists('poultry_meat_excluding_sequestration', $data ?? [], null); + $this->setIfExists('poultry_eggs_including_sequestration', $data ?? [], null); + $this->setIfExists('poultry_eggs_excluding_sequestration', $data ?? [], null); + $this->setIfExists('meat_produced_kg', $data ?? [], null); + $this->setIfExists('eggs_produced_kg', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['poultry_meat_including_sequestration'] === null) { + $invalidProperties[] = "'poultry_meat_including_sequestration' can't be null"; + } + if ($this->container['poultry_meat_excluding_sequestration'] === null) { + $invalidProperties[] = "'poultry_meat_excluding_sequestration' can't be null"; + } + if ($this->container['poultry_eggs_including_sequestration'] === null) { + $invalidProperties[] = "'poultry_eggs_including_sequestration' can't be null"; + } + if ($this->container['poultry_eggs_excluding_sequestration'] === null) { + $invalidProperties[] = "'poultry_eggs_excluding_sequestration' can't be null"; + } + if ($this->container['meat_produced_kg'] === null) { + $invalidProperties[] = "'meat_produced_kg' can't be null"; + } + if ($this->container['eggs_produced_kg'] === null) { + $invalidProperties[] = "'eggs_produced_kg' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets poultry_meat_including_sequestration + * + * @return float + */ + public function getPoultryMeatIncludingSequestration() + { + return $this->container['poultry_meat_including_sequestration']; + } + + /** + * Sets poultry_meat_including_sequestration + * + * @param float $poultry_meat_including_sequestration Poultry meat including carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setPoultryMeatIncludingSequestration($poultry_meat_including_sequestration) + { + if (is_null($poultry_meat_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable poultry_meat_including_sequestration cannot be null'); + } + $this->container['poultry_meat_including_sequestration'] = $poultry_meat_including_sequestration; + + return $this; + } + + /** + * Gets poultry_meat_excluding_sequestration + * + * @return float + */ + public function getPoultryMeatExcludingSequestration() + { + return $this->container['poultry_meat_excluding_sequestration']; + } + + /** + * Sets poultry_meat_excluding_sequestration + * + * @param float $poultry_meat_excluding_sequestration Poultry meat excluding carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setPoultryMeatExcludingSequestration($poultry_meat_excluding_sequestration) + { + if (is_null($poultry_meat_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable poultry_meat_excluding_sequestration cannot be null'); + } + $this->container['poultry_meat_excluding_sequestration'] = $poultry_meat_excluding_sequestration; + + return $this; + } + + /** + * Gets poultry_eggs_including_sequestration + * + * @return float + */ + public function getPoultryEggsIncludingSequestration() + { + return $this->container['poultry_eggs_including_sequestration']; + } + + /** + * Sets poultry_eggs_including_sequestration + * + * @param float $poultry_eggs_including_sequestration Poultry eggs including carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setPoultryEggsIncludingSequestration($poultry_eggs_including_sequestration) + { + if (is_null($poultry_eggs_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable poultry_eggs_including_sequestration cannot be null'); + } + $this->container['poultry_eggs_including_sequestration'] = $poultry_eggs_including_sequestration; + + return $this; + } + + /** + * Gets poultry_eggs_excluding_sequestration + * + * @return float + */ + public function getPoultryEggsExcludingSequestration() + { + return $this->container['poultry_eggs_excluding_sequestration']; + } + + /** + * Sets poultry_eggs_excluding_sequestration + * + * @param float $poultry_eggs_excluding_sequestration Poultry eggs excluding carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setPoultryEggsExcludingSequestration($poultry_eggs_excluding_sequestration) + { + if (is_null($poultry_eggs_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable poultry_eggs_excluding_sequestration cannot be null'); + } + $this->container['poultry_eggs_excluding_sequestration'] = $poultry_eggs_excluding_sequestration; + + return $this; + } + + /** + * Gets meat_produced_kg + * + * @return float + */ + public function getMeatProducedKg() + { + return $this->container['meat_produced_kg']; + } + + /** + * Sets meat_produced_kg + * + * @param float $meat_produced_kg Poultry meat produced in kg + * + * @return self + */ + public function setMeatProducedKg($meat_produced_kg) + { + if (is_null($meat_produced_kg)) { + throw new \InvalidArgumentException('non-nullable meat_produced_kg cannot be null'); + } + $this->container['meat_produced_kg'] = $meat_produced_kg; + + return $this; + } + + /** + * Gets eggs_produced_kg + * + * @return float + */ + public function getEggsProducedKg() + { + return $this->container['eggs_produced_kg']; + } + + /** + * Sets eggs_produced_kg + * + * @param float $eggs_produced_kg Amount of eggs produced, in kg + * + * @return self + */ + public function setEggsProducedKg($eggs_produced_kg) + { + if (is_null($eggs_produced_kg)) { + throw new \InvalidArgumentException('non-nullable eggs_produced_kg cannot be null'); + } + $this->container['eggs_produced_kg'] = $eggs_produced_kg; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateBroilersInner.php b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateBroilersInner.php new file mode 100644 index 00000000..199a3770 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateBroilersInner.php @@ -0,0 +1,635 @@ + + */ +class PostPoultry200ResponseIntermediateBroilersInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_200_response_intermediateBroilers_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostPoultry200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostPoultry200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration', + 'intensities' => '\OpenAPI\Client\Model\PostPoultry200ResponseIntermediateBroilersInnerIntensities', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intensities' => null, + 'net' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intensities' => false, + 'net' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intensities' => 'intensities', + 'net' => 'net' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intensities' => 'setIntensities', + 'net' => 'setNet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intensities' => 'getIntensities', + 'net' => 'getNet' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostPoultry200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostPoultry200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostPoultry200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostPoultry200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostPoultry200ResponseIntermediateBroilersInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostPoultry200ResponseIntermediateBroilersInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.php b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.php new file mode 100644 index 00000000..2db148b6 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.php @@ -0,0 +1,487 @@ + + */ +class PostPoultry200ResponseIntermediateBroilersInnerIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_200_response_intermediateBroilers_inner_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'poultry_meat_including_sequestration' => 'float', + 'poultry_meat_excluding_sequestration' => 'float', + 'meat_produced_kg' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'poultry_meat_including_sequestration' => null, + 'poultry_meat_excluding_sequestration' => null, + 'meat_produced_kg' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'poultry_meat_including_sequestration' => false, + 'poultry_meat_excluding_sequestration' => false, + 'meat_produced_kg' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'poultry_meat_including_sequestration' => 'poultryMeatIncludingSequestration', + 'poultry_meat_excluding_sequestration' => 'poultryMeatExcludingSequestration', + 'meat_produced_kg' => 'meatProducedKg' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'poultry_meat_including_sequestration' => 'setPoultryMeatIncludingSequestration', + 'poultry_meat_excluding_sequestration' => 'setPoultryMeatExcludingSequestration', + 'meat_produced_kg' => 'setMeatProducedKg' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'poultry_meat_including_sequestration' => 'getPoultryMeatIncludingSequestration', + 'poultry_meat_excluding_sequestration' => 'getPoultryMeatExcludingSequestration', + 'meat_produced_kg' => 'getMeatProducedKg' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('poultry_meat_including_sequestration', $data ?? [], null); + $this->setIfExists('poultry_meat_excluding_sequestration', $data ?? [], null); + $this->setIfExists('meat_produced_kg', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['poultry_meat_including_sequestration'] === null) { + $invalidProperties[] = "'poultry_meat_including_sequestration' can't be null"; + } + if ($this->container['poultry_meat_excluding_sequestration'] === null) { + $invalidProperties[] = "'poultry_meat_excluding_sequestration' can't be null"; + } + if ($this->container['meat_produced_kg'] === null) { + $invalidProperties[] = "'meat_produced_kg' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets poultry_meat_including_sequestration + * + * @return float + */ + public function getPoultryMeatIncludingSequestration() + { + return $this->container['poultry_meat_including_sequestration']; + } + + /** + * Sets poultry_meat_including_sequestration + * + * @param float $poultry_meat_including_sequestration Poultry meat including carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setPoultryMeatIncludingSequestration($poultry_meat_including_sequestration) + { + if (is_null($poultry_meat_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable poultry_meat_including_sequestration cannot be null'); + } + $this->container['poultry_meat_including_sequestration'] = $poultry_meat_including_sequestration; + + return $this; + } + + /** + * Gets poultry_meat_excluding_sequestration + * + * @return float + */ + public function getPoultryMeatExcludingSequestration() + { + return $this->container['poultry_meat_excluding_sequestration']; + } + + /** + * Sets poultry_meat_excluding_sequestration + * + * @param float $poultry_meat_excluding_sequestration Poultry meat excluding carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setPoultryMeatExcludingSequestration($poultry_meat_excluding_sequestration) + { + if (is_null($poultry_meat_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable poultry_meat_excluding_sequestration cannot be null'); + } + $this->container['poultry_meat_excluding_sequestration'] = $poultry_meat_excluding_sequestration; + + return $this; + } + + /** + * Gets meat_produced_kg + * + * @return float + */ + public function getMeatProducedKg() + { + return $this->container['meat_produced_kg']; + } + + /** + * Sets meat_produced_kg + * + * @param float $meat_produced_kg Poultry meat produced in kg liveweight + * + * @return self + */ + public function setMeatProducedKg($meat_produced_kg) + { + if (is_null($meat_produced_kg)) { + throw new \InvalidArgumentException('non-nullable meat_produced_kg cannot be null'); + } + $this->container['meat_produced_kg'] = $meat_produced_kg; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateLayersInner.php b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateLayersInner.php new file mode 100644 index 00000000..33eb23c0 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateLayersInner.php @@ -0,0 +1,635 @@ + + */ +class PostPoultry200ResponseIntermediateLayersInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_200_response_intermediateLayers_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostPoultry200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostPoultry200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration', + 'intensities' => '\OpenAPI\Client\Model\PostPoultry200ResponseIntermediateLayersInnerIntensities', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intensities' => null, + 'net' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intensities' => false, + 'net' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intensities' => 'intensities', + 'net' => 'net' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intensities' => 'setIntensities', + 'net' => 'setNet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intensities' => 'getIntensities', + 'net' => 'getNet' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostPoultry200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostPoultry200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostPoultry200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostPoultry200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostPoultry200ResponseIntermediateLayersInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostPoultry200ResponseIntermediateLayersInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.php b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.php new file mode 100644 index 00000000..9fddac27 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.php @@ -0,0 +1,487 @@ + + */ +class PostPoultry200ResponseIntermediateLayersInnerIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_200_response_intermediateLayers_inner_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'poultry_eggs_including_sequestration' => 'float', + 'poultry_eggs_excluding_sequestration' => 'float', + 'eggs_produced_kg' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'poultry_eggs_including_sequestration' => null, + 'poultry_eggs_excluding_sequestration' => null, + 'eggs_produced_kg' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'poultry_eggs_including_sequestration' => false, + 'poultry_eggs_excluding_sequestration' => false, + 'eggs_produced_kg' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'poultry_eggs_including_sequestration' => 'poultryEggsIncludingSequestration', + 'poultry_eggs_excluding_sequestration' => 'poultryEggsExcludingSequestration', + 'eggs_produced_kg' => 'eggsProducedKg' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'poultry_eggs_including_sequestration' => 'setPoultryEggsIncludingSequestration', + 'poultry_eggs_excluding_sequestration' => 'setPoultryEggsExcludingSequestration', + 'eggs_produced_kg' => 'setEggsProducedKg' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'poultry_eggs_including_sequestration' => 'getPoultryEggsIncludingSequestration', + 'poultry_eggs_excluding_sequestration' => 'getPoultryEggsExcludingSequestration', + 'eggs_produced_kg' => 'getEggsProducedKg' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('poultry_eggs_including_sequestration', $data ?? [], null); + $this->setIfExists('poultry_eggs_excluding_sequestration', $data ?? [], null); + $this->setIfExists('eggs_produced_kg', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['poultry_eggs_including_sequestration'] === null) { + $invalidProperties[] = "'poultry_eggs_including_sequestration' can't be null"; + } + if ($this->container['poultry_eggs_excluding_sequestration'] === null) { + $invalidProperties[] = "'poultry_eggs_excluding_sequestration' can't be null"; + } + if ($this->container['eggs_produced_kg'] === null) { + $invalidProperties[] = "'eggs_produced_kg' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets poultry_eggs_including_sequestration + * + * @return float + */ + public function getPoultryEggsIncludingSequestration() + { + return $this->container['poultry_eggs_including_sequestration']; + } + + /** + * Sets poultry_eggs_including_sequestration + * + * @param float $poultry_eggs_including_sequestration Poultry eggs including carbon sequestration, in kg-CO2e/kg eggs + * + * @return self + */ + public function setPoultryEggsIncludingSequestration($poultry_eggs_including_sequestration) + { + if (is_null($poultry_eggs_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable poultry_eggs_including_sequestration cannot be null'); + } + $this->container['poultry_eggs_including_sequestration'] = $poultry_eggs_including_sequestration; + + return $this; + } + + /** + * Gets poultry_eggs_excluding_sequestration + * + * @return float + */ + public function getPoultryEggsExcludingSequestration() + { + return $this->container['poultry_eggs_excluding_sequestration']; + } + + /** + * Sets poultry_eggs_excluding_sequestration + * + * @param float $poultry_eggs_excluding_sequestration Poultry eggs excluding carbon sequestration, in kg-CO2e/kg eggs + * + * @return self + */ + public function setPoultryEggsExcludingSequestration($poultry_eggs_excluding_sequestration) + { + if (is_null($poultry_eggs_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable poultry_eggs_excluding_sequestration cannot be null'); + } + $this->container['poultry_eggs_excluding_sequestration'] = $poultry_eggs_excluding_sequestration; + + return $this; + } + + /** + * Gets eggs_produced_kg + * + * @return float + */ + public function getEggsProducedKg() + { + return $this->container['eggs_produced_kg']; + } + + /** + * Sets eggs_produced_kg + * + * @param float $eggs_produced_kg Poultry eggs produced in kg + * + * @return self + */ + public function setEggsProducedKg($eggs_produced_kg) + { + if (is_null($eggs_produced_kg)) { + throw new \InvalidArgumentException('non-nullable eggs_produced_kg cannot be null'); + } + $this->container['eggs_produced_kg'] = $eggs_produced_kg; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseNet.php b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseNet.php new file mode 100644 index 00000000..f99a8fcc --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseNet.php @@ -0,0 +1,487 @@ + + */ +class PostPoultry200ResponseNet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_200_response_net'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float', + 'broilers' => 'float', + 'layers' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null, + 'broilers' => null, + 'layers' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false, + 'broilers' => false, + 'layers' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total', + 'broilers' => 'broilers', + 'layers' => 'layers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal', + 'broilers' => 'setBroilers', + 'layers' => 'setLayers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal', + 'broilers' => 'getBroilers', + 'layers' => 'getLayers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + $this->setIfExists('broilers', $data ?? [], null); + $this->setIfExists('layers', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + if ($this->container['broilers'] === null) { + $invalidProperties[] = "'broilers' can't be null"; + } + if ($this->container['layers'] === null) { + $invalidProperties[] = "'layers' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total net emissions of this activity, in tonnes-CO2e/year + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets broilers + * + * @return float + */ + public function getBroilers() + { + return $this->container['broilers']; + } + + /** + * Sets broilers + * + * @param float $broilers Net emissions of broilers, in tonnes-CO2e/year + * + * @return self + */ + public function setBroilers($broilers) + { + if (is_null($broilers)) { + throw new \InvalidArgumentException('non-nullable broilers cannot be null'); + } + $this->container['broilers'] = $broilers; + + return $this; + } + + /** + * Gets layers + * + * @return float + */ + public function getLayers() + { + return $this->container['layers']; + } + + /** + * Sets layers + * + * @param float $layers Net emissions of layers, in tonnes-CO2e/year + * + * @return self + */ + public function setLayers($layers) + { + if (is_null($layers)) { + throw new \InvalidArgumentException('non-nullable layers cannot be null'); + } + $this->container['layers'] = $layers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseScope1.php b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseScope1.php new file mode 100644 index 00000000..ae2cbda3 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseScope1.php @@ -0,0 +1,784 @@ + + */ +class PostPoultry200ResponseScope1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_200_response_scope1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel_co2' => 'float', + 'fuel_ch4' => 'float', + 'fuel_n2_o' => 'float', + 'manure_management_ch4' => 'float', + 'manure_management_n2_o' => 'float', + 'atmospheric_deposition_n2_o' => 'float', + 'leaching_and_runoff_n2_o' => 'float', + 'total_co2' => 'float', + 'total_ch4' => 'float', + 'total_n2_o' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel_co2' => null, + 'fuel_ch4' => null, + 'fuel_n2_o' => null, + 'manure_management_ch4' => null, + 'manure_management_n2_o' => null, + 'atmospheric_deposition_n2_o' => null, + 'leaching_and_runoff_n2_o' => null, + 'total_co2' => null, + 'total_ch4' => null, + 'total_n2_o' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel_co2' => false, + 'fuel_ch4' => false, + 'fuel_n2_o' => false, + 'manure_management_ch4' => false, + 'manure_management_n2_o' => false, + 'atmospheric_deposition_n2_o' => false, + 'leaching_and_runoff_n2_o' => false, + 'total_co2' => false, + 'total_ch4' => false, + 'total_n2_o' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel_co2' => 'fuelCO2', + 'fuel_ch4' => 'fuelCH4', + 'fuel_n2_o' => 'fuelN2O', + 'manure_management_ch4' => 'manureManagementCH4', + 'manure_management_n2_o' => 'manureManagementN2O', + 'atmospheric_deposition_n2_o' => 'atmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'leachingAndRunoffN2O', + 'total_co2' => 'totalCO2', + 'total_ch4' => 'totalCH4', + 'total_n2_o' => 'totalN2O', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel_co2' => 'setFuelCo2', + 'fuel_ch4' => 'setFuelCh4', + 'fuel_n2_o' => 'setFuelN2O', + 'manure_management_ch4' => 'setManureManagementCh4', + 'manure_management_n2_o' => 'setManureManagementN2O', + 'atmospheric_deposition_n2_o' => 'setAtmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'setLeachingAndRunoffN2O', + 'total_co2' => 'setTotalCo2', + 'total_ch4' => 'setTotalCh4', + 'total_n2_o' => 'setTotalN2O', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel_co2' => 'getFuelCo2', + 'fuel_ch4' => 'getFuelCh4', + 'fuel_n2_o' => 'getFuelN2O', + 'manure_management_ch4' => 'getManureManagementCh4', + 'manure_management_n2_o' => 'getManureManagementN2O', + 'atmospheric_deposition_n2_o' => 'getAtmosphericDepositionN2O', + 'leaching_and_runoff_n2_o' => 'getLeachingAndRunoffN2O', + 'total_co2' => 'getTotalCo2', + 'total_ch4' => 'getTotalCh4', + 'total_n2_o' => 'getTotalN2O', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel_co2', $data ?? [], null); + $this->setIfExists('fuel_ch4', $data ?? [], null); + $this->setIfExists('fuel_n2_o', $data ?? [], null); + $this->setIfExists('manure_management_ch4', $data ?? [], null); + $this->setIfExists('manure_management_n2_o', $data ?? [], null); + $this->setIfExists('atmospheric_deposition_n2_o', $data ?? [], null); + $this->setIfExists('leaching_and_runoff_n2_o', $data ?? [], null); + $this->setIfExists('total_co2', $data ?? [], null); + $this->setIfExists('total_ch4', $data ?? [], null); + $this->setIfExists('total_n2_o', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel_co2'] === null) { + $invalidProperties[] = "'fuel_co2' can't be null"; + } + if ($this->container['fuel_ch4'] === null) { + $invalidProperties[] = "'fuel_ch4' can't be null"; + } + if ($this->container['fuel_n2_o'] === null) { + $invalidProperties[] = "'fuel_n2_o' can't be null"; + } + if ($this->container['manure_management_ch4'] === null) { + $invalidProperties[] = "'manure_management_ch4' can't be null"; + } + if ($this->container['manure_management_n2_o'] === null) { + $invalidProperties[] = "'manure_management_n2_o' can't be null"; + } + if ($this->container['atmospheric_deposition_n2_o'] === null) { + $invalidProperties[] = "'atmospheric_deposition_n2_o' can't be null"; + } + if ($this->container['leaching_and_runoff_n2_o'] === null) { + $invalidProperties[] = "'leaching_and_runoff_n2_o' can't be null"; + } + if ($this->container['total_co2'] === null) { + $invalidProperties[] = "'total_co2' can't be null"; + } + if ($this->container['total_ch4'] === null) { + $invalidProperties[] = "'total_ch4' can't be null"; + } + if ($this->container['total_n2_o'] === null) { + $invalidProperties[] = "'total_n2_o' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel_co2 + * + * @return float + */ + public function getFuelCo2() + { + return $this->container['fuel_co2']; + } + + /** + * Sets fuel_co2 + * + * @param float $fuel_co2 CO2 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCo2($fuel_co2) + { + if (is_null($fuel_co2)) { + throw new \InvalidArgumentException('non-nullable fuel_co2 cannot be null'); + } + $this->container['fuel_co2'] = $fuel_co2; + + return $this; + } + + /** + * Gets fuel_ch4 + * + * @return float + */ + public function getFuelCh4() + { + return $this->container['fuel_ch4']; + } + + /** + * Sets fuel_ch4 + * + * @param float $fuel_ch4 CH4 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCh4($fuel_ch4) + { + if (is_null($fuel_ch4)) { + throw new \InvalidArgumentException('non-nullable fuel_ch4 cannot be null'); + } + $this->container['fuel_ch4'] = $fuel_ch4; + + return $this; + } + + /** + * Gets fuel_n2_o + * + * @return float + */ + public function getFuelN2O() + { + return $this->container['fuel_n2_o']; + } + + /** + * Sets fuel_n2_o + * + * @param float $fuel_n2_o N2O emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelN2O($fuel_n2_o) + { + if (is_null($fuel_n2_o)) { + throw new \InvalidArgumentException('non-nullable fuel_n2_o cannot be null'); + } + $this->container['fuel_n2_o'] = $fuel_n2_o; + + return $this; + } + + /** + * Gets manure_management_ch4 + * + * @return float + */ + public function getManureManagementCh4() + { + return $this->container['manure_management_ch4']; + } + + /** + * Sets manure_management_ch4 + * + * @param float $manure_management_ch4 CH4 emissions from manure management, in tonnes-CO2e + * + * @return self + */ + public function setManureManagementCh4($manure_management_ch4) + { + if (is_null($manure_management_ch4)) { + throw new \InvalidArgumentException('non-nullable manure_management_ch4 cannot be null'); + } + $this->container['manure_management_ch4'] = $manure_management_ch4; + + return $this; + } + + /** + * Gets manure_management_n2_o + * + * @return float + */ + public function getManureManagementN2O() + { + return $this->container['manure_management_n2_o']; + } + + /** + * Sets manure_management_n2_o + * + * @param float $manure_management_n2_o N2O emissions from manure management, in tonnes-CO2e + * + * @return self + */ + public function setManureManagementN2O($manure_management_n2_o) + { + if (is_null($manure_management_n2_o)) { + throw new \InvalidArgumentException('non-nullable manure_management_n2_o cannot be null'); + } + $this->container['manure_management_n2_o'] = $manure_management_n2_o; + + return $this; + } + + /** + * Gets atmospheric_deposition_n2_o + * + * @return float + */ + public function getAtmosphericDepositionN2O() + { + return $this->container['atmospheric_deposition_n2_o']; + } + + /** + * Sets atmospheric_deposition_n2_o + * + * @param float $atmospheric_deposition_n2_o N2O emissions from atmospheric deposition, in tonnes-CO2e + * + * @return self + */ + public function setAtmosphericDepositionN2O($atmospheric_deposition_n2_o) + { + if (is_null($atmospheric_deposition_n2_o)) { + throw new \InvalidArgumentException('non-nullable atmospheric_deposition_n2_o cannot be null'); + } + $this->container['atmospheric_deposition_n2_o'] = $atmospheric_deposition_n2_o; + + return $this; + } + + /** + * Gets leaching_and_runoff_n2_o + * + * @return float + */ + public function getLeachingAndRunoffN2O() + { + return $this->container['leaching_and_runoff_n2_o']; + } + + /** + * Sets leaching_and_runoff_n2_o + * + * @param float $leaching_and_runoff_n2_o N2O emissions from leeching and runoff, in tonnes-CO2e + * + * @return self + */ + public function setLeachingAndRunoffN2O($leaching_and_runoff_n2_o) + { + if (is_null($leaching_and_runoff_n2_o)) { + throw new \InvalidArgumentException('non-nullable leaching_and_runoff_n2_o cannot be null'); + } + $this->container['leaching_and_runoff_n2_o'] = $leaching_and_runoff_n2_o; + + return $this; + } + + /** + * Gets total_co2 + * + * @return float + */ + public function getTotalCo2() + { + return $this->container['total_co2']; + } + + /** + * Sets total_co2 + * + * @param float $total_co2 Total CO2 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCo2($total_co2) + { + if (is_null($total_co2)) { + throw new \InvalidArgumentException('non-nullable total_co2 cannot be null'); + } + $this->container['total_co2'] = $total_co2; + + return $this; + } + + /** + * Gets total_ch4 + * + * @return float + */ + public function getTotalCh4() + { + return $this->container['total_ch4']; + } + + /** + * Sets total_ch4 + * + * @param float $total_ch4 Total CH4 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCh4($total_ch4) + { + if (is_null($total_ch4)) { + throw new \InvalidArgumentException('non-nullable total_ch4 cannot be null'); + } + $this->container['total_ch4'] = $total_ch4; + + return $this; + } + + /** + * Gets total_n2_o + * + * @return float + */ + public function getTotalN2O() + { + return $this->container['total_n2_o']; + } + + /** + * Sets total_n2_o + * + * @param float $total_n2_o Total N2O scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalN2O($total_n2_o) + { + if (is_null($total_n2_o)) { + throw new \InvalidArgumentException('non-nullable total_n2_o cannot be null'); + } + $this->container['total_n2_o'] = $total_n2_o; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseScope3.php b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseScope3.php new file mode 100644 index 00000000..278f067e --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultry200ResponseScope3.php @@ -0,0 +1,636 @@ + + */ +class PostPoultry200ResponseScope3 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_200_response_scope3'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'purchased_feed' => 'float', + 'purchased_hay' => 'float', + 'purchased_livestock' => 'float', + 'herbicide' => 'float', + 'electricity' => 'float', + 'fuel' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'purchased_feed' => null, + 'purchased_hay' => null, + 'purchased_livestock' => null, + 'herbicide' => null, + 'electricity' => null, + 'fuel' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'purchased_feed' => false, + 'purchased_hay' => false, + 'purchased_livestock' => false, + 'herbicide' => false, + 'electricity' => false, + 'fuel' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'purchased_feed' => 'purchasedFeed', + 'purchased_hay' => 'purchasedHay', + 'purchased_livestock' => 'purchasedLivestock', + 'herbicide' => 'herbicide', + 'electricity' => 'electricity', + 'fuel' => 'fuel', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'purchased_feed' => 'setPurchasedFeed', + 'purchased_hay' => 'setPurchasedHay', + 'purchased_livestock' => 'setPurchasedLivestock', + 'herbicide' => 'setHerbicide', + 'electricity' => 'setElectricity', + 'fuel' => 'setFuel', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'purchased_feed' => 'getPurchasedFeed', + 'purchased_hay' => 'getPurchasedHay', + 'purchased_livestock' => 'getPurchasedLivestock', + 'herbicide' => 'getHerbicide', + 'electricity' => 'getElectricity', + 'fuel' => 'getFuel', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('purchased_feed', $data ?? [], null); + $this->setIfExists('purchased_hay', $data ?? [], null); + $this->setIfExists('purchased_livestock', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('electricity', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['purchased_feed'] === null) { + $invalidProperties[] = "'purchased_feed' can't be null"; + } + if ($this->container['purchased_hay'] === null) { + $invalidProperties[] = "'purchased_hay' can't be null"; + } + if ($this->container['purchased_livestock'] === null) { + $invalidProperties[] = "'purchased_livestock' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['electricity'] === null) { + $invalidProperties[] = "'electricity' can't be null"; + } + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets purchased_feed + * + * @return float + */ + public function getPurchasedFeed() + { + return $this->container['purchased_feed']; + } + + /** + * Sets purchased_feed + * + * @param float $purchased_feed Emissions from purchased feed, in tonnes-CO2e + * + * @return self + */ + public function setPurchasedFeed($purchased_feed) + { + if (is_null($purchased_feed)) { + throw new \InvalidArgumentException('non-nullable purchased_feed cannot be null'); + } + $this->container['purchased_feed'] = $purchased_feed; + + return $this; + } + + /** + * Gets purchased_hay + * + * @return float + */ + public function getPurchasedHay() + { + return $this->container['purchased_hay']; + } + + /** + * Sets purchased_hay + * + * @param float $purchased_hay Emissions from purchased hay, in tonnes-CO2e + * + * @return self + */ + public function setPurchasedHay($purchased_hay) + { + if (is_null($purchased_hay)) { + throw new \InvalidArgumentException('non-nullable purchased_hay cannot be null'); + } + $this->container['purchased_hay'] = $purchased_hay; + + return $this; + } + + /** + * Gets purchased_livestock + * + * @return float + */ + public function getPurchasedLivestock() + { + return $this->container['purchased_livestock']; + } + + /** + * Sets purchased_livestock + * + * @param float $purchased_livestock Emissions from purchased livestock, in tonnes-CO2e + * + * @return self + */ + public function setPurchasedLivestock($purchased_livestock) + { + if (is_null($purchased_livestock)) { + throw new \InvalidArgumentException('non-nullable purchased_livestock cannot be null'); + } + $this->container['purchased_livestock'] = $purchased_livestock; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Emissions from herbicide, in tonnes-CO2e + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets electricity + * + * @return float + */ + public function getElectricity() + { + return $this->container['electricity']; + } + + /** + * Sets electricity + * + * @param float $electricity Emissions from electricity, in tonnes-CO2e + * + * @return self + */ + public function setElectricity($electricity) + { + if (is_null($electricity)) { + throw new \InvalidArgumentException('non-nullable electricity cannot be null'); + } + $this->container['electricity'] = $electricity; + + return $this; + } + + /** + * Gets fuel + * + * @return float + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param float $fuel Emissions from fuel, in tonnes-CO2e + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 3 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequest.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequest.php new file mode 100644 index 00000000..9b7c23d2 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequest.php @@ -0,0 +1,647 @@ + + */ +class PostPoultryRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'north_of_tropic_of_capricorn' => 'bool', + 'rainfall_above600' => 'bool', + 'broilers' => '\OpenAPI\Client\Model\PostPoultryRequestBroilersInner[]', + 'layers' => '\OpenAPI\Client\Model\PostPoultryRequestLayersInner[]', + 'vegetation' => '\OpenAPI\Client\Model\PostPoultryRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'north_of_tropic_of_capricorn' => null, + 'rainfall_above600' => null, + 'broilers' => null, + 'layers' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'north_of_tropic_of_capricorn' => false, + 'rainfall_above600' => false, + 'broilers' => false, + 'layers' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'north_of_tropic_of_capricorn' => 'northOfTropicOfCapricorn', + 'rainfall_above600' => 'rainfallAbove600', + 'broilers' => 'broilers', + 'layers' => 'layers', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'north_of_tropic_of_capricorn' => 'setNorthOfTropicOfCapricorn', + 'rainfall_above600' => 'setRainfallAbove600', + 'broilers' => 'setBroilers', + 'layers' => 'setLayers', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'north_of_tropic_of_capricorn' => 'getNorthOfTropicOfCapricorn', + 'rainfall_above600' => 'getRainfallAbove600', + 'broilers' => 'getBroilers', + 'layers' => 'getLayers', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('north_of_tropic_of_capricorn', $data ?? [], null); + $this->setIfExists('rainfall_above600', $data ?? [], null); + $this->setIfExists('broilers', $data ?? [], null); + $this->setIfExists('layers', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['north_of_tropic_of_capricorn'] === null) { + $invalidProperties[] = "'north_of_tropic_of_capricorn' can't be null"; + } + if ($this->container['rainfall_above600'] === null) { + $invalidProperties[] = "'rainfall_above600' can't be null"; + } + if ($this->container['broilers'] === null) { + $invalidProperties[] = "'broilers' can't be null"; + } + if ($this->container['layers'] === null) { + $invalidProperties[] = "'layers' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets north_of_tropic_of_capricorn + * + * @return bool + */ + public function getNorthOfTropicOfCapricorn() + { + return $this->container['north_of_tropic_of_capricorn']; + } + + /** + * Sets north_of_tropic_of_capricorn + * + * @param bool $north_of_tropic_of_capricorn Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude + * + * @return self + */ + public function setNorthOfTropicOfCapricorn($north_of_tropic_of_capricorn) + { + if (is_null($north_of_tropic_of_capricorn)) { + throw new \InvalidArgumentException('non-nullable north_of_tropic_of_capricorn cannot be null'); + } + $this->container['north_of_tropic_of_capricorn'] = $north_of_tropic_of_capricorn; + + return $this; + } + + /** + * Gets rainfall_above600 + * + * @return bool + */ + public function getRainfallAbove600() + { + return $this->container['rainfall_above600']; + } + + /** + * Sets rainfall_above600 + * + * @param bool $rainfall_above600 Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm + * + * @return self + */ + public function setRainfallAbove600($rainfall_above600) + { + if (is_null($rainfall_above600)) { + throw new \InvalidArgumentException('non-nullable rainfall_above600 cannot be null'); + } + $this->container['rainfall_above600'] = $rainfall_above600; + + return $this; + } + + /** + * Gets broilers + * + * @return \OpenAPI\Client\Model\PostPoultryRequestBroilersInner[] + */ + public function getBroilers() + { + return $this->container['broilers']; + } + + /** + * Sets broilers + * + * @param \OpenAPI\Client\Model\PostPoultryRequestBroilersInner[] $broilers broilers + * + * @return self + */ + public function setBroilers($broilers) + { + if (is_null($broilers)) { + throw new \InvalidArgumentException('non-nullable broilers cannot be null'); + } + $this->container['broilers'] = $broilers; + + return $this; + } + + /** + * Gets layers + * + * @return \OpenAPI\Client\Model\PostPoultryRequestLayersInner[] + */ + public function getLayers() + { + return $this->container['layers']; + } + + /** + * Sets layers + * + * @param \OpenAPI\Client\Model\PostPoultryRequestLayersInner[] $layers layers + * + * @return self + */ + public function setLayers($layers) + { + if (is_null($layers)) { + throw new \InvalidArgumentException('non-nullable layers cannot be null'); + } + $this->container['layers'] = $layers; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostPoultryRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostPoultryRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInner.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInner.php new file mode 100644 index 00000000..74062431 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInner.php @@ -0,0 +1,1163 @@ + + */ +class PostPoultryRequestBroilersInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_broilers_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'groups' => '\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInner[]', + 'diesel' => 'float', + 'petrol' => 'float', + 'lpg' => 'float', + 'electricity_source' => 'string', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'hay' => 'float', + 'herbicide' => 'float', + 'herbicide_other' => 'float', + 'manure_waste_allocation' => 'float', + 'waste_handled_drylot_or_storage' => 'float', + 'litter_recycled' => 'float', + 'litter_recycle_frequency' => 'float', + 'purchased_free_range' => 'float', + 'meat_chicken_growers_purchases' => '\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases', + 'meat_chicken_layers_purchases' => '\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenLayersPurchases', + 'meat_other_purchases' => '\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatOtherPurchases', + 'sales' => '\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerSalesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'groups' => null, + 'diesel' => null, + 'petrol' => null, + 'lpg' => null, + 'electricity_source' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'hay' => null, + 'herbicide' => null, + 'herbicide_other' => null, + 'manure_waste_allocation' => null, + 'waste_handled_drylot_or_storage' => null, + 'litter_recycled' => null, + 'litter_recycle_frequency' => null, + 'purchased_free_range' => null, + 'meat_chicken_growers_purchases' => null, + 'meat_chicken_layers_purchases' => null, + 'meat_other_purchases' => null, + 'sales' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'groups' => false, + 'diesel' => false, + 'petrol' => false, + 'lpg' => false, + 'electricity_source' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'hay' => false, + 'herbicide' => false, + 'herbicide_other' => false, + 'manure_waste_allocation' => false, + 'waste_handled_drylot_or_storage' => false, + 'litter_recycled' => false, + 'litter_recycle_frequency' => false, + 'purchased_free_range' => false, + 'meat_chicken_growers_purchases' => false, + 'meat_chicken_layers_purchases' => false, + 'meat_other_purchases' => false, + 'sales' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'groups' => 'groups', + 'diesel' => 'diesel', + 'petrol' => 'petrol', + 'lpg' => 'lpg', + 'electricity_source' => 'electricitySource', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'hay' => 'hay', + 'herbicide' => 'herbicide', + 'herbicide_other' => 'herbicideOther', + 'manure_waste_allocation' => 'manureWasteAllocation', + 'waste_handled_drylot_or_storage' => 'wasteHandledDrylotOrStorage', + 'litter_recycled' => 'litterRecycled', + 'litter_recycle_frequency' => 'litterRecycleFrequency', + 'purchased_free_range' => 'purchasedFreeRange', + 'meat_chicken_growers_purchases' => 'meatChickenGrowersPurchases', + 'meat_chicken_layers_purchases' => 'meatChickenLayersPurchases', + 'meat_other_purchases' => 'meatOtherPurchases', + 'sales' => 'sales' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'groups' => 'setGroups', + 'diesel' => 'setDiesel', + 'petrol' => 'setPetrol', + 'lpg' => 'setLpg', + 'electricity_source' => 'setElectricitySource', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'hay' => 'setHay', + 'herbicide' => 'setHerbicide', + 'herbicide_other' => 'setHerbicideOther', + 'manure_waste_allocation' => 'setManureWasteAllocation', + 'waste_handled_drylot_or_storage' => 'setWasteHandledDrylotOrStorage', + 'litter_recycled' => 'setLitterRecycled', + 'litter_recycle_frequency' => 'setLitterRecycleFrequency', + 'purchased_free_range' => 'setPurchasedFreeRange', + 'meat_chicken_growers_purchases' => 'setMeatChickenGrowersPurchases', + 'meat_chicken_layers_purchases' => 'setMeatChickenLayersPurchases', + 'meat_other_purchases' => 'setMeatOtherPurchases', + 'sales' => 'setSales' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'groups' => 'getGroups', + 'diesel' => 'getDiesel', + 'petrol' => 'getPetrol', + 'lpg' => 'getLpg', + 'electricity_source' => 'getElectricitySource', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'hay' => 'getHay', + 'herbicide' => 'getHerbicide', + 'herbicide_other' => 'getHerbicideOther', + 'manure_waste_allocation' => 'getManureWasteAllocation', + 'waste_handled_drylot_or_storage' => 'getWasteHandledDrylotOrStorage', + 'litter_recycled' => 'getLitterRecycled', + 'litter_recycle_frequency' => 'getLitterRecycleFrequency', + 'purchased_free_range' => 'getPurchasedFreeRange', + 'meat_chicken_growers_purchases' => 'getMeatChickenGrowersPurchases', + 'meat_chicken_layers_purchases' => 'getMeatChickenLayersPurchases', + 'meat_other_purchases' => 'getMeatOtherPurchases', + 'sales' => 'getSales' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const ELECTRICITY_SOURCE_STATE_GRID = 'State Grid'; + public const ELECTRICITY_SOURCE_RENEWABLE = 'Renewable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getElectricitySourceAllowableValues() + { + return [ + self::ELECTRICITY_SOURCE_STATE_GRID, + self::ELECTRICITY_SOURCE_RENEWABLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('groups', $data ?? [], null); + $this->setIfExists('diesel', $data ?? [], null); + $this->setIfExists('petrol', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + $this->setIfExists('electricity_source', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('hay', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('herbicide_other', $data ?? [], null); + $this->setIfExists('manure_waste_allocation', $data ?? [], null); + $this->setIfExists('waste_handled_drylot_or_storage', $data ?? [], null); + $this->setIfExists('litter_recycled', $data ?? [], null); + $this->setIfExists('litter_recycle_frequency', $data ?? [], null); + $this->setIfExists('purchased_free_range', $data ?? [], null); + $this->setIfExists('meat_chicken_growers_purchases', $data ?? [], null); + $this->setIfExists('meat_chicken_layers_purchases', $data ?? [], null); + $this->setIfExists('meat_other_purchases', $data ?? [], null); + $this->setIfExists('sales', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['groups'] === null) { + $invalidProperties[] = "'groups' can't be null"; + } + if ($this->container['diesel'] === null) { + $invalidProperties[] = "'diesel' can't be null"; + } + if ($this->container['petrol'] === null) { + $invalidProperties[] = "'petrol' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + if ($this->container['electricity_source'] === null) { + $invalidProperties[] = "'electricity_source' can't be null"; + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!is_null($this->container['electricity_source']) && !in_array($this->container['electricity_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'electricity_source', must be one of '%s'", + $this->container['electricity_source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['hay'] === null) { + $invalidProperties[] = "'hay' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['herbicide_other'] === null) { + $invalidProperties[] = "'herbicide_other' can't be null"; + } + if ($this->container['manure_waste_allocation'] === null) { + $invalidProperties[] = "'manure_waste_allocation' can't be null"; + } + if ($this->container['waste_handled_drylot_or_storage'] === null) { + $invalidProperties[] = "'waste_handled_drylot_or_storage' can't be null"; + } + if ($this->container['litter_recycled'] === null) { + $invalidProperties[] = "'litter_recycled' can't be null"; + } + if ($this->container['litter_recycle_frequency'] === null) { + $invalidProperties[] = "'litter_recycle_frequency' can't be null"; + } + if ($this->container['purchased_free_range'] === null) { + $invalidProperties[] = "'purchased_free_range' can't be null"; + } + if ($this->container['meat_chicken_growers_purchases'] === null) { + $invalidProperties[] = "'meat_chicken_growers_purchases' can't be null"; + } + if ($this->container['meat_chicken_layers_purchases'] === null) { + $invalidProperties[] = "'meat_chicken_layers_purchases' can't be null"; + } + if ($this->container['meat_other_purchases'] === null) { + $invalidProperties[] = "'meat_other_purchases' can't be null"; + } + if ($this->container['sales'] === null) { + $invalidProperties[] = "'sales' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets groups + * + * @return \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInner[] + */ + public function getGroups() + { + return $this->container['groups']; + } + + /** + * Sets groups + * + * @param \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInner[] $groups groups + * + * @return self + */ + public function setGroups($groups) + { + if (is_null($groups)) { + throw new \InvalidArgumentException('non-nullable groups cannot be null'); + } + $this->container['groups'] = $groups; + + return $this; + } + + /** + * Gets diesel + * + * @return float + */ + public function getDiesel() + { + return $this->container['diesel']; + } + + /** + * Sets diesel + * + * @param float $diesel Diesel usage in L (litres) + * + * @return self + */ + public function setDiesel($diesel) + { + if (is_null($diesel)) { + throw new \InvalidArgumentException('non-nullable diesel cannot be null'); + } + $this->container['diesel'] = $diesel; + + return $this; + } + + /** + * Gets petrol + * + * @return float + */ + public function getPetrol() + { + return $this->container['petrol']; + } + + /** + * Sets petrol + * + * @param float $petrol Petrol usage in L (litres) + * + * @return self + */ + public function setPetrol($petrol) + { + if (is_null($petrol)) { + throw new \InvalidArgumentException('non-nullable petrol cannot be null'); + } + $this->container['petrol'] = $petrol; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + + /** + * Gets electricity_source + * + * @return string + */ + public function getElectricitySource() + { + return $this->container['electricity_source']; + } + + /** + * Sets electricity_source + * + * @param string $electricity_source Source of electricity + * + * @return self + */ + public function setElectricitySource($electricity_source) + { + if (is_null($electricity_source)) { + throw new \InvalidArgumentException('non-nullable electricity_source cannot be null'); + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!in_array($electricity_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'electricity_source', must be one of '%s'", + $electricity_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['electricity_source'] = $electricity_source; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostPoultryRequestBroilersInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostPoultryRequestBroilersInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets hay + * + * @return float + */ + public function getHay() + { + return $this->container['hay']; + } + + /** + * Sets hay + * + * @param float $hay Hay purchased in tonnes + * + * @return self + */ + public function setHay($hay) + { + if (is_null($hay)) { + throw new \InvalidArgumentException('non-nullable hay cannot be null'); + } + $this->container['hay'] = $hay; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets herbicide_other + * + * @return float + */ + public function getHerbicideOther() + { + return $this->container['herbicide_other']; + } + + /** + * Sets herbicide_other + * + * @param float $herbicide_other Total amount of active ingredients of from other herbicides in kg (kilograms) + * + * @return self + */ + public function setHerbicideOther($herbicide_other) + { + if (is_null($herbicide_other)) { + throw new \InvalidArgumentException('non-nullable herbicide_other cannot be null'); + } + $this->container['herbicide_other'] = $herbicide_other; + + return $this; + } + + /** + * Gets manure_waste_allocation + * + * @return float + */ + public function getManureWasteAllocation() + { + return $this->container['manure_waste_allocation']; + } + + /** + * Sets manure_waste_allocation + * + * @param float $manure_waste_allocation Fraction allocation of manure waste, from 0 to 1. Note: only for pasture range, paddock and free range systems + * + * @return self + */ + public function setManureWasteAllocation($manure_waste_allocation) + { + if (is_null($manure_waste_allocation)) { + throw new \InvalidArgumentException('non-nullable manure_waste_allocation cannot be null'); + } + $this->container['manure_waste_allocation'] = $manure_waste_allocation; + + return $this; + } + + /** + * Gets waste_handled_drylot_or_storage + * + * @return float + */ + public function getWasteHandledDrylotOrStorage() + { + return $this->container['waste_handled_drylot_or_storage']; + } + + /** + * Sets waste_handled_drylot_or_storage + * + * @param float $waste_handled_drylot_or_storage Fraction of waste handled through dryland and solid storage, from 0 to 1 + * + * @return self + */ + public function setWasteHandledDrylotOrStorage($waste_handled_drylot_or_storage) + { + if (is_null($waste_handled_drylot_or_storage)) { + throw new \InvalidArgumentException('non-nullable waste_handled_drylot_or_storage cannot be null'); + } + $this->container['waste_handled_drylot_or_storage'] = $waste_handled_drylot_or_storage; + + return $this; + } + + /** + * Gets litter_recycled + * + * @return float + */ + public function getLitterRecycled() + { + return $this->container['litter_recycled']; + } + + /** + * Sets litter_recycled + * + * @param float $litter_recycled Fraction of litter recycled, from 0 to 1 + * + * @return self + */ + public function setLitterRecycled($litter_recycled) + { + if (is_null($litter_recycled)) { + throw new \InvalidArgumentException('non-nullable litter_recycled cannot be null'); + } + $this->container['litter_recycled'] = $litter_recycled; + + return $this; + } + + /** + * Gets litter_recycle_frequency + * + * @return float + */ + public function getLitterRecycleFrequency() + { + return $this->container['litter_recycle_frequency']; + } + + /** + * Sets litter_recycle_frequency + * + * @param float $litter_recycle_frequency Number of litter cycles per year + * + * @return self + */ + public function setLitterRecycleFrequency($litter_recycle_frequency) + { + if (is_null($litter_recycle_frequency)) { + throw new \InvalidArgumentException('non-nullable litter_recycle_frequency cannot be null'); + } + $this->container['litter_recycle_frequency'] = $litter_recycle_frequency; + + return $this; + } + + /** + * Gets purchased_free_range + * + * @return float + */ + public function getPurchasedFreeRange() + { + return $this->container['purchased_free_range']; + } + + /** + * Sets purchased_free_range + * + * @param float $purchased_free_range Fraction of chickens purchased that are free range. Note: fraction of chickens purchased that are conventional is `1 - purchasedFreeRange` + * + * @return self + */ + public function setPurchasedFreeRange($purchased_free_range) + { + if (is_null($purchased_free_range)) { + throw new \InvalidArgumentException('non-nullable purchased_free_range cannot be null'); + } + $this->container['purchased_free_range'] = $purchased_free_range; + + return $this; + } + + /** + * Gets meat_chicken_growers_purchases + * + * @return \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases + */ + public function getMeatChickenGrowersPurchases() + { + return $this->container['meat_chicken_growers_purchases']; + } + + /** + * Sets meat_chicken_growers_purchases + * + * @param \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases $meat_chicken_growers_purchases meat_chicken_growers_purchases + * + * @return self + */ + public function setMeatChickenGrowersPurchases($meat_chicken_growers_purchases) + { + if (is_null($meat_chicken_growers_purchases)) { + throw new \InvalidArgumentException('non-nullable meat_chicken_growers_purchases cannot be null'); + } + $this->container['meat_chicken_growers_purchases'] = $meat_chicken_growers_purchases; + + return $this; + } + + /** + * Gets meat_chicken_layers_purchases + * + * @return \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenLayersPurchases + */ + public function getMeatChickenLayersPurchases() + { + return $this->container['meat_chicken_layers_purchases']; + } + + /** + * Sets meat_chicken_layers_purchases + * + * @param \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenLayersPurchases $meat_chicken_layers_purchases meat_chicken_layers_purchases + * + * @return self + */ + public function setMeatChickenLayersPurchases($meat_chicken_layers_purchases) + { + if (is_null($meat_chicken_layers_purchases)) { + throw new \InvalidArgumentException('non-nullable meat_chicken_layers_purchases cannot be null'); + } + $this->container['meat_chicken_layers_purchases'] = $meat_chicken_layers_purchases; + + return $this; + } + + /** + * Gets meat_other_purchases + * + * @return \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatOtherPurchases + */ + public function getMeatOtherPurchases() + { + return $this->container['meat_other_purchases']; + } + + /** + * Sets meat_other_purchases + * + * @param \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatOtherPurchases $meat_other_purchases meat_other_purchases + * + * @return self + */ + public function setMeatOtherPurchases($meat_other_purchases) + { + if (is_null($meat_other_purchases)) { + throw new \InvalidArgumentException('non-nullable meat_other_purchases cannot be null'); + } + $this->container['meat_other_purchases'] = $meat_other_purchases; + + return $this; + } + + /** + * Gets sales + * + * @return \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerSalesInner[] + */ + public function getSales() + { + return $this->container['sales']; + } + + /** + * Sets sales + * + * @param \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerSalesInner[] $sales Broiler sales + * + * @return self + */ + public function setSales($sales) + { + if (is_null($sales)) { + throw new \InvalidArgumentException('non-nullable sales cannot be null'); + } + $this->container['sales'] = $sales; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInner.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInner.php new file mode 100644 index 00000000..957e7765 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInner.php @@ -0,0 +1,599 @@ + + */ +class PostPoultryRequestBroilersInnerGroupsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_broilers_inner_groups_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'meat_chicken_growers' => '\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers', + 'meat_chicken_layers' => '\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers', + 'meat_other' => '\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers', + 'feed' => '\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInner[]', + 'custom_feed_purchased' => 'float', + 'custom_feed_emission_intensity' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'meat_chicken_growers' => null, + 'meat_chicken_layers' => null, + 'meat_other' => null, + 'feed' => null, + 'custom_feed_purchased' => null, + 'custom_feed_emission_intensity' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'meat_chicken_growers' => false, + 'meat_chicken_layers' => false, + 'meat_other' => false, + 'feed' => false, + 'custom_feed_purchased' => false, + 'custom_feed_emission_intensity' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'meat_chicken_growers' => 'meatChickenGrowers', + 'meat_chicken_layers' => 'meatChickenLayers', + 'meat_other' => 'meatOther', + 'feed' => 'feed', + 'custom_feed_purchased' => 'customFeedPurchased', + 'custom_feed_emission_intensity' => 'customFeedEmissionIntensity' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'meat_chicken_growers' => 'setMeatChickenGrowers', + 'meat_chicken_layers' => 'setMeatChickenLayers', + 'meat_other' => 'setMeatOther', + 'feed' => 'setFeed', + 'custom_feed_purchased' => 'setCustomFeedPurchased', + 'custom_feed_emission_intensity' => 'setCustomFeedEmissionIntensity' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'meat_chicken_growers' => 'getMeatChickenGrowers', + 'meat_chicken_layers' => 'getMeatChickenLayers', + 'meat_other' => 'getMeatOther', + 'feed' => 'getFeed', + 'custom_feed_purchased' => 'getCustomFeedPurchased', + 'custom_feed_emission_intensity' => 'getCustomFeedEmissionIntensity' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('meat_chicken_growers', $data ?? [], null); + $this->setIfExists('meat_chicken_layers', $data ?? [], null); + $this->setIfExists('meat_other', $data ?? [], null); + $this->setIfExists('feed', $data ?? [], null); + $this->setIfExists('custom_feed_purchased', $data ?? [], null); + $this->setIfExists('custom_feed_emission_intensity', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['meat_chicken_growers'] === null) { + $invalidProperties[] = "'meat_chicken_growers' can't be null"; + } + if ($this->container['meat_chicken_layers'] === null) { + $invalidProperties[] = "'meat_chicken_layers' can't be null"; + } + if ($this->container['meat_other'] === null) { + $invalidProperties[] = "'meat_other' can't be null"; + } + if ($this->container['feed'] === null) { + $invalidProperties[] = "'feed' can't be null"; + } + if ($this->container['custom_feed_purchased'] === null) { + $invalidProperties[] = "'custom_feed_purchased' can't be null"; + } + if ($this->container['custom_feed_emission_intensity'] === null) { + $invalidProperties[] = "'custom_feed_emission_intensity' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets meat_chicken_growers + * + * @return \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers + */ + public function getMeatChickenGrowers() + { + return $this->container['meat_chicken_growers']; + } + + /** + * Sets meat_chicken_growers + * + * @param \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers $meat_chicken_growers meat_chicken_growers + * + * @return self + */ + public function setMeatChickenGrowers($meat_chicken_growers) + { + if (is_null($meat_chicken_growers)) { + throw new \InvalidArgumentException('non-nullable meat_chicken_growers cannot be null'); + } + $this->container['meat_chicken_growers'] = $meat_chicken_growers; + + return $this; + } + + /** + * Gets meat_chicken_layers + * + * @return \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers + */ + public function getMeatChickenLayers() + { + return $this->container['meat_chicken_layers']; + } + + /** + * Sets meat_chicken_layers + * + * @param \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers $meat_chicken_layers meat_chicken_layers + * + * @return self + */ + public function setMeatChickenLayers($meat_chicken_layers) + { + if (is_null($meat_chicken_layers)) { + throw new \InvalidArgumentException('non-nullable meat_chicken_layers cannot be null'); + } + $this->container['meat_chicken_layers'] = $meat_chicken_layers; + + return $this; + } + + /** + * Gets meat_other + * + * @return \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers + */ + public function getMeatOther() + { + return $this->container['meat_other']; + } + + /** + * Sets meat_other + * + * @param \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers $meat_other meat_other + * + * @return self + */ + public function setMeatOther($meat_other) + { + if (is_null($meat_other)) { + throw new \InvalidArgumentException('non-nullable meat_other cannot be null'); + } + $this->container['meat_other'] = $meat_other; + + return $this; + } + + /** + * Gets feed + * + * @return \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInner[] + */ + public function getFeed() + { + return $this->container['feed']; + } + + /** + * Sets feed + * + * @param \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInner[] $feed feed + * + * @return self + */ + public function setFeed($feed) + { + if (is_null($feed)) { + throw new \InvalidArgumentException('non-nullable feed cannot be null'); + } + $this->container['feed'] = $feed; + + return $this; + } + + /** + * Gets custom_feed_purchased + * + * @return float + */ + public function getCustomFeedPurchased() + { + return $this->container['custom_feed_purchased']; + } + + /** + * Sets custom_feed_purchased + * + * @param float $custom_feed_purchased Custom feed purchased, in tonnes + * + * @return self + */ + public function setCustomFeedPurchased($custom_feed_purchased) + { + if (is_null($custom_feed_purchased)) { + throw new \InvalidArgumentException('non-nullable custom_feed_purchased cannot be null'); + } + $this->container['custom_feed_purchased'] = $custom_feed_purchased; + + return $this; + } + + /** + * Gets custom_feed_emission_intensity + * + * @return float + */ + public function getCustomFeedEmissionIntensity() + { + return $this->container['custom_feed_emission_intensity']; + } + + /** + * Sets custom_feed_emission_intensity + * + * @param float $custom_feed_emission_intensity Emissions intensity of custom feed in GHG (kg CO2-e/kg input) + * + * @return self + */ + public function setCustomFeedEmissionIntensity($custom_feed_emission_intensity) + { + if (is_null($custom_feed_emission_intensity)) { + throw new \InvalidArgumentException('non-nullable custom_feed_emission_intensity cannot be null'); + } + $this->container['custom_feed_emission_intensity'] = $custom_feed_emission_intensity; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.php new file mode 100644 index 00000000..5a447b41 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.php @@ -0,0 +1,525 @@ + + */ +class PostPoultryRequestBroilersInnerGroupsInnerFeedInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_broilers_inner_groups_inner_feed_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'ingredients' => '\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients', + 'feed_purchased' => 'float', + 'additional_ingredient' => 'float', + 'emission_intensity' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'ingredients' => null, + 'feed_purchased' => null, + 'additional_ingredient' => null, + 'emission_intensity' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'ingredients' => false, + 'feed_purchased' => false, + 'additional_ingredient' => false, + 'emission_intensity' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'ingredients' => 'ingredients', + 'feed_purchased' => 'feedPurchased', + 'additional_ingredient' => 'additionalIngredient', + 'emission_intensity' => 'emissionIntensity' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'ingredients' => 'setIngredients', + 'feed_purchased' => 'setFeedPurchased', + 'additional_ingredient' => 'setAdditionalIngredient', + 'emission_intensity' => 'setEmissionIntensity' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'ingredients' => 'getIngredients', + 'feed_purchased' => 'getFeedPurchased', + 'additional_ingredient' => 'getAdditionalIngredient', + 'emission_intensity' => 'getEmissionIntensity' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('ingredients', $data ?? [], null); + $this->setIfExists('feed_purchased', $data ?? [], null); + $this->setIfExists('additional_ingredient', $data ?? [], null); + $this->setIfExists('emission_intensity', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['ingredients'] === null) { + $invalidProperties[] = "'ingredients' can't be null"; + } + if ($this->container['feed_purchased'] === null) { + $invalidProperties[] = "'feed_purchased' can't be null"; + } + if ($this->container['additional_ingredient'] === null) { + $invalidProperties[] = "'additional_ingredient' can't be null"; + } + if ($this->container['emission_intensity'] === null) { + $invalidProperties[] = "'emission_intensity' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets ingredients + * + * @return \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients + */ + public function getIngredients() + { + return $this->container['ingredients']; + } + + /** + * Sets ingredients + * + * @param \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients $ingredients ingredients + * + * @return self + */ + public function setIngredients($ingredients) + { + if (is_null($ingredients)) { + throw new \InvalidArgumentException('non-nullable ingredients cannot be null'); + } + $this->container['ingredients'] = $ingredients; + + return $this; + } + + /** + * Gets feed_purchased + * + * @return float + */ + public function getFeedPurchased() + { + return $this->container['feed_purchased']; + } + + /** + * Sets feed_purchased + * + * @param float $feed_purchased Feed purchased, in tonnes + * + * @return self + */ + public function setFeedPurchased($feed_purchased) + { + if (is_null($feed_purchased)) { + throw new \InvalidArgumentException('non-nullable feed_purchased cannot be null'); + } + $this->container['feed_purchased'] = $feed_purchased; + + return $this; + } + + /** + * Gets additional_ingredient + * + * @return float + */ + public function getAdditionalIngredient() + { + return $this->container['additional_ingredient']; + } + + /** + * Sets additional_ingredient + * + * @param float $additional_ingredient Fraction of additional ingredients in feed mix, from 0 to 1 + * + * @return self + */ + public function setAdditionalIngredient($additional_ingredient) + { + if (is_null($additional_ingredient)) { + throw new \InvalidArgumentException('non-nullable additional_ingredient cannot be null'); + } + $this->container['additional_ingredient'] = $additional_ingredient; + + return $this; + } + + /** + * Gets emission_intensity + * + * @return float + */ + public function getEmissionIntensity() + { + return $this->container['emission_intensity']; + } + + /** + * Sets emission_intensity + * + * @param float $emission_intensity Emissions intensity of feed product in GHG (kg CO2-e/kg input) + * + * @return self + */ + public function setEmissionIntensity($emission_intensity) + { + if (is_null($emission_intensity)) { + throw new \InvalidArgumentException('non-nullable emission_intensity cannot be null'); + } + $this->container['emission_intensity'] = $emission_intensity; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.php new file mode 100644 index 00000000..7170cd31 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.php @@ -0,0 +1,547 @@ + + */ +class PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'wheat' => 'float', + 'barley' => 'float', + 'sorghum' => 'float', + 'soybean' => 'float', + 'millrun' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'wheat' => null, + 'barley' => null, + 'sorghum' => null, + 'soybean' => null, + 'millrun' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'wheat' => false, + 'barley' => false, + 'sorghum' => false, + 'soybean' => false, + 'millrun' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'wheat' => 'wheat', + 'barley' => 'barley', + 'sorghum' => 'sorghum', + 'soybean' => 'soybean', + 'millrun' => 'millrun' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'wheat' => 'setWheat', + 'barley' => 'setBarley', + 'sorghum' => 'setSorghum', + 'soybean' => 'setSoybean', + 'millrun' => 'setMillrun' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'wheat' => 'getWheat', + 'barley' => 'getBarley', + 'sorghum' => 'getSorghum', + 'soybean' => 'getSoybean', + 'millrun' => 'getMillrun' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('wheat', $data ?? [], null); + $this->setIfExists('barley', $data ?? [], null); + $this->setIfExists('sorghum', $data ?? [], null); + $this->setIfExists('soybean', $data ?? [], null); + $this->setIfExists('millrun', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets wheat + * + * @return float|null + */ + public function getWheat() + { + return $this->container['wheat']; + } + + /** + * Sets wheat + * + * @param float|null $wheat wheat + * + * @return self + */ + public function setWheat($wheat) + { + if (is_null($wheat)) { + throw new \InvalidArgumentException('non-nullable wheat cannot be null'); + } + $this->container['wheat'] = $wheat; + + return $this; + } + + /** + * Gets barley + * + * @return float|null + */ + public function getBarley() + { + return $this->container['barley']; + } + + /** + * Sets barley + * + * @param float|null $barley barley + * + * @return self + */ + public function setBarley($barley) + { + if (is_null($barley)) { + throw new \InvalidArgumentException('non-nullable barley cannot be null'); + } + $this->container['barley'] = $barley; + + return $this; + } + + /** + * Gets sorghum + * + * @return float|null + */ + public function getSorghum() + { + return $this->container['sorghum']; + } + + /** + * Sets sorghum + * + * @param float|null $sorghum sorghum + * + * @return self + */ + public function setSorghum($sorghum) + { + if (is_null($sorghum)) { + throw new \InvalidArgumentException('non-nullable sorghum cannot be null'); + } + $this->container['sorghum'] = $sorghum; + + return $this; + } + + /** + * Gets soybean + * + * @return float|null + */ + public function getSoybean() + { + return $this->container['soybean']; + } + + /** + * Sets soybean + * + * @param float|null $soybean soybean + * + * @return self + */ + public function setSoybean($soybean) + { + if (is_null($soybean)) { + throw new \InvalidArgumentException('non-nullable soybean cannot be null'); + } + $this->container['soybean'] = $soybean; + + return $this; + } + + /** + * Gets millrun + * + * @return float|null + */ + public function getMillrun() + { + return $this->container['millrun']; + } + + /** + * Sets millrun + * + * @param float|null $millrun millrun + * + * @return self + */ + public function setMillrun($millrun) + { + if (is_null($millrun)) { + throw new \InvalidArgumentException('non-nullable millrun cannot be null'); + } + $this->container['millrun'] = $millrun; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.php new file mode 100644 index 00000000..f477bd7b --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.php @@ -0,0 +1,732 @@ + + */ +class PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_broilers_inner_groups_inner_meatChickenGrowers'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'birds' => 'float', + 'average_stay_length50' => 'float', + 'liveweight50' => 'float', + 'average_stay_length100' => 'float', + 'liveweight100' => 'float', + 'dry_matter_intake' => 'float', + 'dry_matter_digestibility' => 'float', + 'crude_protein' => 'float', + 'manure_ash' => 'float', + 'nitrogen_retention_rate' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'birds' => null, + 'average_stay_length50' => null, + 'liveweight50' => null, + 'average_stay_length100' => null, + 'liveweight100' => null, + 'dry_matter_intake' => null, + 'dry_matter_digestibility' => null, + 'crude_protein' => null, + 'manure_ash' => null, + 'nitrogen_retention_rate' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'birds' => false, + 'average_stay_length50' => false, + 'liveweight50' => false, + 'average_stay_length100' => false, + 'liveweight100' => false, + 'dry_matter_intake' => false, + 'dry_matter_digestibility' => false, + 'crude_protein' => false, + 'manure_ash' => false, + 'nitrogen_retention_rate' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'birds' => 'birds', + 'average_stay_length50' => 'averageStayLength50', + 'liveweight50' => 'liveweight50', + 'average_stay_length100' => 'averageStayLength100', + 'liveweight100' => 'liveweight100', + 'dry_matter_intake' => 'dryMatterIntake', + 'dry_matter_digestibility' => 'dryMatterDigestibility', + 'crude_protein' => 'crudeProtein', + 'manure_ash' => 'manureAsh', + 'nitrogen_retention_rate' => 'nitrogenRetentionRate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'birds' => 'setBirds', + 'average_stay_length50' => 'setAverageStayLength50', + 'liveweight50' => 'setLiveweight50', + 'average_stay_length100' => 'setAverageStayLength100', + 'liveweight100' => 'setLiveweight100', + 'dry_matter_intake' => 'setDryMatterIntake', + 'dry_matter_digestibility' => 'setDryMatterDigestibility', + 'crude_protein' => 'setCrudeProtein', + 'manure_ash' => 'setManureAsh', + 'nitrogen_retention_rate' => 'setNitrogenRetentionRate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'birds' => 'getBirds', + 'average_stay_length50' => 'getAverageStayLength50', + 'liveweight50' => 'getLiveweight50', + 'average_stay_length100' => 'getAverageStayLength100', + 'liveweight100' => 'getLiveweight100', + 'dry_matter_intake' => 'getDryMatterIntake', + 'dry_matter_digestibility' => 'getDryMatterDigestibility', + 'crude_protein' => 'getCrudeProtein', + 'manure_ash' => 'getManureAsh', + 'nitrogen_retention_rate' => 'getNitrogenRetentionRate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('birds', $data ?? [], null); + $this->setIfExists('average_stay_length50', $data ?? [], null); + $this->setIfExists('liveweight50', $data ?? [], null); + $this->setIfExists('average_stay_length100', $data ?? [], null); + $this->setIfExists('liveweight100', $data ?? [], null); + $this->setIfExists('dry_matter_intake', $data ?? [], null); + $this->setIfExists('dry_matter_digestibility', $data ?? [], null); + $this->setIfExists('crude_protein', $data ?? [], null); + $this->setIfExists('manure_ash', $data ?? [], null); + $this->setIfExists('nitrogen_retention_rate', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['birds'] === null) { + $invalidProperties[] = "'birds' can't be null"; + } + if ($this->container['average_stay_length50'] === null) { + $invalidProperties[] = "'average_stay_length50' can't be null"; + } + if ($this->container['liveweight50'] === null) { + $invalidProperties[] = "'liveweight50' can't be null"; + } + if ($this->container['average_stay_length100'] === null) { + $invalidProperties[] = "'average_stay_length100' can't be null"; + } + if ($this->container['liveweight100'] === null) { + $invalidProperties[] = "'liveweight100' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets birds + * + * @return float + */ + public function getBirds() + { + return $this->container['birds']; + } + + /** + * Sets birds + * + * @param float $birds Total number of birds/head + * + * @return self + */ + public function setBirds($birds) + { + if (is_null($birds)) { + throw new \InvalidArgumentException('non-nullable birds cannot be null'); + } + $this->container['birds'] = $birds; + + return $this; + } + + /** + * Gets average_stay_length50 + * + * @return float + */ + public function getAverageStayLength50() + { + return $this->container['average_stay_length50']; + } + + /** + * Sets average_stay_length50 + * + * @param float $average_stay_length50 Average length of stay until 50% of the flock is depleted, in days + * + * @return self + */ + public function setAverageStayLength50($average_stay_length50) + { + if (is_null($average_stay_length50)) { + throw new \InvalidArgumentException('non-nullable average_stay_length50 cannot be null'); + } + $this->container['average_stay_length50'] = $average_stay_length50; + + return $this; + } + + /** + * Gets liveweight50 + * + * @return float + */ + public function getLiveweight50() + { + return $this->container['liveweight50']; + } + + /** + * Sets liveweight50 + * + * @param float $liveweight50 Average liveweight during the 50% depletion period, in kg + * + * @return self + */ + public function setLiveweight50($liveweight50) + { + if (is_null($liveweight50)) { + throw new \InvalidArgumentException('non-nullable liveweight50 cannot be null'); + } + $this->container['liveweight50'] = $liveweight50; + + return $this; + } + + /** + * Gets average_stay_length100 + * + * @return float + */ + public function getAverageStayLength100() + { + return $this->container['average_stay_length100']; + } + + /** + * Sets average_stay_length100 + * + * @param float $average_stay_length100 Average length of stay until 100% of the flock is depleted, in days + * + * @return self + */ + public function setAverageStayLength100($average_stay_length100) + { + if (is_null($average_stay_length100)) { + throw new \InvalidArgumentException('non-nullable average_stay_length100 cannot be null'); + } + $this->container['average_stay_length100'] = $average_stay_length100; + + return $this; + } + + /** + * Gets liveweight100 + * + * @return float + */ + public function getLiveweight100() + { + return $this->container['liveweight100']; + } + + /** + * Sets liveweight100 + * + * @param float $liveweight100 Average liveweight during the 100% depletion period, in kg + * + * @return self + */ + public function setLiveweight100($liveweight100) + { + if (is_null($liveweight100)) { + throw new \InvalidArgumentException('non-nullable liveweight100 cannot be null'); + } + $this->container['liveweight100'] = $liveweight100; + + return $this; + } + + /** + * Gets dry_matter_intake + * + * @return float|null + */ + public function getDryMatterIntake() + { + return $this->container['dry_matter_intake']; + } + + /** + * Sets dry_matter_intake + * + * @param float|null $dry_matter_intake Dry matter intake, in kg/head/day + * + * @return self + */ + public function setDryMatterIntake($dry_matter_intake) + { + if (is_null($dry_matter_intake)) { + throw new \InvalidArgumentException('non-nullable dry_matter_intake cannot be null'); + } + $this->container['dry_matter_intake'] = $dry_matter_intake; + + return $this; + } + + /** + * Gets dry_matter_digestibility + * + * @return float|null + */ + public function getDryMatterDigestibility() + { + return $this->container['dry_matter_digestibility']; + } + + /** + * Sets dry_matter_digestibility + * + * @param float|null $dry_matter_digestibility Dry matter digestibility fraction, from 0 to 1 + * + * @return self + */ + public function setDryMatterDigestibility($dry_matter_digestibility) + { + if (is_null($dry_matter_digestibility)) { + throw new \InvalidArgumentException('non-nullable dry_matter_digestibility cannot be null'); + } + $this->container['dry_matter_digestibility'] = $dry_matter_digestibility; + + return $this; + } + + /** + * Gets crude_protein + * + * @return float|null + */ + public function getCrudeProtein() + { + return $this->container['crude_protein']; + } + + /** + * Sets crude_protein + * + * @param float|null $crude_protein Crude protein fraction, from 0 to 1 + * + * @return self + */ + public function setCrudeProtein($crude_protein) + { + if (is_null($crude_protein)) { + throw new \InvalidArgumentException('non-nullable crude_protein cannot be null'); + } + $this->container['crude_protein'] = $crude_protein; + + return $this; + } + + /** + * Gets manure_ash + * + * @return float|null + */ + public function getManureAsh() + { + return $this->container['manure_ash']; + } + + /** + * Sets manure_ash + * + * @param float|null $manure_ash Manure ash fraction, from 0 to 1 + * + * @return self + */ + public function setManureAsh($manure_ash) + { + if (is_null($manure_ash)) { + throw new \InvalidArgumentException('non-nullable manure_ash cannot be null'); + } + $this->container['manure_ash'] = $manure_ash; + + return $this; + } + + /** + * Gets nitrogen_retention_rate + * + * @return float|null + */ + public function getNitrogenRetentionRate() + { + return $this->container['nitrogen_retention_rate']; + } + + /** + * Sets nitrogen_retention_rate + * + * @param float|null $nitrogen_retention_rate Nitrogen retention rate fraction, from 0 to 1 + * + * @return self + */ + public function setNitrogenRetentionRate($nitrogen_retention_rate) + { + if (is_null($nitrogen_retention_rate)) { + throw new \InvalidArgumentException('non-nullable nitrogen_retention_rate cannot be null'); + } + $this->container['nitrogen_retention_rate'] = $nitrogen_retention_rate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.php new file mode 100644 index 00000000..90866ee8 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.php @@ -0,0 +1,451 @@ + + */ +class PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_broilers_inner_meatChickenGrowersPurchases'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'head' => 'float', + 'purchase_weight' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'head' => null, + 'purchase_weight' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'head' => false, + 'purchase_weight' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'head' => 'head', + 'purchase_weight' => 'purchaseWeight' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'head' => 'setHead', + 'purchase_weight' => 'setPurchaseWeight' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'head' => 'getHead', + 'purchase_weight' => 'getPurchaseWeight' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('head', $data ?? [], null); + $this->setIfExists('purchase_weight', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['head'] === null) { + $invalidProperties[] = "'head' can't be null"; + } + if ($this->container['purchase_weight'] === null) { + $invalidProperties[] = "'purchase_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets head + * + * @return float + */ + public function getHead() + { + return $this->container['head']; + } + + /** + * Sets head + * + * @param float $head Number of animals purchased (head) + * + * @return self + */ + public function setHead($head) + { + if (is_null($head)) { + throw new \InvalidArgumentException('non-nullable head cannot be null'); + } + $this->container['head'] = $head; + + return $this; + } + + /** + * Gets purchase_weight + * + * @return float + */ + public function getPurchaseWeight() + { + return $this->container['purchase_weight']; + } + + /** + * Sets purchase_weight + * + * @param float $purchase_weight Weight at purchase, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setPurchaseWeight($purchase_weight) + { + if (is_null($purchase_weight)) { + throw new \InvalidArgumentException('non-nullable purchase_weight cannot be null'); + } + $this->container['purchase_weight'] = $purchase_weight; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.php new file mode 100644 index 00000000..8d8ee8b5 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.php @@ -0,0 +1,451 @@ + + */ +class PostPoultryRequestBroilersInnerMeatChickenLayersPurchases implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_broilers_inner_meatChickenLayersPurchases'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'head' => 'float', + 'purchase_weight' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'head' => null, + 'purchase_weight' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'head' => false, + 'purchase_weight' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'head' => 'head', + 'purchase_weight' => 'purchaseWeight' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'head' => 'setHead', + 'purchase_weight' => 'setPurchaseWeight' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'head' => 'getHead', + 'purchase_weight' => 'getPurchaseWeight' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('head', $data ?? [], null); + $this->setIfExists('purchase_weight', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['head'] === null) { + $invalidProperties[] = "'head' can't be null"; + } + if ($this->container['purchase_weight'] === null) { + $invalidProperties[] = "'purchase_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets head + * + * @return float + */ + public function getHead() + { + return $this->container['head']; + } + + /** + * Sets head + * + * @param float $head Number of animals purchased (head) + * + * @return self + */ + public function setHead($head) + { + if (is_null($head)) { + throw new \InvalidArgumentException('non-nullable head cannot be null'); + } + $this->container['head'] = $head; + + return $this; + } + + /** + * Gets purchase_weight + * + * @return float + */ + public function getPurchaseWeight() + { + return $this->container['purchase_weight']; + } + + /** + * Sets purchase_weight + * + * @param float $purchase_weight Weight at purchase, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setPurchaseWeight($purchase_weight) + { + if (is_null($purchase_weight)) { + throw new \InvalidArgumentException('non-nullable purchase_weight cannot be null'); + } + $this->container['purchase_weight'] = $purchase_weight; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.php new file mode 100644 index 00000000..e9de2a3f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.php @@ -0,0 +1,451 @@ + + */ +class PostPoultryRequestBroilersInnerMeatOtherPurchases implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_broilers_inner_meatOtherPurchases'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'head' => 'float', + 'purchase_weight' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'head' => null, + 'purchase_weight' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'head' => false, + 'purchase_weight' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'head' => 'head', + 'purchase_weight' => 'purchaseWeight' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'head' => 'setHead', + 'purchase_weight' => 'setPurchaseWeight' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'head' => 'getHead', + 'purchase_weight' => 'getPurchaseWeight' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('head', $data ?? [], null); + $this->setIfExists('purchase_weight', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['head'] === null) { + $invalidProperties[] = "'head' can't be null"; + } + if ($this->container['purchase_weight'] === null) { + $invalidProperties[] = "'purchase_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets head + * + * @return float + */ + public function getHead() + { + return $this->container['head']; + } + + /** + * Sets head + * + * @param float $head Number of animals purchased (head) + * + * @return self + */ + public function setHead($head) + { + if (is_null($head)) { + throw new \InvalidArgumentException('non-nullable head cannot be null'); + } + $this->container['head'] = $head; + + return $this; + } + + /** + * Gets purchase_weight + * + * @return float + */ + public function getPurchaseWeight() + { + return $this->container['purchase_weight']; + } + + /** + * Sets purchase_weight + * + * @param float $purchase_weight Weight at purchase, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setPurchaseWeight($purchase_weight) + { + if (is_null($purchase_weight)) { + throw new \InvalidArgumentException('non-nullable purchase_weight cannot be null'); + } + $this->container['purchase_weight'] = $purchase_weight; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerSalesInner.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerSalesInner.php new file mode 100644 index 00000000..6092a301 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestBroilersInnerSalesInner.php @@ -0,0 +1,488 @@ + + */ +class PostPoultryRequestBroilersInnerSalesInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_broilers_inner_sales_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'meat_chicken_growers_sales' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner', + 'meat_chicken_layers' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner', + 'meat_other' => '\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'meat_chicken_growers_sales' => null, + 'meat_chicken_layers' => null, + 'meat_other' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'meat_chicken_growers_sales' => false, + 'meat_chicken_layers' => false, + 'meat_other' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'meat_chicken_growers_sales' => 'meatChickenGrowersSales', + 'meat_chicken_layers' => 'meatChickenLayers', + 'meat_other' => 'meatOther' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'meat_chicken_growers_sales' => 'setMeatChickenGrowersSales', + 'meat_chicken_layers' => 'setMeatChickenLayers', + 'meat_other' => 'setMeatOther' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'meat_chicken_growers_sales' => 'getMeatChickenGrowersSales', + 'meat_chicken_layers' => 'getMeatChickenLayers', + 'meat_other' => 'getMeatOther' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('meat_chicken_growers_sales', $data ?? [], null); + $this->setIfExists('meat_chicken_layers', $data ?? [], null); + $this->setIfExists('meat_other', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['meat_chicken_growers_sales'] === null) { + $invalidProperties[] = "'meat_chicken_growers_sales' can't be null"; + } + if ($this->container['meat_chicken_layers'] === null) { + $invalidProperties[] = "'meat_chicken_layers' can't be null"; + } + if ($this->container['meat_other'] === null) { + $invalidProperties[] = "'meat_other' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets meat_chicken_growers_sales + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner + */ + public function getMeatChickenGrowersSales() + { + return $this->container['meat_chicken_growers_sales']; + } + + /** + * Sets meat_chicken_growers_sales + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner $meat_chicken_growers_sales meat_chicken_growers_sales + * + * @return self + */ + public function setMeatChickenGrowersSales($meat_chicken_growers_sales) + { + if (is_null($meat_chicken_growers_sales)) { + throw new \InvalidArgumentException('non-nullable meat_chicken_growers_sales cannot be null'); + } + $this->container['meat_chicken_growers_sales'] = $meat_chicken_growers_sales; + + return $this; + } + + /** + * Gets meat_chicken_layers + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner + */ + public function getMeatChickenLayers() + { + return $this->container['meat_chicken_layers']; + } + + /** + * Sets meat_chicken_layers + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner $meat_chicken_layers meat_chicken_layers + * + * @return self + */ + public function setMeatChickenLayers($meat_chicken_layers) + { + if (is_null($meat_chicken_layers)) { + throw new \InvalidArgumentException('non-nullable meat_chicken_layers cannot be null'); + } + $this->container['meat_chicken_layers'] = $meat_chicken_layers; + + return $this; + } + + /** + * Gets meat_other + * + * @return \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner + */ + public function getMeatOther() + { + return $this->container['meat_other']; + } + + /** + * Sets meat_other + * + * @param \OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner $meat_other meat_other + * + * @return self + */ + public function setMeatOther($meat_other) + { + if (is_null($meat_other)) { + throw new \InvalidArgumentException('non-nullable meat_other cannot be null'); + } + $this->container['meat_other'] = $meat_other; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInner.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInner.php new file mode 100644 index 00000000..ec70dfe8 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInner.php @@ -0,0 +1,1311 @@ + + */ +class PostPoultryRequestLayersInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_layers_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'layers' => '\OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayers', + 'meat_chicken_layers' => '\OpenAPI\Client\Model\PostPoultryRequestLayersInnerMeatChickenLayers', + 'feed' => '\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInner[]', + 'purchased_free_range' => 'float', + 'diesel' => 'float', + 'petrol' => 'float', + 'lpg' => 'float', + 'electricity_source' => 'string', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'hay' => 'float', + 'herbicide' => 'float', + 'herbicide_other' => 'float', + 'manure_waste_allocation' => 'float', + 'waste_handled_drylot_or_storage' => 'float', + 'litter_recycled' => 'float', + 'litter_recycle_frequency' => 'float', + 'meat_chicken_layers_purchases' => '\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenLayersPurchases', + 'layers_purchases' => '\OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayersPurchases', + 'custom_feed_purchased' => 'float', + 'custom_feed_emission_intensity' => 'float', + 'meat_chicken_layers_egg_sale' => '\OpenAPI\Client\Model\PostPoultryRequestLayersInnerMeatChickenLayersEggSale', + 'layers_egg_sale' => '\OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayersEggSale' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'layers' => null, + 'meat_chicken_layers' => null, + 'feed' => null, + 'purchased_free_range' => null, + 'diesel' => null, + 'petrol' => null, + 'lpg' => null, + 'electricity_source' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'hay' => null, + 'herbicide' => null, + 'herbicide_other' => null, + 'manure_waste_allocation' => null, + 'waste_handled_drylot_or_storage' => null, + 'litter_recycled' => null, + 'litter_recycle_frequency' => null, + 'meat_chicken_layers_purchases' => null, + 'layers_purchases' => null, + 'custom_feed_purchased' => null, + 'custom_feed_emission_intensity' => null, + 'meat_chicken_layers_egg_sale' => null, + 'layers_egg_sale' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'layers' => false, + 'meat_chicken_layers' => false, + 'feed' => false, + 'purchased_free_range' => false, + 'diesel' => false, + 'petrol' => false, + 'lpg' => false, + 'electricity_source' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'hay' => false, + 'herbicide' => false, + 'herbicide_other' => false, + 'manure_waste_allocation' => false, + 'waste_handled_drylot_or_storage' => false, + 'litter_recycled' => false, + 'litter_recycle_frequency' => false, + 'meat_chicken_layers_purchases' => false, + 'layers_purchases' => false, + 'custom_feed_purchased' => false, + 'custom_feed_emission_intensity' => false, + 'meat_chicken_layers_egg_sale' => false, + 'layers_egg_sale' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'layers' => 'layers', + 'meat_chicken_layers' => 'meatChickenLayers', + 'feed' => 'feed', + 'purchased_free_range' => 'purchasedFreeRange', + 'diesel' => 'diesel', + 'petrol' => 'petrol', + 'lpg' => 'lpg', + 'electricity_source' => 'electricitySource', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'hay' => 'hay', + 'herbicide' => 'herbicide', + 'herbicide_other' => 'herbicideOther', + 'manure_waste_allocation' => 'manureWasteAllocation', + 'waste_handled_drylot_or_storage' => 'wasteHandledDrylotOrStorage', + 'litter_recycled' => 'litterRecycled', + 'litter_recycle_frequency' => 'litterRecycleFrequency', + 'meat_chicken_layers_purchases' => 'meatChickenLayersPurchases', + 'layers_purchases' => 'layersPurchases', + 'custom_feed_purchased' => 'customFeedPurchased', + 'custom_feed_emission_intensity' => 'customFeedEmissionIntensity', + 'meat_chicken_layers_egg_sale' => 'meatChickenLayersEggSale', + 'layers_egg_sale' => 'layersEggSale' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'layers' => 'setLayers', + 'meat_chicken_layers' => 'setMeatChickenLayers', + 'feed' => 'setFeed', + 'purchased_free_range' => 'setPurchasedFreeRange', + 'diesel' => 'setDiesel', + 'petrol' => 'setPetrol', + 'lpg' => 'setLpg', + 'electricity_source' => 'setElectricitySource', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'hay' => 'setHay', + 'herbicide' => 'setHerbicide', + 'herbicide_other' => 'setHerbicideOther', + 'manure_waste_allocation' => 'setManureWasteAllocation', + 'waste_handled_drylot_or_storage' => 'setWasteHandledDrylotOrStorage', + 'litter_recycled' => 'setLitterRecycled', + 'litter_recycle_frequency' => 'setLitterRecycleFrequency', + 'meat_chicken_layers_purchases' => 'setMeatChickenLayersPurchases', + 'layers_purchases' => 'setLayersPurchases', + 'custom_feed_purchased' => 'setCustomFeedPurchased', + 'custom_feed_emission_intensity' => 'setCustomFeedEmissionIntensity', + 'meat_chicken_layers_egg_sale' => 'setMeatChickenLayersEggSale', + 'layers_egg_sale' => 'setLayersEggSale' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'layers' => 'getLayers', + 'meat_chicken_layers' => 'getMeatChickenLayers', + 'feed' => 'getFeed', + 'purchased_free_range' => 'getPurchasedFreeRange', + 'diesel' => 'getDiesel', + 'petrol' => 'getPetrol', + 'lpg' => 'getLpg', + 'electricity_source' => 'getElectricitySource', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'hay' => 'getHay', + 'herbicide' => 'getHerbicide', + 'herbicide_other' => 'getHerbicideOther', + 'manure_waste_allocation' => 'getManureWasteAllocation', + 'waste_handled_drylot_or_storage' => 'getWasteHandledDrylotOrStorage', + 'litter_recycled' => 'getLitterRecycled', + 'litter_recycle_frequency' => 'getLitterRecycleFrequency', + 'meat_chicken_layers_purchases' => 'getMeatChickenLayersPurchases', + 'layers_purchases' => 'getLayersPurchases', + 'custom_feed_purchased' => 'getCustomFeedPurchased', + 'custom_feed_emission_intensity' => 'getCustomFeedEmissionIntensity', + 'meat_chicken_layers_egg_sale' => 'getMeatChickenLayersEggSale', + 'layers_egg_sale' => 'getLayersEggSale' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const ELECTRICITY_SOURCE_STATE_GRID = 'State Grid'; + public const ELECTRICITY_SOURCE_RENEWABLE = 'Renewable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getElectricitySourceAllowableValues() + { + return [ + self::ELECTRICITY_SOURCE_STATE_GRID, + self::ELECTRICITY_SOURCE_RENEWABLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('layers', $data ?? [], null); + $this->setIfExists('meat_chicken_layers', $data ?? [], null); + $this->setIfExists('feed', $data ?? [], null); + $this->setIfExists('purchased_free_range', $data ?? [], null); + $this->setIfExists('diesel', $data ?? [], null); + $this->setIfExists('petrol', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + $this->setIfExists('electricity_source', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('hay', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('herbicide_other', $data ?? [], null); + $this->setIfExists('manure_waste_allocation', $data ?? [], null); + $this->setIfExists('waste_handled_drylot_or_storage', $data ?? [], null); + $this->setIfExists('litter_recycled', $data ?? [], null); + $this->setIfExists('litter_recycle_frequency', $data ?? [], null); + $this->setIfExists('meat_chicken_layers_purchases', $data ?? [], null); + $this->setIfExists('layers_purchases', $data ?? [], null); + $this->setIfExists('custom_feed_purchased', $data ?? [], null); + $this->setIfExists('custom_feed_emission_intensity', $data ?? [], null); + $this->setIfExists('meat_chicken_layers_egg_sale', $data ?? [], null); + $this->setIfExists('layers_egg_sale', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['layers'] === null) { + $invalidProperties[] = "'layers' can't be null"; + } + if ($this->container['meat_chicken_layers'] === null) { + $invalidProperties[] = "'meat_chicken_layers' can't be null"; + } + if ($this->container['feed'] === null) { + $invalidProperties[] = "'feed' can't be null"; + } + if ($this->container['purchased_free_range'] === null) { + $invalidProperties[] = "'purchased_free_range' can't be null"; + } + if ($this->container['diesel'] === null) { + $invalidProperties[] = "'diesel' can't be null"; + } + if ($this->container['petrol'] === null) { + $invalidProperties[] = "'petrol' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + if ($this->container['electricity_source'] === null) { + $invalidProperties[] = "'electricity_source' can't be null"; + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!is_null($this->container['electricity_source']) && !in_array($this->container['electricity_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'electricity_source', must be one of '%s'", + $this->container['electricity_source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['hay'] === null) { + $invalidProperties[] = "'hay' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['herbicide_other'] === null) { + $invalidProperties[] = "'herbicide_other' can't be null"; + } + if ($this->container['manure_waste_allocation'] === null) { + $invalidProperties[] = "'manure_waste_allocation' can't be null"; + } + if ($this->container['waste_handled_drylot_or_storage'] === null) { + $invalidProperties[] = "'waste_handled_drylot_or_storage' can't be null"; + } + if ($this->container['litter_recycled'] === null) { + $invalidProperties[] = "'litter_recycled' can't be null"; + } + if ($this->container['litter_recycle_frequency'] === null) { + $invalidProperties[] = "'litter_recycle_frequency' can't be null"; + } + if ($this->container['meat_chicken_layers_purchases'] === null) { + $invalidProperties[] = "'meat_chicken_layers_purchases' can't be null"; + } + if ($this->container['layers_purchases'] === null) { + $invalidProperties[] = "'layers_purchases' can't be null"; + } + if ($this->container['custom_feed_purchased'] === null) { + $invalidProperties[] = "'custom_feed_purchased' can't be null"; + } + if ($this->container['custom_feed_emission_intensity'] === null) { + $invalidProperties[] = "'custom_feed_emission_intensity' can't be null"; + } + if ($this->container['meat_chicken_layers_egg_sale'] === null) { + $invalidProperties[] = "'meat_chicken_layers_egg_sale' can't be null"; + } + if ($this->container['layers_egg_sale'] === null) { + $invalidProperties[] = "'layers_egg_sale' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets layers + * + * @return \OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayers + */ + public function getLayers() + { + return $this->container['layers']; + } + + /** + * Sets layers + * + * @param \OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayers $layers layers + * + * @return self + */ + public function setLayers($layers) + { + if (is_null($layers)) { + throw new \InvalidArgumentException('non-nullable layers cannot be null'); + } + $this->container['layers'] = $layers; + + return $this; + } + + /** + * Gets meat_chicken_layers + * + * @return \OpenAPI\Client\Model\PostPoultryRequestLayersInnerMeatChickenLayers + */ + public function getMeatChickenLayers() + { + return $this->container['meat_chicken_layers']; + } + + /** + * Sets meat_chicken_layers + * + * @param \OpenAPI\Client\Model\PostPoultryRequestLayersInnerMeatChickenLayers $meat_chicken_layers meat_chicken_layers + * + * @return self + */ + public function setMeatChickenLayers($meat_chicken_layers) + { + if (is_null($meat_chicken_layers)) { + throw new \InvalidArgumentException('non-nullable meat_chicken_layers cannot be null'); + } + $this->container['meat_chicken_layers'] = $meat_chicken_layers; + + return $this; + } + + /** + * Gets feed + * + * @return \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInner[] + */ + public function getFeed() + { + return $this->container['feed']; + } + + /** + * Sets feed + * + * @param \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInner[] $feed feed + * + * @return self + */ + public function setFeed($feed) + { + if (is_null($feed)) { + throw new \InvalidArgumentException('non-nullable feed cannot be null'); + } + $this->container['feed'] = $feed; + + return $this; + } + + /** + * Gets purchased_free_range + * + * @return float + */ + public function getPurchasedFreeRange() + { + return $this->container['purchased_free_range']; + } + + /** + * Sets purchased_free_range + * + * @param float $purchased_free_range Fraction of chickens purchased that are free range. Note: fraction of chickens purchased that are conventional is `1 - purchasedFreeRange` + * + * @return self + */ + public function setPurchasedFreeRange($purchased_free_range) + { + if (is_null($purchased_free_range)) { + throw new \InvalidArgumentException('non-nullable purchased_free_range cannot be null'); + } + $this->container['purchased_free_range'] = $purchased_free_range; + + return $this; + } + + /** + * Gets diesel + * + * @return float + */ + public function getDiesel() + { + return $this->container['diesel']; + } + + /** + * Sets diesel + * + * @param float $diesel Diesel usage in L (litres) + * + * @return self + */ + public function setDiesel($diesel) + { + if (is_null($diesel)) { + throw new \InvalidArgumentException('non-nullable diesel cannot be null'); + } + $this->container['diesel'] = $diesel; + + return $this; + } + + /** + * Gets petrol + * + * @return float + */ + public function getPetrol() + { + return $this->container['petrol']; + } + + /** + * Sets petrol + * + * @param float $petrol Petrol usage in L (litres) + * + * @return self + */ + public function setPetrol($petrol) + { + if (is_null($petrol)) { + throw new \InvalidArgumentException('non-nullable petrol cannot be null'); + } + $this->container['petrol'] = $petrol; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + + /** + * Gets electricity_source + * + * @return string + */ + public function getElectricitySource() + { + return $this->container['electricity_source']; + } + + /** + * Sets electricity_source + * + * @param string $electricity_source Source of electricity + * + * @return self + */ + public function setElectricitySource($electricity_source) + { + if (is_null($electricity_source)) { + throw new \InvalidArgumentException('non-nullable electricity_source cannot be null'); + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!in_array($electricity_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'electricity_source', must be one of '%s'", + $electricity_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['electricity_source'] = $electricity_source; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostPoultryRequestLayersInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostPoultryRequestLayersInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets hay + * + * @return float + */ + public function getHay() + { + return $this->container['hay']; + } + + /** + * Sets hay + * + * @param float $hay Hay purchased in tonnes + * + * @return self + */ + public function setHay($hay) + { + if (is_null($hay)) { + throw new \InvalidArgumentException('non-nullable hay cannot be null'); + } + $this->container['hay'] = $hay; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets herbicide_other + * + * @return float + */ + public function getHerbicideOther() + { + return $this->container['herbicide_other']; + } + + /** + * Sets herbicide_other + * + * @param float $herbicide_other Total amount of active ingredients of from other herbicides in kg (kilograms) + * + * @return self + */ + public function setHerbicideOther($herbicide_other) + { + if (is_null($herbicide_other)) { + throw new \InvalidArgumentException('non-nullable herbicide_other cannot be null'); + } + $this->container['herbicide_other'] = $herbicide_other; + + return $this; + } + + /** + * Gets manure_waste_allocation + * + * @return float + */ + public function getManureWasteAllocation() + { + return $this->container['manure_waste_allocation']; + } + + /** + * Sets manure_waste_allocation + * + * @param float $manure_waste_allocation Fraction allocation of manure waste, from 0 to 1. Note: only for pasture range, paddock and free range systems + * + * @return self + */ + public function setManureWasteAllocation($manure_waste_allocation) + { + if (is_null($manure_waste_allocation)) { + throw new \InvalidArgumentException('non-nullable manure_waste_allocation cannot be null'); + } + $this->container['manure_waste_allocation'] = $manure_waste_allocation; + + return $this; + } + + /** + * Gets waste_handled_drylot_or_storage + * + * @return float + */ + public function getWasteHandledDrylotOrStorage() + { + return $this->container['waste_handled_drylot_or_storage']; + } + + /** + * Sets waste_handled_drylot_or_storage + * + * @param float $waste_handled_drylot_or_storage Fraction of waste handled through dryland and solid storage, from 0 to 1 + * + * @return self + */ + public function setWasteHandledDrylotOrStorage($waste_handled_drylot_or_storage) + { + if (is_null($waste_handled_drylot_or_storage)) { + throw new \InvalidArgumentException('non-nullable waste_handled_drylot_or_storage cannot be null'); + } + $this->container['waste_handled_drylot_or_storage'] = $waste_handled_drylot_or_storage; + + return $this; + } + + /** + * Gets litter_recycled + * + * @return float + */ + public function getLitterRecycled() + { + return $this->container['litter_recycled']; + } + + /** + * Sets litter_recycled + * + * @param float $litter_recycled Fraction of litter recycled, from 0 to 1 + * + * @return self + */ + public function setLitterRecycled($litter_recycled) + { + if (is_null($litter_recycled)) { + throw new \InvalidArgumentException('non-nullable litter_recycled cannot be null'); + } + $this->container['litter_recycled'] = $litter_recycled; + + return $this; + } + + /** + * Gets litter_recycle_frequency + * + * @return float + */ + public function getLitterRecycleFrequency() + { + return $this->container['litter_recycle_frequency']; + } + + /** + * Sets litter_recycle_frequency + * + * @param float $litter_recycle_frequency Number of litter cycles per year + * + * @return self + */ + public function setLitterRecycleFrequency($litter_recycle_frequency) + { + if (is_null($litter_recycle_frequency)) { + throw new \InvalidArgumentException('non-nullable litter_recycle_frequency cannot be null'); + } + $this->container['litter_recycle_frequency'] = $litter_recycle_frequency; + + return $this; + } + + /** + * Gets meat_chicken_layers_purchases + * + * @return \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenLayersPurchases + */ + public function getMeatChickenLayersPurchases() + { + return $this->container['meat_chicken_layers_purchases']; + } + + /** + * Sets meat_chicken_layers_purchases + * + * @param \OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenLayersPurchases $meat_chicken_layers_purchases meat_chicken_layers_purchases + * + * @return self + */ + public function setMeatChickenLayersPurchases($meat_chicken_layers_purchases) + { + if (is_null($meat_chicken_layers_purchases)) { + throw new \InvalidArgumentException('non-nullable meat_chicken_layers_purchases cannot be null'); + } + $this->container['meat_chicken_layers_purchases'] = $meat_chicken_layers_purchases; + + return $this; + } + + /** + * Gets layers_purchases + * + * @return \OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayersPurchases + */ + public function getLayersPurchases() + { + return $this->container['layers_purchases']; + } + + /** + * Sets layers_purchases + * + * @param \OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayersPurchases $layers_purchases layers_purchases + * + * @return self + */ + public function setLayersPurchases($layers_purchases) + { + if (is_null($layers_purchases)) { + throw new \InvalidArgumentException('non-nullable layers_purchases cannot be null'); + } + $this->container['layers_purchases'] = $layers_purchases; + + return $this; + } + + /** + * Gets custom_feed_purchased + * + * @return float + */ + public function getCustomFeedPurchased() + { + return $this->container['custom_feed_purchased']; + } + + /** + * Sets custom_feed_purchased + * + * @param float $custom_feed_purchased Custom feed purchased, in tonnes + * + * @return self + */ + public function setCustomFeedPurchased($custom_feed_purchased) + { + if (is_null($custom_feed_purchased)) { + throw new \InvalidArgumentException('non-nullable custom_feed_purchased cannot be null'); + } + $this->container['custom_feed_purchased'] = $custom_feed_purchased; + + return $this; + } + + /** + * Gets custom_feed_emission_intensity + * + * @return float + */ + public function getCustomFeedEmissionIntensity() + { + return $this->container['custom_feed_emission_intensity']; + } + + /** + * Sets custom_feed_emission_intensity + * + * @param float $custom_feed_emission_intensity Emissions intensity of custom feed in GHG (kg CO2-e/kg input) + * + * @return self + */ + public function setCustomFeedEmissionIntensity($custom_feed_emission_intensity) + { + if (is_null($custom_feed_emission_intensity)) { + throw new \InvalidArgumentException('non-nullable custom_feed_emission_intensity cannot be null'); + } + $this->container['custom_feed_emission_intensity'] = $custom_feed_emission_intensity; + + return $this; + } + + /** + * Gets meat_chicken_layers_egg_sale + * + * @return \OpenAPI\Client\Model\PostPoultryRequestLayersInnerMeatChickenLayersEggSale + */ + public function getMeatChickenLayersEggSale() + { + return $this->container['meat_chicken_layers_egg_sale']; + } + + /** + * Sets meat_chicken_layers_egg_sale + * + * @param \OpenAPI\Client\Model\PostPoultryRequestLayersInnerMeatChickenLayersEggSale $meat_chicken_layers_egg_sale meat_chicken_layers_egg_sale + * + * @return self + */ + public function setMeatChickenLayersEggSale($meat_chicken_layers_egg_sale) + { + if (is_null($meat_chicken_layers_egg_sale)) { + throw new \InvalidArgumentException('non-nullable meat_chicken_layers_egg_sale cannot be null'); + } + $this->container['meat_chicken_layers_egg_sale'] = $meat_chicken_layers_egg_sale; + + return $this; + } + + /** + * Gets layers_egg_sale + * + * @return \OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayersEggSale + */ + public function getLayersEggSale() + { + return $this->container['layers_egg_sale']; + } + + /** + * Sets layers_egg_sale + * + * @param \OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayersEggSale $layers_egg_sale layers_egg_sale + * + * @return self + */ + public function setLayersEggSale($layers_egg_sale) + { + if (is_null($layers_egg_sale)) { + throw new \InvalidArgumentException('non-nullable layers_egg_sale cannot be null'); + } + $this->container['layers_egg_sale'] = $layers_egg_sale; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerLayers.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerLayers.php new file mode 100644 index 00000000..c14922ea --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerLayers.php @@ -0,0 +1,525 @@ + + */ +class PostPoultryRequestLayersInnerLayers implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_layers_inner_layers'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => 'float', + 'winter' => 'float', + 'spring' => 'float', + 'summer' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn Flock numbers in autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter Flock numbers in winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring Flock numbers in spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer Flock numbers in summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerLayersEggSale.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerLayersEggSale.php new file mode 100644 index 00000000..dd4e63da --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerLayersEggSale.php @@ -0,0 +1,451 @@ + + */ +class PostPoultryRequestLayersInnerLayersEggSale implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_layers_inner_layersEggSale'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'eggs_produced' => 'float', + 'average_weight' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'eggs_produced' => null, + 'average_weight' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'eggs_produced' => false, + 'average_weight' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'eggs_produced' => 'eggsProduced', + 'average_weight' => 'averageWeight' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'eggs_produced' => 'setEggsProduced', + 'average_weight' => 'setAverageWeight' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'eggs_produced' => 'getEggsProduced', + 'average_weight' => 'getAverageWeight' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('eggs_produced', $data ?? [], null); + $this->setIfExists('average_weight', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['eggs_produced'] === null) { + $invalidProperties[] = "'eggs_produced' can't be null"; + } + if ($this->container['average_weight'] === null) { + $invalidProperties[] = "'average_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets eggs_produced + * + * @return float + */ + public function getEggsProduced() + { + return $this->container['eggs_produced']; + } + + /** + * Sets eggs_produced + * + * @param float $eggs_produced Number of eggs produced in a year per bird + * + * @return self + */ + public function setEggsProduced($eggs_produced) + { + if (is_null($eggs_produced)) { + throw new \InvalidArgumentException('non-nullable eggs_produced cannot be null'); + } + $this->container['eggs_produced'] = $eggs_produced; + + return $this; + } + + /** + * Gets average_weight + * + * @return float + */ + public function getAverageWeight() + { + return $this->container['average_weight']; + } + + /** + * Sets average_weight + * + * @param float $average_weight Average egg weight in grams + * + * @return self + */ + public function setAverageWeight($average_weight) + { + if (is_null($average_weight)) { + throw new \InvalidArgumentException('non-nullable average_weight cannot be null'); + } + $this->container['average_weight'] = $average_weight; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerLayersPurchases.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerLayersPurchases.php new file mode 100644 index 00000000..4cb710b8 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerLayersPurchases.php @@ -0,0 +1,451 @@ + + */ +class PostPoultryRequestLayersInnerLayersPurchases implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_layers_inner_layersPurchases'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'head' => 'float', + 'purchase_weight' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'head' => null, + 'purchase_weight' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'head' => false, + 'purchase_weight' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'head' => 'head', + 'purchase_weight' => 'purchaseWeight' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'head' => 'setHead', + 'purchase_weight' => 'setPurchaseWeight' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'head' => 'getHead', + 'purchase_weight' => 'getPurchaseWeight' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('head', $data ?? [], null); + $this->setIfExists('purchase_weight', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['head'] === null) { + $invalidProperties[] = "'head' can't be null"; + } + if ($this->container['purchase_weight'] === null) { + $invalidProperties[] = "'purchase_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets head + * + * @return float + */ + public function getHead() + { + return $this->container['head']; + } + + /** + * Sets head + * + * @param float $head Number of animals purchased (head) + * + * @return self + */ + public function setHead($head) + { + if (is_null($head)) { + throw new \InvalidArgumentException('non-nullable head cannot be null'); + } + $this->container['head'] = $head; + + return $this; + } + + /** + * Gets purchase_weight + * + * @return float + */ + public function getPurchaseWeight() + { + return $this->container['purchase_weight']; + } + + /** + * Sets purchase_weight + * + * @param float $purchase_weight Weight at purchase, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setPurchaseWeight($purchase_weight) + { + if (is_null($purchase_weight)) { + throw new \InvalidArgumentException('non-nullable purchase_weight cannot be null'); + } + $this->container['purchase_weight'] = $purchase_weight; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerMeatChickenLayers.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerMeatChickenLayers.php new file mode 100644 index 00000000..2eb2a81e --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerMeatChickenLayers.php @@ -0,0 +1,525 @@ + + */ +class PostPoultryRequestLayersInnerMeatChickenLayers implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_layers_inner_meatChickenLayers'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => 'float', + 'winter' => 'float', + 'spring' => 'float', + 'summer' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn Flock numbers in autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter Flock numbers in winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring Flock numbers in spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer Flock numbers in summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.php new file mode 100644 index 00000000..33586f78 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.php @@ -0,0 +1,451 @@ + + */ +class PostPoultryRequestLayersInnerMeatChickenLayersEggSale implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_layers_inner_meatChickenLayersEggSale'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'eggs_produced' => 'float', + 'average_weight' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'eggs_produced' => null, + 'average_weight' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'eggs_produced' => false, + 'average_weight' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'eggs_produced' => 'eggsProduced', + 'average_weight' => 'averageWeight' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'eggs_produced' => 'setEggsProduced', + 'average_weight' => 'setAverageWeight' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'eggs_produced' => 'getEggsProduced', + 'average_weight' => 'getAverageWeight' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('eggs_produced', $data ?? [], null); + $this->setIfExists('average_weight', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['eggs_produced'] === null) { + $invalidProperties[] = "'eggs_produced' can't be null"; + } + if ($this->container['average_weight'] === null) { + $invalidProperties[] = "'average_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets eggs_produced + * + * @return float + */ + public function getEggsProduced() + { + return $this->container['eggs_produced']; + } + + /** + * Sets eggs_produced + * + * @param float $eggs_produced Number of eggs produced in a year per bird + * + * @return self + */ + public function setEggsProduced($eggs_produced) + { + if (is_null($eggs_produced)) { + throw new \InvalidArgumentException('non-nullable eggs_produced cannot be null'); + } + $this->container['eggs_produced'] = $eggs_produced; + + return $this; + } + + /** + * Gets average_weight + * + * @return float + */ + public function getAverageWeight() + { + return $this->container['average_weight']; + } + + /** + * Sets average_weight + * + * @param float $average_weight Average egg weight in grams + * + * @return self + */ + public function setAverageWeight($average_weight) + { + if (is_null($average_weight)) { + throw new \InvalidArgumentException('non-nullable average_weight cannot be null'); + } + $this->container['average_weight'] = $average_weight; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostPoultryRequestVegetationInner.php b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestVegetationInner.php new file mode 100644 index 00000000..24e50013 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostPoultryRequestVegetationInner.php @@ -0,0 +1,488 @@ + + */ +class PostPoultryRequestVegetationInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_poultry_request_vegetation_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'vegetation' => '\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation', + 'broilers_proportion' => 'float[]', + 'layers_proportion' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'vegetation' => null, + 'broilers_proportion' => null, + 'layers_proportion' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'vegetation' => false, + 'broilers_proportion' => false, + 'layers_proportion' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vegetation' => 'vegetation', + 'broilers_proportion' => 'broilersProportion', + 'layers_proportion' => 'layersProportion' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vegetation' => 'setVegetation', + 'broilers_proportion' => 'setBroilersProportion', + 'layers_proportion' => 'setLayersProportion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vegetation' => 'getVegetation', + 'broilers_proportion' => 'getBroilersProportion', + 'layers_proportion' => 'getLayersProportion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('vegetation', $data ?? [], null); + $this->setIfExists('broilers_proportion', $data ?? [], null); + $this->setIfExists('layers_proportion', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + if ($this->container['broilers_proportion'] === null) { + $invalidProperties[] = "'broilers_proportion' can't be null"; + } + if ($this->container['layers_proportion'] === null) { + $invalidProperties[] = "'layers_proportion' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + + /** + * Gets broilers_proportion + * + * @return float[] + */ + public function getBroilersProportion() + { + return $this->container['broilers_proportion']; + } + + /** + * Sets broilers_proportion + * + * @param float[] $broilers_proportion The proportion of the sequestration that is allocated to broilers + * + * @return self + */ + public function setBroilersProportion($broilers_proportion) + { + if (is_null($broilers_proportion)) { + throw new \InvalidArgumentException('non-nullable broilers_proportion cannot be null'); + } + $this->container['broilers_proportion'] = $broilers_proportion; + + return $this; + } + + /** + * Gets layers_proportion + * + * @return float[] + */ + public function getLayersProportion() + { + return $this->container['layers_proportion']; + } + + /** + * Sets layers_proportion + * + * @param float[] $layers_proportion The proportion of the sequestration that is allocated to layers + * + * @return self + */ + public function setLayersProportion($layers_proportion) + { + if (is_null($layers_proportion)) { + throw new \InvalidArgumentException('non-nullable layers_proportion cannot be null'); + } + $this->container['layers_proportion'] = $layers_proportion; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostProcessing200Response.php b/examples/php-api-client/api-client/lib/Model/PostProcessing200Response.php new file mode 100644 index 00000000..1075d18c --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostProcessing200Response.php @@ -0,0 +1,673 @@ + + */ +class PostProcessing200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_processing_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostProcessing200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostProcessing200ResponseScope3', + 'purchased_offsets' => '\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets', + 'net' => '\OpenAPI\Client\Model\PostProcessing200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostProcessing200ResponseIntensitiesInner[]', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'intermediate' => '\OpenAPI\Client\Model\PostProcessing200ResponseIntermediateInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'purchased_offsets' => null, + 'net' => null, + 'intensities' => null, + 'carbon_sequestration' => null, + 'intermediate' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'purchased_offsets' => false, + 'net' => false, + 'intensities' => false, + 'carbon_sequestration' => false, + 'intermediate' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'purchased_offsets' => 'purchasedOffsets', + 'net' => 'net', + 'intensities' => 'intensities', + 'carbon_sequestration' => 'carbonSequestration', + 'intermediate' => 'intermediate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'purchased_offsets' => 'setPurchasedOffsets', + 'net' => 'setNet', + 'intensities' => 'setIntensities', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intermediate' => 'setIntermediate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'purchased_offsets' => 'getPurchasedOffsets', + 'net' => 'getNet', + 'intensities' => 'getIntensities', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intermediate' => 'getIntermediate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('purchased_offsets', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['purchased_offsets'] === null) { + $invalidProperties[] = "'purchased_offsets' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostProcessing200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostProcessing200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostProcessing200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostProcessing200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets purchased_offsets + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets + */ + public function getPurchasedOffsets() + { + return $this->container['purchased_offsets']; + } + + /** + * Sets purchased_offsets + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets $purchased_offsets purchased_offsets + * + * @return self + */ + public function setPurchasedOffsets($purchased_offsets) + { + if (is_null($purchased_offsets)) { + throw new \InvalidArgumentException('non-nullable purchased_offsets cannot be null'); + } + $this->container['purchased_offsets'] = $purchased_offsets; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostProcessing200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostProcessing200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostProcessing200ResponseIntensitiesInner[] + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostProcessing200ResponseIntensitiesInner[] $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostProcessing200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostProcessing200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseIntensitiesInner.php b/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseIntensitiesInner.php new file mode 100644 index 00000000..ecb45542 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseIntensitiesInner.php @@ -0,0 +1,564 @@ + + */ +class PostProcessing200ResponseIntensitiesInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_processing_200_response_intensities_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'units_produced' => 'float', + 'unit_of_product' => 'string', + 'processing_excluding_carbon_offsets' => 'float', + 'processing_including_carbon_offsets' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'units_produced' => null, + 'unit_of_product' => null, + 'processing_excluding_carbon_offsets' => null, + 'processing_including_carbon_offsets' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'units_produced' => false, + 'unit_of_product' => false, + 'processing_excluding_carbon_offsets' => false, + 'processing_including_carbon_offsets' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'units_produced' => 'unitsProduced', + 'unit_of_product' => 'unitOfProduct', + 'processing_excluding_carbon_offsets' => 'processingExcludingCarbonOffsets', + 'processing_including_carbon_offsets' => 'processingIncludingCarbonOffsets' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'units_produced' => 'setUnitsProduced', + 'unit_of_product' => 'setUnitOfProduct', + 'processing_excluding_carbon_offsets' => 'setProcessingExcludingCarbonOffsets', + 'processing_including_carbon_offsets' => 'setProcessingIncludingCarbonOffsets' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'units_produced' => 'getUnitsProduced', + 'unit_of_product' => 'getUnitOfProduct', + 'processing_excluding_carbon_offsets' => 'getProcessingExcludingCarbonOffsets', + 'processing_including_carbon_offsets' => 'getProcessingIncludingCarbonOffsets' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const UNIT_OF_PRODUCT_LITRE = 'litre'; + public const UNIT_OF_PRODUCT_TONNE = 'tonne'; + public const UNIT_OF_PRODUCT_UNIT = 'unit'; + public const UNIT_OF_PRODUCT_BOTTLE = 'bottle'; + public const UNIT_OF_PRODUCT_DOZEN = 'dozen'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getUnitOfProductAllowableValues() + { + return [ + self::UNIT_OF_PRODUCT_LITRE, + self::UNIT_OF_PRODUCT_TONNE, + self::UNIT_OF_PRODUCT_UNIT, + self::UNIT_OF_PRODUCT_BOTTLE, + self::UNIT_OF_PRODUCT_DOZEN, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('units_produced', $data ?? [], null); + $this->setIfExists('unit_of_product', $data ?? [], null); + $this->setIfExists('processing_excluding_carbon_offsets', $data ?? [], null); + $this->setIfExists('processing_including_carbon_offsets', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['units_produced'] === null) { + $invalidProperties[] = "'units_produced' can't be null"; + } + if ($this->container['unit_of_product'] === null) { + $invalidProperties[] = "'unit_of_product' can't be null"; + } + $allowedValues = $this->getUnitOfProductAllowableValues(); + if (!is_null($this->container['unit_of_product']) && !in_array($this->container['unit_of_product'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'unit_of_product', must be one of '%s'", + $this->container['unit_of_product'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['processing_excluding_carbon_offsets'] === null) { + $invalidProperties[] = "'processing_excluding_carbon_offsets' can't be null"; + } + if ($this->container['processing_including_carbon_offsets'] === null) { + $invalidProperties[] = "'processing_including_carbon_offsets' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets units_produced + * + * @return float + */ + public function getUnitsProduced() + { + return $this->container['units_produced']; + } + + /** + * Sets units_produced + * + * @param float $units_produced Number of processed product units produced + * + * @return self + */ + public function setUnitsProduced($units_produced) + { + if (is_null($units_produced)) { + throw new \InvalidArgumentException('non-nullable units_produced cannot be null'); + } + $this->container['units_produced'] = $units_produced; + + return $this; + } + + /** + * Gets unit_of_product + * + * @return string + */ + public function getUnitOfProduct() + { + return $this->container['unit_of_product']; + } + + /** + * Sets unit_of_product + * + * @param string $unit_of_product Unit type of the product being produced (used by \"unitsProduced\") + * + * @return self + */ + public function setUnitOfProduct($unit_of_product) + { + if (is_null($unit_of_product)) { + throw new \InvalidArgumentException('non-nullable unit_of_product cannot be null'); + } + $allowedValues = $this->getUnitOfProductAllowableValues(); + if (!in_array($unit_of_product, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'unit_of_product', must be one of '%s'", + $unit_of_product, + implode("', '", $allowedValues) + ) + ); + } + $this->container['unit_of_product'] = $unit_of_product; + + return $this; + } + + /** + * Gets processing_excluding_carbon_offsets + * + * @return float + */ + public function getProcessingExcludingCarbonOffsets() + { + return $this->container['processing_excluding_carbon_offsets']; + } + + /** + * Sets processing_excluding_carbon_offsets + * + * @param float $processing_excluding_carbon_offsets Processing emissions intensity excluding carbon offsets, in kg-CO2e/number of units produced + * + * @return self + */ + public function setProcessingExcludingCarbonOffsets($processing_excluding_carbon_offsets) + { + if (is_null($processing_excluding_carbon_offsets)) { + throw new \InvalidArgumentException('non-nullable processing_excluding_carbon_offsets cannot be null'); + } + $this->container['processing_excluding_carbon_offsets'] = $processing_excluding_carbon_offsets; + + return $this; + } + + /** + * Gets processing_including_carbon_offsets + * + * @return float + */ + public function getProcessingIncludingCarbonOffsets() + { + return $this->container['processing_including_carbon_offsets']; + } + + /** + * Sets processing_including_carbon_offsets + * + * @param float $processing_including_carbon_offsets Processing emissions intensity including carbon offsets, in kg-CO2e/number of units produced + * + * @return self + */ + public function setProcessingIncludingCarbonOffsets($processing_including_carbon_offsets) + { + if (is_null($processing_including_carbon_offsets)) { + throw new \InvalidArgumentException('non-nullable processing_including_carbon_offsets cannot be null'); + } + $this->container['processing_including_carbon_offsets'] = $processing_including_carbon_offsets; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseIntermediateInner.php new file mode 100644 index 00000000..989c68c7 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseIntermediateInner.php @@ -0,0 +1,635 @@ + + */ +class PostProcessing200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_processing_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostProcessing200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostProcessing200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration', + 'intensities' => '\OpenAPI\Client\Model\PostProcessing200ResponseIntensitiesInner', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intensities' => null, + 'net' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intensities' => false, + 'net' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intensities' => 'intensities', + 'net' => 'net' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intensities' => 'setIntensities', + 'net' => 'setNet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intensities' => 'getIntensities', + 'net' => 'getNet' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostProcessing200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostProcessing200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostProcessing200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostProcessing200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostProcessing200ResponseIntensitiesInner + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostProcessing200ResponseIntensitiesInner $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseNet.php b/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseNet.php new file mode 100644 index 00000000..dbacadbc --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseNet.php @@ -0,0 +1,414 @@ + + */ +class PostProcessing200ResponseNet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_processing_200_response_net'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total total + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseScope1.php b/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseScope1.php new file mode 100644 index 00000000..d4c0f3c7 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseScope1.php @@ -0,0 +1,821 @@ + + */ +class PostProcessing200ResponseScope1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_processing_200_response_scope1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel_co2' => 'float', + 'fuel_ch4' => 'float', + 'fuel_n2_o' => 'float', + 'hfcs_refrigerant_leakage' => 'float', + 'purchased_co2' => 'float', + 'wastewater_co2' => 'float', + 'composted_solid_waste_co2' => 'float', + 'total_co2' => 'float', + 'total_ch4' => 'float', + 'total_n2_o' => 'float', + 'total_hfcs' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel_co2' => null, + 'fuel_ch4' => null, + 'fuel_n2_o' => null, + 'hfcs_refrigerant_leakage' => null, + 'purchased_co2' => null, + 'wastewater_co2' => null, + 'composted_solid_waste_co2' => null, + 'total_co2' => null, + 'total_ch4' => null, + 'total_n2_o' => null, + 'total_hfcs' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel_co2' => false, + 'fuel_ch4' => false, + 'fuel_n2_o' => false, + 'hfcs_refrigerant_leakage' => false, + 'purchased_co2' => false, + 'wastewater_co2' => false, + 'composted_solid_waste_co2' => false, + 'total_co2' => false, + 'total_ch4' => false, + 'total_n2_o' => false, + 'total_hfcs' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel_co2' => 'fuelCO2', + 'fuel_ch4' => 'fuelCH4', + 'fuel_n2_o' => 'fuelN2O', + 'hfcs_refrigerant_leakage' => 'hfcsRefrigerantLeakage', + 'purchased_co2' => 'purchasedCO2', + 'wastewater_co2' => 'wastewaterCO2', + 'composted_solid_waste_co2' => 'compostedSolidWasteCO2', + 'total_co2' => 'totalCO2', + 'total_ch4' => 'totalCH4', + 'total_n2_o' => 'totalN2O', + 'total_hfcs' => 'totalHFCs', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel_co2' => 'setFuelCo2', + 'fuel_ch4' => 'setFuelCh4', + 'fuel_n2_o' => 'setFuelN2O', + 'hfcs_refrigerant_leakage' => 'setHfcsRefrigerantLeakage', + 'purchased_co2' => 'setPurchasedCo2', + 'wastewater_co2' => 'setWastewaterCo2', + 'composted_solid_waste_co2' => 'setCompostedSolidWasteCo2', + 'total_co2' => 'setTotalCo2', + 'total_ch4' => 'setTotalCh4', + 'total_n2_o' => 'setTotalN2O', + 'total_hfcs' => 'setTotalHfcs', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel_co2' => 'getFuelCo2', + 'fuel_ch4' => 'getFuelCh4', + 'fuel_n2_o' => 'getFuelN2O', + 'hfcs_refrigerant_leakage' => 'getHfcsRefrigerantLeakage', + 'purchased_co2' => 'getPurchasedCo2', + 'wastewater_co2' => 'getWastewaterCo2', + 'composted_solid_waste_co2' => 'getCompostedSolidWasteCo2', + 'total_co2' => 'getTotalCo2', + 'total_ch4' => 'getTotalCh4', + 'total_n2_o' => 'getTotalN2O', + 'total_hfcs' => 'getTotalHfcs', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel_co2', $data ?? [], null); + $this->setIfExists('fuel_ch4', $data ?? [], null); + $this->setIfExists('fuel_n2_o', $data ?? [], null); + $this->setIfExists('hfcs_refrigerant_leakage', $data ?? [], null); + $this->setIfExists('purchased_co2', $data ?? [], null); + $this->setIfExists('wastewater_co2', $data ?? [], null); + $this->setIfExists('composted_solid_waste_co2', $data ?? [], null); + $this->setIfExists('total_co2', $data ?? [], null); + $this->setIfExists('total_ch4', $data ?? [], null); + $this->setIfExists('total_n2_o', $data ?? [], null); + $this->setIfExists('total_hfcs', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel_co2'] === null) { + $invalidProperties[] = "'fuel_co2' can't be null"; + } + if ($this->container['fuel_ch4'] === null) { + $invalidProperties[] = "'fuel_ch4' can't be null"; + } + if ($this->container['fuel_n2_o'] === null) { + $invalidProperties[] = "'fuel_n2_o' can't be null"; + } + if ($this->container['hfcs_refrigerant_leakage'] === null) { + $invalidProperties[] = "'hfcs_refrigerant_leakage' can't be null"; + } + if ($this->container['purchased_co2'] === null) { + $invalidProperties[] = "'purchased_co2' can't be null"; + } + if ($this->container['wastewater_co2'] === null) { + $invalidProperties[] = "'wastewater_co2' can't be null"; + } + if ($this->container['composted_solid_waste_co2'] === null) { + $invalidProperties[] = "'composted_solid_waste_co2' can't be null"; + } + if ($this->container['total_co2'] === null) { + $invalidProperties[] = "'total_co2' can't be null"; + } + if ($this->container['total_ch4'] === null) { + $invalidProperties[] = "'total_ch4' can't be null"; + } + if ($this->container['total_n2_o'] === null) { + $invalidProperties[] = "'total_n2_o' can't be null"; + } + if ($this->container['total_hfcs'] === null) { + $invalidProperties[] = "'total_hfcs' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel_co2 + * + * @return float + */ + public function getFuelCo2() + { + return $this->container['fuel_co2']; + } + + /** + * Sets fuel_co2 + * + * @param float $fuel_co2 CO2 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCo2($fuel_co2) + { + if (is_null($fuel_co2)) { + throw new \InvalidArgumentException('non-nullable fuel_co2 cannot be null'); + } + $this->container['fuel_co2'] = $fuel_co2; + + return $this; + } + + /** + * Gets fuel_ch4 + * + * @return float + */ + public function getFuelCh4() + { + return $this->container['fuel_ch4']; + } + + /** + * Sets fuel_ch4 + * + * @param float $fuel_ch4 CH4 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCh4($fuel_ch4) + { + if (is_null($fuel_ch4)) { + throw new \InvalidArgumentException('non-nullable fuel_ch4 cannot be null'); + } + $this->container['fuel_ch4'] = $fuel_ch4; + + return $this; + } + + /** + * Gets fuel_n2_o + * + * @return float + */ + public function getFuelN2O() + { + return $this->container['fuel_n2_o']; + } + + /** + * Sets fuel_n2_o + * + * @param float $fuel_n2_o N2O emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelN2O($fuel_n2_o) + { + if (is_null($fuel_n2_o)) { + throw new \InvalidArgumentException('non-nullable fuel_n2_o cannot be null'); + } + $this->container['fuel_n2_o'] = $fuel_n2_o; + + return $this; + } + + /** + * Gets hfcs_refrigerant_leakage + * + * @return float + */ + public function getHfcsRefrigerantLeakage() + { + return $this->container['hfcs_refrigerant_leakage']; + } + + /** + * Sets hfcs_refrigerant_leakage + * + * @param float $hfcs_refrigerant_leakage Emissions from refrigerant leakage, in tonnes-HFCs + * + * @return self + */ + public function setHfcsRefrigerantLeakage($hfcs_refrigerant_leakage) + { + if (is_null($hfcs_refrigerant_leakage)) { + throw new \InvalidArgumentException('non-nullable hfcs_refrigerant_leakage cannot be null'); + } + $this->container['hfcs_refrigerant_leakage'] = $hfcs_refrigerant_leakage; + + return $this; + } + + /** + * Gets purchased_co2 + * + * @return float + */ + public function getPurchasedCo2() + { + return $this->container['purchased_co2']; + } + + /** + * Sets purchased_co2 + * + * @param float $purchased_co2 Emissions from purchased CO2, in tonnes-CO2e + * + * @return self + */ + public function setPurchasedCo2($purchased_co2) + { + if (is_null($purchased_co2)) { + throw new \InvalidArgumentException('non-nullable purchased_co2 cannot be null'); + } + $this->container['purchased_co2'] = $purchased_co2; + + return $this; + } + + /** + * Gets wastewater_co2 + * + * @return float + */ + public function getWastewaterCo2() + { + return $this->container['wastewater_co2']; + } + + /** + * Sets wastewater_co2 + * + * @param float $wastewater_co2 Emissions from wastewater, in tonnes-CO2e + * + * @return self + */ + public function setWastewaterCo2($wastewater_co2) + { + if (is_null($wastewater_co2)) { + throw new \InvalidArgumentException('non-nullable wastewater_co2 cannot be null'); + } + $this->container['wastewater_co2'] = $wastewater_co2; + + return $this; + } + + /** + * Gets composted_solid_waste_co2 + * + * @return float + */ + public function getCompostedSolidWasteCo2() + { + return $this->container['composted_solid_waste_co2']; + } + + /** + * Sets composted_solid_waste_co2 + * + * @param float $composted_solid_waste_co2 Emissions from composted solid waste, in tonnes-CO2e + * + * @return self + */ + public function setCompostedSolidWasteCo2($composted_solid_waste_co2) + { + if (is_null($composted_solid_waste_co2)) { + throw new \InvalidArgumentException('non-nullable composted_solid_waste_co2 cannot be null'); + } + $this->container['composted_solid_waste_co2'] = $composted_solid_waste_co2; + + return $this; + } + + /** + * Gets total_co2 + * + * @return float + */ + public function getTotalCo2() + { + return $this->container['total_co2']; + } + + /** + * Sets total_co2 + * + * @param float $total_co2 Total CO2 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCo2($total_co2) + { + if (is_null($total_co2)) { + throw new \InvalidArgumentException('non-nullable total_co2 cannot be null'); + } + $this->container['total_co2'] = $total_co2; + + return $this; + } + + /** + * Gets total_ch4 + * + * @return float + */ + public function getTotalCh4() + { + return $this->container['total_ch4']; + } + + /** + * Sets total_ch4 + * + * @param float $total_ch4 Total CH4 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCh4($total_ch4) + { + if (is_null($total_ch4)) { + throw new \InvalidArgumentException('non-nullable total_ch4 cannot be null'); + } + $this->container['total_ch4'] = $total_ch4; + + return $this; + } + + /** + * Gets total_n2_o + * + * @return float + */ + public function getTotalN2O() + { + return $this->container['total_n2_o']; + } + + /** + * Sets total_n2_o + * + * @param float $total_n2_o Total N2O scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalN2O($total_n2_o) + { + if (is_null($total_n2_o)) { + throw new \InvalidArgumentException('non-nullable total_n2_o cannot be null'); + } + $this->container['total_n2_o'] = $total_n2_o; + + return $this; + } + + /** + * Gets total_hfcs + * + * @return float + */ + public function getTotalHfcs() + { + return $this->container['total_hfcs']; + } + + /** + * Sets total_hfcs + * + * @param float $total_hfcs Total HFCs scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalHfcs($total_hfcs) + { + if (is_null($total_hfcs)) { + throw new \InvalidArgumentException('non-nullable total_hfcs cannot be null'); + } + $this->container['total_hfcs'] = $total_hfcs; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseScope3.php b/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseScope3.php new file mode 100644 index 00000000..a0e682fc --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostProcessing200ResponseScope3.php @@ -0,0 +1,525 @@ + + */ +class PostProcessing200ResponseScope3 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_processing_200_response_scope3'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'electricity' => 'float', + 'fuel' => 'float', + 'solid_waste_sent_offsite' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'electricity' => null, + 'fuel' => null, + 'solid_waste_sent_offsite' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'electricity' => false, + 'fuel' => false, + 'solid_waste_sent_offsite' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'electricity' => 'electricity', + 'fuel' => 'fuel', + 'solid_waste_sent_offsite' => 'solidWasteSentOffsite', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'electricity' => 'setElectricity', + 'fuel' => 'setFuel', + 'solid_waste_sent_offsite' => 'setSolidWasteSentOffsite', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'electricity' => 'getElectricity', + 'fuel' => 'getFuel', + 'solid_waste_sent_offsite' => 'getSolidWasteSentOffsite', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('electricity', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('solid_waste_sent_offsite', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['electricity'] === null) { + $invalidProperties[] = "'electricity' can't be null"; + } + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['solid_waste_sent_offsite'] === null) { + $invalidProperties[] = "'solid_waste_sent_offsite' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets electricity + * + * @return float + */ + public function getElectricity() + { + return $this->container['electricity']; + } + + /** + * Sets electricity + * + * @param float $electricity Emissions from electricity, in tonnes-CO2e + * + * @return self + */ + public function setElectricity($electricity) + { + if (is_null($electricity)) { + throw new \InvalidArgumentException('non-nullable electricity cannot be null'); + } + $this->container['electricity'] = $electricity; + + return $this; + } + + /** + * Gets fuel + * + * @return float + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param float $fuel Emissions from fuel, in tonnes-CO2e + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets solid_waste_sent_offsite + * + * @return float + */ + public function getSolidWasteSentOffsite() + { + return $this->container['solid_waste_sent_offsite']; + } + + /** + * Sets solid_waste_sent_offsite + * + * @param float $solid_waste_sent_offsite Emissions from solid waste sent offsite, in tonnes-CO2e + * + * @return self + */ + public function setSolidWasteSentOffsite($solid_waste_sent_offsite) + { + if (is_null($solid_waste_sent_offsite)) { + throw new \InvalidArgumentException('non-nullable solid_waste_sent_offsite cannot be null'); + } + $this->container['solid_waste_sent_offsite'] = $solid_waste_sent_offsite; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 3 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostProcessingRequest.php b/examples/php-api-client/api-client/lib/Model/PostProcessingRequest.php new file mode 100644 index 00000000..9a431dd8 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostProcessingRequest.php @@ -0,0 +1,499 @@ + + */ +class PostProcessingRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_processing_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'products' => '\OpenAPI\Client\Model\PostProcessingRequestProductsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'products' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'products' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'products' => 'products' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'products' => 'setProducts' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'products' => 'getProducts' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('products', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['products'] === null) { + $invalidProperties[] = "'products' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets products + * + * @return \OpenAPI\Client\Model\PostProcessingRequestProductsInner[] + */ + public function getProducts() + { + return $this->container['products']; + } + + /** + * Sets products + * + * @param \OpenAPI\Client\Model\PostProcessingRequestProductsInner[] $products products + * + * @return self + */ + public function setProducts($products) + { + if (is_null($products)) { + throw new \InvalidArgumentException('non-nullable products cannot be null'); + } + $this->container['products'] = $products; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostProcessingRequestProductsInner.php b/examples/php-api-client/api-client/lib/Model/PostProcessingRequestProductsInner.php new file mode 100644 index 00000000..63ae69bf --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostProcessingRequestProductsInner.php @@ -0,0 +1,828 @@ + + */ +class PostProcessingRequestProductsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_processing_request_products_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'product' => '\OpenAPI\Client\Model\PostProcessingRequestProductsInnerProduct', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'electricity_source' => 'string', + 'fuel' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel', + 'refrigerants' => '\OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[]', + 'fluid_waste' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[]', + 'solid_waste' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste', + 'purchased_co2' => 'float', + 'carbon_offsets' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'product' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'electricity_source' => null, + 'fuel' => null, + 'refrigerants' => null, + 'fluid_waste' => null, + 'solid_waste' => null, + 'purchased_co2' => null, + 'carbon_offsets' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'product' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'electricity_source' => false, + 'fuel' => false, + 'refrigerants' => false, + 'fluid_waste' => false, + 'solid_waste' => false, + 'purchased_co2' => false, + 'carbon_offsets' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'product' => 'product', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'electricity_source' => 'electricitySource', + 'fuel' => 'fuel', + 'refrigerants' => 'refrigerants', + 'fluid_waste' => 'fluidWaste', + 'solid_waste' => 'solidWaste', + 'purchased_co2' => 'purchasedCO2', + 'carbon_offsets' => 'carbonOffsets' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'product' => 'setProduct', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'electricity_source' => 'setElectricitySource', + 'fuel' => 'setFuel', + 'refrigerants' => 'setRefrigerants', + 'fluid_waste' => 'setFluidWaste', + 'solid_waste' => 'setSolidWaste', + 'purchased_co2' => 'setPurchasedCo2', + 'carbon_offsets' => 'setCarbonOffsets' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'product' => 'getProduct', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'electricity_source' => 'getElectricitySource', + 'fuel' => 'getFuel', + 'refrigerants' => 'getRefrigerants', + 'fluid_waste' => 'getFluidWaste', + 'solid_waste' => 'getSolidWaste', + 'purchased_co2' => 'getPurchasedCo2', + 'carbon_offsets' => 'getCarbonOffsets' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const ELECTRICITY_SOURCE_STATE_GRID = 'State Grid'; + public const ELECTRICITY_SOURCE_RENEWABLE = 'Renewable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getElectricitySourceAllowableValues() + { + return [ + self::ELECTRICITY_SOURCE_STATE_GRID, + self::ELECTRICITY_SOURCE_RENEWABLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('product', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('electricity_source', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('refrigerants', $data ?? [], null); + $this->setIfExists('fluid_waste', $data ?? [], null); + $this->setIfExists('solid_waste', $data ?? [], null); + $this->setIfExists('purchased_co2', $data ?? [], null); + $this->setIfExists('carbon_offsets', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['product'] === null) { + $invalidProperties[] = "'product' can't be null"; + } + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['electricity_source'] === null) { + $invalidProperties[] = "'electricity_source' can't be null"; + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!is_null($this->container['electricity_source']) && !in_array($this->container['electricity_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'electricity_source', must be one of '%s'", + $this->container['electricity_source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['refrigerants'] === null) { + $invalidProperties[] = "'refrigerants' can't be null"; + } + if ($this->container['fluid_waste'] === null) { + $invalidProperties[] = "'fluid_waste' can't be null"; + } + if ($this->container['solid_waste'] === null) { + $invalidProperties[] = "'solid_waste' can't be null"; + } + if ($this->container['purchased_co2'] === null) { + $invalidProperties[] = "'purchased_co2' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets product + * + * @return \OpenAPI\Client\Model\PostProcessingRequestProductsInnerProduct + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \OpenAPI\Client\Model\PostProcessingRequestProductsInnerProduct $product product + * + * @return self + */ + public function setProduct($product) + { + if (is_null($product)) { + throw new \InvalidArgumentException('non-nullable product cannot be null'); + } + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostProcessingRequestProductsInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostProcessingRequestProductsInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets electricity_source + * + * @return string + */ + public function getElectricitySource() + { + return $this->container['electricity_source']; + } + + /** + * Sets electricity_source + * + * @param string $electricity_source Source of electricity + * + * @return self + */ + public function setElectricitySource($electricity_source) + { + if (is_null($electricity_source)) { + throw new \InvalidArgumentException('non-nullable electricity_source cannot be null'); + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!in_array($electricity_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'electricity_source', must be one of '%s'", + $electricity_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['electricity_source'] = $electricity_source; + + return $this; + } + + /** + * Gets fuel + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel $fuel fuel + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets refrigerants + * + * @return \OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[] + */ + public function getRefrigerants() + { + return $this->container['refrigerants']; + } + + /** + * Sets refrigerants + * + * @param \OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[] $refrigerants Refrigerant type + * + * @return self + */ + public function setRefrigerants($refrigerants) + { + if (is_null($refrigerants)) { + throw new \InvalidArgumentException('non-nullable refrigerants cannot be null'); + } + $this->container['refrigerants'] = $refrigerants; + + return $this; + } + + /** + * Gets fluid_waste + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[] + */ + public function getFluidWaste() + { + return $this->container['fluid_waste']; + } + + /** + * Sets fluid_waste + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[] $fluid_waste Amount of fluid waste, in kL (kilolitres) + * + * @return self + */ + public function setFluidWaste($fluid_waste) + { + if (is_null($fluid_waste)) { + throw new \InvalidArgumentException('non-nullable fluid_waste cannot be null'); + } + $this->container['fluid_waste'] = $fluid_waste; + + return $this; + } + + /** + * Gets solid_waste + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste + */ + public function getSolidWaste() + { + return $this->container['solid_waste']; + } + + /** + * Sets solid_waste + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste $solid_waste solid_waste + * + * @return self + */ + public function setSolidWaste($solid_waste) + { + if (is_null($solid_waste)) { + throw new \InvalidArgumentException('non-nullable solid_waste cannot be null'); + } + $this->container['solid_waste'] = $solid_waste; + + return $this; + } + + /** + * Gets purchased_co2 + * + * @return float + */ + public function getPurchasedCo2() + { + return $this->container['purchased_co2']; + } + + /** + * Sets purchased_co2 + * + * @param float $purchased_co2 Quantity of CO2 purchased, in kg CO2 + * + * @return self + */ + public function setPurchasedCo2($purchased_co2) + { + if (is_null($purchased_co2)) { + throw new \InvalidArgumentException('non-nullable purchased_co2 cannot be null'); + } + $this->container['purchased_co2'] = $purchased_co2; + + return $this; + } + + /** + * Gets carbon_offsets + * + * @return float|null + */ + public function getCarbonOffsets() + { + return $this->container['carbon_offsets']; + } + + /** + * Sets carbon_offsets + * + * @param float|null $carbon_offsets Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) + * + * @return self + */ + public function setCarbonOffsets($carbon_offsets) + { + if (is_null($carbon_offsets)) { + throw new \InvalidArgumentException('non-nullable carbon_offsets cannot be null'); + } + $this->container['carbon_offsets'] = $carbon_offsets; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostProcessingRequestProductsInnerProduct.php b/examples/php-api-client/api-client/lib/Model/PostProcessingRequestProductsInnerProduct.php new file mode 100644 index 00000000..8ba8129a --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostProcessingRequestProductsInnerProduct.php @@ -0,0 +1,491 @@ + + */ +class PostProcessingRequestProductsInnerProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_processing_request_products_inner_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'unit' => 'string', + 'amount_made_per_year' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'unit' => null, + 'amount_made_per_year' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'unit' => false, + 'amount_made_per_year' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'unit' => 'unit', + 'amount_made_per_year' => 'amountMadePerYear' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'unit' => 'setUnit', + 'amount_made_per_year' => 'setAmountMadePerYear' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'unit' => 'getUnit', + 'amount_made_per_year' => 'getAmountMadePerYear' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const UNIT_LITRE = 'litre'; + public const UNIT_TONNE = 'tonne'; + public const UNIT_UNIT = 'unit'; + public const UNIT_BOTTLE = 'bottle'; + public const UNIT_DOZEN = 'dozen'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getUnitAllowableValues() + { + return [ + self::UNIT_LITRE, + self::UNIT_TONNE, + self::UNIT_UNIT, + self::UNIT_BOTTLE, + self::UNIT_DOZEN, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('unit', $data ?? [], null); + $this->setIfExists('amount_made_per_year', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['unit'] === null) { + $invalidProperties[] = "'unit' can't be null"; + } + $allowedValues = $this->getUnitAllowableValues(); + if (!is_null($this->container['unit']) && !in_array($this->container['unit'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'unit', must be one of '%s'", + $this->container['unit'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['amount_made_per_year'] === null) { + $invalidProperties[] = "'amount_made_per_year' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets unit + * + * @return string + */ + public function getUnit() + { + return $this->container['unit']; + } + + /** + * Sets unit + * + * @param string $unit unit + * + * @return self + */ + public function setUnit($unit) + { + if (is_null($unit)) { + throw new \InvalidArgumentException('non-nullable unit cannot be null'); + } + $allowedValues = $this->getUnitAllowableValues(); + if (!in_array($unit, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'unit', must be one of '%s'", + $unit, + implode("', '", $allowedValues) + ) + ); + } + $this->container['unit'] = $unit; + + return $this; + } + + /** + * Gets amount_made_per_year + * + * @return float + */ + public function getAmountMadePerYear() + { + return $this->container['amount_made_per_year']; + } + + /** + * Sets amount_made_per_year + * + * @param float $amount_made_per_year amount_made_per_year + * + * @return self + */ + public function setAmountMadePerYear($amount_made_per_year) + { + if (is_null($amount_made_per_year)) { + throw new \InvalidArgumentException('non-nullable amount_made_per_year cannot be null'); + } + $this->container['amount_made_per_year'] = $amount_made_per_year; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostRice200Response.php b/examples/php-api-client/api-client/lib/Model/PostRice200Response.php new file mode 100644 index 00000000..fa6edc66 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostRice200Response.php @@ -0,0 +1,636 @@ + + */ +class PostRice200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_rice_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostRice200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostCotton200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'intermediate' => '\OpenAPI\Client\Model\PostRice200ResponseIntermediateInner[]', + 'net' => '\OpenAPI\Client\Model\PostCotton200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostRice200ResponseIntensities' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intermediate' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intermediate' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intermediate' => 'intermediate', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intermediate' => 'setIntermediate', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intermediate' => 'getIntermediate', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostRice200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostRice200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostRice200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostRice200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostRice200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostRice200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostRice200ResponseIntensities.php b/examples/php-api-client/api-client/lib/Model/PostRice200ResponseIntensities.php new file mode 100644 index 00000000..8f219689 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostRice200ResponseIntensities.php @@ -0,0 +1,527 @@ + + */ +class PostRice200ResponseIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_rice_200_response_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'rice_produced_tonnes' => 'float', + 'rice_excluding_sequestration' => 'float', + 'rice_including_sequestration' => 'float', + 'intensity' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'rice_produced_tonnes' => null, + 'rice_excluding_sequestration' => null, + 'rice_including_sequestration' => null, + 'intensity' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'rice_produced_tonnes' => false, + 'rice_excluding_sequestration' => false, + 'rice_including_sequestration' => false, + 'intensity' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'rice_produced_tonnes' => 'riceProducedTonnes', + 'rice_excluding_sequestration' => 'riceExcludingSequestration', + 'rice_including_sequestration' => 'riceIncludingSequestration', + 'intensity' => 'intensity' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'rice_produced_tonnes' => 'setRiceProducedTonnes', + 'rice_excluding_sequestration' => 'setRiceExcludingSequestration', + 'rice_including_sequestration' => 'setRiceIncludingSequestration', + 'intensity' => 'setIntensity' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'rice_produced_tonnes' => 'getRiceProducedTonnes', + 'rice_excluding_sequestration' => 'getRiceExcludingSequestration', + 'rice_including_sequestration' => 'getRiceIncludingSequestration', + 'intensity' => 'getIntensity' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('rice_produced_tonnes', $data ?? [], null); + $this->setIfExists('rice_excluding_sequestration', $data ?? [], null); + $this->setIfExists('rice_including_sequestration', $data ?? [], null); + $this->setIfExists('intensity', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['rice_produced_tonnes'] === null) { + $invalidProperties[] = "'rice_produced_tonnes' can't be null"; + } + if ($this->container['rice_excluding_sequestration'] === null) { + $invalidProperties[] = "'rice_excluding_sequestration' can't be null"; + } + if ($this->container['rice_including_sequestration'] === null) { + $invalidProperties[] = "'rice_including_sequestration' can't be null"; + } + if ($this->container['intensity'] === null) { + $invalidProperties[] = "'intensity' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets rice_produced_tonnes + * + * @return float + */ + public function getRiceProducedTonnes() + { + return $this->container['rice_produced_tonnes']; + } + + /** + * Sets rice_produced_tonnes + * + * @param float $rice_produced_tonnes Rice produced in tonnes + * + * @return self + */ + public function setRiceProducedTonnes($rice_produced_tonnes) + { + if (is_null($rice_produced_tonnes)) { + throw new \InvalidArgumentException('non-nullable rice_produced_tonnes cannot be null'); + } + $this->container['rice_produced_tonnes'] = $rice_produced_tonnes; + + return $this; + } + + /** + * Gets rice_excluding_sequestration + * + * @return float + */ + public function getRiceExcludingSequestration() + { + return $this->container['rice_excluding_sequestration']; + } + + /** + * Sets rice_excluding_sequestration + * + * @param float $rice_excluding_sequestration Rice excluding sequestration, in t-CO2e/t rice + * + * @return self + */ + public function setRiceExcludingSequestration($rice_excluding_sequestration) + { + if (is_null($rice_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable rice_excluding_sequestration cannot be null'); + } + $this->container['rice_excluding_sequestration'] = $rice_excluding_sequestration; + + return $this; + } + + /** + * Gets rice_including_sequestration + * + * @return float + */ + public function getRiceIncludingSequestration() + { + return $this->container['rice_including_sequestration']; + } + + /** + * Sets rice_including_sequestration + * + * @param float $rice_including_sequestration Rice including sequestration, in t-CO2e/t rice + * + * @return self + */ + public function setRiceIncludingSequestration($rice_including_sequestration) + { + if (is_null($rice_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable rice_including_sequestration cannot be null'); + } + $this->container['rice_including_sequestration'] = $rice_including_sequestration; + + return $this; + } + + /** + * Gets intensity + * + * @return float + * @deprecated + */ + public function getIntensity() + { + return $this->container['intensity']; + } + + /** + * Sets intensity + * + * @param float $intensity Emissions intensity of rice production. Deprecation note: Use `riceIncludingSequestration` instead + * + * @return self + * @deprecated + */ + public function setIntensity($intensity) + { + if (is_null($intensity)) { + throw new \InvalidArgumentException('non-nullable intensity cannot be null'); + } + $this->container['intensity'] = $intensity; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostRice200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostRice200ResponseIntermediateInner.php new file mode 100644 index 00000000..48965366 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostRice200ResponseIntermediateInner.php @@ -0,0 +1,636 @@ + + */ +class PostRice200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_rice_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostRice200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostCotton200ResponseScope3', + 'carbon_sequestration' => 'float', + 'intensities' => '\OpenAPI\Client\Model\PostRice200ResponseIntermediateInnerIntensities', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intensities' => null, + 'net' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intensities' => false, + 'net' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intensities' => 'intensities', + 'net' => 'net' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intensities' => 'setIntensities', + 'net' => 'setNet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intensities' => 'getIntensities', + 'net' => 'getNet' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostRice200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostRice200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return float + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param float $carbon_sequestration Carbon sequestration, in tonnes-CO2e + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostRice200ResponseIntermediateInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostRice200ResponseIntermediateInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostRice200ResponseIntermediateInnerIntensities.php b/examples/php-api-client/api-client/lib/Model/PostRice200ResponseIntermediateInnerIntensities.php new file mode 100644 index 00000000..103554bb --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostRice200ResponseIntermediateInnerIntensities.php @@ -0,0 +1,526 @@ + + */ +class PostRice200ResponseIntermediateInnerIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_rice_200_response_intermediate_inner_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'rice_produced_tonnes' => 'float', + 'rice_excluding_sequestration' => 'float', + 'rice_including_sequestration' => 'float', + 'intensity' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'rice_produced_tonnes' => null, + 'rice_excluding_sequestration' => null, + 'rice_including_sequestration' => null, + 'intensity' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'rice_produced_tonnes' => false, + 'rice_excluding_sequestration' => false, + 'rice_including_sequestration' => false, + 'intensity' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'rice_produced_tonnes' => 'riceProducedTonnes', + 'rice_excluding_sequestration' => 'riceExcludingSequestration', + 'rice_including_sequestration' => 'riceIncludingSequestration', + 'intensity' => 'intensity' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'rice_produced_tonnes' => 'setRiceProducedTonnes', + 'rice_excluding_sequestration' => 'setRiceExcludingSequestration', + 'rice_including_sequestration' => 'setRiceIncludingSequestration', + 'intensity' => 'setIntensity' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'rice_produced_tonnes' => 'getRiceProducedTonnes', + 'rice_excluding_sequestration' => 'getRiceExcludingSequestration', + 'rice_including_sequestration' => 'getRiceIncludingSequestration', + 'intensity' => 'getIntensity' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('rice_produced_tonnes', $data ?? [], null); + $this->setIfExists('rice_excluding_sequestration', $data ?? [], null); + $this->setIfExists('rice_including_sequestration', $data ?? [], null); + $this->setIfExists('intensity', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['rice_produced_tonnes'] === null) { + $invalidProperties[] = "'rice_produced_tonnes' can't be null"; + } + if ($this->container['rice_excluding_sequestration'] === null) { + $invalidProperties[] = "'rice_excluding_sequestration' can't be null"; + } + if ($this->container['rice_including_sequestration'] === null) { + $invalidProperties[] = "'rice_including_sequestration' can't be null"; + } + if ($this->container['intensity'] === null) { + $invalidProperties[] = "'intensity' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets rice_produced_tonnes + * + * @return float + */ + public function getRiceProducedTonnes() + { + return $this->container['rice_produced_tonnes']; + } + + /** + * Sets rice_produced_tonnes + * + * @param float $rice_produced_tonnes Rice produced in tonnes + * + * @return self + */ + public function setRiceProducedTonnes($rice_produced_tonnes) + { + if (is_null($rice_produced_tonnes)) { + throw new \InvalidArgumentException('non-nullable rice_produced_tonnes cannot be null'); + } + $this->container['rice_produced_tonnes'] = $rice_produced_tonnes; + + return $this; + } + + /** + * Gets rice_excluding_sequestration + * + * @return float + */ + public function getRiceExcludingSequestration() + { + return $this->container['rice_excluding_sequestration']; + } + + /** + * Sets rice_excluding_sequestration + * + * @param float $rice_excluding_sequestration Rice excluding sequestration, in t-CO2e/t rice + * + * @return self + */ + public function setRiceExcludingSequestration($rice_excluding_sequestration) + { + if (is_null($rice_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable rice_excluding_sequestration cannot be null'); + } + $this->container['rice_excluding_sequestration'] = $rice_excluding_sequestration; + + return $this; + } + + /** + * Gets rice_including_sequestration + * + * @return float + */ + public function getRiceIncludingSequestration() + { + return $this->container['rice_including_sequestration']; + } + + /** + * Sets rice_including_sequestration + * + * @param float $rice_including_sequestration Rice including sequestration, in t-CO2e/t rice + * + * @return self + */ + public function setRiceIncludingSequestration($rice_including_sequestration) + { + if (is_null($rice_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable rice_including_sequestration cannot be null'); + } + $this->container['rice_including_sequestration'] = $rice_including_sequestration; + + return $this; + } + + /** + * Gets intensity + * + * @return float + * @deprecated + */ + public function getIntensity() + { + return $this->container['intensity']; + } + + /** + * Sets intensity + * + * @param float $intensity Emissions intensity of rice production. Deprecation note: Use `riceIncludingSequestration` instead + * + * @return self + * @deprecated + */ + public function setIntensity($intensity) + { + if (is_null($intensity)) { + throw new \InvalidArgumentException('non-nullable intensity cannot be null'); + } + $this->container['intensity'] = $intensity; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostRice200ResponseScope1.php b/examples/php-api-client/api-client/lib/Model/PostRice200ResponseScope1.php new file mode 100644 index 00000000..a3fd4550 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostRice200ResponseScope1.php @@ -0,0 +1,969 @@ + + */ +class PostRice200ResponseScope1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_rice_200_response_scope1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel_co2' => 'float', + 'lime_co2' => 'float', + 'urea_co2' => 'float', + 'field_burning_ch4' => 'float', + 'rice_cultivation_ch4' => 'float', + 'fuel_ch4' => 'float', + 'fertiliser_n2_o' => 'float', + 'atmospheric_deposition_n2_o' => 'float', + 'field_burning_n2_o' => 'float', + 'crop_residue_n2_o' => 'float', + 'leaching_and_runoff_n2_o' => 'float', + 'fuel_n2_o' => 'float', + 'total_co2' => 'float', + 'total_ch4' => 'float', + 'total_n2_o' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel_co2' => null, + 'lime_co2' => null, + 'urea_co2' => null, + 'field_burning_ch4' => null, + 'rice_cultivation_ch4' => null, + 'fuel_ch4' => null, + 'fertiliser_n2_o' => null, + 'atmospheric_deposition_n2_o' => null, + 'field_burning_n2_o' => null, + 'crop_residue_n2_o' => null, + 'leaching_and_runoff_n2_o' => null, + 'fuel_n2_o' => null, + 'total_co2' => null, + 'total_ch4' => null, + 'total_n2_o' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel_co2' => false, + 'lime_co2' => false, + 'urea_co2' => false, + 'field_burning_ch4' => false, + 'rice_cultivation_ch4' => false, + 'fuel_ch4' => false, + 'fertiliser_n2_o' => false, + 'atmospheric_deposition_n2_o' => false, + 'field_burning_n2_o' => false, + 'crop_residue_n2_o' => false, + 'leaching_and_runoff_n2_o' => false, + 'fuel_n2_o' => false, + 'total_co2' => false, + 'total_ch4' => false, + 'total_n2_o' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel_co2' => 'fuelCO2', + 'lime_co2' => 'limeCO2', + 'urea_co2' => 'ureaCO2', + 'field_burning_ch4' => 'fieldBurningCH4', + 'rice_cultivation_ch4' => 'riceCultivationCH4', + 'fuel_ch4' => 'fuelCH4', + 'fertiliser_n2_o' => 'fertiliserN2O', + 'atmospheric_deposition_n2_o' => 'atmosphericDepositionN2O', + 'field_burning_n2_o' => 'fieldBurningN2O', + 'crop_residue_n2_o' => 'cropResidueN2O', + 'leaching_and_runoff_n2_o' => 'leachingAndRunoffN2O', + 'fuel_n2_o' => 'fuelN2O', + 'total_co2' => 'totalCO2', + 'total_ch4' => 'totalCH4', + 'total_n2_o' => 'totalN2O', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel_co2' => 'setFuelCo2', + 'lime_co2' => 'setLimeCo2', + 'urea_co2' => 'setUreaCo2', + 'field_burning_ch4' => 'setFieldBurningCh4', + 'rice_cultivation_ch4' => 'setRiceCultivationCh4', + 'fuel_ch4' => 'setFuelCh4', + 'fertiliser_n2_o' => 'setFertiliserN2O', + 'atmospheric_deposition_n2_o' => 'setAtmosphericDepositionN2O', + 'field_burning_n2_o' => 'setFieldBurningN2O', + 'crop_residue_n2_o' => 'setCropResidueN2O', + 'leaching_and_runoff_n2_o' => 'setLeachingAndRunoffN2O', + 'fuel_n2_o' => 'setFuelN2O', + 'total_co2' => 'setTotalCo2', + 'total_ch4' => 'setTotalCh4', + 'total_n2_o' => 'setTotalN2O', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel_co2' => 'getFuelCo2', + 'lime_co2' => 'getLimeCo2', + 'urea_co2' => 'getUreaCo2', + 'field_burning_ch4' => 'getFieldBurningCh4', + 'rice_cultivation_ch4' => 'getRiceCultivationCh4', + 'fuel_ch4' => 'getFuelCh4', + 'fertiliser_n2_o' => 'getFertiliserN2O', + 'atmospheric_deposition_n2_o' => 'getAtmosphericDepositionN2O', + 'field_burning_n2_o' => 'getFieldBurningN2O', + 'crop_residue_n2_o' => 'getCropResidueN2O', + 'leaching_and_runoff_n2_o' => 'getLeachingAndRunoffN2O', + 'fuel_n2_o' => 'getFuelN2O', + 'total_co2' => 'getTotalCo2', + 'total_ch4' => 'getTotalCh4', + 'total_n2_o' => 'getTotalN2O', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel_co2', $data ?? [], null); + $this->setIfExists('lime_co2', $data ?? [], null); + $this->setIfExists('urea_co2', $data ?? [], null); + $this->setIfExists('field_burning_ch4', $data ?? [], null); + $this->setIfExists('rice_cultivation_ch4', $data ?? [], null); + $this->setIfExists('fuel_ch4', $data ?? [], null); + $this->setIfExists('fertiliser_n2_o', $data ?? [], null); + $this->setIfExists('atmospheric_deposition_n2_o', $data ?? [], null); + $this->setIfExists('field_burning_n2_o', $data ?? [], null); + $this->setIfExists('crop_residue_n2_o', $data ?? [], null); + $this->setIfExists('leaching_and_runoff_n2_o', $data ?? [], null); + $this->setIfExists('fuel_n2_o', $data ?? [], null); + $this->setIfExists('total_co2', $data ?? [], null); + $this->setIfExists('total_ch4', $data ?? [], null); + $this->setIfExists('total_n2_o', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel_co2'] === null) { + $invalidProperties[] = "'fuel_co2' can't be null"; + } + if ($this->container['lime_co2'] === null) { + $invalidProperties[] = "'lime_co2' can't be null"; + } + if ($this->container['urea_co2'] === null) { + $invalidProperties[] = "'urea_co2' can't be null"; + } + if ($this->container['field_burning_ch4'] === null) { + $invalidProperties[] = "'field_burning_ch4' can't be null"; + } + if ($this->container['rice_cultivation_ch4'] === null) { + $invalidProperties[] = "'rice_cultivation_ch4' can't be null"; + } + if ($this->container['fuel_ch4'] === null) { + $invalidProperties[] = "'fuel_ch4' can't be null"; + } + if ($this->container['fertiliser_n2_o'] === null) { + $invalidProperties[] = "'fertiliser_n2_o' can't be null"; + } + if ($this->container['atmospheric_deposition_n2_o'] === null) { + $invalidProperties[] = "'atmospheric_deposition_n2_o' can't be null"; + } + if ($this->container['field_burning_n2_o'] === null) { + $invalidProperties[] = "'field_burning_n2_o' can't be null"; + } + if ($this->container['crop_residue_n2_o'] === null) { + $invalidProperties[] = "'crop_residue_n2_o' can't be null"; + } + if ($this->container['leaching_and_runoff_n2_o'] === null) { + $invalidProperties[] = "'leaching_and_runoff_n2_o' can't be null"; + } + if ($this->container['fuel_n2_o'] === null) { + $invalidProperties[] = "'fuel_n2_o' can't be null"; + } + if ($this->container['total_co2'] === null) { + $invalidProperties[] = "'total_co2' can't be null"; + } + if ($this->container['total_ch4'] === null) { + $invalidProperties[] = "'total_ch4' can't be null"; + } + if ($this->container['total_n2_o'] === null) { + $invalidProperties[] = "'total_n2_o' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel_co2 + * + * @return float + */ + public function getFuelCo2() + { + return $this->container['fuel_co2']; + } + + /** + * Sets fuel_co2 + * + * @param float $fuel_co2 CO2 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCo2($fuel_co2) + { + if (is_null($fuel_co2)) { + throw new \InvalidArgumentException('non-nullable fuel_co2 cannot be null'); + } + $this->container['fuel_co2'] = $fuel_co2; + + return $this; + } + + /** + * Gets lime_co2 + * + * @return float + */ + public function getLimeCo2() + { + return $this->container['lime_co2']; + } + + /** + * Sets lime_co2 + * + * @param float $lime_co2 CO2 emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLimeCo2($lime_co2) + { + if (is_null($lime_co2)) { + throw new \InvalidArgumentException('non-nullable lime_co2 cannot be null'); + } + $this->container['lime_co2'] = $lime_co2; + + return $this; + } + + /** + * Gets urea_co2 + * + * @return float + */ + public function getUreaCo2() + { + return $this->container['urea_co2']; + } + + /** + * Sets urea_co2 + * + * @param float $urea_co2 CO2 emissions from urea, in tonnes-CO2e + * + * @return self + */ + public function setUreaCo2($urea_co2) + { + if (is_null($urea_co2)) { + throw new \InvalidArgumentException('non-nullable urea_co2 cannot be null'); + } + $this->container['urea_co2'] = $urea_co2; + + return $this; + } + + /** + * Gets field_burning_ch4 + * + * @return float + */ + public function getFieldBurningCh4() + { + return $this->container['field_burning_ch4']; + } + + /** + * Sets field_burning_ch4 + * + * @param float $field_burning_ch4 CH4 emissions from field burning, in tonnes-CO2e + * + * @return self + */ + public function setFieldBurningCh4($field_burning_ch4) + { + if (is_null($field_burning_ch4)) { + throw new \InvalidArgumentException('non-nullable field_burning_ch4 cannot be null'); + } + $this->container['field_burning_ch4'] = $field_burning_ch4; + + return $this; + } + + /** + * Gets rice_cultivation_ch4 + * + * @return float + */ + public function getRiceCultivationCh4() + { + return $this->container['rice_cultivation_ch4']; + } + + /** + * Sets rice_cultivation_ch4 + * + * @param float $rice_cultivation_ch4 CH4 emissions from rice cultivation, in tonnes-CO2e + * + * @return self + */ + public function setRiceCultivationCh4($rice_cultivation_ch4) + { + if (is_null($rice_cultivation_ch4)) { + throw new \InvalidArgumentException('non-nullable rice_cultivation_ch4 cannot be null'); + } + $this->container['rice_cultivation_ch4'] = $rice_cultivation_ch4; + + return $this; + } + + /** + * Gets fuel_ch4 + * + * @return float + */ + public function getFuelCh4() + { + return $this->container['fuel_ch4']; + } + + /** + * Sets fuel_ch4 + * + * @param float $fuel_ch4 CH4 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCh4($fuel_ch4) + { + if (is_null($fuel_ch4)) { + throw new \InvalidArgumentException('non-nullable fuel_ch4 cannot be null'); + } + $this->container['fuel_ch4'] = $fuel_ch4; + + return $this; + } + + /** + * Gets fertiliser_n2_o + * + * @return float + */ + public function getFertiliserN2O() + { + return $this->container['fertiliser_n2_o']; + } + + /** + * Sets fertiliser_n2_o + * + * @param float $fertiliser_n2_o N2O emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliserN2O($fertiliser_n2_o) + { + if (is_null($fertiliser_n2_o)) { + throw new \InvalidArgumentException('non-nullable fertiliser_n2_o cannot be null'); + } + $this->container['fertiliser_n2_o'] = $fertiliser_n2_o; + + return $this; + } + + /** + * Gets atmospheric_deposition_n2_o + * + * @return float + */ + public function getAtmosphericDepositionN2O() + { + return $this->container['atmospheric_deposition_n2_o']; + } + + /** + * Sets atmospheric_deposition_n2_o + * + * @param float $atmospheric_deposition_n2_o N2O emissions from atmospheric deposition, in tonnes-CO2e + * + * @return self + */ + public function setAtmosphericDepositionN2O($atmospheric_deposition_n2_o) + { + if (is_null($atmospheric_deposition_n2_o)) { + throw new \InvalidArgumentException('non-nullable atmospheric_deposition_n2_o cannot be null'); + } + $this->container['atmospheric_deposition_n2_o'] = $atmospheric_deposition_n2_o; + + return $this; + } + + /** + * Gets field_burning_n2_o + * + * @return float + */ + public function getFieldBurningN2O() + { + return $this->container['field_burning_n2_o']; + } + + /** + * Sets field_burning_n2_o + * + * @param float $field_burning_n2_o N2O emissions from field burning, in tonnes-CO2e + * + * @return self + */ + public function setFieldBurningN2O($field_burning_n2_o) + { + if (is_null($field_burning_n2_o)) { + throw new \InvalidArgumentException('non-nullable field_burning_n2_o cannot be null'); + } + $this->container['field_burning_n2_o'] = $field_burning_n2_o; + + return $this; + } + + /** + * Gets crop_residue_n2_o + * + * @return float + */ + public function getCropResidueN2O() + { + return $this->container['crop_residue_n2_o']; + } + + /** + * Sets crop_residue_n2_o + * + * @param float $crop_residue_n2_o N2O emissions from crop residue, in tonnes-CO2e + * + * @return self + */ + public function setCropResidueN2O($crop_residue_n2_o) + { + if (is_null($crop_residue_n2_o)) { + throw new \InvalidArgumentException('non-nullable crop_residue_n2_o cannot be null'); + } + $this->container['crop_residue_n2_o'] = $crop_residue_n2_o; + + return $this; + } + + /** + * Gets leaching_and_runoff_n2_o + * + * @return float + */ + public function getLeachingAndRunoffN2O() + { + return $this->container['leaching_and_runoff_n2_o']; + } + + /** + * Sets leaching_and_runoff_n2_o + * + * @param float $leaching_and_runoff_n2_o N2O emissions from leeching and runoff, in tonnes-CO2e + * + * @return self + */ + public function setLeachingAndRunoffN2O($leaching_and_runoff_n2_o) + { + if (is_null($leaching_and_runoff_n2_o)) { + throw new \InvalidArgumentException('non-nullable leaching_and_runoff_n2_o cannot be null'); + } + $this->container['leaching_and_runoff_n2_o'] = $leaching_and_runoff_n2_o; + + return $this; + } + + /** + * Gets fuel_n2_o + * + * @return float + */ + public function getFuelN2O() + { + return $this->container['fuel_n2_o']; + } + + /** + * Sets fuel_n2_o + * + * @param float $fuel_n2_o N2O emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelN2O($fuel_n2_o) + { + if (is_null($fuel_n2_o)) { + throw new \InvalidArgumentException('non-nullable fuel_n2_o cannot be null'); + } + $this->container['fuel_n2_o'] = $fuel_n2_o; + + return $this; + } + + /** + * Gets total_co2 + * + * @return float + */ + public function getTotalCo2() + { + return $this->container['total_co2']; + } + + /** + * Sets total_co2 + * + * @param float $total_co2 Total CO2 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCo2($total_co2) + { + if (is_null($total_co2)) { + throw new \InvalidArgumentException('non-nullable total_co2 cannot be null'); + } + $this->container['total_co2'] = $total_co2; + + return $this; + } + + /** + * Gets total_ch4 + * + * @return float + */ + public function getTotalCh4() + { + return $this->container['total_ch4']; + } + + /** + * Sets total_ch4 + * + * @param float $total_ch4 Total CH4 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCh4($total_ch4) + { + if (is_null($total_ch4)) { + throw new \InvalidArgumentException('non-nullable total_ch4 cannot be null'); + } + $this->container['total_ch4'] = $total_ch4; + + return $this; + } + + /** + * Gets total_n2_o + * + * @return float + */ + public function getTotalN2O() + { + return $this->container['total_n2_o']; + } + + /** + * Sets total_n2_o + * + * @param float $total_n2_o Total N2O scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalN2O($total_n2_o) + { + if (is_null($total_n2_o)) { + throw new \InvalidArgumentException('non-nullable total_n2_o cannot be null'); + } + $this->container['total_n2_o'] = $total_n2_o; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostRiceRequest.php b/examples/php-api-client/api-client/lib/Model/PostRiceRequest.php new file mode 100644 index 00000000..f454a467 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostRiceRequest.php @@ -0,0 +1,626 @@ + + */ +class PostRiceRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_rice_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'crops' => '\OpenAPI\Client\Model\PostRiceRequestCropsInner[]', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'vegetation' => '\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'crops' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'crops' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'crops' => 'crops', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'crops' => 'setCrops', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'crops' => 'getCrops', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('crops', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['crops'] === null) { + $invalidProperties[] = "'crops' can't be null"; + } + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets crops + * + * @return \OpenAPI\Client\Model\PostRiceRequestCropsInner[] + */ + public function getCrops() + { + return $this->container['crops']; + } + + /** + * Sets crops + * + * @param \OpenAPI\Client\Model\PostRiceRequestCropsInner[] $crops crops + * + * @return self + */ + public function setCrops($crops) + { + if (is_null($crops)) { + throw new \InvalidArgumentException('non-nullable crops cannot be null'); + } + $this->container['crops'] = $crops; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostRiceRequest., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostRiceRequest., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostCottonRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostCottonRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostRiceRequestCropsInner.php b/examples/php-api-client/api-client/lib/Model/PostRiceRequestCropsInner.php new file mode 100644 index 00000000..118f3711 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostRiceRequestCropsInner.php @@ -0,0 +1,1424 @@ + + */ +class PostRiceRequestCropsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_rice_request_crops_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'state' => 'string', + 'average_rice_yield' => 'float', + 'area_sown' => 'float', + 'growing_season_days' => 'float', + 'water_regime_type' => 'string', + 'water_regime_sub_type' => 'string', + 'rice_preseason_flooding_period' => 'string', + 'urea_application' => 'float', + 'non_urea_nitrogen' => 'float', + 'urea_ammonium_nitrate' => 'float', + 'phosphorus_application' => 'float', + 'potassium_application' => 'float', + 'sulfur_application' => 'float', + 'fraction_of_annual_crop_burnt' => 'float', + 'herbicide_use' => 'float', + 'glyphosate_other_herbicide_use' => 'float', + 'electricity_allocation' => 'float', + 'limestone' => 'float', + 'limestone_fraction' => 'float', + 'diesel_use' => 'float', + 'petrol_use' => 'float', + 'lpg' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'state' => null, + 'average_rice_yield' => null, + 'area_sown' => null, + 'growing_season_days' => null, + 'water_regime_type' => null, + 'water_regime_sub_type' => null, + 'rice_preseason_flooding_period' => null, + 'urea_application' => null, + 'non_urea_nitrogen' => null, + 'urea_ammonium_nitrate' => null, + 'phosphorus_application' => null, + 'potassium_application' => null, + 'sulfur_application' => null, + 'fraction_of_annual_crop_burnt' => null, + 'herbicide_use' => null, + 'glyphosate_other_herbicide_use' => null, + 'electricity_allocation' => null, + 'limestone' => null, + 'limestone_fraction' => null, + 'diesel_use' => null, + 'petrol_use' => null, + 'lpg' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'state' => false, + 'average_rice_yield' => false, + 'area_sown' => false, + 'growing_season_days' => false, + 'water_regime_type' => false, + 'water_regime_sub_type' => false, + 'rice_preseason_flooding_period' => false, + 'urea_application' => false, + 'non_urea_nitrogen' => false, + 'urea_ammonium_nitrate' => false, + 'phosphorus_application' => false, + 'potassium_application' => false, + 'sulfur_application' => false, + 'fraction_of_annual_crop_burnt' => false, + 'herbicide_use' => false, + 'glyphosate_other_herbicide_use' => false, + 'electricity_allocation' => false, + 'limestone' => false, + 'limestone_fraction' => false, + 'diesel_use' => false, + 'petrol_use' => false, + 'lpg' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'state' => 'state', + 'average_rice_yield' => 'averageRiceYield', + 'area_sown' => 'areaSown', + 'growing_season_days' => 'growingSeasonDays', + 'water_regime_type' => 'waterRegimeType', + 'water_regime_sub_type' => 'waterRegimeSubType', + 'rice_preseason_flooding_period' => 'ricePreseasonFloodingPeriod', + 'urea_application' => 'ureaApplication', + 'non_urea_nitrogen' => 'nonUreaNitrogen', + 'urea_ammonium_nitrate' => 'ureaAmmoniumNitrate', + 'phosphorus_application' => 'phosphorusApplication', + 'potassium_application' => 'potassiumApplication', + 'sulfur_application' => 'sulfurApplication', + 'fraction_of_annual_crop_burnt' => 'fractionOfAnnualCropBurnt', + 'herbicide_use' => 'herbicideUse', + 'glyphosate_other_herbicide_use' => 'glyphosateOtherHerbicideUse', + 'electricity_allocation' => 'electricityAllocation', + 'limestone' => 'limestone', + 'limestone_fraction' => 'limestoneFraction', + 'diesel_use' => 'dieselUse', + 'petrol_use' => 'petrolUse', + 'lpg' => 'lpg' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'state' => 'setState', + 'average_rice_yield' => 'setAverageRiceYield', + 'area_sown' => 'setAreaSown', + 'growing_season_days' => 'setGrowingSeasonDays', + 'water_regime_type' => 'setWaterRegimeType', + 'water_regime_sub_type' => 'setWaterRegimeSubType', + 'rice_preseason_flooding_period' => 'setRicePreseasonFloodingPeriod', + 'urea_application' => 'setUreaApplication', + 'non_urea_nitrogen' => 'setNonUreaNitrogen', + 'urea_ammonium_nitrate' => 'setUreaAmmoniumNitrate', + 'phosphorus_application' => 'setPhosphorusApplication', + 'potassium_application' => 'setPotassiumApplication', + 'sulfur_application' => 'setSulfurApplication', + 'fraction_of_annual_crop_burnt' => 'setFractionOfAnnualCropBurnt', + 'herbicide_use' => 'setHerbicideUse', + 'glyphosate_other_herbicide_use' => 'setGlyphosateOtherHerbicideUse', + 'electricity_allocation' => 'setElectricityAllocation', + 'limestone' => 'setLimestone', + 'limestone_fraction' => 'setLimestoneFraction', + 'diesel_use' => 'setDieselUse', + 'petrol_use' => 'setPetrolUse', + 'lpg' => 'setLpg' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'state' => 'getState', + 'average_rice_yield' => 'getAverageRiceYield', + 'area_sown' => 'getAreaSown', + 'growing_season_days' => 'getGrowingSeasonDays', + 'water_regime_type' => 'getWaterRegimeType', + 'water_regime_sub_type' => 'getWaterRegimeSubType', + 'rice_preseason_flooding_period' => 'getRicePreseasonFloodingPeriod', + 'urea_application' => 'getUreaApplication', + 'non_urea_nitrogen' => 'getNonUreaNitrogen', + 'urea_ammonium_nitrate' => 'getUreaAmmoniumNitrate', + 'phosphorus_application' => 'getPhosphorusApplication', + 'potassium_application' => 'getPotassiumApplication', + 'sulfur_application' => 'getSulfurApplication', + 'fraction_of_annual_crop_burnt' => 'getFractionOfAnnualCropBurnt', + 'herbicide_use' => 'getHerbicideUse', + 'glyphosate_other_herbicide_use' => 'getGlyphosateOtherHerbicideUse', + 'electricity_allocation' => 'getElectricityAllocation', + 'limestone' => 'getLimestone', + 'limestone_fraction' => 'getLimestoneFraction', + 'diesel_use' => 'getDieselUse', + 'petrol_use' => 'getPetrolUse', + 'lpg' => 'getLpg' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + public const WATER_REGIME_TYPE_UPLAND = 'Upland'; + public const WATER_REGIME_TYPE_IRRIGATED = 'Irrigated'; + public const WATER_REGIME_TYPE_RAINFED = 'Rainfed'; + public const WATER_REGIME_SUB_TYPE_CONTINUOUSLY_FLOODED = 'Continuously flooded'; + public const WATER_REGIME_SUB_TYPE_SINGLE_DRAINAGE_PERIOD = 'Single drainage period'; + public const WATER_REGIME_SUB_TYPE_MULTIPLE_DRAINAGE_PERIODS = 'Multiple drainage periods'; + public const WATER_REGIME_SUB_TYPE_REGULAR_RAINFED = 'Regular rainfed'; + public const WATER_REGIME_SUB_TYPE_DROUGHT_PRONE = 'Drought prone'; + public const WATER_REGIME_SUB_TYPE_DEEP_WATER = 'Deep water'; + public const WATER_REGIME_SUB_TYPE_PADDY_ROTATION = 'Paddy rotation'; + public const WATER_REGIME_SUB_TYPE_FALLOW_WITHOUT_FLOODING_IN_PREVIOUS_YEAR = 'Fallow without flooding in previous year'; + public const RICE_PRESEASON_FLOODING_PERIOD_NON_FLOODED_PRE_SEASON__180_DAYS = 'Non flooded pre-season < 180 days'; + public const RICE_PRESEASON_FLOODING_PERIOD_NON_FLOODED_PRE_SEASON__180_DAYS2 = 'Non flooded pre-season > 180 days'; + public const RICE_PRESEASON_FLOODING_PERIOD_FLOODED_PRE_SEASON__30_DAYS = 'Flooded pre-season > 30 days'; + public const RICE_PRESEASON_FLOODING_PERIOD_NON_FLOODED_PRE_SEASON__365_DAYS = 'Non-flooded pre-season > 365 days'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getWaterRegimeTypeAllowableValues() + { + return [ + self::WATER_REGIME_TYPE_UPLAND, + self::WATER_REGIME_TYPE_IRRIGATED, + self::WATER_REGIME_TYPE_RAINFED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getWaterRegimeSubTypeAllowableValues() + { + return [ + self::WATER_REGIME_SUB_TYPE_CONTINUOUSLY_FLOODED, + self::WATER_REGIME_SUB_TYPE_SINGLE_DRAINAGE_PERIOD, + self::WATER_REGIME_SUB_TYPE_MULTIPLE_DRAINAGE_PERIODS, + self::WATER_REGIME_SUB_TYPE_REGULAR_RAINFED, + self::WATER_REGIME_SUB_TYPE_DROUGHT_PRONE, + self::WATER_REGIME_SUB_TYPE_DEEP_WATER, + self::WATER_REGIME_SUB_TYPE_PADDY_ROTATION, + self::WATER_REGIME_SUB_TYPE_FALLOW_WITHOUT_FLOODING_IN_PREVIOUS_YEAR, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRicePreseasonFloodingPeriodAllowableValues() + { + return [ + self::RICE_PRESEASON_FLOODING_PERIOD_NON_FLOODED_PRE_SEASON__180_DAYS, + self::RICE_PRESEASON_FLOODING_PERIOD_NON_FLOODED_PRE_SEASON__180_DAYS2, + self::RICE_PRESEASON_FLOODING_PERIOD_FLOODED_PRE_SEASON__30_DAYS, + self::RICE_PRESEASON_FLOODING_PERIOD_NON_FLOODED_PRE_SEASON__365_DAYS, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('average_rice_yield', $data ?? [], null); + $this->setIfExists('area_sown', $data ?? [], null); + $this->setIfExists('growing_season_days', $data ?? [], null); + $this->setIfExists('water_regime_type', $data ?? [], null); + $this->setIfExists('water_regime_sub_type', $data ?? [], null); + $this->setIfExists('rice_preseason_flooding_period', $data ?? [], null); + $this->setIfExists('urea_application', $data ?? [], null); + $this->setIfExists('non_urea_nitrogen', $data ?? [], null); + $this->setIfExists('urea_ammonium_nitrate', $data ?? [], null); + $this->setIfExists('phosphorus_application', $data ?? [], null); + $this->setIfExists('potassium_application', $data ?? [], null); + $this->setIfExists('sulfur_application', $data ?? [], null); + $this->setIfExists('fraction_of_annual_crop_burnt', $data ?? [], null); + $this->setIfExists('herbicide_use', $data ?? [], null); + $this->setIfExists('glyphosate_other_herbicide_use', $data ?? [], null); + $this->setIfExists('electricity_allocation', $data ?? [], null); + $this->setIfExists('limestone', $data ?? [], null); + $this->setIfExists('limestone_fraction', $data ?? [], null); + $this->setIfExists('diesel_use', $data ?? [], null); + $this->setIfExists('petrol_use', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['average_rice_yield'] === null) { + $invalidProperties[] = "'average_rice_yield' can't be null"; + } + if ($this->container['area_sown'] === null) { + $invalidProperties[] = "'area_sown' can't be null"; + } + if ($this->container['growing_season_days'] === null) { + $invalidProperties[] = "'growing_season_days' can't be null"; + } + if ($this->container['water_regime_type'] === null) { + $invalidProperties[] = "'water_regime_type' can't be null"; + } + $allowedValues = $this->getWaterRegimeTypeAllowableValues(); + if (!is_null($this->container['water_regime_type']) && !in_array($this->container['water_regime_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'water_regime_type', must be one of '%s'", + $this->container['water_regime_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['water_regime_sub_type'] === null) { + $invalidProperties[] = "'water_regime_sub_type' can't be null"; + } + $allowedValues = $this->getWaterRegimeSubTypeAllowableValues(); + if (!is_null($this->container['water_regime_sub_type']) && !in_array($this->container['water_regime_sub_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'water_regime_sub_type', must be one of '%s'", + $this->container['water_regime_sub_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['rice_preseason_flooding_period'] === null) { + $invalidProperties[] = "'rice_preseason_flooding_period' can't be null"; + } + $allowedValues = $this->getRicePreseasonFloodingPeriodAllowableValues(); + if (!is_null($this->container['rice_preseason_flooding_period']) && !in_array($this->container['rice_preseason_flooding_period'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'rice_preseason_flooding_period', must be one of '%s'", + $this->container['rice_preseason_flooding_period'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['urea_application'] === null) { + $invalidProperties[] = "'urea_application' can't be null"; + } + if ($this->container['non_urea_nitrogen'] === null) { + $invalidProperties[] = "'non_urea_nitrogen' can't be null"; + } + if ($this->container['urea_ammonium_nitrate'] === null) { + $invalidProperties[] = "'urea_ammonium_nitrate' can't be null"; + } + if ($this->container['phosphorus_application'] === null) { + $invalidProperties[] = "'phosphorus_application' can't be null"; + } + if ($this->container['potassium_application'] === null) { + $invalidProperties[] = "'potassium_application' can't be null"; + } + if ($this->container['sulfur_application'] === null) { + $invalidProperties[] = "'sulfur_application' can't be null"; + } + if ($this->container['fraction_of_annual_crop_burnt'] === null) { + $invalidProperties[] = "'fraction_of_annual_crop_burnt' can't be null"; + } + if (($this->container['fraction_of_annual_crop_burnt'] > 1)) { + $invalidProperties[] = "invalid value for 'fraction_of_annual_crop_burnt', must be smaller than or equal to 1."; + } + + if (($this->container['fraction_of_annual_crop_burnt'] < 0)) { + $invalidProperties[] = "invalid value for 'fraction_of_annual_crop_burnt', must be bigger than or equal to 0."; + } + + if ($this->container['herbicide_use'] === null) { + $invalidProperties[] = "'herbicide_use' can't be null"; + } + if ($this->container['glyphosate_other_herbicide_use'] === null) { + $invalidProperties[] = "'glyphosate_other_herbicide_use' can't be null"; + } + if ($this->container['electricity_allocation'] === null) { + $invalidProperties[] = "'electricity_allocation' can't be null"; + } + if (($this->container['electricity_allocation'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_allocation', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_allocation'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_allocation', must be bigger than or equal to 0."; + } + + if ($this->container['limestone'] === null) { + $invalidProperties[] = "'limestone' can't be null"; + } + if ($this->container['limestone_fraction'] === null) { + $invalidProperties[] = "'limestone_fraction' can't be null"; + } + if ($this->container['diesel_use'] === null) { + $invalidProperties[] = "'diesel_use' can't be null"; + } + if ($this->container['petrol_use'] === null) { + $invalidProperties[] = "'petrol_use' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets average_rice_yield + * + * @return float + */ + public function getAverageRiceYield() + { + return $this->container['average_rice_yield']; + } + + /** + * Sets average_rice_yield + * + * @param float $average_rice_yield Average rice yield, in t/ha (tonnes per hectare) + * + * @return self + */ + public function setAverageRiceYield($average_rice_yield) + { + if (is_null($average_rice_yield)) { + throw new \InvalidArgumentException('non-nullable average_rice_yield cannot be null'); + } + $this->container['average_rice_yield'] = $average_rice_yield; + + return $this; + } + + /** + * Gets area_sown + * + * @return float + */ + public function getAreaSown() + { + return $this->container['area_sown']; + } + + /** + * Sets area_sown + * + * @param float $area_sown Area sown, in ha (hectares) + * + * @return self + */ + public function setAreaSown($area_sown) + { + if (is_null($area_sown)) { + throw new \InvalidArgumentException('non-nullable area_sown cannot be null'); + } + $this->container['area_sown'] = $area_sown; + + return $this; + } + + /** + * Gets growing_season_days + * + * @return float + */ + public function getGrowingSeasonDays() + { + return $this->container['growing_season_days']; + } + + /** + * Sets growing_season_days + * + * @param float $growing_season_days The length of the growing season for this crop, in days + * + * @return self + */ + public function setGrowingSeasonDays($growing_season_days) + { + if (is_null($growing_season_days)) { + throw new \InvalidArgumentException('non-nullable growing_season_days cannot be null'); + } + $this->container['growing_season_days'] = $growing_season_days; + + return $this; + } + + /** + * Gets water_regime_type + * + * @return string + */ + public function getWaterRegimeType() + { + return $this->container['water_regime_type']; + } + + /** + * Sets water_regime_type + * + * @param string $water_regime_type water_regime_type + * + * @return self + */ + public function setWaterRegimeType($water_regime_type) + { + if (is_null($water_regime_type)) { + throw new \InvalidArgumentException('non-nullable water_regime_type cannot be null'); + } + $allowedValues = $this->getWaterRegimeTypeAllowableValues(); + if (!in_array($water_regime_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'water_regime_type', must be one of '%s'", + $water_regime_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['water_regime_type'] = $water_regime_type; + + return $this; + } + + /** + * Gets water_regime_sub_type + * + * @return string + */ + public function getWaterRegimeSubType() + { + return $this->container['water_regime_sub_type']; + } + + /** + * Sets water_regime_sub_type + * + * @param string $water_regime_sub_type water_regime_sub_type + * + * @return self + */ + public function setWaterRegimeSubType($water_regime_sub_type) + { + if (is_null($water_regime_sub_type)) { + throw new \InvalidArgumentException('non-nullable water_regime_sub_type cannot be null'); + } + $allowedValues = $this->getWaterRegimeSubTypeAllowableValues(); + if (!in_array($water_regime_sub_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'water_regime_sub_type', must be one of '%s'", + $water_regime_sub_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['water_regime_sub_type'] = $water_regime_sub_type; + + return $this; + } + + /** + * Gets rice_preseason_flooding_period + * + * @return string + */ + public function getRicePreseasonFloodingPeriod() + { + return $this->container['rice_preseason_flooding_period']; + } + + /** + * Sets rice_preseason_flooding_period + * + * @param string $rice_preseason_flooding_period rice_preseason_flooding_period + * + * @return self + */ + public function setRicePreseasonFloodingPeriod($rice_preseason_flooding_period) + { + if (is_null($rice_preseason_flooding_period)) { + throw new \InvalidArgumentException('non-nullable rice_preseason_flooding_period cannot be null'); + } + $allowedValues = $this->getRicePreseasonFloodingPeriodAllowableValues(); + if (!in_array($rice_preseason_flooding_period, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'rice_preseason_flooding_period', must be one of '%s'", + $rice_preseason_flooding_period, + implode("', '", $allowedValues) + ) + ); + } + $this->container['rice_preseason_flooding_period'] = $rice_preseason_flooding_period; + + return $this; + } + + /** + * Gets urea_application + * + * @return float + */ + public function getUreaApplication() + { + return $this->container['urea_application']; + } + + /** + * Sets urea_application + * + * @param float $urea_application Urea application, in kg Urea/ha (kilograms of urea per hectare) + * + * @return self + */ + public function setUreaApplication($urea_application) + { + if (is_null($urea_application)) { + throw new \InvalidArgumentException('non-nullable urea_application cannot be null'); + } + $this->container['urea_application'] = $urea_application; + + return $this; + } + + /** + * Gets non_urea_nitrogen + * + * @return float + */ + public function getNonUreaNitrogen() + { + return $this->container['non_urea_nitrogen']; + } + + /** + * Sets non_urea_nitrogen + * + * @param float $non_urea_nitrogen Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) + * + * @return self + */ + public function setNonUreaNitrogen($non_urea_nitrogen) + { + if (is_null($non_urea_nitrogen)) { + throw new \InvalidArgumentException('non-nullable non_urea_nitrogen cannot be null'); + } + $this->container['non_urea_nitrogen'] = $non_urea_nitrogen; + + return $this; + } + + /** + * Gets urea_ammonium_nitrate + * + * @return float + */ + public function getUreaAmmoniumNitrate() + { + return $this->container['urea_ammonium_nitrate']; + } + + /** + * Sets urea_ammonium_nitrate + * + * @param float $urea_ammonium_nitrate Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) + * + * @return self + */ + public function setUreaAmmoniumNitrate($urea_ammonium_nitrate) + { + if (is_null($urea_ammonium_nitrate)) { + throw new \InvalidArgumentException('non-nullable urea_ammonium_nitrate cannot be null'); + } + $this->container['urea_ammonium_nitrate'] = $urea_ammonium_nitrate; + + return $this; + } + + /** + * Gets phosphorus_application + * + * @return float + */ + public function getPhosphorusApplication() + { + return $this->container['phosphorus_application']; + } + + /** + * Sets phosphorus_application + * + * @param float $phosphorus_application Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) + * + * @return self + */ + public function setPhosphorusApplication($phosphorus_application) + { + if (is_null($phosphorus_application)) { + throw new \InvalidArgumentException('non-nullable phosphorus_application cannot be null'); + } + $this->container['phosphorus_application'] = $phosphorus_application; + + return $this; + } + + /** + * Gets potassium_application + * + * @return float + */ + public function getPotassiumApplication() + { + return $this->container['potassium_application']; + } + + /** + * Sets potassium_application + * + * @param float $potassium_application Potassium application, in kg K/ha (kilograms of potassium per hectare) + * + * @return self + */ + public function setPotassiumApplication($potassium_application) + { + if (is_null($potassium_application)) { + throw new \InvalidArgumentException('non-nullable potassium_application cannot be null'); + } + $this->container['potassium_application'] = $potassium_application; + + return $this; + } + + /** + * Gets sulfur_application + * + * @return float + */ + public function getSulfurApplication() + { + return $this->container['sulfur_application']; + } + + /** + * Sets sulfur_application + * + * @param float $sulfur_application Sulfur application, in kg S/ha (kilograms of sulfur per hectare) + * + * @return self + */ + public function setSulfurApplication($sulfur_application) + { + if (is_null($sulfur_application)) { + throw new \InvalidArgumentException('non-nullable sulfur_application cannot be null'); + } + $this->container['sulfur_application'] = $sulfur_application; + + return $this; + } + + /** + * Gets fraction_of_annual_crop_burnt + * + * @return float + */ + public function getFractionOfAnnualCropBurnt() + { + return $this->container['fraction_of_annual_crop_burnt']; + } + + /** + * Sets fraction_of_annual_crop_burnt + * + * @param float $fraction_of_annual_crop_burnt Fraction of annual production of crop that is burnt, from 0 to 1 + * + * @return self + */ + public function setFractionOfAnnualCropBurnt($fraction_of_annual_crop_burnt) + { + if (is_null($fraction_of_annual_crop_burnt)) { + throw new \InvalidArgumentException('non-nullable fraction_of_annual_crop_burnt cannot be null'); + } + + if (($fraction_of_annual_crop_burnt > 1)) { + throw new \InvalidArgumentException('invalid value for $fraction_of_annual_crop_burnt when calling PostRiceRequestCropsInner., must be smaller than or equal to 1.'); + } + if (($fraction_of_annual_crop_burnt < 0)) { + throw new \InvalidArgumentException('invalid value for $fraction_of_annual_crop_burnt when calling PostRiceRequestCropsInner., must be bigger than or equal to 0.'); + } + + $this->container['fraction_of_annual_crop_burnt'] = $fraction_of_annual_crop_burnt; + + return $this; + } + + /** + * Gets herbicide_use + * + * @return float + */ + public function getHerbicideUse() + { + return $this->container['herbicide_use']; + } + + /** + * Sets herbicide_use + * + * @param float $herbicide_use Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) + * + * @return self + */ + public function setHerbicideUse($herbicide_use) + { + if (is_null($herbicide_use)) { + throw new \InvalidArgumentException('non-nullable herbicide_use cannot be null'); + } + $this->container['herbicide_use'] = $herbicide_use; + + return $this; + } + + /** + * Gets glyphosate_other_herbicide_use + * + * @return float + */ + public function getGlyphosateOtherHerbicideUse() + { + return $this->container['glyphosate_other_herbicide_use']; + } + + /** + * Sets glyphosate_other_herbicide_use + * + * @param float $glyphosate_other_herbicide_use Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) + * + * @return self + */ + public function setGlyphosateOtherHerbicideUse($glyphosate_other_herbicide_use) + { + if (is_null($glyphosate_other_herbicide_use)) { + throw new \InvalidArgumentException('non-nullable glyphosate_other_herbicide_use cannot be null'); + } + $this->container['glyphosate_other_herbicide_use'] = $glyphosate_other_herbicide_use; + + return $this; + } + + /** + * Gets electricity_allocation + * + * @return float + */ + public function getElectricityAllocation() + { + return $this->container['electricity_allocation']; + } + + /** + * Sets electricity_allocation + * + * @param float $electricity_allocation Percentage of electricity use to allocate to this crop, from 0 to 1 + * + * @return self + */ + public function setElectricityAllocation($electricity_allocation) + { + if (is_null($electricity_allocation)) { + throw new \InvalidArgumentException('non-nullable electricity_allocation cannot be null'); + } + + if (($electricity_allocation > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_allocation when calling PostRiceRequestCropsInner., must be smaller than or equal to 1.'); + } + if (($electricity_allocation < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_allocation when calling PostRiceRequestCropsInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_allocation'] = $electricity_allocation; + + return $this; + } + + /** + * Gets limestone + * + * @return float + */ + public function getLimestone() + { + return $this->container['limestone']; + } + + /** + * Sets limestone + * + * @param float $limestone Lime applied in tonnes + * + * @return self + */ + public function setLimestone($limestone) + { + if (is_null($limestone)) { + throw new \InvalidArgumentException('non-nullable limestone cannot be null'); + } + $this->container['limestone'] = $limestone; + + return $this; + } + + /** + * Gets limestone_fraction + * + * @return float + */ + public function getLimestoneFraction() + { + return $this->container['limestone_fraction']; + } + + /** + * Sets limestone_fraction + * + * @param float $limestone_fraction Fraction of lime as limestone vs dolomite, between 0 and 1 + * + * @return self + */ + public function setLimestoneFraction($limestone_fraction) + { + if (is_null($limestone_fraction)) { + throw new \InvalidArgumentException('non-nullable limestone_fraction cannot be null'); + } + $this->container['limestone_fraction'] = $limestone_fraction; + + return $this; + } + + /** + * Gets diesel_use + * + * @return float + */ + public function getDieselUse() + { + return $this->container['diesel_use']; + } + + /** + * Sets diesel_use + * + * @param float $diesel_use Diesel usage in L (litres) + * + * @return self + */ + public function setDieselUse($diesel_use) + { + if (is_null($diesel_use)) { + throw new \InvalidArgumentException('non-nullable diesel_use cannot be null'); + } + $this->container['diesel_use'] = $diesel_use; + + return $this; + } + + /** + * Gets petrol_use + * + * @return float + */ + public function getPetrolUse() + { + return $this->container['petrol_use']; + } + + /** + * Sets petrol_use + * + * @param float $petrol_use Petrol usage in L (litres) + * + * @return self + */ + public function setPetrolUse($petrol_use) + { + if (is_null($petrol_use)) { + throw new \InvalidArgumentException('non-nullable petrol_use cannot be null'); + } + $this->container['petrol_use'] = $petrol_use; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheep200Response.php b/examples/php-api-client/api-client/lib/Model/PostSheep200Response.php new file mode 100644 index 00000000..703dc248 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheep200Response.php @@ -0,0 +1,636 @@ + + */ +class PostSheep200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheep_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostBuffalo200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostBeef200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'intermediate' => '\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInner[]', + 'net' => '\OpenAPI\Client\Model\PostSheep200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intermediate' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intermediate' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intermediate' => 'intermediate', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intermediate' => 'setIntermediate', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intermediate' => 'getIntermediate', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostSheep200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostSheep200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostSheep200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostSheep200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheep200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostSheep200ResponseIntermediateInner.php new file mode 100644 index 00000000..f03d1bd5 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheep200ResponseIntermediateInner.php @@ -0,0 +1,635 @@ + + */ +class PostSheep200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheep_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostBuffalo200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostBeef200ResponseScope3', + 'carbon_sequestration' => 'float', + 'intensities' => '\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intensities' => null, + 'net' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intensities' => false, + 'net' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intensities' => 'intensities', + 'net' => 'net' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intensities' => 'setIntensities', + 'net' => 'setNet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intensities' => 'getIntensities', + 'net' => 'getNet' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostBuffalo200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return float + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param float $carbon_sequestration Carbon sequestration, in tonnes-CO2e + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheep200ResponseIntermediateInnerIntensities.php b/examples/php-api-client/api-client/lib/Model/PostSheep200ResponseIntermediateInnerIntensities.php new file mode 100644 index 00000000..ece3f05f --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheep200ResponseIntermediateInnerIntensities.php @@ -0,0 +1,598 @@ + + */ +class PostSheep200ResponseIntermediateInnerIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheep_200_response_intermediate_inner_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'wool_produced_kg' => 'float', + 'sheep_meat_produced_kg' => 'float', + 'wool_including_sequestration' => 'float', + 'wool_excluding_sequestration' => 'float', + 'sheep_meat_breeding_including_sequestration' => 'float', + 'sheep_meat_breeding_excluding_sequestration' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'wool_produced_kg' => null, + 'sheep_meat_produced_kg' => null, + 'wool_including_sequestration' => null, + 'wool_excluding_sequestration' => null, + 'sheep_meat_breeding_including_sequestration' => null, + 'sheep_meat_breeding_excluding_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'wool_produced_kg' => false, + 'sheep_meat_produced_kg' => false, + 'wool_including_sequestration' => false, + 'wool_excluding_sequestration' => false, + 'sheep_meat_breeding_including_sequestration' => false, + 'sheep_meat_breeding_excluding_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'wool_produced_kg' => 'woolProducedKg', + 'sheep_meat_produced_kg' => 'sheepMeatProducedKg', + 'wool_including_sequestration' => 'woolIncludingSequestration', + 'wool_excluding_sequestration' => 'woolExcludingSequestration', + 'sheep_meat_breeding_including_sequestration' => 'sheepMeatBreedingIncludingSequestration', + 'sheep_meat_breeding_excluding_sequestration' => 'sheepMeatBreedingExcludingSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'wool_produced_kg' => 'setWoolProducedKg', + 'sheep_meat_produced_kg' => 'setSheepMeatProducedKg', + 'wool_including_sequestration' => 'setWoolIncludingSequestration', + 'wool_excluding_sequestration' => 'setWoolExcludingSequestration', + 'sheep_meat_breeding_including_sequestration' => 'setSheepMeatBreedingIncludingSequestration', + 'sheep_meat_breeding_excluding_sequestration' => 'setSheepMeatBreedingExcludingSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'wool_produced_kg' => 'getWoolProducedKg', + 'sheep_meat_produced_kg' => 'getSheepMeatProducedKg', + 'wool_including_sequestration' => 'getWoolIncludingSequestration', + 'wool_excluding_sequestration' => 'getWoolExcludingSequestration', + 'sheep_meat_breeding_including_sequestration' => 'getSheepMeatBreedingIncludingSequestration', + 'sheep_meat_breeding_excluding_sequestration' => 'getSheepMeatBreedingExcludingSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('wool_produced_kg', $data ?? [], null); + $this->setIfExists('sheep_meat_produced_kg', $data ?? [], null); + $this->setIfExists('wool_including_sequestration', $data ?? [], null); + $this->setIfExists('wool_excluding_sequestration', $data ?? [], null); + $this->setIfExists('sheep_meat_breeding_including_sequestration', $data ?? [], null); + $this->setIfExists('sheep_meat_breeding_excluding_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['wool_produced_kg'] === null) { + $invalidProperties[] = "'wool_produced_kg' can't be null"; + } + if ($this->container['sheep_meat_produced_kg'] === null) { + $invalidProperties[] = "'sheep_meat_produced_kg' can't be null"; + } + if ($this->container['wool_including_sequestration'] === null) { + $invalidProperties[] = "'wool_including_sequestration' can't be null"; + } + if ($this->container['wool_excluding_sequestration'] === null) { + $invalidProperties[] = "'wool_excluding_sequestration' can't be null"; + } + if ($this->container['sheep_meat_breeding_including_sequestration'] === null) { + $invalidProperties[] = "'sheep_meat_breeding_including_sequestration' can't be null"; + } + if ($this->container['sheep_meat_breeding_excluding_sequestration'] === null) { + $invalidProperties[] = "'sheep_meat_breeding_excluding_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets wool_produced_kg + * + * @return float + */ + public function getWoolProducedKg() + { + return $this->container['wool_produced_kg']; + } + + /** + * Sets wool_produced_kg + * + * @param float $wool_produced_kg Greasy wool produced in kg + * + * @return self + */ + public function setWoolProducedKg($wool_produced_kg) + { + if (is_null($wool_produced_kg)) { + throw new \InvalidArgumentException('non-nullable wool_produced_kg cannot be null'); + } + $this->container['wool_produced_kg'] = $wool_produced_kg; + + return $this; + } + + /** + * Gets sheep_meat_produced_kg + * + * @return float + */ + public function getSheepMeatProducedKg() + { + return $this->container['sheep_meat_produced_kg']; + } + + /** + * Sets sheep_meat_produced_kg + * + * @param float $sheep_meat_produced_kg Sheep meat produced in kg liveweight + * + * @return self + */ + public function setSheepMeatProducedKg($sheep_meat_produced_kg) + { + if (is_null($sheep_meat_produced_kg)) { + throw new \InvalidArgumentException('non-nullable sheep_meat_produced_kg cannot be null'); + } + $this->container['sheep_meat_produced_kg'] = $sheep_meat_produced_kg; + + return $this; + } + + /** + * Gets wool_including_sequestration + * + * @return float + */ + public function getWoolIncludingSequestration() + { + return $this->container['wool_including_sequestration']; + } + + /** + * Sets wool_including_sequestration + * + * @param float $wool_including_sequestration Wool production including carbon sequestration, in kg-CO2e/kg greasy + * + * @return self + */ + public function setWoolIncludingSequestration($wool_including_sequestration) + { + if (is_null($wool_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable wool_including_sequestration cannot be null'); + } + $this->container['wool_including_sequestration'] = $wool_including_sequestration; + + return $this; + } + + /** + * Gets wool_excluding_sequestration + * + * @return float + */ + public function getWoolExcludingSequestration() + { + return $this->container['wool_excluding_sequestration']; + } + + /** + * Sets wool_excluding_sequestration + * + * @param float $wool_excluding_sequestration Wool production excluding carbon sequestration, in kg-CO2e/kg greasy + * + * @return self + */ + public function setWoolExcludingSequestration($wool_excluding_sequestration) + { + if (is_null($wool_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable wool_excluding_sequestration cannot be null'); + } + $this->container['wool_excluding_sequestration'] = $wool_excluding_sequestration; + + return $this; + } + + /** + * Gets sheep_meat_breeding_including_sequestration + * + * @return float + */ + public function getSheepMeatBreedingIncludingSequestration() + { + return $this->container['sheep_meat_breeding_including_sequestration']; + } + + /** + * Sets sheep_meat_breeding_including_sequestration + * + * @param float $sheep_meat_breeding_including_sequestration Sheep meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setSheepMeatBreedingIncludingSequestration($sheep_meat_breeding_including_sequestration) + { + if (is_null($sheep_meat_breeding_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable sheep_meat_breeding_including_sequestration cannot be null'); + } + $this->container['sheep_meat_breeding_including_sequestration'] = $sheep_meat_breeding_including_sequestration; + + return $this; + } + + /** + * Gets sheep_meat_breeding_excluding_sequestration + * + * @return float + */ + public function getSheepMeatBreedingExcludingSequestration() + { + return $this->container['sheep_meat_breeding_excluding_sequestration']; + } + + /** + * Sets sheep_meat_breeding_excluding_sequestration + * + * @param float $sheep_meat_breeding_excluding_sequestration Sheep meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setSheepMeatBreedingExcludingSequestration($sheep_meat_breeding_excluding_sequestration) + { + if (is_null($sheep_meat_breeding_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable sheep_meat_breeding_excluding_sequestration cannot be null'); + } + $this->container['sheep_meat_breeding_excluding_sequestration'] = $sheep_meat_breeding_excluding_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheep200ResponseNet.php b/examples/php-api-client/api-client/lib/Model/PostSheep200ResponseNet.php new file mode 100644 index 00000000..c79b7cc1 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheep200ResponseNet.php @@ -0,0 +1,450 @@ + + */ +class PostSheep200ResponseNet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheep_200_response_net'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float', + 'sheep' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null, + 'sheep' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false, + 'sheep' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total', + 'sheep' => 'sheep' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal', + 'sheep' => 'setSheep' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal', + 'sheep' => 'getSheep' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + $this->setIfExists('sheep', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + if ($this->container['sheep'] === null) { + $invalidProperties[] = "'sheep' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total net emissions of this activity, in tonnes-CO2e/year + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets sheep + * + * @return float + */ + public function getSheep() + { + return $this->container['sheep']; + } + + /** + * Sets sheep + * + * @param float $sheep Net emissions of sheep, in tonnes-CO2e/year + * + * @return self + */ + public function setSheep($sheep) + { + if (is_null($sheep)) { + throw new \InvalidArgumentException('non-nullable sheep cannot be null'); + } + $this->container['sheep'] = $sheep; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepRequest.php b/examples/php-api-client/api-client/lib/Model/PostSheepRequest.php new file mode 100644 index 00000000..13cd6dda --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepRequest.php @@ -0,0 +1,610 @@ + + */ +class PostSheepRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheep_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'north_of_tropic_of_capricorn' => 'bool', + 'rainfall_above600' => 'bool', + 'sheep' => '\OpenAPI\Client\Model\PostSheepRequestSheepInner[]', + 'vegetation' => '\OpenAPI\Client\Model\PostSheepRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'north_of_tropic_of_capricorn' => null, + 'rainfall_above600' => null, + 'sheep' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'north_of_tropic_of_capricorn' => false, + 'rainfall_above600' => false, + 'sheep' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'north_of_tropic_of_capricorn' => 'northOfTropicOfCapricorn', + 'rainfall_above600' => 'rainfallAbove600', + 'sheep' => 'sheep', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'north_of_tropic_of_capricorn' => 'setNorthOfTropicOfCapricorn', + 'rainfall_above600' => 'setRainfallAbove600', + 'sheep' => 'setSheep', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'north_of_tropic_of_capricorn' => 'getNorthOfTropicOfCapricorn', + 'rainfall_above600' => 'getRainfallAbove600', + 'sheep' => 'getSheep', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('north_of_tropic_of_capricorn', $data ?? [], null); + $this->setIfExists('rainfall_above600', $data ?? [], null); + $this->setIfExists('sheep', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['north_of_tropic_of_capricorn'] === null) { + $invalidProperties[] = "'north_of_tropic_of_capricorn' can't be null"; + } + if ($this->container['rainfall_above600'] === null) { + $invalidProperties[] = "'rainfall_above600' can't be null"; + } + if ($this->container['sheep'] === null) { + $invalidProperties[] = "'sheep' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets north_of_tropic_of_capricorn + * + * @return bool + */ + public function getNorthOfTropicOfCapricorn() + { + return $this->container['north_of_tropic_of_capricorn']; + } + + /** + * Sets north_of_tropic_of_capricorn + * + * @param bool $north_of_tropic_of_capricorn Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude + * + * @return self + */ + public function setNorthOfTropicOfCapricorn($north_of_tropic_of_capricorn) + { + if (is_null($north_of_tropic_of_capricorn)) { + throw new \InvalidArgumentException('non-nullable north_of_tropic_of_capricorn cannot be null'); + } + $this->container['north_of_tropic_of_capricorn'] = $north_of_tropic_of_capricorn; + + return $this; + } + + /** + * Gets rainfall_above600 + * + * @return bool + */ + public function getRainfallAbove600() + { + return $this->container['rainfall_above600']; + } + + /** + * Sets rainfall_above600 + * + * @param bool $rainfall_above600 Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm + * + * @return self + */ + public function setRainfallAbove600($rainfall_above600) + { + if (is_null($rainfall_above600)) { + throw new \InvalidArgumentException('non-nullable rainfall_above600 cannot be null'); + } + $this->container['rainfall_above600'] = $rainfall_above600; + + return $this; + } + + /** + * Gets sheep + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInner[] + */ + public function getSheep() + { + return $this->container['sheep']; + } + + /** + * Sets sheep + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInner[] $sheep sheep + * + * @return self + */ + public function setSheep($sheep) + { + if (is_null($sheep)) { + throw new \InvalidArgumentException('non-nullable sheep cannot be null'); + } + $this->container['sheep'] = $sheep; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostSheepRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostSheepRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInner.php b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInner.php new file mode 100644 index 00000000..cd1bf211 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInner.php @@ -0,0 +1,1126 @@ + + */ +class PostSheepRequestSheepInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheep_request_sheep_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'classes' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClasses', + 'limestone' => 'float', + 'limestone_fraction' => 'float', + 'fertiliser' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser', + 'diesel' => 'float', + 'petrol' => 'float', + 'lpg' => 'float', + 'mineral_supplementation' => '\OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation', + 'electricity_source' => 'string', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'grain_feed' => 'float', + 'hay_feed' => 'float', + 'herbicide' => 'float', + 'herbicide_other' => 'float', + 'merino_percent' => 'float', + 'ewes_lambing' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerEwesLambing', + 'seasonal_lambing' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerSeasonalLambing' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'classes' => null, + 'limestone' => null, + 'limestone_fraction' => null, + 'fertiliser' => null, + 'diesel' => null, + 'petrol' => null, + 'lpg' => null, + 'mineral_supplementation' => null, + 'electricity_source' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'grain_feed' => null, + 'hay_feed' => null, + 'herbicide' => null, + 'herbicide_other' => null, + 'merino_percent' => null, + 'ewes_lambing' => null, + 'seasonal_lambing' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'classes' => false, + 'limestone' => false, + 'limestone_fraction' => false, + 'fertiliser' => false, + 'diesel' => false, + 'petrol' => false, + 'lpg' => false, + 'mineral_supplementation' => false, + 'electricity_source' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'grain_feed' => false, + 'hay_feed' => false, + 'herbicide' => false, + 'herbicide_other' => false, + 'merino_percent' => false, + 'ewes_lambing' => false, + 'seasonal_lambing' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'classes' => 'classes', + 'limestone' => 'limestone', + 'limestone_fraction' => 'limestoneFraction', + 'fertiliser' => 'fertiliser', + 'diesel' => 'diesel', + 'petrol' => 'petrol', + 'lpg' => 'lpg', + 'mineral_supplementation' => 'mineralSupplementation', + 'electricity_source' => 'electricitySource', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'grain_feed' => 'grainFeed', + 'hay_feed' => 'hayFeed', + 'herbicide' => 'herbicide', + 'herbicide_other' => 'herbicideOther', + 'merino_percent' => 'merinoPercent', + 'ewes_lambing' => 'ewesLambing', + 'seasonal_lambing' => 'seasonalLambing' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'classes' => 'setClasses', + 'limestone' => 'setLimestone', + 'limestone_fraction' => 'setLimestoneFraction', + 'fertiliser' => 'setFertiliser', + 'diesel' => 'setDiesel', + 'petrol' => 'setPetrol', + 'lpg' => 'setLpg', + 'mineral_supplementation' => 'setMineralSupplementation', + 'electricity_source' => 'setElectricitySource', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'grain_feed' => 'setGrainFeed', + 'hay_feed' => 'setHayFeed', + 'herbicide' => 'setHerbicide', + 'herbicide_other' => 'setHerbicideOther', + 'merino_percent' => 'setMerinoPercent', + 'ewes_lambing' => 'setEwesLambing', + 'seasonal_lambing' => 'setSeasonalLambing' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'classes' => 'getClasses', + 'limestone' => 'getLimestone', + 'limestone_fraction' => 'getLimestoneFraction', + 'fertiliser' => 'getFertiliser', + 'diesel' => 'getDiesel', + 'petrol' => 'getPetrol', + 'lpg' => 'getLpg', + 'mineral_supplementation' => 'getMineralSupplementation', + 'electricity_source' => 'getElectricitySource', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'grain_feed' => 'getGrainFeed', + 'hay_feed' => 'getHayFeed', + 'herbicide' => 'getHerbicide', + 'herbicide_other' => 'getHerbicideOther', + 'merino_percent' => 'getMerinoPercent', + 'ewes_lambing' => 'getEwesLambing', + 'seasonal_lambing' => 'getSeasonalLambing' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const ELECTRICITY_SOURCE_STATE_GRID = 'State Grid'; + public const ELECTRICITY_SOURCE_RENEWABLE = 'Renewable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getElectricitySourceAllowableValues() + { + return [ + self::ELECTRICITY_SOURCE_STATE_GRID, + self::ELECTRICITY_SOURCE_RENEWABLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('classes', $data ?? [], null); + $this->setIfExists('limestone', $data ?? [], null); + $this->setIfExists('limestone_fraction', $data ?? [], null); + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('diesel', $data ?? [], null); + $this->setIfExists('petrol', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + $this->setIfExists('mineral_supplementation', $data ?? [], null); + $this->setIfExists('electricity_source', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('grain_feed', $data ?? [], null); + $this->setIfExists('hay_feed', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('herbicide_other', $data ?? [], null); + $this->setIfExists('merino_percent', $data ?? [], null); + $this->setIfExists('ewes_lambing', $data ?? [], null); + $this->setIfExists('seasonal_lambing', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['classes'] === null) { + $invalidProperties[] = "'classes' can't be null"; + } + if ($this->container['limestone'] === null) { + $invalidProperties[] = "'limestone' can't be null"; + } + if ($this->container['limestone_fraction'] === null) { + $invalidProperties[] = "'limestone_fraction' can't be null"; + } + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['diesel'] === null) { + $invalidProperties[] = "'diesel' can't be null"; + } + if ($this->container['petrol'] === null) { + $invalidProperties[] = "'petrol' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + if ($this->container['mineral_supplementation'] === null) { + $invalidProperties[] = "'mineral_supplementation' can't be null"; + } + if ($this->container['electricity_source'] === null) { + $invalidProperties[] = "'electricity_source' can't be null"; + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!is_null($this->container['electricity_source']) && !in_array($this->container['electricity_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'electricity_source', must be one of '%s'", + $this->container['electricity_source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['grain_feed'] === null) { + $invalidProperties[] = "'grain_feed' can't be null"; + } + if ($this->container['hay_feed'] === null) { + $invalidProperties[] = "'hay_feed' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['herbicide_other'] === null) { + $invalidProperties[] = "'herbicide_other' can't be null"; + } + if ($this->container['merino_percent'] === null) { + $invalidProperties[] = "'merino_percent' can't be null"; + } + if ($this->container['ewes_lambing'] === null) { + $invalidProperties[] = "'ewes_lambing' can't be null"; + } + if ($this->container['seasonal_lambing'] === null) { + $invalidProperties[] = "'seasonal_lambing' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets classes + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClasses + */ + public function getClasses() + { + return $this->container['classes']; + } + + /** + * Sets classes + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClasses $classes classes + * + * @return self + */ + public function setClasses($classes) + { + if (is_null($classes)) { + throw new \InvalidArgumentException('non-nullable classes cannot be null'); + } + $this->container['classes'] = $classes; + + return $this; + } + + /** + * Gets limestone + * + * @return float + */ + public function getLimestone() + { + return $this->container['limestone']; + } + + /** + * Sets limestone + * + * @param float $limestone Lime applied in tonnes + * + * @return self + */ + public function setLimestone($limestone) + { + if (is_null($limestone)) { + throw new \InvalidArgumentException('non-nullable limestone cannot be null'); + } + $this->container['limestone'] = $limestone; + + return $this; + } + + /** + * Gets limestone_fraction + * + * @return float + */ + public function getLimestoneFraction() + { + return $this->container['limestone_fraction']; + } + + /** + * Sets limestone_fraction + * + * @param float $limestone_fraction Fraction of lime as limestone vs dolomite, between 0 and 1 + * + * @return self + */ + public function setLimestoneFraction($limestone_fraction) + { + if (is_null($limestone_fraction)) { + throw new \InvalidArgumentException('non-nullable limestone_fraction cannot be null'); + } + $this->container['limestone_fraction'] = $limestone_fraction; + + return $this; + } + + /** + * Gets fertiliser + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser $fertiliser fertiliser + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets diesel + * + * @return float + */ + public function getDiesel() + { + return $this->container['diesel']; + } + + /** + * Sets diesel + * + * @param float $diesel Diesel usage in L (litres) + * + * @return self + */ + public function setDiesel($diesel) + { + if (is_null($diesel)) { + throw new \InvalidArgumentException('non-nullable diesel cannot be null'); + } + $this->container['diesel'] = $diesel; + + return $this; + } + + /** + * Gets petrol + * + * @return float + */ + public function getPetrol() + { + return $this->container['petrol']; + } + + /** + * Sets petrol + * + * @param float $petrol Petrol usage in L (litres) + * + * @return self + */ + public function setPetrol($petrol) + { + if (is_null($petrol)) { + throw new \InvalidArgumentException('non-nullable petrol cannot be null'); + } + $this->container['petrol'] = $petrol; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + + /** + * Gets mineral_supplementation + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation + */ + public function getMineralSupplementation() + { + return $this->container['mineral_supplementation']; + } + + /** + * Sets mineral_supplementation + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation $mineral_supplementation mineral_supplementation + * + * @return self + */ + public function setMineralSupplementation($mineral_supplementation) + { + if (is_null($mineral_supplementation)) { + throw new \InvalidArgumentException('non-nullable mineral_supplementation cannot be null'); + } + $this->container['mineral_supplementation'] = $mineral_supplementation; + + return $this; + } + + /** + * Gets electricity_source + * + * @return string + */ + public function getElectricitySource() + { + return $this->container['electricity_source']; + } + + /** + * Sets electricity_source + * + * @param string $electricity_source Source of electricity + * + * @return self + */ + public function setElectricitySource($electricity_source) + { + if (is_null($electricity_source)) { + throw new \InvalidArgumentException('non-nullable electricity_source cannot be null'); + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!in_array($electricity_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'electricity_source', must be one of '%s'", + $electricity_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['electricity_source'] = $electricity_source; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostSheepRequestSheepInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostSheepRequestSheepInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets grain_feed + * + * @return float + */ + public function getGrainFeed() + { + return $this->container['grain_feed']; + } + + /** + * Sets grain_feed + * + * @param float $grain_feed Grain purchased for cattle feed in tonnes + * + * @return self + */ + public function setGrainFeed($grain_feed) + { + if (is_null($grain_feed)) { + throw new \InvalidArgumentException('non-nullable grain_feed cannot be null'); + } + $this->container['grain_feed'] = $grain_feed; + + return $this; + } + + /** + * Gets hay_feed + * + * @return float + */ + public function getHayFeed() + { + return $this->container['hay_feed']; + } + + /** + * Sets hay_feed + * + * @param float $hay_feed Hay purchased for cattle feed in tonnes + * + * @return self + */ + public function setHayFeed($hay_feed) + { + if (is_null($hay_feed)) { + throw new \InvalidArgumentException('non-nullable hay_feed cannot be null'); + } + $this->container['hay_feed'] = $hay_feed; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets herbicide_other + * + * @return float + */ + public function getHerbicideOther() + { + return $this->container['herbicide_other']; + } + + /** + * Sets herbicide_other + * + * @param float $herbicide_other Total amount of active ingredients of from other herbicides in kg (kilograms) + * + * @return self + */ + public function setHerbicideOther($herbicide_other) + { + if (is_null($herbicide_other)) { + throw new \InvalidArgumentException('non-nullable herbicide_other cannot be null'); + } + $this->container['herbicide_other'] = $herbicide_other; + + return $this; + } + + /** + * Gets merino_percent + * + * @return float + */ + public function getMerinoPercent() + { + return $this->container['merino_percent']; + } + + /** + * Sets merino_percent + * + * @param float $merino_percent Percent of sheep purchases that are of type Merino, from 0 to 100 + * + * @return self + */ + public function setMerinoPercent($merino_percent) + { + if (is_null($merino_percent)) { + throw new \InvalidArgumentException('non-nullable merino_percent cannot be null'); + } + $this->container['merino_percent'] = $merino_percent; + + return $this; + } + + /** + * Gets ewes_lambing + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerEwesLambing + */ + public function getEwesLambing() + { + return $this->container['ewes_lambing']; + } + + /** + * Sets ewes_lambing + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerEwesLambing $ewes_lambing ewes_lambing + * + * @return self + */ + public function setEwesLambing($ewes_lambing) + { + if (is_null($ewes_lambing)) { + throw new \InvalidArgumentException('non-nullable ewes_lambing cannot be null'); + } + $this->container['ewes_lambing'] = $ewes_lambing; + + return $this; + } + + /** + * Gets seasonal_lambing + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerSeasonalLambing + */ + public function getSeasonalLambing() + { + return $this->container['seasonal_lambing']; + } + + /** + * Sets seasonal_lambing + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerSeasonalLambing $seasonal_lambing seasonal_lambing + * + * @return self + */ + public function setSeasonalLambing($seasonal_lambing) + { + if (is_null($seasonal_lambing)) { + throw new \InvalidArgumentException('non-nullable seasonal_lambing cannot be null'); + } + $this->container['seasonal_lambing'] = $seasonal_lambing; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClasses.php b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClasses.php new file mode 100644 index 00000000..51165122 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClasses.php @@ -0,0 +1,933 @@ + + */ +class PostSheepRequestSheepInnerClasses implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheep_request_sheep_inner_classes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'rams' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams', + 'trade_rams' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams', + 'wethers' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams', + 'trade_wethers' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams', + 'maiden_breeding_ewes' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams', + 'trade_maiden_breeding_ewes' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams', + 'breeding_ewes' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams', + 'trade_breeding_ewes' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams', + 'other_ewes' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams', + 'trade_other_ewes' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams', + 'ewe_lambs' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams', + 'trade_ewe_lambs' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams', + 'wether_lambs' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams', + 'trade_wether_lambs' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams', + 'trade_ewes' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesTradeEwes', + 'trade_lambs_and_hoggets' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesTradeLambsAndHoggets' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'rams' => null, + 'trade_rams' => null, + 'wethers' => null, + 'trade_wethers' => null, + 'maiden_breeding_ewes' => null, + 'trade_maiden_breeding_ewes' => null, + 'breeding_ewes' => null, + 'trade_breeding_ewes' => null, + 'other_ewes' => null, + 'trade_other_ewes' => null, + 'ewe_lambs' => null, + 'trade_ewe_lambs' => null, + 'wether_lambs' => null, + 'trade_wether_lambs' => null, + 'trade_ewes' => null, + 'trade_lambs_and_hoggets' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'rams' => false, + 'trade_rams' => false, + 'wethers' => false, + 'trade_wethers' => false, + 'maiden_breeding_ewes' => false, + 'trade_maiden_breeding_ewes' => false, + 'breeding_ewes' => false, + 'trade_breeding_ewes' => false, + 'other_ewes' => false, + 'trade_other_ewes' => false, + 'ewe_lambs' => false, + 'trade_ewe_lambs' => false, + 'wether_lambs' => false, + 'trade_wether_lambs' => false, + 'trade_ewes' => false, + 'trade_lambs_and_hoggets' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'rams' => 'rams', + 'trade_rams' => 'tradeRams', + 'wethers' => 'wethers', + 'trade_wethers' => 'tradeWethers', + 'maiden_breeding_ewes' => 'maidenBreedingEwes', + 'trade_maiden_breeding_ewes' => 'tradeMaidenBreedingEwes', + 'breeding_ewes' => 'breedingEwes', + 'trade_breeding_ewes' => 'tradeBreedingEwes', + 'other_ewes' => 'otherEwes', + 'trade_other_ewes' => 'tradeOtherEwes', + 'ewe_lambs' => 'eweLambs', + 'trade_ewe_lambs' => 'tradeEweLambs', + 'wether_lambs' => 'wetherLambs', + 'trade_wether_lambs' => 'tradeWetherLambs', + 'trade_ewes' => 'tradeEwes', + 'trade_lambs_and_hoggets' => 'tradeLambsAndHoggets' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'rams' => 'setRams', + 'trade_rams' => 'setTradeRams', + 'wethers' => 'setWethers', + 'trade_wethers' => 'setTradeWethers', + 'maiden_breeding_ewes' => 'setMaidenBreedingEwes', + 'trade_maiden_breeding_ewes' => 'setTradeMaidenBreedingEwes', + 'breeding_ewes' => 'setBreedingEwes', + 'trade_breeding_ewes' => 'setTradeBreedingEwes', + 'other_ewes' => 'setOtherEwes', + 'trade_other_ewes' => 'setTradeOtherEwes', + 'ewe_lambs' => 'setEweLambs', + 'trade_ewe_lambs' => 'setTradeEweLambs', + 'wether_lambs' => 'setWetherLambs', + 'trade_wether_lambs' => 'setTradeWetherLambs', + 'trade_ewes' => 'setTradeEwes', + 'trade_lambs_and_hoggets' => 'setTradeLambsAndHoggets' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'rams' => 'getRams', + 'trade_rams' => 'getTradeRams', + 'wethers' => 'getWethers', + 'trade_wethers' => 'getTradeWethers', + 'maiden_breeding_ewes' => 'getMaidenBreedingEwes', + 'trade_maiden_breeding_ewes' => 'getTradeMaidenBreedingEwes', + 'breeding_ewes' => 'getBreedingEwes', + 'trade_breeding_ewes' => 'getTradeBreedingEwes', + 'other_ewes' => 'getOtherEwes', + 'trade_other_ewes' => 'getTradeOtherEwes', + 'ewe_lambs' => 'getEweLambs', + 'trade_ewe_lambs' => 'getTradeEweLambs', + 'wether_lambs' => 'getWetherLambs', + 'trade_wether_lambs' => 'getTradeWetherLambs', + 'trade_ewes' => 'getTradeEwes', + 'trade_lambs_and_hoggets' => 'getTradeLambsAndHoggets' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('rams', $data ?? [], null); + $this->setIfExists('trade_rams', $data ?? [], null); + $this->setIfExists('wethers', $data ?? [], null); + $this->setIfExists('trade_wethers', $data ?? [], null); + $this->setIfExists('maiden_breeding_ewes', $data ?? [], null); + $this->setIfExists('trade_maiden_breeding_ewes', $data ?? [], null); + $this->setIfExists('breeding_ewes', $data ?? [], null); + $this->setIfExists('trade_breeding_ewes', $data ?? [], null); + $this->setIfExists('other_ewes', $data ?? [], null); + $this->setIfExists('trade_other_ewes', $data ?? [], null); + $this->setIfExists('ewe_lambs', $data ?? [], null); + $this->setIfExists('trade_ewe_lambs', $data ?? [], null); + $this->setIfExists('wether_lambs', $data ?? [], null); + $this->setIfExists('trade_wether_lambs', $data ?? [], null); + $this->setIfExists('trade_ewes', $data ?? [], null); + $this->setIfExists('trade_lambs_and_hoggets', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['breeding_ewes'] === null) { + $invalidProperties[] = "'breeding_ewes' can't be null"; + } + if ($this->container['ewe_lambs'] === null) { + $invalidProperties[] = "'ewe_lambs' can't be null"; + } + if ($this->container['wether_lambs'] === null) { + $invalidProperties[] = "'wether_lambs' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets rams + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null + */ + public function getRams() + { + return $this->container['rams']; + } + + /** + * Sets rams + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null $rams rams + * + * @return self + */ + public function setRams($rams) + { + if (is_null($rams)) { + throw new \InvalidArgumentException('non-nullable rams cannot be null'); + } + $this->container['rams'] = $rams; + + return $this; + } + + /** + * Gets trade_rams + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null + */ + public function getTradeRams() + { + return $this->container['trade_rams']; + } + + /** + * Sets trade_rams + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null $trade_rams trade_rams + * + * @return self + */ + public function setTradeRams($trade_rams) + { + if (is_null($trade_rams)) { + throw new \InvalidArgumentException('non-nullable trade_rams cannot be null'); + } + $this->container['trade_rams'] = $trade_rams; + + return $this; + } + + /** + * Gets wethers + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null + */ + public function getWethers() + { + return $this->container['wethers']; + } + + /** + * Sets wethers + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null $wethers wethers + * + * @return self + */ + public function setWethers($wethers) + { + if (is_null($wethers)) { + throw new \InvalidArgumentException('non-nullable wethers cannot be null'); + } + $this->container['wethers'] = $wethers; + + return $this; + } + + /** + * Gets trade_wethers + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null + */ + public function getTradeWethers() + { + return $this->container['trade_wethers']; + } + + /** + * Sets trade_wethers + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null $trade_wethers trade_wethers + * + * @return self + */ + public function setTradeWethers($trade_wethers) + { + if (is_null($trade_wethers)) { + throw new \InvalidArgumentException('non-nullable trade_wethers cannot be null'); + } + $this->container['trade_wethers'] = $trade_wethers; + + return $this; + } + + /** + * Gets maiden_breeding_ewes + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null + */ + public function getMaidenBreedingEwes() + { + return $this->container['maiden_breeding_ewes']; + } + + /** + * Sets maiden_breeding_ewes + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null $maiden_breeding_ewes maiden_breeding_ewes + * + * @return self + */ + public function setMaidenBreedingEwes($maiden_breeding_ewes) + { + if (is_null($maiden_breeding_ewes)) { + throw new \InvalidArgumentException('non-nullable maiden_breeding_ewes cannot be null'); + } + $this->container['maiden_breeding_ewes'] = $maiden_breeding_ewes; + + return $this; + } + + /** + * Gets trade_maiden_breeding_ewes + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null + */ + public function getTradeMaidenBreedingEwes() + { + return $this->container['trade_maiden_breeding_ewes']; + } + + /** + * Sets trade_maiden_breeding_ewes + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null $trade_maiden_breeding_ewes trade_maiden_breeding_ewes + * + * @return self + */ + public function setTradeMaidenBreedingEwes($trade_maiden_breeding_ewes) + { + if (is_null($trade_maiden_breeding_ewes)) { + throw new \InvalidArgumentException('non-nullable trade_maiden_breeding_ewes cannot be null'); + } + $this->container['trade_maiden_breeding_ewes'] = $trade_maiden_breeding_ewes; + + return $this; + } + + /** + * Gets breeding_ewes + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams + */ + public function getBreedingEwes() + { + return $this->container['breeding_ewes']; + } + + /** + * Sets breeding_ewes + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams $breeding_ewes breeding_ewes + * + * @return self + */ + public function setBreedingEwes($breeding_ewes) + { + if (is_null($breeding_ewes)) { + throw new \InvalidArgumentException('non-nullable breeding_ewes cannot be null'); + } + $this->container['breeding_ewes'] = $breeding_ewes; + + return $this; + } + + /** + * Gets trade_breeding_ewes + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null + */ + public function getTradeBreedingEwes() + { + return $this->container['trade_breeding_ewes']; + } + + /** + * Sets trade_breeding_ewes + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null $trade_breeding_ewes trade_breeding_ewes + * + * @return self + */ + public function setTradeBreedingEwes($trade_breeding_ewes) + { + if (is_null($trade_breeding_ewes)) { + throw new \InvalidArgumentException('non-nullable trade_breeding_ewes cannot be null'); + } + $this->container['trade_breeding_ewes'] = $trade_breeding_ewes; + + return $this; + } + + /** + * Gets other_ewes + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null + */ + public function getOtherEwes() + { + return $this->container['other_ewes']; + } + + /** + * Sets other_ewes + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null $other_ewes other_ewes + * + * @return self + */ + public function setOtherEwes($other_ewes) + { + if (is_null($other_ewes)) { + throw new \InvalidArgumentException('non-nullable other_ewes cannot be null'); + } + $this->container['other_ewes'] = $other_ewes; + + return $this; + } + + /** + * Gets trade_other_ewes + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null + */ + public function getTradeOtherEwes() + { + return $this->container['trade_other_ewes']; + } + + /** + * Sets trade_other_ewes + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null $trade_other_ewes trade_other_ewes + * + * @return self + */ + public function setTradeOtherEwes($trade_other_ewes) + { + if (is_null($trade_other_ewes)) { + throw new \InvalidArgumentException('non-nullable trade_other_ewes cannot be null'); + } + $this->container['trade_other_ewes'] = $trade_other_ewes; + + return $this; + } + + /** + * Gets ewe_lambs + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams + */ + public function getEweLambs() + { + return $this->container['ewe_lambs']; + } + + /** + * Sets ewe_lambs + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams $ewe_lambs ewe_lambs + * + * @return self + */ + public function setEweLambs($ewe_lambs) + { + if (is_null($ewe_lambs)) { + throw new \InvalidArgumentException('non-nullable ewe_lambs cannot be null'); + } + $this->container['ewe_lambs'] = $ewe_lambs; + + return $this; + } + + /** + * Gets trade_ewe_lambs + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null + */ + public function getTradeEweLambs() + { + return $this->container['trade_ewe_lambs']; + } + + /** + * Sets trade_ewe_lambs + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null $trade_ewe_lambs trade_ewe_lambs + * + * @return self + */ + public function setTradeEweLambs($trade_ewe_lambs) + { + if (is_null($trade_ewe_lambs)) { + throw new \InvalidArgumentException('non-nullable trade_ewe_lambs cannot be null'); + } + $this->container['trade_ewe_lambs'] = $trade_ewe_lambs; + + return $this; + } + + /** + * Gets wether_lambs + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams + */ + public function getWetherLambs() + { + return $this->container['wether_lambs']; + } + + /** + * Sets wether_lambs + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams $wether_lambs wether_lambs + * + * @return self + */ + public function setWetherLambs($wether_lambs) + { + if (is_null($wether_lambs)) { + throw new \InvalidArgumentException('non-nullable wether_lambs cannot be null'); + } + $this->container['wether_lambs'] = $wether_lambs; + + return $this; + } + + /** + * Gets trade_wether_lambs + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null + */ + public function getTradeWetherLambs() + { + return $this->container['trade_wether_lambs']; + } + + /** + * Sets trade_wether_lambs + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams|null $trade_wether_lambs trade_wether_lambs + * + * @return self + */ + public function setTradeWetherLambs($trade_wether_lambs) + { + if (is_null($trade_wether_lambs)) { + throw new \InvalidArgumentException('non-nullable trade_wether_lambs cannot be null'); + } + $this->container['trade_wether_lambs'] = $trade_wether_lambs; + + return $this; + } + + /** + * Gets trade_ewes + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesTradeEwes|null + * @deprecated + */ + public function getTradeEwes() + { + return $this->container['trade_ewes']; + } + + /** + * Sets trade_ewes + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesTradeEwes|null $trade_ewes trade_ewes + * + * @return self + * @deprecated + */ + public function setTradeEwes($trade_ewes) + { + if (is_null($trade_ewes)) { + throw new \InvalidArgumentException('non-nullable trade_ewes cannot be null'); + } + $this->container['trade_ewes'] = $trade_ewes; + + return $this; + } + + /** + * Gets trade_lambs_and_hoggets + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesTradeLambsAndHoggets|null + * @deprecated + */ + public function getTradeLambsAndHoggets() + { + return $this->container['trade_lambs_and_hoggets']; + } + + /** + * Sets trade_lambs_and_hoggets + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesTradeLambsAndHoggets|null $trade_lambs_and_hoggets trade_lambs_and_hoggets + * + * @return self + * @deprecated + */ + public function setTradeLambsAndHoggets($trade_lambs_and_hoggets) + { + if (is_null($trade_lambs_and_hoggets)) { + throw new \InvalidArgumentException('non-nullable trade_lambs_and_hoggets cannot be null'); + } + $this->container['trade_lambs_and_hoggets'] = $trade_lambs_and_hoggets; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesRams.php b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesRams.php new file mode 100644 index 00000000..e59b442e --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesRams.php @@ -0,0 +1,815 @@ + + */ +class PostSheepRequestSheepInnerClassesRams implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheep_request_sheep_inner_classes_rams'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of sheep shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesRamsAutumn.php b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesRamsAutumn.php new file mode 100644 index 00000000..9310a817 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesRamsAutumn.php @@ -0,0 +1,589 @@ + + */ +class PostSheepRequestSheepInnerClassesRamsAutumn implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheep_request_sheep_inner_classes_rams_autumn'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'head' => 'float', + 'liveweight' => 'float', + 'liveweight_gain' => 'float', + 'crude_protein' => 'float', + 'dry_matter_digestibility' => 'float', + 'feed_availability' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'head' => null, + 'liveweight' => null, + 'liveweight_gain' => null, + 'crude_protein' => null, + 'dry_matter_digestibility' => null, + 'feed_availability' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'head' => false, + 'liveweight' => false, + 'liveweight_gain' => false, + 'crude_protein' => false, + 'dry_matter_digestibility' => false, + 'feed_availability' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'head' => 'head', + 'liveweight' => 'liveweight', + 'liveweight_gain' => 'liveweightGain', + 'crude_protein' => 'crudeProtein', + 'dry_matter_digestibility' => 'dryMatterDigestibility', + 'feed_availability' => 'feedAvailability' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'head' => 'setHead', + 'liveweight' => 'setLiveweight', + 'liveweight_gain' => 'setLiveweightGain', + 'crude_protein' => 'setCrudeProtein', + 'dry_matter_digestibility' => 'setDryMatterDigestibility', + 'feed_availability' => 'setFeedAvailability' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'head' => 'getHead', + 'liveweight' => 'getLiveweight', + 'liveweight_gain' => 'getLiveweightGain', + 'crude_protein' => 'getCrudeProtein', + 'dry_matter_digestibility' => 'getDryMatterDigestibility', + 'feed_availability' => 'getFeedAvailability' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('head', $data ?? [], null); + $this->setIfExists('liveweight', $data ?? [], null); + $this->setIfExists('liveweight_gain', $data ?? [], null); + $this->setIfExists('crude_protein', $data ?? [], null); + $this->setIfExists('dry_matter_digestibility', $data ?? [], null); + $this->setIfExists('feed_availability', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['head'] === null) { + $invalidProperties[] = "'head' can't be null"; + } + if ($this->container['liveweight'] === null) { + $invalidProperties[] = "'liveweight' can't be null"; + } + if ($this->container['liveweight_gain'] === null) { + $invalidProperties[] = "'liveweight_gain' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets head + * + * @return float + */ + public function getHead() + { + return $this->container['head']; + } + + /** + * Sets head + * + * @param float $head Number of animals (head) + * + * @return self + */ + public function setHead($head) + { + if (is_null($head)) { + throw new \InvalidArgumentException('non-nullable head cannot be null'); + } + $this->container['head'] = $head; + + return $this; + } + + /** + * Gets liveweight + * + * @return float + */ + public function getLiveweight() + { + return $this->container['liveweight']; + } + + /** + * Sets liveweight + * + * @param float $liveweight Average liveweight of animals in kg/head (kilogram per head) + * + * @return self + */ + public function setLiveweight($liveweight) + { + if (is_null($liveweight)) { + throw new \InvalidArgumentException('non-nullable liveweight cannot be null'); + } + $this->container['liveweight'] = $liveweight; + + return $this; + } + + /** + * Gets liveweight_gain + * + * @return float + */ + public function getLiveweightGain() + { + return $this->container['liveweight_gain']; + } + + /** + * Sets liveweight_gain + * + * @param float $liveweight_gain Average liveweight gain in kg/day (kilogram per day) + * + * @return self + */ + public function setLiveweightGain($liveweight_gain) + { + if (is_null($liveweight_gain)) { + throw new \InvalidArgumentException('non-nullable liveweight_gain cannot be null'); + } + $this->container['liveweight_gain'] = $liveweight_gain; + + return $this; + } + + /** + * Gets crude_protein + * + * @return float|null + */ + public function getCrudeProtein() + { + return $this->container['crude_protein']; + } + + /** + * Sets crude_protein + * + * @param float|null $crude_protein Crude protein percent, between 0 and 100 + * + * @return self + */ + public function setCrudeProtein($crude_protein) + { + if (is_null($crude_protein)) { + throw new \InvalidArgumentException('non-nullable crude_protein cannot be null'); + } + $this->container['crude_protein'] = $crude_protein; + + return $this; + } + + /** + * Gets dry_matter_digestibility + * + * @return float|null + */ + public function getDryMatterDigestibility() + { + return $this->container['dry_matter_digestibility']; + } + + /** + * Sets dry_matter_digestibility + * + * @param float|null $dry_matter_digestibility Dry matter digestibility percent, between 0 and 100 + * + * @return self + */ + public function setDryMatterDigestibility($dry_matter_digestibility) + { + if (is_null($dry_matter_digestibility)) { + throw new \InvalidArgumentException('non-nullable dry_matter_digestibility cannot be null'); + } + $this->container['dry_matter_digestibility'] = $dry_matter_digestibility; + + return $this; + } + + /** + * Gets feed_availability + * + * @return float|null + */ + public function getFeedAvailability() + { + return $this->container['feed_availability']; + } + + /** + * Sets feed_availability + * + * @param float|null $feed_availability Feed availability, in t/ha (tonnes per hectare) + * + * @return self + */ + public function setFeedAvailability($feed_availability) + { + if (is_null($feed_availability)) { + throw new \InvalidArgumentException('non-nullable feed_availability cannot be null'); + } + $this->container['feed_availability'] = $feed_availability; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesTradeEwes.php b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesTradeEwes.php new file mode 100644 index 00000000..99abc24a --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesTradeEwes.php @@ -0,0 +1,816 @@ + + */ +class PostSheepRequestSheepInnerClassesTradeEwes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheep_request_sheep_inner_classes_tradeEwes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of sheep shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.php b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.php new file mode 100644 index 00000000..a7710012 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.php @@ -0,0 +1,816 @@ + + */ +class PostSheepRequestSheepInnerClassesTradeLambsAndHoggets implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheep_request_sheep_inner_classes_tradeLambsAndHoggets'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn', + 'winter' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn', + 'spring' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn', + 'summer' => '\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn', + 'head_shorn' => 'float', + 'wool_shorn' => 'float', + 'clean_wool_yield' => 'float', + 'head_purchased' => 'float', + 'purchased_weight' => 'float', + 'head_sold' => 'float', + 'sale_weight' => 'float', + 'purchases' => '\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null, + 'head_shorn' => null, + 'wool_shorn' => null, + 'clean_wool_yield' => null, + 'head_purchased' => null, + 'purchased_weight' => null, + 'head_sold' => null, + 'sale_weight' => null, + 'purchases' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false, + 'head_shorn' => false, + 'wool_shorn' => false, + 'clean_wool_yield' => false, + 'head_purchased' => false, + 'purchased_weight' => false, + 'head_sold' => false, + 'sale_weight' => false, + 'purchases' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer', + 'head_shorn' => 'headShorn', + 'wool_shorn' => 'woolShorn', + 'clean_wool_yield' => 'cleanWoolYield', + 'head_purchased' => 'headPurchased', + 'purchased_weight' => 'purchasedWeight', + 'head_sold' => 'headSold', + 'sale_weight' => 'saleWeight', + 'purchases' => 'purchases' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer', + 'head_shorn' => 'setHeadShorn', + 'wool_shorn' => 'setWoolShorn', + 'clean_wool_yield' => 'setCleanWoolYield', + 'head_purchased' => 'setHeadPurchased', + 'purchased_weight' => 'setPurchasedWeight', + 'head_sold' => 'setHeadSold', + 'sale_weight' => 'setSaleWeight', + 'purchases' => 'setPurchases' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer', + 'head_shorn' => 'getHeadShorn', + 'wool_shorn' => 'getWoolShorn', + 'clean_wool_yield' => 'getCleanWoolYield', + 'head_purchased' => 'getHeadPurchased', + 'purchased_weight' => 'getPurchasedWeight', + 'head_sold' => 'getHeadSold', + 'sale_weight' => 'getSaleWeight', + 'purchases' => 'getPurchases' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + $this->setIfExists('head_shorn', $data ?? [], null); + $this->setIfExists('wool_shorn', $data ?? [], null); + $this->setIfExists('clean_wool_yield', $data ?? [], null); + $this->setIfExists('head_purchased', $data ?? [], null); + $this->setIfExists('purchased_weight', $data ?? [], null); + $this->setIfExists('head_sold', $data ?? [], null); + $this->setIfExists('sale_weight', $data ?? [], null); + $this->setIfExists('purchases', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if ($this->container['head_shorn'] === null) { + $invalidProperties[] = "'head_shorn' can't be null"; + } + if ($this->container['wool_shorn'] === null) { + $invalidProperties[] = "'wool_shorn' can't be null"; + } + if ($this->container['clean_wool_yield'] === null) { + $invalidProperties[] = "'clean_wool_yield' can't be null"; + } + if ($this->container['head_sold'] === null) { + $invalidProperties[] = "'head_sold' can't be null"; + } + if ($this->container['sale_weight'] === null) { + $invalidProperties[] = "'sale_weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + $this->container['summer'] = $summer; + + return $this; + } + + /** + * Gets head_shorn + * + * @return float + */ + public function getHeadShorn() + { + return $this->container['head_shorn']; + } + + /** + * Sets head_shorn + * + * @param float $head_shorn Number of sheep shorn, in head + * + * @return self + */ + public function setHeadShorn($head_shorn) + { + if (is_null($head_shorn)) { + throw new \InvalidArgumentException('non-nullable head_shorn cannot be null'); + } + $this->container['head_shorn'] = $head_shorn; + + return $this; + } + + /** + * Gets wool_shorn + * + * @return float + */ + public function getWoolShorn() + { + return $this->container['wool_shorn']; + } + + /** + * Sets wool_shorn + * + * @param float $wool_shorn Weight of wool shorn, in kg/head (kilogram per head) + * + * @return self + */ + public function setWoolShorn($wool_shorn) + { + if (is_null($wool_shorn)) { + throw new \InvalidArgumentException('non-nullable wool_shorn cannot be null'); + } + $this->container['wool_shorn'] = $wool_shorn; + + return $this; + } + + /** + * Gets clean_wool_yield + * + * @return float + */ + public function getCleanWoolYield() + { + return $this->container['clean_wool_yield']; + } + + /** + * Sets clean_wool_yield + * + * @param float $clean_wool_yield Percentage of clean wool from weight of yield, from 0 to 100 + * + * @return self + */ + public function setCleanWoolYield($clean_wool_yield) + { + if (is_null($clean_wool_yield)) { + throw new \InvalidArgumentException('non-nullable clean_wool_yield cannot be null'); + } + $this->container['clean_wool_yield'] = $clean_wool_yield; + + return $this; + } + + /** + * Gets head_purchased + * + * @return float|null + * @deprecated + */ + public function getHeadPurchased() + { + return $this->container['head_purchased']; + } + + /** + * Sets head_purchased + * + * @param float|null $head_purchased Number of animals purchased (head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setHeadPurchased($head_purchased) + { + if (is_null($head_purchased)) { + throw new \InvalidArgumentException('non-nullable head_purchased cannot be null'); + } + $this->container['head_purchased'] = $head_purchased; + + return $this; + } + + /** + * Gets purchased_weight + * + * @return float|null + * @deprecated + */ + public function getPurchasedWeight() + { + return $this->container['purchased_weight']; + } + + /** + * Sets purchased_weight + * + * @param float|null $purchased_weight Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead + * + * @return self + * @deprecated + */ + public function setPurchasedWeight($purchased_weight) + { + if (is_null($purchased_weight)) { + throw new \InvalidArgumentException('non-nullable purchased_weight cannot be null'); + } + $this->container['purchased_weight'] = $purchased_weight; + + return $this; + } + + /** + * Gets head_sold + * + * @return float + */ + public function getHeadSold() + { + return $this->container['head_sold']; + } + + /** + * Sets head_sold + * + * @param float $head_sold Number of animals sold (head) + * + * @return self + */ + public function setHeadSold($head_sold) + { + if (is_null($head_sold)) { + throw new \InvalidArgumentException('non-nullable head_sold cannot be null'); + } + $this->container['head_sold'] = $head_sold; + + return $this; + } + + /** + * Gets sale_weight + * + * @return float + */ + public function getSaleWeight() + { + return $this->container['sale_weight']; + } + + /** + * Sets sale_weight + * + * @param float $sale_weight Weight at sale, in liveweight kg/head (kilogram per head) + * + * @return self + */ + public function setSaleWeight($sale_weight) + { + if (is_null($sale_weight)) { + throw new \InvalidArgumentException('non-nullable sale_weight cannot be null'); + } + $this->container['sale_weight'] = $sale_weight; + + return $this; + } + + /** + * Gets purchases + * + * @return \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null + */ + public function getPurchases() + { + return $this->container['purchases']; + } + + /** + * Sets purchases + * + * @param \OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]|null $purchases purchases + * + * @return self + */ + public function setPurchases($purchases) + { + if (is_null($purchases)) { + throw new \InvalidArgumentException('non-nullable purchases cannot be null'); + } + $this->container['purchases'] = $purchases; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerEwesLambing.php b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerEwesLambing.php new file mode 100644 index 00000000..6f32284c --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerEwesLambing.php @@ -0,0 +1,589 @@ + + */ +class PostSheepRequestSheepInnerEwesLambing implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheep_request_sheep_inner_ewesLambing'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => 'float', + 'winter' => 'float', + 'spring' => 'float', + 'summer' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if (($this->container['autumn'] > 1)) { + $invalidProperties[] = "invalid value for 'autumn', must be smaller than or equal to 1."; + } + + if (($this->container['autumn'] < 0)) { + $invalidProperties[] = "invalid value for 'autumn', must be bigger than or equal to 0."; + } + + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if (($this->container['winter'] > 1)) { + $invalidProperties[] = "invalid value for 'winter', must be smaller than or equal to 1."; + } + + if (($this->container['winter'] < 0)) { + $invalidProperties[] = "invalid value for 'winter', must be bigger than or equal to 0."; + } + + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if (($this->container['spring'] > 1)) { + $invalidProperties[] = "invalid value for 'spring', must be smaller than or equal to 1."; + } + + if (($this->container['spring'] < 0)) { + $invalidProperties[] = "invalid value for 'spring', must be bigger than or equal to 0."; + } + + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if (($this->container['summer'] > 1)) { + $invalidProperties[] = "invalid value for 'summer', must be smaller than or equal to 1."; + } + + if (($this->container['summer'] < 0)) { + $invalidProperties[] = "invalid value for 'summer', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + + if (($autumn > 1)) { + throw new \InvalidArgumentException('invalid value for $autumn when calling PostSheepRequestSheepInnerEwesLambing., must be smaller than or equal to 1.'); + } + if (($autumn < 0)) { + throw new \InvalidArgumentException('invalid value for $autumn when calling PostSheepRequestSheepInnerEwesLambing., must be bigger than or equal to 0.'); + } + + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + + if (($winter > 1)) { + throw new \InvalidArgumentException('invalid value for $winter when calling PostSheepRequestSheepInnerEwesLambing., must be smaller than or equal to 1.'); + } + if (($winter < 0)) { + throw new \InvalidArgumentException('invalid value for $winter when calling PostSheepRequestSheepInnerEwesLambing., must be bigger than or equal to 0.'); + } + + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + + if (($spring > 1)) { + throw new \InvalidArgumentException('invalid value for $spring when calling PostSheepRequestSheepInnerEwesLambing., must be smaller than or equal to 1.'); + } + if (($spring < 0)) { + throw new \InvalidArgumentException('invalid value for $spring when calling PostSheepRequestSheepInnerEwesLambing., must be bigger than or equal to 0.'); + } + + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + + if (($summer > 1)) { + throw new \InvalidArgumentException('invalid value for $summer when calling PostSheepRequestSheepInnerEwesLambing., must be smaller than or equal to 1.'); + } + if (($summer < 0)) { + throw new \InvalidArgumentException('invalid value for $summer when calling PostSheepRequestSheepInnerEwesLambing., must be bigger than or equal to 0.'); + } + + $this->container['summer'] = $summer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerSeasonalLambing.php b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerSeasonalLambing.php new file mode 100644 index 00000000..3f2009be --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepRequestSheepInnerSeasonalLambing.php @@ -0,0 +1,561 @@ + + */ +class PostSheepRequestSheepInnerSeasonalLambing implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheep_request_sheep_inner_seasonalLambing'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'autumn' => 'float', + 'winter' => 'float', + 'spring' => 'float', + 'summer' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'autumn' => null, + 'winter' => null, + 'spring' => null, + 'summer' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'autumn' => false, + 'winter' => false, + 'spring' => false, + 'summer' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'autumn' => 'autumn', + 'winter' => 'winter', + 'spring' => 'spring', + 'summer' => 'summer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'autumn' => 'setAutumn', + 'winter' => 'setWinter', + 'spring' => 'setSpring', + 'summer' => 'setSummer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'autumn' => 'getAutumn', + 'winter' => 'getWinter', + 'spring' => 'getSpring', + 'summer' => 'getSummer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('autumn', $data ?? [], null); + $this->setIfExists('winter', $data ?? [], null); + $this->setIfExists('spring', $data ?? [], null); + $this->setIfExists('summer', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['autumn'] === null) { + $invalidProperties[] = "'autumn' can't be null"; + } + if (($this->container['autumn'] < 0)) { + $invalidProperties[] = "invalid value for 'autumn', must be bigger than or equal to 0."; + } + + if ($this->container['winter'] === null) { + $invalidProperties[] = "'winter' can't be null"; + } + if (($this->container['winter'] < 0)) { + $invalidProperties[] = "invalid value for 'winter', must be bigger than or equal to 0."; + } + + if ($this->container['spring'] === null) { + $invalidProperties[] = "'spring' can't be null"; + } + if (($this->container['spring'] < 0)) { + $invalidProperties[] = "invalid value for 'spring', must be bigger than or equal to 0."; + } + + if ($this->container['summer'] === null) { + $invalidProperties[] = "'summer' can't be null"; + } + if (($this->container['summer'] < 0)) { + $invalidProperties[] = "invalid value for 'summer', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets autumn + * + * @return float + */ + public function getAutumn() + { + return $this->container['autumn']; + } + + /** + * Sets autumn + * + * @param float $autumn autumn + * + * @return self + */ + public function setAutumn($autumn) + { + if (is_null($autumn)) { + throw new \InvalidArgumentException('non-nullable autumn cannot be null'); + } + + if (($autumn < 0)) { + throw new \InvalidArgumentException('invalid value for $autumn when calling PostSheepRequestSheepInnerSeasonalLambing., must be bigger than or equal to 0.'); + } + + $this->container['autumn'] = $autumn; + + return $this; + } + + /** + * Gets winter + * + * @return float + */ + public function getWinter() + { + return $this->container['winter']; + } + + /** + * Sets winter + * + * @param float $winter winter + * + * @return self + */ + public function setWinter($winter) + { + if (is_null($winter)) { + throw new \InvalidArgumentException('non-nullable winter cannot be null'); + } + + if (($winter < 0)) { + throw new \InvalidArgumentException('invalid value for $winter when calling PostSheepRequestSheepInnerSeasonalLambing., must be bigger than or equal to 0.'); + } + + $this->container['winter'] = $winter; + + return $this; + } + + /** + * Gets spring + * + * @return float + */ + public function getSpring() + { + return $this->container['spring']; + } + + /** + * Sets spring + * + * @param float $spring spring + * + * @return self + */ + public function setSpring($spring) + { + if (is_null($spring)) { + throw new \InvalidArgumentException('non-nullable spring cannot be null'); + } + + if (($spring < 0)) { + throw new \InvalidArgumentException('invalid value for $spring when calling PostSheepRequestSheepInnerSeasonalLambing., must be bigger than or equal to 0.'); + } + + $this->container['spring'] = $spring; + + return $this; + } + + /** + * Gets summer + * + * @return float + */ + public function getSummer() + { + return $this->container['summer']; + } + + /** + * Sets summer + * + * @param float $summer summer + * + * @return self + */ + public function setSummer($summer) + { + if (is_null($summer)) { + throw new \InvalidArgumentException('non-nullable summer cannot be null'); + } + + if (($summer < 0)) { + throw new \InvalidArgumentException('invalid value for $summer when calling PostSheepRequestSheepInnerSeasonalLambing., must be bigger than or equal to 0.'); + } + + $this->container['summer'] = $summer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepRequestVegetationInner.php b/examples/php-api-client/api-client/lib/Model/PostSheepRequestVegetationInner.php new file mode 100644 index 00000000..a856d829 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepRequestVegetationInner.php @@ -0,0 +1,451 @@ + + */ +class PostSheepRequestVegetationInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheep_request_vegetation_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'vegetation' => '\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation', + 'sheep_proportion' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'vegetation' => null, + 'sheep_proportion' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'vegetation' => false, + 'sheep_proportion' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vegetation' => 'vegetation', + 'sheep_proportion' => 'sheepProportion' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vegetation' => 'setVegetation', + 'sheep_proportion' => 'setSheepProportion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vegetation' => 'getVegetation', + 'sheep_proportion' => 'getSheepProportion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('vegetation', $data ?? [], null); + $this->setIfExists('sheep_proportion', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + if ($this->container['sheep_proportion'] === null) { + $invalidProperties[] = "'sheep_proportion' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + + /** + * Gets sheep_proportion + * + * @return float[] + */ + public function getSheepProportion() + { + return $this->container['sheep_proportion']; + } + + /** + * Sets sheep_proportion + * + * @param float[] $sheep_proportion The proportion of the sequestration that is allocated to sheep + * + * @return self + */ + public function setSheepProportion($sheep_proportion) + { + if (is_null($sheep_proportion)) { + throw new \InvalidArgumentException('non-nullable sheep_proportion cannot be null'); + } + $this->container['sheep_proportion'] = $sheep_proportion; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepbeef200Response.php b/examples/php-api-client/api-client/lib/Model/PostSheepbeef200Response.php new file mode 100644 index 00000000..f8debb80 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepbeef200Response.php @@ -0,0 +1,710 @@ + + */ +class PostSheepbeef200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheepbeef_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostBeef200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostBeef200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'intermediate' => '\OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediate', + 'intermediate_beef' => '\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInner[]', + 'intermediate_sheep' => '\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInner[]', + 'net' => '\OpenAPI\Client\Model\PostSheepbeef200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostSheepbeef200ResponseIntensities' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intermediate' => null, + 'intermediate_beef' => null, + 'intermediate_sheep' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intermediate' => false, + 'intermediate_beef' => false, + 'intermediate_sheep' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intermediate' => 'intermediate', + 'intermediate_beef' => 'intermediateBeef', + 'intermediate_sheep' => 'intermediateSheep', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intermediate' => 'setIntermediate', + 'intermediate_beef' => 'setIntermediateBeef', + 'intermediate_sheep' => 'setIntermediateSheep', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intermediate' => 'getIntermediate', + 'intermediate_beef' => 'getIntermediateBeef', + 'intermediate_sheep' => 'getIntermediateSheep', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + $this->setIfExists('intermediate_beef', $data ?? [], null); + $this->setIfExists('intermediate_sheep', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + if ($this->container['intermediate_beef'] === null) { + $invalidProperties[] = "'intermediate_beef' can't be null"; + } + if ($this->container['intermediate_sheep'] === null) { + $invalidProperties[] = "'intermediate_sheep' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediate + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediate $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + + /** + * Gets intermediate_beef + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseIntermediateInner[] + */ + public function getIntermediateBeef() + { + return $this->container['intermediate_beef']; + } + + /** + * Sets intermediate_beef + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseIntermediateInner[] $intermediate_beef intermediate_beef + * + * @return self + */ + public function setIntermediateBeef($intermediate_beef) + { + if (is_null($intermediate_beef)) { + throw new \InvalidArgumentException('non-nullable intermediate_beef cannot be null'); + } + $this->container['intermediate_beef'] = $intermediate_beef; + + return $this; + } + + /** + * Gets intermediate_sheep + * + * @return \OpenAPI\Client\Model\PostSheep200ResponseIntermediateInner[] + */ + public function getIntermediateSheep() + { + return $this->container['intermediate_sheep']; + } + + /** + * Sets intermediate_sheep + * + * @param \OpenAPI\Client\Model\PostSheep200ResponseIntermediateInner[] $intermediate_sheep intermediate_sheep + * + * @return self + */ + public function setIntermediateSheep($intermediate_sheep) + { + if (is_null($intermediate_sheep)) { + throw new \InvalidArgumentException('non-nullable intermediate_sheep cannot be null'); + } + $this->container['intermediate_sheep'] = $intermediate_sheep; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostSheepbeef200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostSheepbeef200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostSheepbeef200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostSheepbeef200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntensities.php b/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntensities.php new file mode 100644 index 00000000..414b6db6 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntensities.php @@ -0,0 +1,709 @@ + + */ +class PostSheepbeef200ResponseIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheepbeef_200_response_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'beef_including_sequestration' => 'float', + 'beef_excluding_sequestration' => 'float', + 'liveweight_beef_produced_kg' => 'float', + 'wool_including_sequestration' => 'float', + 'wool_excluding_sequestration' => 'float', + 'sheep_meat_breeding_including_sequestration' => 'float', + 'sheep_meat_breeding_excluding_sequestration' => 'float', + 'wool_produced_kg' => 'float', + 'sheep_meat_produced_kg' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'beef_including_sequestration' => null, + 'beef_excluding_sequestration' => null, + 'liveweight_beef_produced_kg' => null, + 'wool_including_sequestration' => null, + 'wool_excluding_sequestration' => null, + 'sheep_meat_breeding_including_sequestration' => null, + 'sheep_meat_breeding_excluding_sequestration' => null, + 'wool_produced_kg' => null, + 'sheep_meat_produced_kg' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'beef_including_sequestration' => false, + 'beef_excluding_sequestration' => false, + 'liveweight_beef_produced_kg' => false, + 'wool_including_sequestration' => false, + 'wool_excluding_sequestration' => false, + 'sheep_meat_breeding_including_sequestration' => false, + 'sheep_meat_breeding_excluding_sequestration' => false, + 'wool_produced_kg' => false, + 'sheep_meat_produced_kg' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'beef_including_sequestration' => 'beefIncludingSequestration', + 'beef_excluding_sequestration' => 'beefExcludingSequestration', + 'liveweight_beef_produced_kg' => 'liveweightBeefProducedKg', + 'wool_including_sequestration' => 'woolIncludingSequestration', + 'wool_excluding_sequestration' => 'woolExcludingSequestration', + 'sheep_meat_breeding_including_sequestration' => 'sheepMeatBreedingIncludingSequestration', + 'sheep_meat_breeding_excluding_sequestration' => 'sheepMeatBreedingExcludingSequestration', + 'wool_produced_kg' => 'woolProducedKg', + 'sheep_meat_produced_kg' => 'sheepMeatProducedKg' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'beef_including_sequestration' => 'setBeefIncludingSequestration', + 'beef_excluding_sequestration' => 'setBeefExcludingSequestration', + 'liveweight_beef_produced_kg' => 'setLiveweightBeefProducedKg', + 'wool_including_sequestration' => 'setWoolIncludingSequestration', + 'wool_excluding_sequestration' => 'setWoolExcludingSequestration', + 'sheep_meat_breeding_including_sequestration' => 'setSheepMeatBreedingIncludingSequestration', + 'sheep_meat_breeding_excluding_sequestration' => 'setSheepMeatBreedingExcludingSequestration', + 'wool_produced_kg' => 'setWoolProducedKg', + 'sheep_meat_produced_kg' => 'setSheepMeatProducedKg' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'beef_including_sequestration' => 'getBeefIncludingSequestration', + 'beef_excluding_sequestration' => 'getBeefExcludingSequestration', + 'liveweight_beef_produced_kg' => 'getLiveweightBeefProducedKg', + 'wool_including_sequestration' => 'getWoolIncludingSequestration', + 'wool_excluding_sequestration' => 'getWoolExcludingSequestration', + 'sheep_meat_breeding_including_sequestration' => 'getSheepMeatBreedingIncludingSequestration', + 'sheep_meat_breeding_excluding_sequestration' => 'getSheepMeatBreedingExcludingSequestration', + 'wool_produced_kg' => 'getWoolProducedKg', + 'sheep_meat_produced_kg' => 'getSheepMeatProducedKg' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('beef_including_sequestration', $data ?? [], null); + $this->setIfExists('beef_excluding_sequestration', $data ?? [], null); + $this->setIfExists('liveweight_beef_produced_kg', $data ?? [], null); + $this->setIfExists('wool_including_sequestration', $data ?? [], null); + $this->setIfExists('wool_excluding_sequestration', $data ?? [], null); + $this->setIfExists('sheep_meat_breeding_including_sequestration', $data ?? [], null); + $this->setIfExists('sheep_meat_breeding_excluding_sequestration', $data ?? [], null); + $this->setIfExists('wool_produced_kg', $data ?? [], null); + $this->setIfExists('sheep_meat_produced_kg', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['beef_including_sequestration'] === null) { + $invalidProperties[] = "'beef_including_sequestration' can't be null"; + } + if ($this->container['beef_excluding_sequestration'] === null) { + $invalidProperties[] = "'beef_excluding_sequestration' can't be null"; + } + if ($this->container['liveweight_beef_produced_kg'] === null) { + $invalidProperties[] = "'liveweight_beef_produced_kg' can't be null"; + } + if ($this->container['wool_including_sequestration'] === null) { + $invalidProperties[] = "'wool_including_sequestration' can't be null"; + } + if ($this->container['wool_excluding_sequestration'] === null) { + $invalidProperties[] = "'wool_excluding_sequestration' can't be null"; + } + if ($this->container['sheep_meat_breeding_including_sequestration'] === null) { + $invalidProperties[] = "'sheep_meat_breeding_including_sequestration' can't be null"; + } + if ($this->container['sheep_meat_breeding_excluding_sequestration'] === null) { + $invalidProperties[] = "'sheep_meat_breeding_excluding_sequestration' can't be null"; + } + if ($this->container['wool_produced_kg'] === null) { + $invalidProperties[] = "'wool_produced_kg' can't be null"; + } + if ($this->container['sheep_meat_produced_kg'] === null) { + $invalidProperties[] = "'sheep_meat_produced_kg' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets beef_including_sequestration + * + * @return float + */ + public function getBeefIncludingSequestration() + { + return $this->container['beef_including_sequestration']; + } + + /** + * Sets beef_including_sequestration + * + * @param float $beef_including_sequestration Beef including carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setBeefIncludingSequestration($beef_including_sequestration) + { + if (is_null($beef_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable beef_including_sequestration cannot be null'); + } + $this->container['beef_including_sequestration'] = $beef_including_sequestration; + + return $this; + } + + /** + * Gets beef_excluding_sequestration + * + * @return float + */ + public function getBeefExcludingSequestration() + { + return $this->container['beef_excluding_sequestration']; + } + + /** + * Sets beef_excluding_sequestration + * + * @param float $beef_excluding_sequestration Beef excluding carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setBeefExcludingSequestration($beef_excluding_sequestration) + { + if (is_null($beef_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable beef_excluding_sequestration cannot be null'); + } + $this->container['beef_excluding_sequestration'] = $beef_excluding_sequestration; + + return $this; + } + + /** + * Gets liveweight_beef_produced_kg + * + * @return float + */ + public function getLiveweightBeefProducedKg() + { + return $this->container['liveweight_beef_produced_kg']; + } + + /** + * Sets liveweight_beef_produced_kg + * + * @param float $liveweight_beef_produced_kg Liveweight produced in kg + * + * @return self + */ + public function setLiveweightBeefProducedKg($liveweight_beef_produced_kg) + { + if (is_null($liveweight_beef_produced_kg)) { + throw new \InvalidArgumentException('non-nullable liveweight_beef_produced_kg cannot be null'); + } + $this->container['liveweight_beef_produced_kg'] = $liveweight_beef_produced_kg; + + return $this; + } + + /** + * Gets wool_including_sequestration + * + * @return float + */ + public function getWoolIncludingSequestration() + { + return $this->container['wool_including_sequestration']; + } + + /** + * Sets wool_including_sequestration + * + * @param float $wool_including_sequestration Wool production including carbon sequestration, in kg-CO2e/kg greasy + * + * @return self + */ + public function setWoolIncludingSequestration($wool_including_sequestration) + { + if (is_null($wool_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable wool_including_sequestration cannot be null'); + } + $this->container['wool_including_sequestration'] = $wool_including_sequestration; + + return $this; + } + + /** + * Gets wool_excluding_sequestration + * + * @return float + */ + public function getWoolExcludingSequestration() + { + return $this->container['wool_excluding_sequestration']; + } + + /** + * Sets wool_excluding_sequestration + * + * @param float $wool_excluding_sequestration Wool production excluding carbon sequestration, in kg-CO2e/kg greasy + * + * @return self + */ + public function setWoolExcludingSequestration($wool_excluding_sequestration) + { + if (is_null($wool_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable wool_excluding_sequestration cannot be null'); + } + $this->container['wool_excluding_sequestration'] = $wool_excluding_sequestration; + + return $this; + } + + /** + * Gets sheep_meat_breeding_including_sequestration + * + * @return float + */ + public function getSheepMeatBreedingIncludingSequestration() + { + return $this->container['sheep_meat_breeding_including_sequestration']; + } + + /** + * Sets sheep_meat_breeding_including_sequestration + * + * @param float $sheep_meat_breeding_including_sequestration Sheep meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setSheepMeatBreedingIncludingSequestration($sheep_meat_breeding_including_sequestration) + { + if (is_null($sheep_meat_breeding_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable sheep_meat_breeding_including_sequestration cannot be null'); + } + $this->container['sheep_meat_breeding_including_sequestration'] = $sheep_meat_breeding_including_sequestration; + + return $this; + } + + /** + * Gets sheep_meat_breeding_excluding_sequestration + * + * @return float + */ + public function getSheepMeatBreedingExcludingSequestration() + { + return $this->container['sheep_meat_breeding_excluding_sequestration']; + } + + /** + * Sets sheep_meat_breeding_excluding_sequestration + * + * @param float $sheep_meat_breeding_excluding_sequestration Sheep meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight + * + * @return self + */ + public function setSheepMeatBreedingExcludingSequestration($sheep_meat_breeding_excluding_sequestration) + { + if (is_null($sheep_meat_breeding_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable sheep_meat_breeding_excluding_sequestration cannot be null'); + } + $this->container['sheep_meat_breeding_excluding_sequestration'] = $sheep_meat_breeding_excluding_sequestration; + + return $this; + } + + /** + * Gets wool_produced_kg + * + * @return float + */ + public function getWoolProducedKg() + { + return $this->container['wool_produced_kg']; + } + + /** + * Sets wool_produced_kg + * + * @param float $wool_produced_kg Greasy wool produced in kg + * + * @return self + */ + public function setWoolProducedKg($wool_produced_kg) + { + if (is_null($wool_produced_kg)) { + throw new \InvalidArgumentException('non-nullable wool_produced_kg cannot be null'); + } + $this->container['wool_produced_kg'] = $wool_produced_kg; + + return $this; + } + + /** + * Gets sheep_meat_produced_kg + * + * @return float + */ + public function getSheepMeatProducedKg() + { + return $this->container['sheep_meat_produced_kg']; + } + + /** + * Sets sheep_meat_produced_kg + * + * @param float $sheep_meat_produced_kg Sheep meat produced in kg liveweight + * + * @return self + */ + public function setSheepMeatProducedKg($sheep_meat_produced_kg) + { + if (is_null($sheep_meat_produced_kg)) { + throw new \InvalidArgumentException('non-nullable sheep_meat_produced_kg cannot be null'); + } + $this->container['sheep_meat_produced_kg'] = $sheep_meat_produced_kg; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntermediate.php b/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntermediate.php new file mode 100644 index 00000000..93f872a9 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntermediate.php @@ -0,0 +1,451 @@ + + */ +class PostSheepbeef200ResponseIntermediate implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheepbeef_200_response_intermediate'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'beef' => '\OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediateBeef', + 'sheep' => '\OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediateSheep' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'beef' => null, + 'sheep' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'beef' => false, + 'sheep' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'beef' => 'beef', + 'sheep' => 'sheep' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'beef' => 'setBeef', + 'sheep' => 'setSheep' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'beef' => 'getBeef', + 'sheep' => 'getSheep' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('beef', $data ?? [], null); + $this->setIfExists('sheep', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['beef'] === null) { + $invalidProperties[] = "'beef' can't be null"; + } + if ($this->container['sheep'] === null) { + $invalidProperties[] = "'sheep' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets beef + * + * @return \OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediateBeef + */ + public function getBeef() + { + return $this->container['beef']; + } + + /** + * Sets beef + * + * @param \OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediateBeef $beef beef + * + * @return self + */ + public function setBeef($beef) + { + if (is_null($beef)) { + throw new \InvalidArgumentException('non-nullable beef cannot be null'); + } + $this->container['beef'] = $beef; + + return $this; + } + + /** + * Gets sheep + * + * @return \OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediateSheep + */ + public function getSheep() + { + return $this->container['sheep']; + } + + /** + * Sets sheep + * + * @param \OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediateSheep $sheep sheep + * + * @return self + */ + public function setSheep($sheep) + { + if (is_null($sheep)) { + throw new \InvalidArgumentException('non-nullable sheep cannot be null'); + } + $this->container['sheep'] = $sheep; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntermediateBeef.php b/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntermediateBeef.php new file mode 100644 index 00000000..5a46d6e9 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntermediateBeef.php @@ -0,0 +1,599 @@ + + */ +class PostSheepbeef200ResponseIntermediateBeef implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheepbeef_200_response_intermediate_beef'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostBeef200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostBeef200ResponseScope3', + 'carbon_sequestration' => 'float', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return float + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param float $carbon_sequestration Carbon sequestration, in tonnes-CO2e + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntermediateSheep.php b/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntermediateSheep.php new file mode 100644 index 00000000..14ac5d47 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseIntermediateSheep.php @@ -0,0 +1,599 @@ + + */ +class PostSheepbeef200ResponseIntermediateSheep implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheepbeef_200_response_intermediate_sheep'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostBeef200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostBeef200ResponseScope3', + 'carbon_sequestration' => 'float', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostBeef200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostBeef200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return float + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param float $carbon_sequestration Carbon sequestration, in tonnes-CO2e + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseNet.php b/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseNet.php new file mode 100644 index 00000000..f3f817a4 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepbeef200ResponseNet.php @@ -0,0 +1,487 @@ + + */ +class PostSheepbeef200ResponseNet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheepbeef_200_response_net'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float', + 'beef' => 'float', + 'sheep' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null, + 'beef' => null, + 'sheep' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false, + 'beef' => false, + 'sheep' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total', + 'beef' => 'beef', + 'sheep' => 'sheep' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal', + 'beef' => 'setBeef', + 'sheep' => 'setSheep' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal', + 'beef' => 'getBeef', + 'sheep' => 'getSheep' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + $this->setIfExists('beef', $data ?? [], null); + $this->setIfExists('sheep', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + if ($this->container['beef'] === null) { + $invalidProperties[] = "'beef' can't be null"; + } + if ($this->container['sheep'] === null) { + $invalidProperties[] = "'sheep' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total net emissions of this activity, in tonnes-CO2e/year + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets beef + * + * @return float + */ + public function getBeef() + { + return $this->container['beef']; + } + + /** + * Sets beef + * + * @param float $beef Net emissions of beef, in tonnes-CO2e/year + * + * @return self + */ + public function setBeef($beef) + { + if (is_null($beef)) { + throw new \InvalidArgumentException('non-nullable beef cannot be null'); + } + $this->container['beef'] = $beef; + + return $this; + } + + /** + * Gets sheep + * + * @return float + */ + public function getSheep() + { + return $this->container['sheep']; + } + + /** + * Sets sheep + * + * @param float $sheep Net emissions of sheep, in tonnes-CO2e/year + * + * @return self + */ + public function setSheep($sheep) + { + if (is_null($sheep)) { + throw new \InvalidArgumentException('non-nullable sheep cannot be null'); + } + $this->container['sheep'] = $sheep; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepbeefRequest.php b/examples/php-api-client/api-client/lib/Model/PostSheepbeefRequest.php new file mode 100644 index 00000000..a15ff132 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepbeefRequest.php @@ -0,0 +1,684 @@ + + */ +class PostSheepbeefRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheepbeef_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'north_of_tropic_of_capricorn' => 'bool', + 'rainfall_above600' => 'bool', + 'beef' => '\OpenAPI\Client\Model\PostBeefRequestBeefInner[]', + 'sheep' => '\OpenAPI\Client\Model\PostSheepRequestSheepInner[]', + 'burning' => '\OpenAPI\Client\Model\PostBeefRequestBurningInnerBurning[]', + 'vegetation' => '\OpenAPI\Client\Model\PostSheepbeefRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'north_of_tropic_of_capricorn' => null, + 'rainfall_above600' => null, + 'beef' => null, + 'sheep' => null, + 'burning' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'north_of_tropic_of_capricorn' => false, + 'rainfall_above600' => false, + 'beef' => false, + 'sheep' => false, + 'burning' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'north_of_tropic_of_capricorn' => 'northOfTropicOfCapricorn', + 'rainfall_above600' => 'rainfallAbove600', + 'beef' => 'beef', + 'sheep' => 'sheep', + 'burning' => 'burning', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'north_of_tropic_of_capricorn' => 'setNorthOfTropicOfCapricorn', + 'rainfall_above600' => 'setRainfallAbove600', + 'beef' => 'setBeef', + 'sheep' => 'setSheep', + 'burning' => 'setBurning', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'north_of_tropic_of_capricorn' => 'getNorthOfTropicOfCapricorn', + 'rainfall_above600' => 'getRainfallAbove600', + 'beef' => 'getBeef', + 'sheep' => 'getSheep', + 'burning' => 'getBurning', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('north_of_tropic_of_capricorn', $data ?? [], null); + $this->setIfExists('rainfall_above600', $data ?? [], null); + $this->setIfExists('beef', $data ?? [], null); + $this->setIfExists('sheep', $data ?? [], null); + $this->setIfExists('burning', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['north_of_tropic_of_capricorn'] === null) { + $invalidProperties[] = "'north_of_tropic_of_capricorn' can't be null"; + } + if ($this->container['rainfall_above600'] === null) { + $invalidProperties[] = "'rainfall_above600' can't be null"; + } + if ($this->container['beef'] === null) { + $invalidProperties[] = "'beef' can't be null"; + } + if ($this->container['sheep'] === null) { + $invalidProperties[] = "'sheep' can't be null"; + } + if ($this->container['burning'] === null) { + $invalidProperties[] = "'burning' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets north_of_tropic_of_capricorn + * + * @return bool + */ + public function getNorthOfTropicOfCapricorn() + { + return $this->container['north_of_tropic_of_capricorn']; + } + + /** + * Sets north_of_tropic_of_capricorn + * + * @param bool $north_of_tropic_of_capricorn Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude + * + * @return self + */ + public function setNorthOfTropicOfCapricorn($north_of_tropic_of_capricorn) + { + if (is_null($north_of_tropic_of_capricorn)) { + throw new \InvalidArgumentException('non-nullable north_of_tropic_of_capricorn cannot be null'); + } + $this->container['north_of_tropic_of_capricorn'] = $north_of_tropic_of_capricorn; + + return $this; + } + + /** + * Gets rainfall_above600 + * + * @return bool + */ + public function getRainfallAbove600() + { + return $this->container['rainfall_above600']; + } + + /** + * Sets rainfall_above600 + * + * @param bool $rainfall_above600 Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm + * + * @return self + */ + public function setRainfallAbove600($rainfall_above600) + { + if (is_null($rainfall_above600)) { + throw new \InvalidArgumentException('non-nullable rainfall_above600 cannot be null'); + } + $this->container['rainfall_above600'] = $rainfall_above600; + + return $this; + } + + /** + * Gets beef + * + * @return \OpenAPI\Client\Model\PostBeefRequestBeefInner[] + */ + public function getBeef() + { + return $this->container['beef']; + } + + /** + * Sets beef + * + * @param \OpenAPI\Client\Model\PostBeefRequestBeefInner[] $beef beef + * + * @return self + */ + public function setBeef($beef) + { + if (is_null($beef)) { + throw new \InvalidArgumentException('non-nullable beef cannot be null'); + } + $this->container['beef'] = $beef; + + return $this; + } + + /** + * Gets sheep + * + * @return \OpenAPI\Client\Model\PostSheepRequestSheepInner[] + */ + public function getSheep() + { + return $this->container['sheep']; + } + + /** + * Sets sheep + * + * @param \OpenAPI\Client\Model\PostSheepRequestSheepInner[] $sheep sheep + * + * @return self + */ + public function setSheep($sheep) + { + if (is_null($sheep)) { + throw new \InvalidArgumentException('non-nullable sheep cannot be null'); + } + $this->container['sheep'] = $sheep; + + return $this; + } + + /** + * Gets burning + * + * @return \OpenAPI\Client\Model\PostBeefRequestBurningInnerBurning[] + */ + public function getBurning() + { + return $this->container['burning']; + } + + /** + * Sets burning + * + * @param \OpenAPI\Client\Model\PostBeefRequestBurningInnerBurning[] $burning burning + * + * @return self + */ + public function setBurning($burning) + { + if (is_null($burning)) { + throw new \InvalidArgumentException('non-nullable burning cannot be null'); + } + $this->container['burning'] = $burning; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostSheepbeefRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostSheepbeefRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSheepbeefRequestVegetationInner.php b/examples/php-api-client/api-client/lib/Model/PostSheepbeefRequestVegetationInner.php new file mode 100644 index 00000000..97d5c346 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSheepbeefRequestVegetationInner.php @@ -0,0 +1,488 @@ + + */ +class PostSheepbeefRequestVegetationInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sheepbeef_request_vegetation_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'vegetation' => '\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation', + 'beef_proportion' => 'float[]', + 'sheep_proportion' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'vegetation' => null, + 'beef_proportion' => null, + 'sheep_proportion' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'vegetation' => false, + 'beef_proportion' => false, + 'sheep_proportion' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vegetation' => 'vegetation', + 'beef_proportion' => 'beefProportion', + 'sheep_proportion' => 'sheepProportion' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vegetation' => 'setVegetation', + 'beef_proportion' => 'setBeefProportion', + 'sheep_proportion' => 'setSheepProportion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vegetation' => 'getVegetation', + 'beef_proportion' => 'getBeefProportion', + 'sheep_proportion' => 'getSheepProportion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('vegetation', $data ?? [], null); + $this->setIfExists('beef_proportion', $data ?? [], null); + $this->setIfExists('sheep_proportion', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + if ($this->container['beef_proportion'] === null) { + $invalidProperties[] = "'beef_proportion' can't be null"; + } + if ($this->container['sheep_proportion'] === null) { + $invalidProperties[] = "'sheep_proportion' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + + /** + * Gets beef_proportion + * + * @return float[] + */ + public function getBeefProportion() + { + return $this->container['beef_proportion']; + } + + /** + * Sets beef_proportion + * + * @param float[] $beef_proportion The proportion of the sequestration that is allocated to beef + * + * @return self + */ + public function setBeefProportion($beef_proportion) + { + if (is_null($beef_proportion)) { + throw new \InvalidArgumentException('non-nullable beef_proportion cannot be null'); + } + $this->container['beef_proportion'] = $beef_proportion; + + return $this; + } + + /** + * Gets sheep_proportion + * + * @return float[] + */ + public function getSheepProportion() + { + return $this->container['sheep_proportion']; + } + + /** + * Sets sheep_proportion + * + * @param float[] $sheep_proportion The proportion of the sequestration that is allocated to sheep + * + * @return self + */ + public function setSheepProportion($sheep_proportion) + { + if (is_null($sheep_proportion)) { + throw new \InvalidArgumentException('non-nullable sheep_proportion cannot be null'); + } + $this->container['sheep_proportion'] = $sheep_proportion; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSugar200Response.php b/examples/php-api-client/api-client/lib/Model/PostSugar200Response.php new file mode 100644 index 00000000..fd906719 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSugar200Response.php @@ -0,0 +1,636 @@ + + */ +class PostSugar200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sugar_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostCotton200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostCotton200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'intermediate' => '\OpenAPI\Client\Model\PostSugar200ResponseIntermediateInner[]', + 'net' => '\OpenAPI\Client\Model\PostCotton200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostSugar200ResponseIntermediateInnerIntensities[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intermediate' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intermediate' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intermediate' => 'intermediate', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intermediate' => 'setIntermediate', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intermediate' => 'getIntermediate', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostSugar200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostSugar200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostSugar200ResponseIntermediateInnerIntensities[] + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostSugar200ResponseIntermediateInnerIntensities[] $intensities Emissions intensity for each crop (in order), in t-CO2e/t crop + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSugar200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostSugar200ResponseIntermediateInner.php new file mode 100644 index 00000000..96208ac2 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSugar200ResponseIntermediateInner.php @@ -0,0 +1,636 @@ + + */ +class PostSugar200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sugar_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostCotton200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostCotton200ResponseScope3', + 'carbon_sequestration' => 'float', + 'intensities' => '\OpenAPI\Client\Model\PostSugar200ResponseIntermediateInnerIntensities', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intensities' => null, + 'net' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intensities' => false, + 'net' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intensities' => 'intensities', + 'net' => 'net' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intensities' => 'setIntensities', + 'net' => 'setNet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intensities' => 'getIntensities', + 'net' => 'getNet' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostCotton200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostCotton200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return float + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param float $carbon_sequestration Carbon sequestration, in tonnes-CO2e + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostSugar200ResponseIntermediateInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostSugar200ResponseIntermediateInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSugar200ResponseIntermediateInnerIntensities.php b/examples/php-api-client/api-client/lib/Model/PostSugar200ResponseIntermediateInnerIntensities.php new file mode 100644 index 00000000..a1fb27b8 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSugar200ResponseIntermediateInnerIntensities.php @@ -0,0 +1,487 @@ + + */ +class PostSugar200ResponseIntermediateInnerIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sugar_200_response_intermediate_inner_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'sugar_excluding_sequestration' => 'float', + 'sugar_including_sequestration' => 'float', + 'sugar_produced_kg' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'sugar_excluding_sequestration' => null, + 'sugar_including_sequestration' => null, + 'sugar_produced_kg' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'sugar_excluding_sequestration' => false, + 'sugar_including_sequestration' => false, + 'sugar_produced_kg' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sugar_excluding_sequestration' => 'sugarExcludingSequestration', + 'sugar_including_sequestration' => 'sugarIncludingSequestration', + 'sugar_produced_kg' => 'sugarProducedKg' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sugar_excluding_sequestration' => 'setSugarExcludingSequestration', + 'sugar_including_sequestration' => 'setSugarIncludingSequestration', + 'sugar_produced_kg' => 'setSugarProducedKg' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sugar_excluding_sequestration' => 'getSugarExcludingSequestration', + 'sugar_including_sequestration' => 'getSugarIncludingSequestration', + 'sugar_produced_kg' => 'getSugarProducedKg' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('sugar_excluding_sequestration', $data ?? [], null); + $this->setIfExists('sugar_including_sequestration', $data ?? [], null); + $this->setIfExists('sugar_produced_kg', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['sugar_excluding_sequestration'] === null) { + $invalidProperties[] = "'sugar_excluding_sequestration' can't be null"; + } + if ($this->container['sugar_including_sequestration'] === null) { + $invalidProperties[] = "'sugar_including_sequestration' can't be null"; + } + if ($this->container['sugar_produced_kg'] === null) { + $invalidProperties[] = "'sugar_produced_kg' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sugar_excluding_sequestration + * + * @return float + */ + public function getSugarExcludingSequestration() + { + return $this->container['sugar_excluding_sequestration']; + } + + /** + * Sets sugar_excluding_sequestration + * + * @param float $sugar_excluding_sequestration Sugar emissions intensity excluding sequestration, in kg-CO2e/kg sugar + * + * @return self + */ + public function setSugarExcludingSequestration($sugar_excluding_sequestration) + { + if (is_null($sugar_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable sugar_excluding_sequestration cannot be null'); + } + $this->container['sugar_excluding_sequestration'] = $sugar_excluding_sequestration; + + return $this; + } + + /** + * Gets sugar_including_sequestration + * + * @return float + */ + public function getSugarIncludingSequestration() + { + return $this->container['sugar_including_sequestration']; + } + + /** + * Sets sugar_including_sequestration + * + * @param float $sugar_including_sequestration Sugar emissions intensity including sequestration, in kg-CO2e/kg sugar + * + * @return self + */ + public function setSugarIncludingSequestration($sugar_including_sequestration) + { + if (is_null($sugar_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable sugar_including_sequestration cannot be null'); + } + $this->container['sugar_including_sequestration'] = $sugar_including_sequestration; + + return $this; + } + + /** + * Gets sugar_produced_kg + * + * @return float + */ + public function getSugarProducedKg() + { + return $this->container['sugar_produced_kg']; + } + + /** + * Sets sugar_produced_kg + * + * @param float $sugar_produced_kg Sugar produced in kg + * + * @return self + */ + public function setSugarProducedKg($sugar_produced_kg) + { + if (is_null($sugar_produced_kg)) { + throw new \InvalidArgumentException('non-nullable sugar_produced_kg cannot be null'); + } + $this->container['sugar_produced_kg'] = $sugar_produced_kg; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSugarRequest.php b/examples/php-api-client/api-client/lib/Model/PostSugarRequest.php new file mode 100644 index 00000000..ac24d736 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSugarRequest.php @@ -0,0 +1,626 @@ + + */ +class PostSugarRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sugar_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'state' => 'string', + 'crops' => '\OpenAPI\Client\Model\PostSugarRequestCropsInner[]', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'vegetation' => '\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'state' => null, + 'crops' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'state' => false, + 'crops' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'state' => 'state', + 'crops' => 'crops', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'state' => 'setState', + 'crops' => 'setCrops', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'state' => 'getState', + 'crops' => 'getCrops', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('crops', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['crops'] === null) { + $invalidProperties[] = "'crops' can't be null"; + } + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets crops + * + * @return \OpenAPI\Client\Model\PostSugarRequestCropsInner[] + */ + public function getCrops() + { + return $this->container['crops']; + } + + /** + * Sets crops + * + * @param \OpenAPI\Client\Model\PostSugarRequestCropsInner[] $crops crops + * + * @return self + */ + public function setCrops($crops) + { + if (is_null($crops)) { + throw new \InvalidArgumentException('non-nullable crops cannot be null'); + } + $this->container['crops'] = $crops; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostSugarRequest., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostSugarRequest., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostCottonRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostCottonRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostSugarRequestCropsInner.php b/examples/php-api-client/api-client/lib/Model/PostSugarRequestCropsInner.php new file mode 100644 index 00000000..796cdaab --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostSugarRequestCropsInner.php @@ -0,0 +1,1272 @@ + + */ +class PostSugarRequestCropsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_sugar_request_crops_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'state' => 'string', + 'production_system' => 'string', + 'average_cane_yield' => 'float', + 'percent_milled_cane_yield' => 'float', + 'area_sown' => 'float', + 'non_urea_nitrogen' => 'float', + 'urea_application' => 'float', + 'urea_ammonium_nitrate' => 'float', + 'phosphorus_application' => 'float', + 'potassium_application' => 'float', + 'sulfur_application' => 'float', + 'rainfall_above600' => 'bool', + 'fraction_of_annual_crop_burnt' => 'float', + 'herbicide_use' => 'float', + 'glyphosate_other_herbicide_use' => 'float', + 'electricity_allocation' => 'float', + 'limestone' => 'float', + 'limestone_fraction' => 'float', + 'diesel_use' => 'float', + 'petrol_use' => 'float', + 'lpg' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'state' => null, + 'production_system' => null, + 'average_cane_yield' => null, + 'percent_milled_cane_yield' => null, + 'area_sown' => null, + 'non_urea_nitrogen' => null, + 'urea_application' => null, + 'urea_ammonium_nitrate' => null, + 'phosphorus_application' => null, + 'potassium_application' => null, + 'sulfur_application' => null, + 'rainfall_above600' => null, + 'fraction_of_annual_crop_burnt' => null, + 'herbicide_use' => null, + 'glyphosate_other_herbicide_use' => null, + 'electricity_allocation' => null, + 'limestone' => null, + 'limestone_fraction' => null, + 'diesel_use' => null, + 'petrol_use' => null, + 'lpg' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'state' => false, + 'production_system' => false, + 'average_cane_yield' => false, + 'percent_milled_cane_yield' => false, + 'area_sown' => false, + 'non_urea_nitrogen' => false, + 'urea_application' => false, + 'urea_ammonium_nitrate' => false, + 'phosphorus_application' => false, + 'potassium_application' => false, + 'sulfur_application' => false, + 'rainfall_above600' => false, + 'fraction_of_annual_crop_burnt' => false, + 'herbicide_use' => false, + 'glyphosate_other_herbicide_use' => false, + 'electricity_allocation' => false, + 'limestone' => false, + 'limestone_fraction' => false, + 'diesel_use' => false, + 'petrol_use' => false, + 'lpg' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'state' => 'state', + 'production_system' => 'productionSystem', + 'average_cane_yield' => 'averageCaneYield', + 'percent_milled_cane_yield' => 'percentMilledCaneYield', + 'area_sown' => 'areaSown', + 'non_urea_nitrogen' => 'nonUreaNitrogen', + 'urea_application' => 'ureaApplication', + 'urea_ammonium_nitrate' => 'ureaAmmoniumNitrate', + 'phosphorus_application' => 'phosphorusApplication', + 'potassium_application' => 'potassiumApplication', + 'sulfur_application' => 'sulfurApplication', + 'rainfall_above600' => 'rainfallAbove600', + 'fraction_of_annual_crop_burnt' => 'fractionOfAnnualCropBurnt', + 'herbicide_use' => 'herbicideUse', + 'glyphosate_other_herbicide_use' => 'glyphosateOtherHerbicideUse', + 'electricity_allocation' => 'electricityAllocation', + 'limestone' => 'limestone', + 'limestone_fraction' => 'limestoneFraction', + 'diesel_use' => 'dieselUse', + 'petrol_use' => 'petrolUse', + 'lpg' => 'lpg' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'state' => 'setState', + 'production_system' => 'setProductionSystem', + 'average_cane_yield' => 'setAverageCaneYield', + 'percent_milled_cane_yield' => 'setPercentMilledCaneYield', + 'area_sown' => 'setAreaSown', + 'non_urea_nitrogen' => 'setNonUreaNitrogen', + 'urea_application' => 'setUreaApplication', + 'urea_ammonium_nitrate' => 'setUreaAmmoniumNitrate', + 'phosphorus_application' => 'setPhosphorusApplication', + 'potassium_application' => 'setPotassiumApplication', + 'sulfur_application' => 'setSulfurApplication', + 'rainfall_above600' => 'setRainfallAbove600', + 'fraction_of_annual_crop_burnt' => 'setFractionOfAnnualCropBurnt', + 'herbicide_use' => 'setHerbicideUse', + 'glyphosate_other_herbicide_use' => 'setGlyphosateOtherHerbicideUse', + 'electricity_allocation' => 'setElectricityAllocation', + 'limestone' => 'setLimestone', + 'limestone_fraction' => 'setLimestoneFraction', + 'diesel_use' => 'setDieselUse', + 'petrol_use' => 'setPetrolUse', + 'lpg' => 'setLpg' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'state' => 'getState', + 'production_system' => 'getProductionSystem', + 'average_cane_yield' => 'getAverageCaneYield', + 'percent_milled_cane_yield' => 'getPercentMilledCaneYield', + 'area_sown' => 'getAreaSown', + 'non_urea_nitrogen' => 'getNonUreaNitrogen', + 'urea_application' => 'getUreaApplication', + 'urea_ammonium_nitrate' => 'getUreaAmmoniumNitrate', + 'phosphorus_application' => 'getPhosphorusApplication', + 'potassium_application' => 'getPotassiumApplication', + 'sulfur_application' => 'getSulfurApplication', + 'rainfall_above600' => 'getRainfallAbove600', + 'fraction_of_annual_crop_burnt' => 'getFractionOfAnnualCropBurnt', + 'herbicide_use' => 'getHerbicideUse', + 'glyphosate_other_herbicide_use' => 'getGlyphosateOtherHerbicideUse', + 'electricity_allocation' => 'getElectricityAllocation', + 'limestone' => 'getLimestone', + 'limestone_fraction' => 'getLimestoneFraction', + 'diesel_use' => 'getDieselUse', + 'petrol_use' => 'getPetrolUse', + 'lpg' => 'getLpg' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + public const PRODUCTION_SYSTEM_NON_IRRIGATED_CROP = 'Non-irrigated crop'; + public const PRODUCTION_SYSTEM_IRRIGATED_CROP = 'Irrigated crop'; + public const PRODUCTION_SYSTEM_SUGAR_CANE = 'Sugar cane'; + public const PRODUCTION_SYSTEM_COTTON = 'Cotton'; + public const PRODUCTION_SYSTEM_HORTICULTURE = 'Horticulture'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getProductionSystemAllowableValues() + { + return [ + self::PRODUCTION_SYSTEM_NON_IRRIGATED_CROP, + self::PRODUCTION_SYSTEM_IRRIGATED_CROP, + self::PRODUCTION_SYSTEM_SUGAR_CANE, + self::PRODUCTION_SYSTEM_COTTON, + self::PRODUCTION_SYSTEM_HORTICULTURE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('production_system', $data ?? [], null); + $this->setIfExists('average_cane_yield', $data ?? [], null); + $this->setIfExists('percent_milled_cane_yield', $data ?? [], null); + $this->setIfExists('area_sown', $data ?? [], null); + $this->setIfExists('non_urea_nitrogen', $data ?? [], null); + $this->setIfExists('urea_application', $data ?? [], null); + $this->setIfExists('urea_ammonium_nitrate', $data ?? [], null); + $this->setIfExists('phosphorus_application', $data ?? [], null); + $this->setIfExists('potassium_application', $data ?? [], null); + $this->setIfExists('sulfur_application', $data ?? [], null); + $this->setIfExists('rainfall_above600', $data ?? [], null); + $this->setIfExists('fraction_of_annual_crop_burnt', $data ?? [], null); + $this->setIfExists('herbicide_use', $data ?? [], null); + $this->setIfExists('glyphosate_other_herbicide_use', $data ?? [], null); + $this->setIfExists('electricity_allocation', $data ?? [], null); + $this->setIfExists('limestone', $data ?? [], null); + $this->setIfExists('limestone_fraction', $data ?? [], null); + $this->setIfExists('diesel_use', $data ?? [], null); + $this->setIfExists('petrol_use', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['production_system'] === null) { + $invalidProperties[] = "'production_system' can't be null"; + } + $allowedValues = $this->getProductionSystemAllowableValues(); + if (!is_null($this->container['production_system']) && !in_array($this->container['production_system'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'production_system', must be one of '%s'", + $this->container['production_system'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['average_cane_yield'] === null) { + $invalidProperties[] = "'average_cane_yield' can't be null"; + } + if ($this->container['area_sown'] === null) { + $invalidProperties[] = "'area_sown' can't be null"; + } + if ($this->container['non_urea_nitrogen'] === null) { + $invalidProperties[] = "'non_urea_nitrogen' can't be null"; + } + if ($this->container['urea_application'] === null) { + $invalidProperties[] = "'urea_application' can't be null"; + } + if ($this->container['urea_ammonium_nitrate'] === null) { + $invalidProperties[] = "'urea_ammonium_nitrate' can't be null"; + } + if ($this->container['phosphorus_application'] === null) { + $invalidProperties[] = "'phosphorus_application' can't be null"; + } + if ($this->container['potassium_application'] === null) { + $invalidProperties[] = "'potassium_application' can't be null"; + } + if ($this->container['sulfur_application'] === null) { + $invalidProperties[] = "'sulfur_application' can't be null"; + } + if ($this->container['rainfall_above600'] === null) { + $invalidProperties[] = "'rainfall_above600' can't be null"; + } + if ($this->container['fraction_of_annual_crop_burnt'] === null) { + $invalidProperties[] = "'fraction_of_annual_crop_burnt' can't be null"; + } + if ($this->container['herbicide_use'] === null) { + $invalidProperties[] = "'herbicide_use' can't be null"; + } + if ($this->container['glyphosate_other_herbicide_use'] === null) { + $invalidProperties[] = "'glyphosate_other_herbicide_use' can't be null"; + } + if ($this->container['electricity_allocation'] === null) { + $invalidProperties[] = "'electricity_allocation' can't be null"; + } + if ($this->container['limestone'] === null) { + $invalidProperties[] = "'limestone' can't be null"; + } + if ($this->container['limestone_fraction'] === null) { + $invalidProperties[] = "'limestone_fraction' can't be null"; + } + if ($this->container['diesel_use'] === null) { + $invalidProperties[] = "'diesel_use' can't be null"; + } + if ($this->container['petrol_use'] === null) { + $invalidProperties[] = "'petrol_use' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets production_system + * + * @return string + */ + public function getProductionSystem() + { + return $this->container['production_system']; + } + + /** + * Sets production_system + * + * @param string $production_system Production system of this crop + * + * @return self + */ + public function setProductionSystem($production_system) + { + if (is_null($production_system)) { + throw new \InvalidArgumentException('non-nullable production_system cannot be null'); + } + $allowedValues = $this->getProductionSystemAllowableValues(); + if (!in_array($production_system, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'production_system', must be one of '%s'", + $production_system, + implode("', '", $allowedValues) + ) + ); + } + $this->container['production_system'] = $production_system; + + return $this; + } + + /** + * Gets average_cane_yield + * + * @return float + */ + public function getAverageCaneYield() + { + return $this->container['average_cane_yield']; + } + + /** + * Sets average_cane_yield + * + * @param float $average_cane_yield Average cane/crop yield, in t/ha (tonnes per hectare) + * + * @return self + */ + public function setAverageCaneYield($average_cane_yield) + { + if (is_null($average_cane_yield)) { + throw new \InvalidArgumentException('non-nullable average_cane_yield cannot be null'); + } + $this->container['average_cane_yield'] = $average_cane_yield; + + return $this; + } + + /** + * Gets percent_milled_cane_yield + * + * @return float|null + */ + public function getPercentMilledCaneYield() + { + return $this->container['percent_milled_cane_yield']; + } + + /** + * Sets percent_milled_cane_yield + * + * @param float|null $percent_milled_cane_yield Percentage of cane yield that becomes milled sugar, from 0 to 1 + * + * @return self + */ + public function setPercentMilledCaneYield($percent_milled_cane_yield) + { + if (is_null($percent_milled_cane_yield)) { + throw new \InvalidArgumentException('non-nullable percent_milled_cane_yield cannot be null'); + } + $this->container['percent_milled_cane_yield'] = $percent_milled_cane_yield; + + return $this; + } + + /** + * Gets area_sown + * + * @return float + */ + public function getAreaSown() + { + return $this->container['area_sown']; + } + + /** + * Sets area_sown + * + * @param float $area_sown Area sown, in ha (hectares) + * + * @return self + */ + public function setAreaSown($area_sown) + { + if (is_null($area_sown)) { + throw new \InvalidArgumentException('non-nullable area_sown cannot be null'); + } + $this->container['area_sown'] = $area_sown; + + return $this; + } + + /** + * Gets non_urea_nitrogen + * + * @return float + */ + public function getNonUreaNitrogen() + { + return $this->container['non_urea_nitrogen']; + } + + /** + * Sets non_urea_nitrogen + * + * @param float $non_urea_nitrogen Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) + * + * @return self + */ + public function setNonUreaNitrogen($non_urea_nitrogen) + { + if (is_null($non_urea_nitrogen)) { + throw new \InvalidArgumentException('non-nullable non_urea_nitrogen cannot be null'); + } + $this->container['non_urea_nitrogen'] = $non_urea_nitrogen; + + return $this; + } + + /** + * Gets urea_application + * + * @return float + */ + public function getUreaApplication() + { + return $this->container['urea_application']; + } + + /** + * Sets urea_application + * + * @param float $urea_application Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) + * + * @return self + */ + public function setUreaApplication($urea_application) + { + if (is_null($urea_application)) { + throw new \InvalidArgumentException('non-nullable urea_application cannot be null'); + } + $this->container['urea_application'] = $urea_application; + + return $this; + } + + /** + * Gets urea_ammonium_nitrate + * + * @return float + */ + public function getUreaAmmoniumNitrate() + { + return $this->container['urea_ammonium_nitrate']; + } + + /** + * Sets urea_ammonium_nitrate + * + * @param float $urea_ammonium_nitrate Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) + * + * @return self + */ + public function setUreaAmmoniumNitrate($urea_ammonium_nitrate) + { + if (is_null($urea_ammonium_nitrate)) { + throw new \InvalidArgumentException('non-nullable urea_ammonium_nitrate cannot be null'); + } + $this->container['urea_ammonium_nitrate'] = $urea_ammonium_nitrate; + + return $this; + } + + /** + * Gets phosphorus_application + * + * @return float + */ + public function getPhosphorusApplication() + { + return $this->container['phosphorus_application']; + } + + /** + * Sets phosphorus_application + * + * @param float $phosphorus_application Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) + * + * @return self + */ + public function setPhosphorusApplication($phosphorus_application) + { + if (is_null($phosphorus_application)) { + throw new \InvalidArgumentException('non-nullable phosphorus_application cannot be null'); + } + $this->container['phosphorus_application'] = $phosphorus_application; + + return $this; + } + + /** + * Gets potassium_application + * + * @return float + */ + public function getPotassiumApplication() + { + return $this->container['potassium_application']; + } + + /** + * Sets potassium_application + * + * @param float $potassium_application Potassium application, in kg K/ha (kilograms of potassium per hectare) + * + * @return self + */ + public function setPotassiumApplication($potassium_application) + { + if (is_null($potassium_application)) { + throw new \InvalidArgumentException('non-nullable potassium_application cannot be null'); + } + $this->container['potassium_application'] = $potassium_application; + + return $this; + } + + /** + * Gets sulfur_application + * + * @return float + */ + public function getSulfurApplication() + { + return $this->container['sulfur_application']; + } + + /** + * Sets sulfur_application + * + * @param float $sulfur_application Sulfur application, in kg S/ha (kilograms of sulfur per hectare) + * + * @return self + */ + public function setSulfurApplication($sulfur_application) + { + if (is_null($sulfur_application)) { + throw new \InvalidArgumentException('non-nullable sulfur_application cannot be null'); + } + $this->container['sulfur_application'] = $sulfur_application; + + return $this; + } + + /** + * Gets rainfall_above600 + * + * @return bool + */ + public function getRainfallAbove600() + { + return $this->container['rainfall_above600']; + } + + /** + * Sets rainfall_above600 + * + * @param bool $rainfall_above600 Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm + * + * @return self + */ + public function setRainfallAbove600($rainfall_above600) + { + if (is_null($rainfall_above600)) { + throw new \InvalidArgumentException('non-nullable rainfall_above600 cannot be null'); + } + $this->container['rainfall_above600'] = $rainfall_above600; + + return $this; + } + + /** + * Gets fraction_of_annual_crop_burnt + * + * @return float + */ + public function getFractionOfAnnualCropBurnt() + { + return $this->container['fraction_of_annual_crop_burnt']; + } + + /** + * Sets fraction_of_annual_crop_burnt + * + * @param float $fraction_of_annual_crop_burnt Fraction of annual production of crop that is burnt, from 0 to 1 + * + * @return self + */ + public function setFractionOfAnnualCropBurnt($fraction_of_annual_crop_burnt) + { + if (is_null($fraction_of_annual_crop_burnt)) { + throw new \InvalidArgumentException('non-nullable fraction_of_annual_crop_burnt cannot be null'); + } + $this->container['fraction_of_annual_crop_burnt'] = $fraction_of_annual_crop_burnt; + + return $this; + } + + /** + * Gets herbicide_use + * + * @return float + */ + public function getHerbicideUse() + { + return $this->container['herbicide_use']; + } + + /** + * Sets herbicide_use + * + * @param float $herbicide_use Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) + * + * @return self + */ + public function setHerbicideUse($herbicide_use) + { + if (is_null($herbicide_use)) { + throw new \InvalidArgumentException('non-nullable herbicide_use cannot be null'); + } + $this->container['herbicide_use'] = $herbicide_use; + + return $this; + } + + /** + * Gets glyphosate_other_herbicide_use + * + * @return float + */ + public function getGlyphosateOtherHerbicideUse() + { + return $this->container['glyphosate_other_herbicide_use']; + } + + /** + * Sets glyphosate_other_herbicide_use + * + * @param float $glyphosate_other_herbicide_use Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) + * + * @return self + */ + public function setGlyphosateOtherHerbicideUse($glyphosate_other_herbicide_use) + { + if (is_null($glyphosate_other_herbicide_use)) { + throw new \InvalidArgumentException('non-nullable glyphosate_other_herbicide_use cannot be null'); + } + $this->container['glyphosate_other_herbicide_use'] = $glyphosate_other_herbicide_use; + + return $this; + } + + /** + * Gets electricity_allocation + * + * @return float + */ + public function getElectricityAllocation() + { + return $this->container['electricity_allocation']; + } + + /** + * Sets electricity_allocation + * + * @param float $electricity_allocation Percentage of electricity use to allocate to this crop, from 0 to 1 + * + * @return self + */ + public function setElectricityAllocation($electricity_allocation) + { + if (is_null($electricity_allocation)) { + throw new \InvalidArgumentException('non-nullable electricity_allocation cannot be null'); + } + $this->container['electricity_allocation'] = $electricity_allocation; + + return $this; + } + + /** + * Gets limestone + * + * @return float + */ + public function getLimestone() + { + return $this->container['limestone']; + } + + /** + * Sets limestone + * + * @param float $limestone Lime applied in tonnes + * + * @return self + */ + public function setLimestone($limestone) + { + if (is_null($limestone)) { + throw new \InvalidArgumentException('non-nullable limestone cannot be null'); + } + $this->container['limestone'] = $limestone; + + return $this; + } + + /** + * Gets limestone_fraction + * + * @return float + */ + public function getLimestoneFraction() + { + return $this->container['limestone_fraction']; + } + + /** + * Sets limestone_fraction + * + * @param float $limestone_fraction Fraction of lime as limestone vs dolomite, between 0 and 1 + * + * @return self + */ + public function setLimestoneFraction($limestone_fraction) + { + if (is_null($limestone_fraction)) { + throw new \InvalidArgumentException('non-nullable limestone_fraction cannot be null'); + } + $this->container['limestone_fraction'] = $limestone_fraction; + + return $this; + } + + /** + * Gets diesel_use + * + * @return float + */ + public function getDieselUse() + { + return $this->container['diesel_use']; + } + + /** + * Sets diesel_use + * + * @param float $diesel_use Diesel usage in L (litres) + * + * @return self + */ + public function setDieselUse($diesel_use) + { + if (is_null($diesel_use)) { + throw new \InvalidArgumentException('non-nullable diesel_use cannot be null'); + } + $this->container['diesel_use'] = $diesel_use; + + return $this; + } + + /** + * Gets petrol_use + * + * @return float + */ + public function getPetrolUse() + { + return $this->container['petrol_use']; + } + + /** + * Sets petrol_use + * + * @param float $petrol_use Petrol usage in L (litres) + * + * @return self + */ + public function setPetrolUse($petrol_use) + { + if (is_null($petrol_use)) { + throw new \InvalidArgumentException('non-nullable petrol_use cannot be null'); + } + $this->container['petrol_use'] = $petrol_use; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostVineyard200Response.php b/examples/php-api-client/api-client/lib/Model/PostVineyard200Response.php new file mode 100644 index 00000000..0aaed1fc --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostVineyard200Response.php @@ -0,0 +1,636 @@ + + */ +class PostVineyard200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_vineyard_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostVineyard200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostVineyard200ResponseScope3', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'intermediate' => '\OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInner[]', + 'net' => '\OpenAPI\Client\Model\PostVineyard200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInnerIntensities[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intermediate' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intermediate' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intermediate' => 'intermediate', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intermediate' => 'setIntermediate', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intermediate' => 'getIntermediate', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostVineyard200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostVineyard200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostVineyard200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostVineyard200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostVineyard200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostVineyard200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInnerIntensities[] + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInnerIntensities[] $intensities Emissions intensity for each vineyard (in order), in t-CO2e/t yield + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseIntermediateInner.php new file mode 100644 index 00000000..b9a0dc92 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseIntermediateInner.php @@ -0,0 +1,636 @@ + + */ +class PostVineyard200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_vineyard_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostVineyard200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostVineyard200ResponseScope3', + 'carbon_sequestration' => 'float', + 'intensities' => '\OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInnerIntensities', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'carbon_sequestration' => null, + 'intensities' => null, + 'net' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'carbon_sequestration' => false, + 'intensities' => false, + 'net' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'carbon_sequestration' => 'carbonSequestration', + 'intensities' => 'intensities', + 'net' => 'net' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intensities' => 'setIntensities', + 'net' => 'setNet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intensities' => 'getIntensities', + 'net' => 'getNet' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostVineyard200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostVineyard200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostVineyard200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostVineyard200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return float + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param float $carbon_sequestration Carbon sequestration, in tonnes-CO2e + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseIntermediateInnerIntensities.php b/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseIntermediateInnerIntensities.php new file mode 100644 index 00000000..17a2229a --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseIntermediateInnerIntensities.php @@ -0,0 +1,487 @@ + + */ +class PostVineyard200ResponseIntermediateInnerIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_vineyard_200_response_intermediate_inner_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'vineyards_excluding_sequestration' => 'float', + 'vineyards_including_sequestration' => 'float', + 'crop_produced_kg' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'vineyards_excluding_sequestration' => null, + 'vineyards_including_sequestration' => null, + 'crop_produced_kg' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'vineyards_excluding_sequestration' => false, + 'vineyards_including_sequestration' => false, + 'crop_produced_kg' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vineyards_excluding_sequestration' => 'vineyardsExcludingSequestration', + 'vineyards_including_sequestration' => 'vineyardsIncludingSequestration', + 'crop_produced_kg' => 'cropProducedKg' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vineyards_excluding_sequestration' => 'setVineyardsExcludingSequestration', + 'vineyards_including_sequestration' => 'setVineyardsIncludingSequestration', + 'crop_produced_kg' => 'setCropProducedKg' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vineyards_excluding_sequestration' => 'getVineyardsExcludingSequestration', + 'vineyards_including_sequestration' => 'getVineyardsIncludingSequestration', + 'crop_produced_kg' => 'getCropProducedKg' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('vineyards_excluding_sequestration', $data ?? [], null); + $this->setIfExists('vineyards_including_sequestration', $data ?? [], null); + $this->setIfExists('crop_produced_kg', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['vineyards_excluding_sequestration'] === null) { + $invalidProperties[] = "'vineyards_excluding_sequestration' can't be null"; + } + if ($this->container['vineyards_including_sequestration'] === null) { + $invalidProperties[] = "'vineyards_including_sequestration' can't be null"; + } + if ($this->container['crop_produced_kg'] === null) { + $invalidProperties[] = "'crop_produced_kg' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vineyards_excluding_sequestration + * + * @return float + */ + public function getVineyardsExcludingSequestration() + { + return $this->container['vineyards_excluding_sequestration']; + } + + /** + * Sets vineyards_excluding_sequestration + * + * @param float $vineyards_excluding_sequestration Vineyard emissions intensity excluding sequestration, in kg-CO2e/kg crop + * + * @return self + */ + public function setVineyardsExcludingSequestration($vineyards_excluding_sequestration) + { + if (is_null($vineyards_excluding_sequestration)) { + throw new \InvalidArgumentException('non-nullable vineyards_excluding_sequestration cannot be null'); + } + $this->container['vineyards_excluding_sequestration'] = $vineyards_excluding_sequestration; + + return $this; + } + + /** + * Gets vineyards_including_sequestration + * + * @return float + */ + public function getVineyardsIncludingSequestration() + { + return $this->container['vineyards_including_sequestration']; + } + + /** + * Sets vineyards_including_sequestration + * + * @param float $vineyards_including_sequestration Vineyard emissions intensity including sequestration, in kg-CO2e/kg crop + * + * @return self + */ + public function setVineyardsIncludingSequestration($vineyards_including_sequestration) + { + if (is_null($vineyards_including_sequestration)) { + throw new \InvalidArgumentException('non-nullable vineyards_including_sequestration cannot be null'); + } + $this->container['vineyards_including_sequestration'] = $vineyards_including_sequestration; + + return $this; + } + + /** + * Gets crop_produced_kg + * + * @return float + */ + public function getCropProducedKg() + { + return $this->container['crop_produced_kg']; + } + + /** + * Sets crop_produced_kg + * + * @param float $crop_produced_kg Vineyard crop produced in kg + * + * @return self + */ + public function setCropProducedKg($crop_produced_kg) + { + if (is_null($crop_produced_kg)) { + throw new \InvalidArgumentException('non-nullable crop_produced_kg cannot be null'); + } + $this->container['crop_produced_kg'] = $crop_produced_kg; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseNet.php b/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseNet.php new file mode 100644 index 00000000..cb965294 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseNet.php @@ -0,0 +1,451 @@ + + */ +class PostVineyard200ResponseNet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_vineyard_200_response_net'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'float', + 'vineyards' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null, + 'vineyards' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false, + 'vineyards' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total' => 'total', + 'vineyards' => 'vineyards' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal', + 'vineyards' => 'setVineyards' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal', + 'vineyards' => 'getVineyards' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + $this->setIfExists('vineyards', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + if ($this->container['vineyards'] === null) { + $invalidProperties[] = "'vineyards' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total total + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets vineyards + * + * @return float[] + */ + public function getVineyards() + { + return $this->container['vineyards']; + } + + /** + * Sets vineyards + * + * @param float[] $vineyards vineyards + * + * @return self + */ + public function setVineyards($vineyards) + { + if (is_null($vineyards)) { + throw new \InvalidArgumentException('non-nullable vineyards cannot be null'); + } + $this->container['vineyards'] = $vineyards; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseScope1.php b/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseScope1.php new file mode 100644 index 00000000..f3945710 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseScope1.php @@ -0,0 +1,932 @@ + + */ +class PostVineyard200ResponseScope1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_vineyard_200_response_scope1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel_co2' => 'float', + 'lime_co2' => 'float', + 'urea_co2' => 'float', + 'waste_water_co2' => 'float', + 'composted_solid_waste_co2' => 'float', + 'fuel_ch4' => 'float', + 'fertiliser_n2_o' => 'float', + 'atmospheric_deposition_n2_o' => 'float', + 'crop_residue_n2_o' => 'float', + 'leaching_and_runoff_n2_o' => 'float', + 'fuel_n2_o' => 'float', + 'total_co2' => 'float', + 'total_ch4' => 'float', + 'total_n2_o' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel_co2' => null, + 'lime_co2' => null, + 'urea_co2' => null, + 'waste_water_co2' => null, + 'composted_solid_waste_co2' => null, + 'fuel_ch4' => null, + 'fertiliser_n2_o' => null, + 'atmospheric_deposition_n2_o' => null, + 'crop_residue_n2_o' => null, + 'leaching_and_runoff_n2_o' => null, + 'fuel_n2_o' => null, + 'total_co2' => null, + 'total_ch4' => null, + 'total_n2_o' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel_co2' => false, + 'lime_co2' => false, + 'urea_co2' => false, + 'waste_water_co2' => false, + 'composted_solid_waste_co2' => false, + 'fuel_ch4' => false, + 'fertiliser_n2_o' => false, + 'atmospheric_deposition_n2_o' => false, + 'crop_residue_n2_o' => false, + 'leaching_and_runoff_n2_o' => false, + 'fuel_n2_o' => false, + 'total_co2' => false, + 'total_ch4' => false, + 'total_n2_o' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel_co2' => 'fuelCO2', + 'lime_co2' => 'limeCO2', + 'urea_co2' => 'ureaCO2', + 'waste_water_co2' => 'wasteWaterCO2', + 'composted_solid_waste_co2' => 'compostedSolidWasteCO2', + 'fuel_ch4' => 'fuelCH4', + 'fertiliser_n2_o' => 'fertiliserN2O', + 'atmospheric_deposition_n2_o' => 'atmosphericDepositionN2O', + 'crop_residue_n2_o' => 'cropResidueN2O', + 'leaching_and_runoff_n2_o' => 'leachingAndRunoffN2O', + 'fuel_n2_o' => 'fuelN2O', + 'total_co2' => 'totalCO2', + 'total_ch4' => 'totalCH4', + 'total_n2_o' => 'totalN2O', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel_co2' => 'setFuelCo2', + 'lime_co2' => 'setLimeCo2', + 'urea_co2' => 'setUreaCo2', + 'waste_water_co2' => 'setWasteWaterCo2', + 'composted_solid_waste_co2' => 'setCompostedSolidWasteCo2', + 'fuel_ch4' => 'setFuelCh4', + 'fertiliser_n2_o' => 'setFertiliserN2O', + 'atmospheric_deposition_n2_o' => 'setAtmosphericDepositionN2O', + 'crop_residue_n2_o' => 'setCropResidueN2O', + 'leaching_and_runoff_n2_o' => 'setLeachingAndRunoffN2O', + 'fuel_n2_o' => 'setFuelN2O', + 'total_co2' => 'setTotalCo2', + 'total_ch4' => 'setTotalCh4', + 'total_n2_o' => 'setTotalN2O', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel_co2' => 'getFuelCo2', + 'lime_co2' => 'getLimeCo2', + 'urea_co2' => 'getUreaCo2', + 'waste_water_co2' => 'getWasteWaterCo2', + 'composted_solid_waste_co2' => 'getCompostedSolidWasteCo2', + 'fuel_ch4' => 'getFuelCh4', + 'fertiliser_n2_o' => 'getFertiliserN2O', + 'atmospheric_deposition_n2_o' => 'getAtmosphericDepositionN2O', + 'crop_residue_n2_o' => 'getCropResidueN2O', + 'leaching_and_runoff_n2_o' => 'getLeachingAndRunoffN2O', + 'fuel_n2_o' => 'getFuelN2O', + 'total_co2' => 'getTotalCo2', + 'total_ch4' => 'getTotalCh4', + 'total_n2_o' => 'getTotalN2O', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel_co2', $data ?? [], null); + $this->setIfExists('lime_co2', $data ?? [], null); + $this->setIfExists('urea_co2', $data ?? [], null); + $this->setIfExists('waste_water_co2', $data ?? [], null); + $this->setIfExists('composted_solid_waste_co2', $data ?? [], null); + $this->setIfExists('fuel_ch4', $data ?? [], null); + $this->setIfExists('fertiliser_n2_o', $data ?? [], null); + $this->setIfExists('atmospheric_deposition_n2_o', $data ?? [], null); + $this->setIfExists('crop_residue_n2_o', $data ?? [], null); + $this->setIfExists('leaching_and_runoff_n2_o', $data ?? [], null); + $this->setIfExists('fuel_n2_o', $data ?? [], null); + $this->setIfExists('total_co2', $data ?? [], null); + $this->setIfExists('total_ch4', $data ?? [], null); + $this->setIfExists('total_n2_o', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel_co2'] === null) { + $invalidProperties[] = "'fuel_co2' can't be null"; + } + if ($this->container['lime_co2'] === null) { + $invalidProperties[] = "'lime_co2' can't be null"; + } + if ($this->container['urea_co2'] === null) { + $invalidProperties[] = "'urea_co2' can't be null"; + } + if ($this->container['waste_water_co2'] === null) { + $invalidProperties[] = "'waste_water_co2' can't be null"; + } + if ($this->container['composted_solid_waste_co2'] === null) { + $invalidProperties[] = "'composted_solid_waste_co2' can't be null"; + } + if ($this->container['fuel_ch4'] === null) { + $invalidProperties[] = "'fuel_ch4' can't be null"; + } + if ($this->container['fertiliser_n2_o'] === null) { + $invalidProperties[] = "'fertiliser_n2_o' can't be null"; + } + if ($this->container['atmospheric_deposition_n2_o'] === null) { + $invalidProperties[] = "'atmospheric_deposition_n2_o' can't be null"; + } + if ($this->container['crop_residue_n2_o'] === null) { + $invalidProperties[] = "'crop_residue_n2_o' can't be null"; + } + if ($this->container['leaching_and_runoff_n2_o'] === null) { + $invalidProperties[] = "'leaching_and_runoff_n2_o' can't be null"; + } + if ($this->container['fuel_n2_o'] === null) { + $invalidProperties[] = "'fuel_n2_o' can't be null"; + } + if ($this->container['total_co2'] === null) { + $invalidProperties[] = "'total_co2' can't be null"; + } + if ($this->container['total_ch4'] === null) { + $invalidProperties[] = "'total_ch4' can't be null"; + } + if ($this->container['total_n2_o'] === null) { + $invalidProperties[] = "'total_n2_o' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel_co2 + * + * @return float + */ + public function getFuelCo2() + { + return $this->container['fuel_co2']; + } + + /** + * Sets fuel_co2 + * + * @param float $fuel_co2 CO2 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCo2($fuel_co2) + { + if (is_null($fuel_co2)) { + throw new \InvalidArgumentException('non-nullable fuel_co2 cannot be null'); + } + $this->container['fuel_co2'] = $fuel_co2; + + return $this; + } + + /** + * Gets lime_co2 + * + * @return float + */ + public function getLimeCo2() + { + return $this->container['lime_co2']; + } + + /** + * Sets lime_co2 + * + * @param float $lime_co2 CO2 emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLimeCo2($lime_co2) + { + if (is_null($lime_co2)) { + throw new \InvalidArgumentException('non-nullable lime_co2 cannot be null'); + } + $this->container['lime_co2'] = $lime_co2; + + return $this; + } + + /** + * Gets urea_co2 + * + * @return float + */ + public function getUreaCo2() + { + return $this->container['urea_co2']; + } + + /** + * Sets urea_co2 + * + * @param float $urea_co2 CO2 emissions from urea, in tonnes-CO2e + * + * @return self + */ + public function setUreaCo2($urea_co2) + { + if (is_null($urea_co2)) { + throw new \InvalidArgumentException('non-nullable urea_co2 cannot be null'); + } + $this->container['urea_co2'] = $urea_co2; + + return $this; + } + + /** + * Gets waste_water_co2 + * + * @return float + */ + public function getWasteWaterCo2() + { + return $this->container['waste_water_co2']; + } + + /** + * Sets waste_water_co2 + * + * @param float $waste_water_co2 Emissions from wastewater, in tonnes-CO2e + * + * @return self + */ + public function setWasteWaterCo2($waste_water_co2) + { + if (is_null($waste_water_co2)) { + throw new \InvalidArgumentException('non-nullable waste_water_co2 cannot be null'); + } + $this->container['waste_water_co2'] = $waste_water_co2; + + return $this; + } + + /** + * Gets composted_solid_waste_co2 + * + * @return float + */ + public function getCompostedSolidWasteCo2() + { + return $this->container['composted_solid_waste_co2']; + } + + /** + * Sets composted_solid_waste_co2 + * + * @param float $composted_solid_waste_co2 Emissions from composted solid waste, in tonnes-CO2e + * + * @return self + */ + public function setCompostedSolidWasteCo2($composted_solid_waste_co2) + { + if (is_null($composted_solid_waste_co2)) { + throw new \InvalidArgumentException('non-nullable composted_solid_waste_co2 cannot be null'); + } + $this->container['composted_solid_waste_co2'] = $composted_solid_waste_co2; + + return $this; + } + + /** + * Gets fuel_ch4 + * + * @return float + */ + public function getFuelCh4() + { + return $this->container['fuel_ch4']; + } + + /** + * Sets fuel_ch4 + * + * @param float $fuel_ch4 CH4 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCh4($fuel_ch4) + { + if (is_null($fuel_ch4)) { + throw new \InvalidArgumentException('non-nullable fuel_ch4 cannot be null'); + } + $this->container['fuel_ch4'] = $fuel_ch4; + + return $this; + } + + /** + * Gets fertiliser_n2_o + * + * @return float + */ + public function getFertiliserN2O() + { + return $this->container['fertiliser_n2_o']; + } + + /** + * Sets fertiliser_n2_o + * + * @param float $fertiliser_n2_o N2O emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliserN2O($fertiliser_n2_o) + { + if (is_null($fertiliser_n2_o)) { + throw new \InvalidArgumentException('non-nullable fertiliser_n2_o cannot be null'); + } + $this->container['fertiliser_n2_o'] = $fertiliser_n2_o; + + return $this; + } + + /** + * Gets atmospheric_deposition_n2_o + * + * @return float + */ + public function getAtmosphericDepositionN2O() + { + return $this->container['atmospheric_deposition_n2_o']; + } + + /** + * Sets atmospheric_deposition_n2_o + * + * @param float $atmospheric_deposition_n2_o N2O emissions from atmospheric deposition, in tonnes-CO2e + * + * @return self + */ + public function setAtmosphericDepositionN2O($atmospheric_deposition_n2_o) + { + if (is_null($atmospheric_deposition_n2_o)) { + throw new \InvalidArgumentException('non-nullable atmospheric_deposition_n2_o cannot be null'); + } + $this->container['atmospheric_deposition_n2_o'] = $atmospheric_deposition_n2_o; + + return $this; + } + + /** + * Gets crop_residue_n2_o + * + * @return float + */ + public function getCropResidueN2O() + { + return $this->container['crop_residue_n2_o']; + } + + /** + * Sets crop_residue_n2_o + * + * @param float $crop_residue_n2_o N2O emissions from crop residue, in tonnes-CO2e + * + * @return self + */ + public function setCropResidueN2O($crop_residue_n2_o) + { + if (is_null($crop_residue_n2_o)) { + throw new \InvalidArgumentException('non-nullable crop_residue_n2_o cannot be null'); + } + $this->container['crop_residue_n2_o'] = $crop_residue_n2_o; + + return $this; + } + + /** + * Gets leaching_and_runoff_n2_o + * + * @return float + */ + public function getLeachingAndRunoffN2O() + { + return $this->container['leaching_and_runoff_n2_o']; + } + + /** + * Sets leaching_and_runoff_n2_o + * + * @param float $leaching_and_runoff_n2_o N2O emissions from leeching and runoff, in tonnes-CO2e + * + * @return self + */ + public function setLeachingAndRunoffN2O($leaching_and_runoff_n2_o) + { + if (is_null($leaching_and_runoff_n2_o)) { + throw new \InvalidArgumentException('non-nullable leaching_and_runoff_n2_o cannot be null'); + } + $this->container['leaching_and_runoff_n2_o'] = $leaching_and_runoff_n2_o; + + return $this; + } + + /** + * Gets fuel_n2_o + * + * @return float + */ + public function getFuelN2O() + { + return $this->container['fuel_n2_o']; + } + + /** + * Sets fuel_n2_o + * + * @param float $fuel_n2_o N2O emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelN2O($fuel_n2_o) + { + if (is_null($fuel_n2_o)) { + throw new \InvalidArgumentException('non-nullable fuel_n2_o cannot be null'); + } + $this->container['fuel_n2_o'] = $fuel_n2_o; + + return $this; + } + + /** + * Gets total_co2 + * + * @return float + */ + public function getTotalCo2() + { + return $this->container['total_co2']; + } + + /** + * Sets total_co2 + * + * @param float $total_co2 Total CO2 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCo2($total_co2) + { + if (is_null($total_co2)) { + throw new \InvalidArgumentException('non-nullable total_co2 cannot be null'); + } + $this->container['total_co2'] = $total_co2; + + return $this; + } + + /** + * Gets total_ch4 + * + * @return float + */ + public function getTotalCh4() + { + return $this->container['total_ch4']; + } + + /** + * Sets total_ch4 + * + * @param float $total_ch4 Total CH4 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCh4($total_ch4) + { + if (is_null($total_ch4)) { + throw new \InvalidArgumentException('non-nullable total_ch4 cannot be null'); + } + $this->container['total_ch4'] = $total_ch4; + + return $this; + } + + /** + * Gets total_n2_o + * + * @return float + */ + public function getTotalN2O() + { + return $this->container['total_n2_o']; + } + + /** + * Sets total_n2_o + * + * @param float $total_n2_o Total N2O scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalN2O($total_n2_o) + { + if (is_null($total_n2_o)) { + throw new \InvalidArgumentException('non-nullable total_n2_o cannot be null'); + } + $this->container['total_n2_o'] = $total_n2_o; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseScope3.php b/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseScope3.php new file mode 100644 index 00000000..8a40cca5 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostVineyard200ResponseScope3.php @@ -0,0 +1,747 @@ + + */ +class PostVineyard200ResponseScope3 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_vineyard_200_response_scope3'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fertiliser' => 'float', + 'herbicide' => 'float', + 'electricity' => 'float', + 'fuel' => 'float', + 'lime' => 'float', + 'commercial_flights' => 'float', + 'inbound_freight' => 'float', + 'solid_waste_sent_offsite' => 'float', + 'outbound_freight' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fertiliser' => null, + 'herbicide' => null, + 'electricity' => null, + 'fuel' => null, + 'lime' => null, + 'commercial_flights' => null, + 'inbound_freight' => null, + 'solid_waste_sent_offsite' => null, + 'outbound_freight' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fertiliser' => false, + 'herbicide' => false, + 'electricity' => false, + 'fuel' => false, + 'lime' => false, + 'commercial_flights' => false, + 'inbound_freight' => false, + 'solid_waste_sent_offsite' => false, + 'outbound_freight' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fertiliser' => 'fertiliser', + 'herbicide' => 'herbicide', + 'electricity' => 'electricity', + 'fuel' => 'fuel', + 'lime' => 'lime', + 'commercial_flights' => 'commercialFlights', + 'inbound_freight' => 'inboundFreight', + 'solid_waste_sent_offsite' => 'solidWasteSentOffsite', + 'outbound_freight' => 'outboundFreight', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fertiliser' => 'setFertiliser', + 'herbicide' => 'setHerbicide', + 'electricity' => 'setElectricity', + 'fuel' => 'setFuel', + 'lime' => 'setLime', + 'commercial_flights' => 'setCommercialFlights', + 'inbound_freight' => 'setInboundFreight', + 'solid_waste_sent_offsite' => 'setSolidWasteSentOffsite', + 'outbound_freight' => 'setOutboundFreight', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fertiliser' => 'getFertiliser', + 'herbicide' => 'getHerbicide', + 'electricity' => 'getElectricity', + 'fuel' => 'getFuel', + 'lime' => 'getLime', + 'commercial_flights' => 'getCommercialFlights', + 'inbound_freight' => 'getInboundFreight', + 'solid_waste_sent_offsite' => 'getSolidWasteSentOffsite', + 'outbound_freight' => 'getOutboundFreight', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fertiliser', $data ?? [], null); + $this->setIfExists('herbicide', $data ?? [], null); + $this->setIfExists('electricity', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('lime', $data ?? [], null); + $this->setIfExists('commercial_flights', $data ?? [], null); + $this->setIfExists('inbound_freight', $data ?? [], null); + $this->setIfExists('solid_waste_sent_offsite', $data ?? [], null); + $this->setIfExists('outbound_freight', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fertiliser'] === null) { + $invalidProperties[] = "'fertiliser' can't be null"; + } + if ($this->container['herbicide'] === null) { + $invalidProperties[] = "'herbicide' can't be null"; + } + if ($this->container['electricity'] === null) { + $invalidProperties[] = "'electricity' can't be null"; + } + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['lime'] === null) { + $invalidProperties[] = "'lime' can't be null"; + } + if ($this->container['commercial_flights'] === null) { + $invalidProperties[] = "'commercial_flights' can't be null"; + } + if ($this->container['inbound_freight'] === null) { + $invalidProperties[] = "'inbound_freight' can't be null"; + } + if ($this->container['solid_waste_sent_offsite'] === null) { + $invalidProperties[] = "'solid_waste_sent_offsite' can't be null"; + } + if ($this->container['outbound_freight'] === null) { + $invalidProperties[] = "'outbound_freight' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fertiliser + * + * @return float + */ + public function getFertiliser() + { + return $this->container['fertiliser']; + } + + /** + * Sets fertiliser + * + * @param float $fertiliser Emissions from fertiliser, in tonnes-CO2e + * + * @return self + */ + public function setFertiliser($fertiliser) + { + if (is_null($fertiliser)) { + throw new \InvalidArgumentException('non-nullable fertiliser cannot be null'); + } + $this->container['fertiliser'] = $fertiliser; + + return $this; + } + + /** + * Gets herbicide + * + * @return float + */ + public function getHerbicide() + { + return $this->container['herbicide']; + } + + /** + * Sets herbicide + * + * @param float $herbicide Emissions from herbicide, in tonnes-CO2e + * + * @return self + */ + public function setHerbicide($herbicide) + { + if (is_null($herbicide)) { + throw new \InvalidArgumentException('non-nullable herbicide cannot be null'); + } + $this->container['herbicide'] = $herbicide; + + return $this; + } + + /** + * Gets electricity + * + * @return float + */ + public function getElectricity() + { + return $this->container['electricity']; + } + + /** + * Sets electricity + * + * @param float $electricity Emissions from electricity, in tonnes-CO2e + * + * @return self + */ + public function setElectricity($electricity) + { + if (is_null($electricity)) { + throw new \InvalidArgumentException('non-nullable electricity cannot be null'); + } + $this->container['electricity'] = $electricity; + + return $this; + } + + /** + * Gets fuel + * + * @return float + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param float $fuel Emissions from fuel, in tonnes-CO2e + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets lime + * + * @return float + */ + public function getLime() + { + return $this->container['lime']; + } + + /** + * Sets lime + * + * @param float $lime Emissions from lime, in tonnes-CO2e + * + * @return self + */ + public function setLime($lime) + { + if (is_null($lime)) { + throw new \InvalidArgumentException('non-nullable lime cannot be null'); + } + $this->container['lime'] = $lime; + + return $this; + } + + /** + * Gets commercial_flights + * + * @return float + */ + public function getCommercialFlights() + { + return $this->container['commercial_flights']; + } + + /** + * Sets commercial_flights + * + * @param float $commercial_flights Emissions from commercial flights, in tonnes-CO2e + * + * @return self + */ + public function setCommercialFlights($commercial_flights) + { + if (is_null($commercial_flights)) { + throw new \InvalidArgumentException('non-nullable commercial_flights cannot be null'); + } + $this->container['commercial_flights'] = $commercial_flights; + + return $this; + } + + /** + * Gets inbound_freight + * + * @return float + */ + public function getInboundFreight() + { + return $this->container['inbound_freight']; + } + + /** + * Sets inbound_freight + * + * @param float $inbound_freight Emissions from inbound freight, in tonnes-CO2e + * + * @return self + */ + public function setInboundFreight($inbound_freight) + { + if (is_null($inbound_freight)) { + throw new \InvalidArgumentException('non-nullable inbound_freight cannot be null'); + } + $this->container['inbound_freight'] = $inbound_freight; + + return $this; + } + + /** + * Gets solid_waste_sent_offsite + * + * @return float + */ + public function getSolidWasteSentOffsite() + { + return $this->container['solid_waste_sent_offsite']; + } + + /** + * Sets solid_waste_sent_offsite + * + * @param float $solid_waste_sent_offsite Emissions from solid waste sent offsite, in tonnes-CO2e + * + * @return self + */ + public function setSolidWasteSentOffsite($solid_waste_sent_offsite) + { + if (is_null($solid_waste_sent_offsite)) { + throw new \InvalidArgumentException('non-nullable solid_waste_sent_offsite cannot be null'); + } + $this->container['solid_waste_sent_offsite'] = $solid_waste_sent_offsite; + + return $this; + } + + /** + * Gets outbound_freight + * + * @return float + */ + public function getOutboundFreight() + { + return $this->container['outbound_freight']; + } + + /** + * Sets outbound_freight + * + * @param float $outbound_freight Emissions from outbound freight, in tonnes-CO2e + * + * @return self + */ + public function setOutboundFreight($outbound_freight) + { + if (is_null($outbound_freight)) { + throw new \InvalidArgumentException('non-nullable outbound_freight cannot be null'); + } + $this->container['outbound_freight'] = $outbound_freight; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 3 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostVineyardRequest.php b/examples/php-api-client/api-client/lib/Model/PostVineyardRequest.php new file mode 100644 index 00000000..8e418210 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostVineyardRequest.php @@ -0,0 +1,451 @@ + + */ +class PostVineyardRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_vineyard_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'vineyards' => '\OpenAPI\Client\Model\PostVineyardRequestVineyardsInner[]', + 'vegetation' => '\OpenAPI\Client\Model\PostVineyardRequestVegetationInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'vineyards' => null, + 'vegetation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'vineyards' => false, + 'vegetation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vineyards' => 'vineyards', + 'vegetation' => 'vegetation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vineyards' => 'setVineyards', + 'vegetation' => 'setVegetation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vineyards' => 'getVineyards', + 'vegetation' => 'getVegetation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('vineyards', $data ?? [], null); + $this->setIfExists('vegetation', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['vineyards'] === null) { + $invalidProperties[] = "'vineyards' can't be null"; + } + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vineyards + * + * @return \OpenAPI\Client\Model\PostVineyardRequestVineyardsInner[] + */ + public function getVineyards() + { + return $this->container['vineyards']; + } + + /** + * Sets vineyards + * + * @param \OpenAPI\Client\Model\PostVineyardRequestVineyardsInner[] $vineyards vineyards + * + * @return self + */ + public function setVineyards($vineyards) + { + if (is_null($vineyards)) { + throw new \InvalidArgumentException('non-nullable vineyards cannot be null'); + } + $this->container['vineyards'] = $vineyards; + + return $this; + } + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostVineyardRequestVegetationInner[] + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostVineyardRequestVegetationInner[] $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostVineyardRequestVegetationInner.php b/examples/php-api-client/api-client/lib/Model/PostVineyardRequestVegetationInner.php new file mode 100644 index 00000000..f2a85fb2 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostVineyardRequestVegetationInner.php @@ -0,0 +1,450 @@ + + */ +class PostVineyardRequestVegetationInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_vineyard_request_vegetation_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'vegetation' => '\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation', + 'allocation_to_vineyards' => 'float[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'vegetation' => null, + 'allocation_to_vineyards' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'vegetation' => false, + 'allocation_to_vineyards' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vegetation' => 'vegetation', + 'allocation_to_vineyards' => 'allocationToVineyards' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vegetation' => 'setVegetation', + 'allocation_to_vineyards' => 'setAllocationToVineyards' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vegetation' => 'getVegetation', + 'allocation_to_vineyards' => 'getAllocationToVineyards' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('vegetation', $data ?? [], null); + $this->setIfExists('allocation_to_vineyards', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['vegetation'] === null) { + $invalidProperties[] = "'vegetation' can't be null"; + } + if ($this->container['allocation_to_vineyards'] === null) { + $invalidProperties[] = "'allocation_to_vineyards' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vegetation + * + * @return \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation + */ + public function getVegetation() + { + return $this->container['vegetation']; + } + + /** + * Sets vegetation + * + * @param \OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation $vegetation vegetation + * + * @return self + */ + public function setVegetation($vegetation) + { + if (is_null($vegetation)) { + throw new \InvalidArgumentException('non-nullable vegetation cannot be null'); + } + $this->container['vegetation'] = $vegetation; + + return $this; + } + + /** + * Gets allocation_to_vineyards + * + * @return float[] + */ + public function getAllocationToVineyards() + { + return $this->container['allocation_to_vineyards']; + } + + /** + * Sets allocation_to_vineyards + * + * @param float[] $allocation_to_vineyards allocation_to_vineyards + * + * @return self + */ + public function setAllocationToVineyards($allocation_to_vineyards) + { + if (is_null($allocation_to_vineyards)) { + throw new \InvalidArgumentException('non-nullable allocation_to_vineyards cannot be null'); + } + $this->container['allocation_to_vineyards'] = $allocation_to_vineyards; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostVineyardRequestVineyardsInner.php b/examples/php-api-client/api-client/lib/Model/PostVineyardRequestVineyardsInner.php new file mode 100644 index 00000000..d1ccb685 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostVineyardRequestVineyardsInner.php @@ -0,0 +1,1396 @@ + + */ +class PostVineyardRequestVineyardsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_vineyard_request_vineyards_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'state' => 'string', + 'rainfall_above600' => 'bool', + 'irrigated' => 'bool', + 'area_planted' => 'float', + 'average_yield' => 'float', + 'non_urea_nitrogen' => 'float', + 'phosphorus_application' => 'float', + 'potassium_application' => 'float', + 'sulfur_application' => 'float', + 'urea_application' => 'float', + 'urea_ammonium_nitrate' => 'float', + 'limestone' => 'float', + 'limestone_fraction' => 'float', + 'herbicide_use' => 'float', + 'glyphosate_other_herbicide_use' => 'float', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'electricity_source' => 'string', + 'fuel' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel', + 'fluid_waste' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[]', + 'solid_waste' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste', + 'inbound_freight' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]', + 'outbound_freight' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]', + 'total_commercial_flights_km' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'state' => null, + 'rainfall_above600' => null, + 'irrigated' => null, + 'area_planted' => null, + 'average_yield' => null, + 'non_urea_nitrogen' => null, + 'phosphorus_application' => null, + 'potassium_application' => null, + 'sulfur_application' => null, + 'urea_application' => null, + 'urea_ammonium_nitrate' => null, + 'limestone' => null, + 'limestone_fraction' => null, + 'herbicide_use' => null, + 'glyphosate_other_herbicide_use' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'electricity_source' => null, + 'fuel' => null, + 'fluid_waste' => null, + 'solid_waste' => null, + 'inbound_freight' => null, + 'outbound_freight' => null, + 'total_commercial_flights_km' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'state' => false, + 'rainfall_above600' => false, + 'irrigated' => false, + 'area_planted' => false, + 'average_yield' => false, + 'non_urea_nitrogen' => false, + 'phosphorus_application' => false, + 'potassium_application' => false, + 'sulfur_application' => false, + 'urea_application' => false, + 'urea_ammonium_nitrate' => false, + 'limestone' => false, + 'limestone_fraction' => false, + 'herbicide_use' => false, + 'glyphosate_other_herbicide_use' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'electricity_source' => false, + 'fuel' => false, + 'fluid_waste' => false, + 'solid_waste' => false, + 'inbound_freight' => false, + 'outbound_freight' => false, + 'total_commercial_flights_km' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'state' => 'state', + 'rainfall_above600' => 'rainfallAbove600', + 'irrigated' => 'irrigated', + 'area_planted' => 'areaPlanted', + 'average_yield' => 'averageYield', + 'non_urea_nitrogen' => 'nonUreaNitrogen', + 'phosphorus_application' => 'phosphorusApplication', + 'potassium_application' => 'potassiumApplication', + 'sulfur_application' => 'sulfurApplication', + 'urea_application' => 'ureaApplication', + 'urea_ammonium_nitrate' => 'ureaAmmoniumNitrate', + 'limestone' => 'limestone', + 'limestone_fraction' => 'limestoneFraction', + 'herbicide_use' => 'herbicideUse', + 'glyphosate_other_herbicide_use' => 'glyphosateOtherHerbicideUse', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'electricity_source' => 'electricitySource', + 'fuel' => 'fuel', + 'fluid_waste' => 'fluidWaste', + 'solid_waste' => 'solidWaste', + 'inbound_freight' => 'inboundFreight', + 'outbound_freight' => 'outboundFreight', + 'total_commercial_flights_km' => 'totalCommercialFlightsKm' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'state' => 'setState', + 'rainfall_above600' => 'setRainfallAbove600', + 'irrigated' => 'setIrrigated', + 'area_planted' => 'setAreaPlanted', + 'average_yield' => 'setAverageYield', + 'non_urea_nitrogen' => 'setNonUreaNitrogen', + 'phosphorus_application' => 'setPhosphorusApplication', + 'potassium_application' => 'setPotassiumApplication', + 'sulfur_application' => 'setSulfurApplication', + 'urea_application' => 'setUreaApplication', + 'urea_ammonium_nitrate' => 'setUreaAmmoniumNitrate', + 'limestone' => 'setLimestone', + 'limestone_fraction' => 'setLimestoneFraction', + 'herbicide_use' => 'setHerbicideUse', + 'glyphosate_other_herbicide_use' => 'setGlyphosateOtherHerbicideUse', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'electricity_source' => 'setElectricitySource', + 'fuel' => 'setFuel', + 'fluid_waste' => 'setFluidWaste', + 'solid_waste' => 'setSolidWaste', + 'inbound_freight' => 'setInboundFreight', + 'outbound_freight' => 'setOutboundFreight', + 'total_commercial_flights_km' => 'setTotalCommercialFlightsKm' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'state' => 'getState', + 'rainfall_above600' => 'getRainfallAbove600', + 'irrigated' => 'getIrrigated', + 'area_planted' => 'getAreaPlanted', + 'average_yield' => 'getAverageYield', + 'non_urea_nitrogen' => 'getNonUreaNitrogen', + 'phosphorus_application' => 'getPhosphorusApplication', + 'potassium_application' => 'getPotassiumApplication', + 'sulfur_application' => 'getSulfurApplication', + 'urea_application' => 'getUreaApplication', + 'urea_ammonium_nitrate' => 'getUreaAmmoniumNitrate', + 'limestone' => 'getLimestone', + 'limestone_fraction' => 'getLimestoneFraction', + 'herbicide_use' => 'getHerbicideUse', + 'glyphosate_other_herbicide_use' => 'getGlyphosateOtherHerbicideUse', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'electricity_source' => 'getElectricitySource', + 'fuel' => 'getFuel', + 'fluid_waste' => 'getFluidWaste', + 'solid_waste' => 'getSolidWaste', + 'inbound_freight' => 'getInboundFreight', + 'outbound_freight' => 'getOutboundFreight', + 'total_commercial_flights_km' => 'getTotalCommercialFlightsKm' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + public const ELECTRICITY_SOURCE_STATE_GRID = 'State Grid'; + public const ELECTRICITY_SOURCE_RENEWABLE = 'Renewable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getElectricitySourceAllowableValues() + { + return [ + self::ELECTRICITY_SOURCE_STATE_GRID, + self::ELECTRICITY_SOURCE_RENEWABLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('rainfall_above600', $data ?? [], null); + $this->setIfExists('irrigated', $data ?? [], null); + $this->setIfExists('area_planted', $data ?? [], null); + $this->setIfExists('average_yield', $data ?? [], null); + $this->setIfExists('non_urea_nitrogen', $data ?? [], null); + $this->setIfExists('phosphorus_application', $data ?? [], null); + $this->setIfExists('potassium_application', $data ?? [], null); + $this->setIfExists('sulfur_application', $data ?? [], null); + $this->setIfExists('urea_application', $data ?? [], null); + $this->setIfExists('urea_ammonium_nitrate', $data ?? [], null); + $this->setIfExists('limestone', $data ?? [], null); + $this->setIfExists('limestone_fraction', $data ?? [], null); + $this->setIfExists('herbicide_use', $data ?? [], null); + $this->setIfExists('glyphosate_other_herbicide_use', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('electricity_source', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('fluid_waste', $data ?? [], null); + $this->setIfExists('solid_waste', $data ?? [], null); + $this->setIfExists('inbound_freight', $data ?? [], null); + $this->setIfExists('outbound_freight', $data ?? [], null); + $this->setIfExists('total_commercial_flights_km', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['rainfall_above600'] === null) { + $invalidProperties[] = "'rainfall_above600' can't be null"; + } + if ($this->container['irrigated'] === null) { + $invalidProperties[] = "'irrigated' can't be null"; + } + if ($this->container['area_planted'] === null) { + $invalidProperties[] = "'area_planted' can't be null"; + } + if ($this->container['average_yield'] === null) { + $invalidProperties[] = "'average_yield' can't be null"; + } + if ($this->container['non_urea_nitrogen'] === null) { + $invalidProperties[] = "'non_urea_nitrogen' can't be null"; + } + if ($this->container['phosphorus_application'] === null) { + $invalidProperties[] = "'phosphorus_application' can't be null"; + } + if ($this->container['potassium_application'] === null) { + $invalidProperties[] = "'potassium_application' can't be null"; + } + if ($this->container['sulfur_application'] === null) { + $invalidProperties[] = "'sulfur_application' can't be null"; + } + if ($this->container['urea_application'] === null) { + $invalidProperties[] = "'urea_application' can't be null"; + } + if ($this->container['urea_ammonium_nitrate'] === null) { + $invalidProperties[] = "'urea_ammonium_nitrate' can't be null"; + } + if ($this->container['limestone'] === null) { + $invalidProperties[] = "'limestone' can't be null"; + } + if ($this->container['limestone_fraction'] === null) { + $invalidProperties[] = "'limestone_fraction' can't be null"; + } + if ($this->container['herbicide_use'] === null) { + $invalidProperties[] = "'herbicide_use' can't be null"; + } + if ($this->container['glyphosate_other_herbicide_use'] === null) { + $invalidProperties[] = "'glyphosate_other_herbicide_use' can't be null"; + } + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['electricity_source'] === null) { + $invalidProperties[] = "'electricity_source' can't be null"; + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!is_null($this->container['electricity_source']) && !in_array($this->container['electricity_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'electricity_source', must be one of '%s'", + $this->container['electricity_source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['fluid_waste'] === null) { + $invalidProperties[] = "'fluid_waste' can't be null"; + } + if ($this->container['solid_waste'] === null) { + $invalidProperties[] = "'solid_waste' can't be null"; + } + if ($this->container['inbound_freight'] === null) { + $invalidProperties[] = "'inbound_freight' can't be null"; + } + if ($this->container['outbound_freight'] === null) { + $invalidProperties[] = "'outbound_freight' can't be null"; + } + if ($this->container['total_commercial_flights_km'] === null) { + $invalidProperties[] = "'total_commercial_flights_km' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets rainfall_above600 + * + * @return bool + */ + public function getRainfallAbove600() + { + return $this->container['rainfall_above600']; + } + + /** + * Sets rainfall_above600 + * + * @param bool $rainfall_above600 Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm + * + * @return self + */ + public function setRainfallAbove600($rainfall_above600) + { + if (is_null($rainfall_above600)) { + throw new \InvalidArgumentException('non-nullable rainfall_above600 cannot be null'); + } + $this->container['rainfall_above600'] = $rainfall_above600; + + return $this; + } + + /** + * Gets irrigated + * + * @return bool + */ + public function getIrrigated() + { + return $this->container['irrigated']; + } + + /** + * Sets irrigated + * + * @param bool $irrigated Is the crop irrigated? + * + * @return self + */ + public function setIrrigated($irrigated) + { + if (is_null($irrigated)) { + throw new \InvalidArgumentException('non-nullable irrigated cannot be null'); + } + $this->container['irrigated'] = $irrigated; + + return $this; + } + + /** + * Gets area_planted + * + * @return float + */ + public function getAreaPlanted() + { + return $this->container['area_planted']; + } + + /** + * Sets area_planted + * + * @param float $area_planted Area planted, in ha (hectares) + * + * @return self + */ + public function setAreaPlanted($area_planted) + { + if (is_null($area_planted)) { + throw new \InvalidArgumentException('non-nullable area_planted cannot be null'); + } + $this->container['area_planted'] = $area_planted; + + return $this; + } + + /** + * Gets average_yield + * + * @return float + */ + public function getAverageYield() + { + return $this->container['average_yield']; + } + + /** + * Sets average_yield + * + * @param float $average_yield Average yield, in t/ha (tonnes per hectare) + * + * @return self + */ + public function setAverageYield($average_yield) + { + if (is_null($average_yield)) { + throw new \InvalidArgumentException('non-nullable average_yield cannot be null'); + } + $this->container['average_yield'] = $average_yield; + + return $this; + } + + /** + * Gets non_urea_nitrogen + * + * @return float + */ + public function getNonUreaNitrogen() + { + return $this->container['non_urea_nitrogen']; + } + + /** + * Sets non_urea_nitrogen + * + * @param float $non_urea_nitrogen Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) + * + * @return self + */ + public function setNonUreaNitrogen($non_urea_nitrogen) + { + if (is_null($non_urea_nitrogen)) { + throw new \InvalidArgumentException('non-nullable non_urea_nitrogen cannot be null'); + } + $this->container['non_urea_nitrogen'] = $non_urea_nitrogen; + + return $this; + } + + /** + * Gets phosphorus_application + * + * @return float + */ + public function getPhosphorusApplication() + { + return $this->container['phosphorus_application']; + } + + /** + * Sets phosphorus_application + * + * @param float $phosphorus_application Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) + * + * @return self + */ + public function setPhosphorusApplication($phosphorus_application) + { + if (is_null($phosphorus_application)) { + throw new \InvalidArgumentException('non-nullable phosphorus_application cannot be null'); + } + $this->container['phosphorus_application'] = $phosphorus_application; + + return $this; + } + + /** + * Gets potassium_application + * + * @return float + */ + public function getPotassiumApplication() + { + return $this->container['potassium_application']; + } + + /** + * Sets potassium_application + * + * @param float $potassium_application Potassium application, in kg K/ha (kilograms of potassium per hectare) + * + * @return self + */ + public function setPotassiumApplication($potassium_application) + { + if (is_null($potassium_application)) { + throw new \InvalidArgumentException('non-nullable potassium_application cannot be null'); + } + $this->container['potassium_application'] = $potassium_application; + + return $this; + } + + /** + * Gets sulfur_application + * + * @return float + */ + public function getSulfurApplication() + { + return $this->container['sulfur_application']; + } + + /** + * Sets sulfur_application + * + * @param float $sulfur_application Sulfur application, in kg S/ha (kilograms of sulfur per hectare) + * + * @return self + */ + public function setSulfurApplication($sulfur_application) + { + if (is_null($sulfur_application)) { + throw new \InvalidArgumentException('non-nullable sulfur_application cannot be null'); + } + $this->container['sulfur_application'] = $sulfur_application; + + return $this; + } + + /** + * Gets urea_application + * + * @return float + */ + public function getUreaApplication() + { + return $this->container['urea_application']; + } + + /** + * Sets urea_application + * + * @param float $urea_application Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) + * + * @return self + */ + public function setUreaApplication($urea_application) + { + if (is_null($urea_application)) { + throw new \InvalidArgumentException('non-nullable urea_application cannot be null'); + } + $this->container['urea_application'] = $urea_application; + + return $this; + } + + /** + * Gets urea_ammonium_nitrate + * + * @return float + */ + public function getUreaAmmoniumNitrate() + { + return $this->container['urea_ammonium_nitrate']; + } + + /** + * Sets urea_ammonium_nitrate + * + * @param float $urea_ammonium_nitrate Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) + * + * @return self + */ + public function setUreaAmmoniumNitrate($urea_ammonium_nitrate) + { + if (is_null($urea_ammonium_nitrate)) { + throw new \InvalidArgumentException('non-nullable urea_ammonium_nitrate cannot be null'); + } + $this->container['urea_ammonium_nitrate'] = $urea_ammonium_nitrate; + + return $this; + } + + /** + * Gets limestone + * + * @return float + */ + public function getLimestone() + { + return $this->container['limestone']; + } + + /** + * Sets limestone + * + * @param float $limestone Lime applied in tonnes + * + * @return self + */ + public function setLimestone($limestone) + { + if (is_null($limestone)) { + throw new \InvalidArgumentException('non-nullable limestone cannot be null'); + } + $this->container['limestone'] = $limestone; + + return $this; + } + + /** + * Gets limestone_fraction + * + * @return float + */ + public function getLimestoneFraction() + { + return $this->container['limestone_fraction']; + } + + /** + * Sets limestone_fraction + * + * @param float $limestone_fraction Fraction of lime as limestone vs dolomite, between 0 and 1 + * + * @return self + */ + public function setLimestoneFraction($limestone_fraction) + { + if (is_null($limestone_fraction)) { + throw new \InvalidArgumentException('non-nullable limestone_fraction cannot be null'); + } + $this->container['limestone_fraction'] = $limestone_fraction; + + return $this; + } + + /** + * Gets herbicide_use + * + * @return float + */ + public function getHerbicideUse() + { + return $this->container['herbicide_use']; + } + + /** + * Sets herbicide_use + * + * @param float $herbicide_use Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) + * + * @return self + */ + public function setHerbicideUse($herbicide_use) + { + if (is_null($herbicide_use)) { + throw new \InvalidArgumentException('non-nullable herbicide_use cannot be null'); + } + $this->container['herbicide_use'] = $herbicide_use; + + return $this; + } + + /** + * Gets glyphosate_other_herbicide_use + * + * @return float + */ + public function getGlyphosateOtherHerbicideUse() + { + return $this->container['glyphosate_other_herbicide_use']; + } + + /** + * Sets glyphosate_other_herbicide_use + * + * @param float $glyphosate_other_herbicide_use Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) + * + * @return self + */ + public function setGlyphosateOtherHerbicideUse($glyphosate_other_herbicide_use) + { + if (is_null($glyphosate_other_herbicide_use)) { + throw new \InvalidArgumentException('non-nullable glyphosate_other_herbicide_use cannot be null'); + } + $this->container['glyphosate_other_herbicide_use'] = $glyphosate_other_herbicide_use; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostVineyardRequestVineyardsInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostVineyardRequestVineyardsInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets electricity_source + * + * @return string + */ + public function getElectricitySource() + { + return $this->container['electricity_source']; + } + + /** + * Sets electricity_source + * + * @param string $electricity_source Source of electricity + * + * @return self + */ + public function setElectricitySource($electricity_source) + { + if (is_null($electricity_source)) { + throw new \InvalidArgumentException('non-nullable electricity_source cannot be null'); + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!in_array($electricity_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'electricity_source', must be one of '%s'", + $electricity_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['electricity_source'] = $electricity_source; + + return $this; + } + + /** + * Gets fuel + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel $fuel fuel + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets fluid_waste + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[] + */ + public function getFluidWaste() + { + return $this->container['fluid_waste']; + } + + /** + * Sets fluid_waste + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[] $fluid_waste Amount of fluid waste, in kL (kilolitres) + * + * @return self + */ + public function setFluidWaste($fluid_waste) + { + if (is_null($fluid_waste)) { + throw new \InvalidArgumentException('non-nullable fluid_waste cannot be null'); + } + $this->container['fluid_waste'] = $fluid_waste; + + return $this; + } + + /** + * Gets solid_waste + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste + */ + public function getSolidWaste() + { + return $this->container['solid_waste']; + } + + /** + * Sets solid_waste + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste $solid_waste solid_waste + * + * @return self + */ + public function setSolidWaste($solid_waste) + { + if (is_null($solid_waste)) { + throw new \InvalidArgumentException('non-nullable solid_waste cannot be null'); + } + $this->container['solid_waste'] = $solid_waste; + + return $this; + } + + /** + * Gets inbound_freight + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[] + */ + public function getInboundFreight() + { + return $this->container['inbound_freight']; + } + + /** + * Sets inbound_freight + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[] $inbound_freight Services used to transport goods to the enterprise + * + * @return self + */ + public function setInboundFreight($inbound_freight) + { + if (is_null($inbound_freight)) { + throw new \InvalidArgumentException('non-nullable inbound_freight cannot be null'); + } + $this->container['inbound_freight'] = $inbound_freight; + + return $this; + } + + /** + * Gets outbound_freight + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[] + */ + public function getOutboundFreight() + { + return $this->container['outbound_freight']; + } + + /** + * Sets outbound_freight + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[] $outbound_freight Services used to transport goods from the enterprise + * + * @return self + */ + public function setOutboundFreight($outbound_freight) + { + if (is_null($outbound_freight)) { + throw new \InvalidArgumentException('non-nullable outbound_freight cannot be null'); + } + $this->container['outbound_freight'] = $outbound_freight; + + return $this; + } + + /** + * Gets total_commercial_flights_km + * + * @return float + */ + public function getTotalCommercialFlightsKm() + { + return $this->container['total_commercial_flights_km']; + } + + /** + * Sets total_commercial_flights_km + * + * @param float $total_commercial_flights_km Total distance of commercial flights, in km (kilometers) + * + * @return self + */ + public function setTotalCommercialFlightsKm($total_commercial_flights_km) + { + if (is_null($total_commercial_flights_km)) { + throw new \InvalidArgumentException('non-nullable total_commercial_flights_km cannot be null'); + } + $this->container['total_commercial_flights_km'] = $total_commercial_flights_km; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200Response.php b/examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200Response.php new file mode 100644 index 00000000..203e51ec --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200Response.php @@ -0,0 +1,673 @@ + + */ +class PostWildcatchfishery200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildcatchfishery_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostWildcatchfishery200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope3', + 'purchased_offsets' => '\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntensities', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration', + 'intermediate' => '\OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntermediateInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'purchased_offsets' => null, + 'net' => null, + 'intensities' => null, + 'carbon_sequestration' => null, + 'intermediate' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'purchased_offsets' => false, + 'net' => false, + 'intensities' => false, + 'carbon_sequestration' => false, + 'intermediate' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'purchased_offsets' => 'purchasedOffsets', + 'net' => 'net', + 'intensities' => 'intensities', + 'carbon_sequestration' => 'carbonSequestration', + 'intermediate' => 'intermediate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'purchased_offsets' => 'setPurchasedOffsets', + 'net' => 'setNet', + 'intensities' => 'setIntensities', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intermediate' => 'setIntermediate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'purchased_offsets' => 'getPurchasedOffsets', + 'net' => 'getNet', + 'intensities' => 'getIntensities', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intermediate' => 'getIntermediate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('purchased_offsets', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['purchased_offsets'] === null) { + $invalidProperties[] = "'purchased_offsets' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostWildcatchfishery200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostWildcatchfishery200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets purchased_offsets + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets + */ + public function getPurchasedOffsets() + { + return $this->container['purchased_offsets']; + } + + /** + * Sets purchased_offsets + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets $purchased_offsets purchased_offsets + * + * @return self + */ + public function setPurchasedOffsets($purchased_offsets) + { + if (is_null($purchased_offsets)) { + throw new \InvalidArgumentException('non-nullable purchased_offsets cannot be null'); + } + $this->container['purchased_offsets'] = $purchased_offsets; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200ResponseIntensities.php b/examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200ResponseIntensities.php new file mode 100644 index 00000000..266ec80a --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200ResponseIntensities.php @@ -0,0 +1,487 @@ + + */ +class PostWildcatchfishery200ResponseIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildcatchfishery_200_response_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total_harvest_weight_kg' => 'float', + 'wild_catch_fishery_excluding_carbon_offsets' => 'float', + 'wild_catch_fishery_including_carbon_offsets' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total_harvest_weight_kg' => null, + 'wild_catch_fishery_excluding_carbon_offsets' => null, + 'wild_catch_fishery_including_carbon_offsets' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total_harvest_weight_kg' => false, + 'wild_catch_fishery_excluding_carbon_offsets' => false, + 'wild_catch_fishery_including_carbon_offsets' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total_harvest_weight_kg' => 'totalHarvestWeightKg', + 'wild_catch_fishery_excluding_carbon_offsets' => 'wildCatchFisheryExcludingCarbonOffsets', + 'wild_catch_fishery_including_carbon_offsets' => 'wildCatchFisheryIncludingCarbonOffsets' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total_harvest_weight_kg' => 'setTotalHarvestWeightKg', + 'wild_catch_fishery_excluding_carbon_offsets' => 'setWildCatchFisheryExcludingCarbonOffsets', + 'wild_catch_fishery_including_carbon_offsets' => 'setWildCatchFisheryIncludingCarbonOffsets' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total_harvest_weight_kg' => 'getTotalHarvestWeightKg', + 'wild_catch_fishery_excluding_carbon_offsets' => 'getWildCatchFisheryExcludingCarbonOffsets', + 'wild_catch_fishery_including_carbon_offsets' => 'getWildCatchFisheryIncludingCarbonOffsets' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total_harvest_weight_kg', $data ?? [], null); + $this->setIfExists('wild_catch_fishery_excluding_carbon_offsets', $data ?? [], null); + $this->setIfExists('wild_catch_fishery_including_carbon_offsets', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total_harvest_weight_kg'] === null) { + $invalidProperties[] = "'total_harvest_weight_kg' can't be null"; + } + if ($this->container['wild_catch_fishery_excluding_carbon_offsets'] === null) { + $invalidProperties[] = "'wild_catch_fishery_excluding_carbon_offsets' can't be null"; + } + if ($this->container['wild_catch_fishery_including_carbon_offsets'] === null) { + $invalidProperties[] = "'wild_catch_fishery_including_carbon_offsets' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total_harvest_weight_kg + * + * @return float + */ + public function getTotalHarvestWeightKg() + { + return $this->container['total_harvest_weight_kg']; + } + + /** + * Sets total_harvest_weight_kg + * + * @param float $total_harvest_weight_kg Total harvest weight in kg + * + * @return self + */ + public function setTotalHarvestWeightKg($total_harvest_weight_kg) + { + if (is_null($total_harvest_weight_kg)) { + throw new \InvalidArgumentException('non-nullable total_harvest_weight_kg cannot be null'); + } + $this->container['total_harvest_weight_kg'] = $total_harvest_weight_kg; + + return $this; + } + + /** + * Gets wild_catch_fishery_excluding_carbon_offsets + * + * @return float + */ + public function getWildCatchFisheryExcludingCarbonOffsets() + { + return $this->container['wild_catch_fishery_excluding_carbon_offsets']; + } + + /** + * Sets wild_catch_fishery_excluding_carbon_offsets + * + * @param float $wild_catch_fishery_excluding_carbon_offsets Wild catch fishery emissions intensity excluding sequestration, in kg-CO2e/kg harvest weight + * + * @return self + */ + public function setWildCatchFisheryExcludingCarbonOffsets($wild_catch_fishery_excluding_carbon_offsets) + { + if (is_null($wild_catch_fishery_excluding_carbon_offsets)) { + throw new \InvalidArgumentException('non-nullable wild_catch_fishery_excluding_carbon_offsets cannot be null'); + } + $this->container['wild_catch_fishery_excluding_carbon_offsets'] = $wild_catch_fishery_excluding_carbon_offsets; + + return $this; + } + + /** + * Gets wild_catch_fishery_including_carbon_offsets + * + * @return float + */ + public function getWildCatchFisheryIncludingCarbonOffsets() + { + return $this->container['wild_catch_fishery_including_carbon_offsets']; + } + + /** + * Sets wild_catch_fishery_including_carbon_offsets + * + * @param float $wild_catch_fishery_including_carbon_offsets Wild catch fishery emissions intensity including sequestration, in kg-CO2e/kg harvest weight + * + * @return self + */ + public function setWildCatchFisheryIncludingCarbonOffsets($wild_catch_fishery_including_carbon_offsets) + { + if (is_null($wild_catch_fishery_including_carbon_offsets)) { + throw new \InvalidArgumentException('non-nullable wild_catch_fishery_including_carbon_offsets cannot be null'); + } + $this->container['wild_catch_fishery_including_carbon_offsets'] = $wild_catch_fishery_including_carbon_offsets; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200ResponseIntermediateInner.php new file mode 100644 index 00000000..3283b129 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200ResponseIntermediateInner.php @@ -0,0 +1,636 @@ + + */ +class PostWildcatchfishery200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildcatchfishery_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostWildcatchfishery200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope3', + 'intensities' => '\OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntensities', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet', + 'carbon_sequestration' => '\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'intensities' => null, + 'net' => null, + 'carbon_sequestration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'intensities' => false, + 'net' => false, + 'carbon_sequestration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'intensities' => 'intensities', + 'net' => 'net', + 'carbon_sequestration' => 'carbonSequestration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'intensities' => 'setIntensities', + 'net' => 'setNet', + 'carbon_sequestration' => 'setCarbonSequestration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'intensities' => 'getIntensities', + 'net' => 'getNet', + 'carbon_sequestration' => 'getCarbonSequestration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostWildcatchfishery200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostWildcatchfishery200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration $carbon_sequestration carbon_sequestration + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200ResponseScope1.php b/examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200ResponseScope1.php new file mode 100644 index 00000000..a934b098 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildcatchfishery200ResponseScope1.php @@ -0,0 +1,784 @@ + + */ +class PostWildcatchfishery200ResponseScope1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildcatchfishery_200_response_scope1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel_co2' => 'float', + 'fuel_ch4' => 'float', + 'fuel_n2_o' => 'float', + 'waste_water_co2' => 'float', + 'composted_solid_waste_co2' => 'float', + 'hfcs_refrigerant_leakage' => 'float', + 'total_co2' => 'float', + 'total_ch4' => 'float', + 'total_n2_o' => 'float', + 'total_hfcs' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel_co2' => null, + 'fuel_ch4' => null, + 'fuel_n2_o' => null, + 'waste_water_co2' => null, + 'composted_solid_waste_co2' => null, + 'hfcs_refrigerant_leakage' => null, + 'total_co2' => null, + 'total_ch4' => null, + 'total_n2_o' => null, + 'total_hfcs' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel_co2' => false, + 'fuel_ch4' => false, + 'fuel_n2_o' => false, + 'waste_water_co2' => false, + 'composted_solid_waste_co2' => false, + 'hfcs_refrigerant_leakage' => false, + 'total_co2' => false, + 'total_ch4' => false, + 'total_n2_o' => false, + 'total_hfcs' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel_co2' => 'fuelCO2', + 'fuel_ch4' => 'fuelCH4', + 'fuel_n2_o' => 'fuelN2O', + 'waste_water_co2' => 'wasteWaterCO2', + 'composted_solid_waste_co2' => 'compostedSolidWasteCO2', + 'hfcs_refrigerant_leakage' => 'hfcsRefrigerantLeakage', + 'total_co2' => 'totalCO2', + 'total_ch4' => 'totalCH4', + 'total_n2_o' => 'totalN2O', + 'total_hfcs' => 'totalHFCs', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel_co2' => 'setFuelCo2', + 'fuel_ch4' => 'setFuelCh4', + 'fuel_n2_o' => 'setFuelN2O', + 'waste_water_co2' => 'setWasteWaterCo2', + 'composted_solid_waste_co2' => 'setCompostedSolidWasteCo2', + 'hfcs_refrigerant_leakage' => 'setHfcsRefrigerantLeakage', + 'total_co2' => 'setTotalCo2', + 'total_ch4' => 'setTotalCh4', + 'total_n2_o' => 'setTotalN2O', + 'total_hfcs' => 'setTotalHfcs', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel_co2' => 'getFuelCo2', + 'fuel_ch4' => 'getFuelCh4', + 'fuel_n2_o' => 'getFuelN2O', + 'waste_water_co2' => 'getWasteWaterCo2', + 'composted_solid_waste_co2' => 'getCompostedSolidWasteCo2', + 'hfcs_refrigerant_leakage' => 'getHfcsRefrigerantLeakage', + 'total_co2' => 'getTotalCo2', + 'total_ch4' => 'getTotalCh4', + 'total_n2_o' => 'getTotalN2O', + 'total_hfcs' => 'getTotalHfcs', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel_co2', $data ?? [], null); + $this->setIfExists('fuel_ch4', $data ?? [], null); + $this->setIfExists('fuel_n2_o', $data ?? [], null); + $this->setIfExists('waste_water_co2', $data ?? [], null); + $this->setIfExists('composted_solid_waste_co2', $data ?? [], null); + $this->setIfExists('hfcs_refrigerant_leakage', $data ?? [], null); + $this->setIfExists('total_co2', $data ?? [], null); + $this->setIfExists('total_ch4', $data ?? [], null); + $this->setIfExists('total_n2_o', $data ?? [], null); + $this->setIfExists('total_hfcs', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel_co2'] === null) { + $invalidProperties[] = "'fuel_co2' can't be null"; + } + if ($this->container['fuel_ch4'] === null) { + $invalidProperties[] = "'fuel_ch4' can't be null"; + } + if ($this->container['fuel_n2_o'] === null) { + $invalidProperties[] = "'fuel_n2_o' can't be null"; + } + if ($this->container['waste_water_co2'] === null) { + $invalidProperties[] = "'waste_water_co2' can't be null"; + } + if ($this->container['composted_solid_waste_co2'] === null) { + $invalidProperties[] = "'composted_solid_waste_co2' can't be null"; + } + if ($this->container['hfcs_refrigerant_leakage'] === null) { + $invalidProperties[] = "'hfcs_refrigerant_leakage' can't be null"; + } + if ($this->container['total_co2'] === null) { + $invalidProperties[] = "'total_co2' can't be null"; + } + if ($this->container['total_ch4'] === null) { + $invalidProperties[] = "'total_ch4' can't be null"; + } + if ($this->container['total_n2_o'] === null) { + $invalidProperties[] = "'total_n2_o' can't be null"; + } + if ($this->container['total_hfcs'] === null) { + $invalidProperties[] = "'total_hfcs' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel_co2 + * + * @return float + */ + public function getFuelCo2() + { + return $this->container['fuel_co2']; + } + + /** + * Sets fuel_co2 + * + * @param float $fuel_co2 CO2 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCo2($fuel_co2) + { + if (is_null($fuel_co2)) { + throw new \InvalidArgumentException('non-nullable fuel_co2 cannot be null'); + } + $this->container['fuel_co2'] = $fuel_co2; + + return $this; + } + + /** + * Gets fuel_ch4 + * + * @return float + */ + public function getFuelCh4() + { + return $this->container['fuel_ch4']; + } + + /** + * Sets fuel_ch4 + * + * @param float $fuel_ch4 CH4 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCh4($fuel_ch4) + { + if (is_null($fuel_ch4)) { + throw new \InvalidArgumentException('non-nullable fuel_ch4 cannot be null'); + } + $this->container['fuel_ch4'] = $fuel_ch4; + + return $this; + } + + /** + * Gets fuel_n2_o + * + * @return float + */ + public function getFuelN2O() + { + return $this->container['fuel_n2_o']; + } + + /** + * Sets fuel_n2_o + * + * @param float $fuel_n2_o N2O emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelN2O($fuel_n2_o) + { + if (is_null($fuel_n2_o)) { + throw new \InvalidArgumentException('non-nullable fuel_n2_o cannot be null'); + } + $this->container['fuel_n2_o'] = $fuel_n2_o; + + return $this; + } + + /** + * Gets waste_water_co2 + * + * @return float + */ + public function getWasteWaterCo2() + { + return $this->container['waste_water_co2']; + } + + /** + * Sets waste_water_co2 + * + * @param float $waste_water_co2 Emissions from wastewater, in tonnes-CO2e + * + * @return self + */ + public function setWasteWaterCo2($waste_water_co2) + { + if (is_null($waste_water_co2)) { + throw new \InvalidArgumentException('non-nullable waste_water_co2 cannot be null'); + } + $this->container['waste_water_co2'] = $waste_water_co2; + + return $this; + } + + /** + * Gets composted_solid_waste_co2 + * + * @return float + */ + public function getCompostedSolidWasteCo2() + { + return $this->container['composted_solid_waste_co2']; + } + + /** + * Sets composted_solid_waste_co2 + * + * @param float $composted_solid_waste_co2 Emissions from composted solid waste, in tonnes-CO2e + * + * @return self + */ + public function setCompostedSolidWasteCo2($composted_solid_waste_co2) + { + if (is_null($composted_solid_waste_co2)) { + throw new \InvalidArgumentException('non-nullable composted_solid_waste_co2 cannot be null'); + } + $this->container['composted_solid_waste_co2'] = $composted_solid_waste_co2; + + return $this; + } + + /** + * Gets hfcs_refrigerant_leakage + * + * @return float + */ + public function getHfcsRefrigerantLeakage() + { + return $this->container['hfcs_refrigerant_leakage']; + } + + /** + * Sets hfcs_refrigerant_leakage + * + * @param float $hfcs_refrigerant_leakage Emissions from refrigerant leakage, in tonnes-HFCs + * + * @return self + */ + public function setHfcsRefrigerantLeakage($hfcs_refrigerant_leakage) + { + if (is_null($hfcs_refrigerant_leakage)) { + throw new \InvalidArgumentException('non-nullable hfcs_refrigerant_leakage cannot be null'); + } + $this->container['hfcs_refrigerant_leakage'] = $hfcs_refrigerant_leakage; + + return $this; + } + + /** + * Gets total_co2 + * + * @return float + */ + public function getTotalCo2() + { + return $this->container['total_co2']; + } + + /** + * Sets total_co2 + * + * @param float $total_co2 Total CO2 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCo2($total_co2) + { + if (is_null($total_co2)) { + throw new \InvalidArgumentException('non-nullable total_co2 cannot be null'); + } + $this->container['total_co2'] = $total_co2; + + return $this; + } + + /** + * Gets total_ch4 + * + * @return float + */ + public function getTotalCh4() + { + return $this->container['total_ch4']; + } + + /** + * Sets total_ch4 + * + * @param float $total_ch4 Total CH4 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCh4($total_ch4) + { + if (is_null($total_ch4)) { + throw new \InvalidArgumentException('non-nullable total_ch4 cannot be null'); + } + $this->container['total_ch4'] = $total_ch4; + + return $this; + } + + /** + * Gets total_n2_o + * + * @return float + */ + public function getTotalN2O() + { + return $this->container['total_n2_o']; + } + + /** + * Sets total_n2_o + * + * @param float $total_n2_o Total N2O scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalN2O($total_n2_o) + { + if (is_null($total_n2_o)) { + throw new \InvalidArgumentException('non-nullable total_n2_o cannot be null'); + } + $this->container['total_n2_o'] = $total_n2_o; + + return $this; + } + + /** + * Gets total_hfcs + * + * @return float + */ + public function getTotalHfcs() + { + return $this->container['total_hfcs']; + } + + /** + * Sets total_hfcs + * + * @param float $total_hfcs Total HFCs scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalHfcs($total_hfcs) + { + if (is_null($total_hfcs)) { + throw new \InvalidArgumentException('non-nullable total_hfcs cannot be null'); + } + $this->container['total_hfcs'] = $total_hfcs; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildcatchfisheryRequest.php b/examples/php-api-client/api-client/lib/Model/PostWildcatchfisheryRequest.php new file mode 100644 index 00000000..9748c334 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildcatchfisheryRequest.php @@ -0,0 +1,414 @@ + + */ +class PostWildcatchfisheryRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildcatchfishery_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'enterprises' => '\OpenAPI\Client\Model\PostWildcatchfisheryRequestEnterprisesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'enterprises' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'enterprises' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'enterprises' => 'enterprises' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enterprises' => 'setEnterprises' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enterprises' => 'getEnterprises' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('enterprises', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['enterprises'] === null) { + $invalidProperties[] = "'enterprises' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets enterprises + * + * @return \OpenAPI\Client\Model\PostWildcatchfisheryRequestEnterprisesInner[] + */ + public function getEnterprises() + { + return $this->container['enterprises']; + } + + /** + * Sets enterprises + * + * @param \OpenAPI\Client\Model\PostWildcatchfisheryRequestEnterprisesInner[] $enterprises enterprises + * + * @return self + */ + public function setEnterprises($enterprises) + { + if (is_null($enterprises)) { + throw new \InvalidArgumentException('non-nullable enterprises cannot be null'); + } + $this->container['enterprises'] = $enterprises; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildcatchfisheryRequestEnterprisesInner.php b/examples/php-api-client/api-client/lib/Model/PostWildcatchfisheryRequestEnterprisesInner.php new file mode 100644 index 00000000..f8655222 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildcatchfisheryRequestEnterprisesInner.php @@ -0,0 +1,1154 @@ + + */ +class PostWildcatchfisheryRequestEnterprisesInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildcatchfishery_request_enterprises_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'state' => 'string', + 'production_system' => 'string', + 'total_harvest_kg' => 'float', + 'refrigerants' => '\OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[]', + 'bait' => '\OpenAPI\Client\Model\PostWildcatchfisheryRequestEnterprisesInnerBaitInner[]', + 'custom_bait' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerCustomBaitInner[]', + 'inbound_freight' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]', + 'outbound_freight' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]', + 'total_commercial_flights_km' => 'float', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'electricity_source' => 'string', + 'fuel' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel', + 'fluid_waste' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[]', + 'solid_waste' => '\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste', + 'carbon_offsets' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'state' => null, + 'production_system' => null, + 'total_harvest_kg' => null, + 'refrigerants' => null, + 'bait' => null, + 'custom_bait' => null, + 'inbound_freight' => null, + 'outbound_freight' => null, + 'total_commercial_flights_km' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'electricity_source' => null, + 'fuel' => null, + 'fluid_waste' => null, + 'solid_waste' => null, + 'carbon_offsets' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'state' => false, + 'production_system' => false, + 'total_harvest_kg' => false, + 'refrigerants' => false, + 'bait' => false, + 'custom_bait' => false, + 'inbound_freight' => false, + 'outbound_freight' => false, + 'total_commercial_flights_km' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'electricity_source' => false, + 'fuel' => false, + 'fluid_waste' => false, + 'solid_waste' => false, + 'carbon_offsets' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'state' => 'state', + 'production_system' => 'productionSystem', + 'total_harvest_kg' => 'totalHarvestKg', + 'refrigerants' => 'refrigerants', + 'bait' => 'bait', + 'custom_bait' => 'customBait', + 'inbound_freight' => 'inboundFreight', + 'outbound_freight' => 'outboundFreight', + 'total_commercial_flights_km' => 'totalCommercialFlightsKm', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'electricity_source' => 'electricitySource', + 'fuel' => 'fuel', + 'fluid_waste' => 'fluidWaste', + 'solid_waste' => 'solidWaste', + 'carbon_offsets' => 'carbonOffsets' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'state' => 'setState', + 'production_system' => 'setProductionSystem', + 'total_harvest_kg' => 'setTotalHarvestKg', + 'refrigerants' => 'setRefrigerants', + 'bait' => 'setBait', + 'custom_bait' => 'setCustomBait', + 'inbound_freight' => 'setInboundFreight', + 'outbound_freight' => 'setOutboundFreight', + 'total_commercial_flights_km' => 'setTotalCommercialFlightsKm', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'electricity_source' => 'setElectricitySource', + 'fuel' => 'setFuel', + 'fluid_waste' => 'setFluidWaste', + 'solid_waste' => 'setSolidWaste', + 'carbon_offsets' => 'setCarbonOffsets' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'state' => 'getState', + 'production_system' => 'getProductionSystem', + 'total_harvest_kg' => 'getTotalHarvestKg', + 'refrigerants' => 'getRefrigerants', + 'bait' => 'getBait', + 'custom_bait' => 'getCustomBait', + 'inbound_freight' => 'getInboundFreight', + 'outbound_freight' => 'getOutboundFreight', + 'total_commercial_flights_km' => 'getTotalCommercialFlightsKm', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'electricity_source' => 'getElectricitySource', + 'fuel' => 'getFuel', + 'fluid_waste' => 'getFluidWaste', + 'solid_waste' => 'getSolidWaste', + 'carbon_offsets' => 'getCarbonOffsets' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + public const PRODUCTION_SYSTEM_ABALONE = 'Abalone'; + public const PRODUCTION_SYSTEM_CRAB_FISHING = 'Crab Fishing'; + public const PRODUCTION_SYSTEM_DEMERSAL_TRAWL = 'Demersal Trawl'; + public const PRODUCTION_SYSTEM_GILLNET = 'Gillnet'; + public const PRODUCTION_SYSTEM_HANDLINE = 'Handline'; + public const PRODUCTION_SYSTEM_LOBSTER_POT = 'Lobster Pot'; + public const PRODUCTION_SYSTEM_LONGLINE = 'Longline'; + public const PRODUCTION_SYSTEM_NORTHERN_FISH_TRAP = 'Northern Fish Trap'; + public const PRODUCTION_SYSTEM_NORTHERN_PRAWN_TRAWL = 'Northern Prawn trawl'; + public const PRODUCTION_SYSTEM_OTTER_BOARD_TRAWL = 'Otter Board Trawl'; + public const PRODUCTION_SYSTEM_PRAWN_TRAWL_AUSTRALIAN_AVERAGE = 'Prawn trawl Australian average'; + public const PRODUCTION_SYSTEM_PURSE_SEINE = 'Purse seine'; + public const PRODUCTION_SYSTEM_SOUTHERN_OCEAN_LONGLINE = 'Southern Ocean Longline'; + public const ELECTRICITY_SOURCE_STATE_GRID = 'State Grid'; + public const ELECTRICITY_SOURCE_RENEWABLE = 'Renewable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getProductionSystemAllowableValues() + { + return [ + self::PRODUCTION_SYSTEM_ABALONE, + self::PRODUCTION_SYSTEM_CRAB_FISHING, + self::PRODUCTION_SYSTEM_DEMERSAL_TRAWL, + self::PRODUCTION_SYSTEM_GILLNET, + self::PRODUCTION_SYSTEM_HANDLINE, + self::PRODUCTION_SYSTEM_LOBSTER_POT, + self::PRODUCTION_SYSTEM_LONGLINE, + self::PRODUCTION_SYSTEM_NORTHERN_FISH_TRAP, + self::PRODUCTION_SYSTEM_NORTHERN_PRAWN_TRAWL, + self::PRODUCTION_SYSTEM_OTTER_BOARD_TRAWL, + self::PRODUCTION_SYSTEM_PRAWN_TRAWL_AUSTRALIAN_AVERAGE, + self::PRODUCTION_SYSTEM_PURSE_SEINE, + self::PRODUCTION_SYSTEM_SOUTHERN_OCEAN_LONGLINE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getElectricitySourceAllowableValues() + { + return [ + self::ELECTRICITY_SOURCE_STATE_GRID, + self::ELECTRICITY_SOURCE_RENEWABLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('production_system', $data ?? [], null); + $this->setIfExists('total_harvest_kg', $data ?? [], null); + $this->setIfExists('refrigerants', $data ?? [], null); + $this->setIfExists('bait', $data ?? [], null); + $this->setIfExists('custom_bait', $data ?? [], null); + $this->setIfExists('inbound_freight', $data ?? [], null); + $this->setIfExists('outbound_freight', $data ?? [], null); + $this->setIfExists('total_commercial_flights_km', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('electricity_source', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('fluid_waste', $data ?? [], null); + $this->setIfExists('solid_waste', $data ?? [], null); + $this->setIfExists('carbon_offsets', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['production_system'] === null) { + $invalidProperties[] = "'production_system' can't be null"; + } + $allowedValues = $this->getProductionSystemAllowableValues(); + if (!is_null($this->container['production_system']) && !in_array($this->container['production_system'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'production_system', must be one of '%s'", + $this->container['production_system'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['total_harvest_kg'] === null) { + $invalidProperties[] = "'total_harvest_kg' can't be null"; + } + if ($this->container['refrigerants'] === null) { + $invalidProperties[] = "'refrigerants' can't be null"; + } + if ($this->container['bait'] === null) { + $invalidProperties[] = "'bait' can't be null"; + } + if ($this->container['custom_bait'] === null) { + $invalidProperties[] = "'custom_bait' can't be null"; + } + if ($this->container['inbound_freight'] === null) { + $invalidProperties[] = "'inbound_freight' can't be null"; + } + if ($this->container['outbound_freight'] === null) { + $invalidProperties[] = "'outbound_freight' can't be null"; + } + if ($this->container['total_commercial_flights_km'] === null) { + $invalidProperties[] = "'total_commercial_flights_km' can't be null"; + } + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['electricity_source'] === null) { + $invalidProperties[] = "'electricity_source' can't be null"; + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!is_null($this->container['electricity_source']) && !in_array($this->container['electricity_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'electricity_source', must be one of '%s'", + $this->container['electricity_source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['fluid_waste'] === null) { + $invalidProperties[] = "'fluid_waste' can't be null"; + } + if ($this->container['solid_waste'] === null) { + $invalidProperties[] = "'solid_waste' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets production_system + * + * @return string + */ + public function getProductionSystem() + { + return $this->container['production_system']; + } + + /** + * Sets production_system + * + * @param string $production_system Production system of the wild catch fishery enterprise + * + * @return self + */ + public function setProductionSystem($production_system) + { + if (is_null($production_system)) { + throw new \InvalidArgumentException('non-nullable production_system cannot be null'); + } + $allowedValues = $this->getProductionSystemAllowableValues(); + if (!in_array($production_system, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'production_system', must be one of '%s'", + $production_system, + implode("', '", $allowedValues) + ) + ); + } + $this->container['production_system'] = $production_system; + + return $this; + } + + /** + * Gets total_harvest_kg + * + * @return float + */ + public function getTotalHarvestKg() + { + return $this->container['total_harvest_kg']; + } + + /** + * Sets total_harvest_kg + * + * @param float $total_harvest_kg Total harvest in kg + * + * @return self + */ + public function setTotalHarvestKg($total_harvest_kg) + { + if (is_null($total_harvest_kg)) { + throw new \InvalidArgumentException('non-nullable total_harvest_kg cannot be null'); + } + $this->container['total_harvest_kg'] = $total_harvest_kg; + + return $this; + } + + /** + * Gets refrigerants + * + * @return \OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[] + */ + public function getRefrigerants() + { + return $this->container['refrigerants']; + } + + /** + * Sets refrigerants + * + * @param \OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[] $refrigerants Refrigerant type + * + * @return self + */ + public function setRefrigerants($refrigerants) + { + if (is_null($refrigerants)) { + throw new \InvalidArgumentException('non-nullable refrigerants cannot be null'); + } + $this->container['refrigerants'] = $refrigerants; + + return $this; + } + + /** + * Gets bait + * + * @return \OpenAPI\Client\Model\PostWildcatchfisheryRequestEnterprisesInnerBaitInner[] + */ + public function getBait() + { + return $this->container['bait']; + } + + /** + * Sets bait + * + * @param \OpenAPI\Client\Model\PostWildcatchfisheryRequestEnterprisesInnerBaitInner[] $bait Bait purchases + * + * @return self + */ + public function setBait($bait) + { + if (is_null($bait)) { + throw new \InvalidArgumentException('non-nullable bait cannot be null'); + } + $this->container['bait'] = $bait; + + return $this; + } + + /** + * Gets custom_bait + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerCustomBaitInner[] + */ + public function getCustomBait() + { + return $this->container['custom_bait']; + } + + /** + * Sets custom_bait + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerCustomBaitInner[] $custom_bait Custom bait purchases + * + * @return self + */ + public function setCustomBait($custom_bait) + { + if (is_null($custom_bait)) { + throw new \InvalidArgumentException('non-nullable custom_bait cannot be null'); + } + $this->container['custom_bait'] = $custom_bait; + + return $this; + } + + /** + * Gets inbound_freight + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[] + */ + public function getInboundFreight() + { + return $this->container['inbound_freight']; + } + + /** + * Sets inbound_freight + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[] $inbound_freight Services used to transport goods to the enterprise + * + * @return self + */ + public function setInboundFreight($inbound_freight) + { + if (is_null($inbound_freight)) { + throw new \InvalidArgumentException('non-nullable inbound_freight cannot be null'); + } + $this->container['inbound_freight'] = $inbound_freight; + + return $this; + } + + /** + * Gets outbound_freight + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[] + */ + public function getOutboundFreight() + { + return $this->container['outbound_freight']; + } + + /** + * Sets outbound_freight + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[] $outbound_freight Services used to transport goods from the enterprise + * + * @return self + */ + public function setOutboundFreight($outbound_freight) + { + if (is_null($outbound_freight)) { + throw new \InvalidArgumentException('non-nullable outbound_freight cannot be null'); + } + $this->container['outbound_freight'] = $outbound_freight; + + return $this; + } + + /** + * Gets total_commercial_flights_km + * + * @return float + */ + public function getTotalCommercialFlightsKm() + { + return $this->container['total_commercial_flights_km']; + } + + /** + * Sets total_commercial_flights_km + * + * @param float $total_commercial_flights_km Total distance of commercial flights, in km (kilometers) + * + * @return self + */ + public function setTotalCommercialFlightsKm($total_commercial_flights_km) + { + if (is_null($total_commercial_flights_km)) { + throw new \InvalidArgumentException('non-nullable total_commercial_flights_km cannot be null'); + } + $this->container['total_commercial_flights_km'] = $total_commercial_flights_km; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostWildcatchfisheryRequestEnterprisesInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostWildcatchfisheryRequestEnterprisesInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets electricity_source + * + * @return string + */ + public function getElectricitySource() + { + return $this->container['electricity_source']; + } + + /** + * Sets electricity_source + * + * @param string $electricity_source Source of electricity + * + * @return self + */ + public function setElectricitySource($electricity_source) + { + if (is_null($electricity_source)) { + throw new \InvalidArgumentException('non-nullable electricity_source cannot be null'); + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!in_array($electricity_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'electricity_source', must be one of '%s'", + $electricity_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['electricity_source'] = $electricity_source; + + return $this; + } + + /** + * Gets fuel + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel $fuel fuel + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets fluid_waste + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[] + */ + public function getFluidWaste() + { + return $this->container['fluid_waste']; + } + + /** + * Sets fluid_waste + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[] $fluid_waste Amount of fluid waste, in kL (kilolitres) + * + * @return self + */ + public function setFluidWaste($fluid_waste) + { + if (is_null($fluid_waste)) { + throw new \InvalidArgumentException('non-nullable fluid_waste cannot be null'); + } + $this->container['fluid_waste'] = $fluid_waste; + + return $this; + } + + /** + * Gets solid_waste + * + * @return \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste + */ + public function getSolidWaste() + { + return $this->container['solid_waste']; + } + + /** + * Sets solid_waste + * + * @param \OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste $solid_waste solid_waste + * + * @return self + */ + public function setSolidWaste($solid_waste) + { + if (is_null($solid_waste)) { + throw new \InvalidArgumentException('non-nullable solid_waste cannot be null'); + } + $this->container['solid_waste'] = $solid_waste; + + return $this; + } + + /** + * Gets carbon_offsets + * + * @return float|null + */ + public function getCarbonOffsets() + { + return $this->container['carbon_offsets']; + } + + /** + * Sets carbon_offsets + * + * @param float|null $carbon_offsets Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) + * + * @return self + */ + public function setCarbonOffsets($carbon_offsets) + { + if (is_null($carbon_offsets)) { + throw new \InvalidArgumentException('non-nullable carbon_offsets cannot be null'); + } + $this->container['carbon_offsets'] = $carbon_offsets; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.php b/examples/php-api-client/api-client/lib/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.php new file mode 100644 index 00000000..ac5ca0c1 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.php @@ -0,0 +1,580 @@ + + */ +class PostWildcatchfisheryRequestEnterprisesInnerBaitInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildcatchfishery_request_enterprises_inner_bait_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'purchased_tonnes' => 'float', + 'additional_ingredients' => 'float', + 'emissions_intensity' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'purchased_tonnes' => null, + 'additional_ingredients' => null, + 'emissions_intensity' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'type' => false, + 'purchased_tonnes' => false, + 'additional_ingredients' => false, + 'emissions_intensity' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'purchased_tonnes' => 'purchasedTonnes', + 'additional_ingredients' => 'additionalIngredients', + 'emissions_intensity' => 'emissionsIntensity' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'purchased_tonnes' => 'setPurchasedTonnes', + 'additional_ingredients' => 'setAdditionalIngredients', + 'emissions_intensity' => 'setEmissionsIntensity' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'purchased_tonnes' => 'getPurchasedTonnes', + 'additional_ingredients' => 'getAdditionalIngredients', + 'emissions_intensity' => 'getEmissionsIntensity' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_FISH_FRAMES = 'Fish Frames'; + public const TYPE_FISH_HEADS = 'Fish Heads'; + public const TYPE_SARDINES = 'Sardines'; + public const TYPE_SQUID = 'Squid'; + public const TYPE_WHOLE_FISH = 'Whole Fish'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_FISH_FRAMES, + self::TYPE_FISH_HEADS, + self::TYPE_SARDINES, + self::TYPE_SQUID, + self::TYPE_WHOLE_FISH, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('purchased_tonnes', $data ?? [], null); + $this->setIfExists('additional_ingredients', $data ?? [], null); + $this->setIfExists('emissions_intensity', $data ?? [], 0); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['purchased_tonnes'] === null) { + $invalidProperties[] = "'purchased_tonnes' can't be null"; + } + if ($this->container['additional_ingredients'] === null) { + $invalidProperties[] = "'additional_ingredients' can't be null"; + } + if (($this->container['additional_ingredients'] > 1)) { + $invalidProperties[] = "invalid value for 'additional_ingredients', must be smaller than or equal to 1."; + } + + if (($this->container['additional_ingredients'] < 0)) { + $invalidProperties[] = "invalid value for 'additional_ingredients', must be bigger than or equal to 0."; + } + + if ($this->container['emissions_intensity'] === null) { + $invalidProperties[] = "'emissions_intensity' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Bait product type + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets purchased_tonnes + * + * @return float + */ + public function getPurchasedTonnes() + { + return $this->container['purchased_tonnes']; + } + + /** + * Sets purchased_tonnes + * + * @param float $purchased_tonnes Purchased product in tonnes + * + * @return self + */ + public function setPurchasedTonnes($purchased_tonnes) + { + if (is_null($purchased_tonnes)) { + throw new \InvalidArgumentException('non-nullable purchased_tonnes cannot be null'); + } + $this->container['purchased_tonnes'] = $purchased_tonnes; + + return $this; + } + + /** + * Gets additional_ingredients + * + * @return float + */ + public function getAdditionalIngredients() + { + return $this->container['additional_ingredients']; + } + + /** + * Sets additional_ingredients + * + * @param float $additional_ingredients Additional ingredient fraction, from 0 to 1 + * + * @return self + */ + public function setAdditionalIngredients($additional_ingredients) + { + if (is_null($additional_ingredients)) { + throw new \InvalidArgumentException('non-nullable additional_ingredients cannot be null'); + } + + if (($additional_ingredients > 1)) { + throw new \InvalidArgumentException('invalid value for $additional_ingredients when calling PostWildcatchfisheryRequestEnterprisesInnerBaitInner., must be smaller than or equal to 1.'); + } + if (($additional_ingredients < 0)) { + throw new \InvalidArgumentException('invalid value for $additional_ingredients when calling PostWildcatchfisheryRequestEnterprisesInnerBaitInner., must be bigger than or equal to 0.'); + } + + $this->container['additional_ingredients'] = $additional_ingredients; + + return $this; + } + + /** + * Gets emissions_intensity + * + * @return float + */ + public function getEmissionsIntensity() + { + return $this->container['emissions_intensity']; + } + + /** + * Sets emissions_intensity + * + * @param float $emissions_intensity Emissions intensity of additional ingredients, in kg CO2e/kg bait (default 0) + * + * @return self + */ + public function setEmissionsIntensity($emissions_intensity) + { + if (is_null($emissions_intensity)) { + throw new \InvalidArgumentException('non-nullable emissions_intensity cannot be null'); + } + $this->container['emissions_intensity'] = $emissions_intensity; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200Response.php b/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200Response.php new file mode 100644 index 00000000..1158e568 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200Response.php @@ -0,0 +1,636 @@ + + */ +class PostWildseafisheries200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildseafisheries_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scope1' => '\OpenAPI\Client\Model\PostWildseafisheries200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostWildseafisheries200ResponseScope3', + 'purchased_offsets' => '\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets', + 'intermediate' => '\OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInner[]', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet', + 'intensities' => '\OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInnerIntensities[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'purchased_offsets' => null, + 'intermediate' => null, + 'net' => null, + 'intensities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'purchased_offsets' => false, + 'intermediate' => false, + 'net' => false, + 'intensities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'purchased_offsets' => 'purchasedOffsets', + 'intermediate' => 'intermediate', + 'net' => 'net', + 'intensities' => 'intensities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'purchased_offsets' => 'setPurchasedOffsets', + 'intermediate' => 'setIntermediate', + 'net' => 'setNet', + 'intensities' => 'setIntensities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'purchased_offsets' => 'getPurchasedOffsets', + 'intermediate' => 'getIntermediate', + 'net' => 'getNet', + 'intensities' => 'getIntensities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('purchased_offsets', $data ?? [], null); + $this->setIfExists('intermediate', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['purchased_offsets'] === null) { + $invalidProperties[] = "'purchased_offsets' can't be null"; + } + if ($this->container['intermediate'] === null) { + $invalidProperties[] = "'intermediate' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostWildseafisheries200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostWildseafisheries200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostWildseafisheries200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostWildseafisheries200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets purchased_offsets + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets + */ + public function getPurchasedOffsets() + { + return $this->container['purchased_offsets']; + } + + /** + * Sets purchased_offsets + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets $purchased_offsets purchased_offsets + * + * @return self + */ + public function setPurchasedOffsets($purchased_offsets) + { + if (is_null($purchased_offsets)) { + throw new \InvalidArgumentException('non-nullable purchased_offsets cannot be null'); + } + $this->container['purchased_offsets'] = $purchased_offsets; + + return $this; + } + + /** + * Gets intermediate + * + * @return \OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInner[] + */ + public function getIntermediate() + { + return $this->container['intermediate']; + } + + /** + * Sets intermediate + * + * @param \OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInner[] $intermediate intermediate + * + * @return self + */ + public function setIntermediate($intermediate) + { + if (is_null($intermediate)) { + throw new \InvalidArgumentException('non-nullable intermediate cannot be null'); + } + $this->container['intermediate'] = $intermediate; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInnerIntensities[] + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInnerIntensities[] $intensities Emissions intensity for each enterprise (in order), in t-CO2e/t product caught + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseIntermediateInner.php b/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseIntermediateInner.php new file mode 100644 index 00000000..f0a6f70a --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseIntermediateInner.php @@ -0,0 +1,673 @@ + + */ +class PostWildseafisheries200ResponseIntermediateInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildseafisheries_200_response_intermediate_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'scope1' => '\OpenAPI\Client\Model\PostWildseafisheries200ResponseScope1', + 'scope2' => '\OpenAPI\Client\Model\PostAquaculture200ResponseScope2', + 'scope3' => '\OpenAPI\Client\Model\PostWildseafisheries200ResponseScope3', + 'purchased_offsets' => '\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets', + 'carbon_sequestration' => 'float', + 'intensities' => '\OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInnerIntensities', + 'net' => '\OpenAPI\Client\Model\PostAquaculture200ResponseNet' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'scope1' => null, + 'scope2' => null, + 'scope3' => null, + 'purchased_offsets' => null, + 'carbon_sequestration' => null, + 'intensities' => null, + 'net' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'scope1' => false, + 'scope2' => false, + 'scope3' => false, + 'purchased_offsets' => false, + 'carbon_sequestration' => false, + 'intensities' => false, + 'net' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'scope1' => 'scope1', + 'scope2' => 'scope2', + 'scope3' => 'scope3', + 'purchased_offsets' => 'purchasedOffsets', + 'carbon_sequestration' => 'carbonSequestration', + 'intensities' => 'intensities', + 'net' => 'net' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'scope1' => 'setScope1', + 'scope2' => 'setScope2', + 'scope3' => 'setScope3', + 'purchased_offsets' => 'setPurchasedOffsets', + 'carbon_sequestration' => 'setCarbonSequestration', + 'intensities' => 'setIntensities', + 'net' => 'setNet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'scope1' => 'getScope1', + 'scope2' => 'getScope2', + 'scope3' => 'getScope3', + 'purchased_offsets' => 'getPurchasedOffsets', + 'carbon_sequestration' => 'getCarbonSequestration', + 'intensities' => 'getIntensities', + 'net' => 'getNet' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('scope1', $data ?? [], null); + $this->setIfExists('scope2', $data ?? [], null); + $this->setIfExists('scope3', $data ?? [], null); + $this->setIfExists('purchased_offsets', $data ?? [], null); + $this->setIfExists('carbon_sequestration', $data ?? [], null); + $this->setIfExists('intensities', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['scope1'] === null) { + $invalidProperties[] = "'scope1' can't be null"; + } + if ($this->container['scope2'] === null) { + $invalidProperties[] = "'scope2' can't be null"; + } + if ($this->container['scope3'] === null) { + $invalidProperties[] = "'scope3' can't be null"; + } + if ($this->container['purchased_offsets'] === null) { + $invalidProperties[] = "'purchased_offsets' can't be null"; + } + if ($this->container['carbon_sequestration'] === null) { + $invalidProperties[] = "'carbon_sequestration' can't be null"; + } + if ($this->container['intensities'] === null) { + $invalidProperties[] = "'intensities' can't be null"; + } + if ($this->container['net'] === null) { + $invalidProperties[] = "'net' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets scope1 + * + * @return \OpenAPI\Client\Model\PostWildseafisheries200ResponseScope1 + */ + public function getScope1() + { + return $this->container['scope1']; + } + + /** + * Sets scope1 + * + * @param \OpenAPI\Client\Model\PostWildseafisheries200ResponseScope1 $scope1 scope1 + * + * @return self + */ + public function setScope1($scope1) + { + if (is_null($scope1)) { + throw new \InvalidArgumentException('non-nullable scope1 cannot be null'); + } + $this->container['scope1'] = $scope1; + + return $this; + } + + /** + * Gets scope2 + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 + */ + public function getScope2() + { + return $this->container['scope2']; + } + + /** + * Sets scope2 + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseScope2 $scope2 scope2 + * + * @return self + */ + public function setScope2($scope2) + { + if (is_null($scope2)) { + throw new \InvalidArgumentException('non-nullable scope2 cannot be null'); + } + $this->container['scope2'] = $scope2; + + return $this; + } + + /** + * Gets scope3 + * + * @return \OpenAPI\Client\Model\PostWildseafisheries200ResponseScope3 + */ + public function getScope3() + { + return $this->container['scope3']; + } + + /** + * Sets scope3 + * + * @param \OpenAPI\Client\Model\PostWildseafisheries200ResponseScope3 $scope3 scope3 + * + * @return self + */ + public function setScope3($scope3) + { + if (is_null($scope3)) { + throw new \InvalidArgumentException('non-nullable scope3 cannot be null'); + } + $this->container['scope3'] = $scope3; + + return $this; + } + + /** + * Gets purchased_offsets + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets + */ + public function getPurchasedOffsets() + { + return $this->container['purchased_offsets']; + } + + /** + * Sets purchased_offsets + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets $purchased_offsets purchased_offsets + * + * @return self + */ + public function setPurchasedOffsets($purchased_offsets) + { + if (is_null($purchased_offsets)) { + throw new \InvalidArgumentException('non-nullable purchased_offsets cannot be null'); + } + $this->container['purchased_offsets'] = $purchased_offsets; + + return $this; + } + + /** + * Gets carbon_sequestration + * + * @return float + */ + public function getCarbonSequestration() + { + return $this->container['carbon_sequestration']; + } + + /** + * Sets carbon_sequestration + * + * @param float $carbon_sequestration Carbon sequestration, in tonnes-CO2e + * + * @return self + */ + public function setCarbonSequestration($carbon_sequestration) + { + if (is_null($carbon_sequestration)) { + throw new \InvalidArgumentException('non-nullable carbon_sequestration cannot be null'); + } + $this->container['carbon_sequestration'] = $carbon_sequestration; + + return $this; + } + + /** + * Gets intensities + * + * @return \OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInnerIntensities + */ + public function getIntensities() + { + return $this->container['intensities']; + } + + /** + * Sets intensities + * + * @param \OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInnerIntensities $intensities intensities + * + * @return self + */ + public function setIntensities($intensities) + { + if (is_null($intensities)) { + throw new \InvalidArgumentException('non-nullable intensities cannot be null'); + } + $this->container['intensities'] = $intensities; + + return $this; + } + + /** + * Gets net + * + * @return \OpenAPI\Client\Model\PostAquaculture200ResponseNet + */ + public function getNet() + { + return $this->container['net']; + } + + /** + * Sets net + * + * @param \OpenAPI\Client\Model\PostAquaculture200ResponseNet $net net + * + * @return self + */ + public function setNet($net) + { + if (is_null($net)) { + throw new \InvalidArgumentException('non-nullable net cannot be null'); + } + $this->container['net'] = $net; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.php b/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.php new file mode 100644 index 00000000..c1dd9588 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.php @@ -0,0 +1,487 @@ + + */ +class PostWildseafisheries200ResponseIntermediateInnerIntensities implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildseafisheries_200_response_intermediate_inner_intensities'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'intensity_excluding_carbon_offset' => 'float', + 'intensity_including_carbon_offset' => 'float', + 'total_harvest_weight_tonnes' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'intensity_excluding_carbon_offset' => null, + 'intensity_including_carbon_offset' => null, + 'total_harvest_weight_tonnes' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'intensity_excluding_carbon_offset' => false, + 'intensity_including_carbon_offset' => false, + 'total_harvest_weight_tonnes' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'intensity_excluding_carbon_offset' => 'intensityExcludingCarbonOffset', + 'intensity_including_carbon_offset' => 'intensityIncludingCarbonOffset', + 'total_harvest_weight_tonnes' => 'totalHarvestWeightTonnes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'intensity_excluding_carbon_offset' => 'setIntensityExcludingCarbonOffset', + 'intensity_including_carbon_offset' => 'setIntensityIncludingCarbonOffset', + 'total_harvest_weight_tonnes' => 'setTotalHarvestWeightTonnes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'intensity_excluding_carbon_offset' => 'getIntensityExcludingCarbonOffset', + 'intensity_including_carbon_offset' => 'getIntensityIncludingCarbonOffset', + 'total_harvest_weight_tonnes' => 'getTotalHarvestWeightTonnes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('intensity_excluding_carbon_offset', $data ?? [], null); + $this->setIfExists('intensity_including_carbon_offset', $data ?? [], null); + $this->setIfExists('total_harvest_weight_tonnes', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['intensity_excluding_carbon_offset'] === null) { + $invalidProperties[] = "'intensity_excluding_carbon_offset' can't be null"; + } + if ($this->container['intensity_including_carbon_offset'] === null) { + $invalidProperties[] = "'intensity_including_carbon_offset' can't be null"; + } + if ($this->container['total_harvest_weight_tonnes'] === null) { + $invalidProperties[] = "'total_harvest_weight_tonnes' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets intensity_excluding_carbon_offset + * + * @return float + */ + public function getIntensityExcludingCarbonOffset() + { + return $this->container['intensity_excluding_carbon_offset']; + } + + /** + * Sets intensity_excluding_carbon_offset + * + * @param float $intensity_excluding_carbon_offset Wild sea fisheries emissions intensity excluding carbon offsets, in kg-CO2e/kg + * + * @return self + */ + public function setIntensityExcludingCarbonOffset($intensity_excluding_carbon_offset) + { + if (is_null($intensity_excluding_carbon_offset)) { + throw new \InvalidArgumentException('non-nullable intensity_excluding_carbon_offset cannot be null'); + } + $this->container['intensity_excluding_carbon_offset'] = $intensity_excluding_carbon_offset; + + return $this; + } + + /** + * Gets intensity_including_carbon_offset + * + * @return float + */ + public function getIntensityIncludingCarbonOffset() + { + return $this->container['intensity_including_carbon_offset']; + } + + /** + * Sets intensity_including_carbon_offset + * + * @param float $intensity_including_carbon_offset Wild sea fisheries emissions intensity including carbon offsets, in kg-CO2e/kg + * + * @return self + */ + public function setIntensityIncludingCarbonOffset($intensity_including_carbon_offset) + { + if (is_null($intensity_including_carbon_offset)) { + throw new \InvalidArgumentException('non-nullable intensity_including_carbon_offset cannot be null'); + } + $this->container['intensity_including_carbon_offset'] = $intensity_including_carbon_offset; + + return $this; + } + + /** + * Gets total_harvest_weight_tonnes + * + * @return float + */ + public function getTotalHarvestWeightTonnes() + { + return $this->container['total_harvest_weight_tonnes']; + } + + /** + * Sets total_harvest_weight_tonnes + * + * @param float $total_harvest_weight_tonnes Total harvest weight in tonnes + * + * @return self + */ + public function setTotalHarvestWeightTonnes($total_harvest_weight_tonnes) + { + if (is_null($total_harvest_weight_tonnes)) { + throw new \InvalidArgumentException('non-nullable total_harvest_weight_tonnes cannot be null'); + } + $this->container['total_harvest_weight_tonnes'] = $total_harvest_weight_tonnes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseScope1.php b/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseScope1.php new file mode 100644 index 00000000..59f64b63 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseScope1.php @@ -0,0 +1,710 @@ + + */ +class PostWildseafisheries200ResponseScope1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildseafisheries_200_response_scope1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fuel_co2' => 'float', + 'fuel_ch4' => 'float', + 'fuel_n2_o' => 'float', + 'hfcs_refrigerant_leakage' => 'float', + 'total_co2' => 'float', + 'total_ch4' => 'float', + 'total_n2_o' => 'float', + 'total_hfcs' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fuel_co2' => null, + 'fuel_ch4' => null, + 'fuel_n2_o' => null, + 'hfcs_refrigerant_leakage' => null, + 'total_co2' => null, + 'total_ch4' => null, + 'total_n2_o' => null, + 'total_hfcs' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'fuel_co2' => false, + 'fuel_ch4' => false, + 'fuel_n2_o' => false, + 'hfcs_refrigerant_leakage' => false, + 'total_co2' => false, + 'total_ch4' => false, + 'total_n2_o' => false, + 'total_hfcs' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fuel_co2' => 'fuelCO2', + 'fuel_ch4' => 'fuelCH4', + 'fuel_n2_o' => 'fuelN2O', + 'hfcs_refrigerant_leakage' => 'hfcsRefrigerantLeakage', + 'total_co2' => 'totalCO2', + 'total_ch4' => 'totalCH4', + 'total_n2_o' => 'totalN2O', + 'total_hfcs' => 'totalHFCs', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fuel_co2' => 'setFuelCo2', + 'fuel_ch4' => 'setFuelCh4', + 'fuel_n2_o' => 'setFuelN2O', + 'hfcs_refrigerant_leakage' => 'setHfcsRefrigerantLeakage', + 'total_co2' => 'setTotalCo2', + 'total_ch4' => 'setTotalCh4', + 'total_n2_o' => 'setTotalN2O', + 'total_hfcs' => 'setTotalHfcs', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fuel_co2' => 'getFuelCo2', + 'fuel_ch4' => 'getFuelCh4', + 'fuel_n2_o' => 'getFuelN2O', + 'hfcs_refrigerant_leakage' => 'getHfcsRefrigerantLeakage', + 'total_co2' => 'getTotalCo2', + 'total_ch4' => 'getTotalCh4', + 'total_n2_o' => 'getTotalN2O', + 'total_hfcs' => 'getTotalHfcs', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('fuel_co2', $data ?? [], null); + $this->setIfExists('fuel_ch4', $data ?? [], null); + $this->setIfExists('fuel_n2_o', $data ?? [], null); + $this->setIfExists('hfcs_refrigerant_leakage', $data ?? [], null); + $this->setIfExists('total_co2', $data ?? [], null); + $this->setIfExists('total_ch4', $data ?? [], null); + $this->setIfExists('total_n2_o', $data ?? [], null); + $this->setIfExists('total_hfcs', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fuel_co2'] === null) { + $invalidProperties[] = "'fuel_co2' can't be null"; + } + if ($this->container['fuel_ch4'] === null) { + $invalidProperties[] = "'fuel_ch4' can't be null"; + } + if ($this->container['fuel_n2_o'] === null) { + $invalidProperties[] = "'fuel_n2_o' can't be null"; + } + if ($this->container['hfcs_refrigerant_leakage'] === null) { + $invalidProperties[] = "'hfcs_refrigerant_leakage' can't be null"; + } + if ($this->container['total_co2'] === null) { + $invalidProperties[] = "'total_co2' can't be null"; + } + if ($this->container['total_ch4'] === null) { + $invalidProperties[] = "'total_ch4' can't be null"; + } + if ($this->container['total_n2_o'] === null) { + $invalidProperties[] = "'total_n2_o' can't be null"; + } + if ($this->container['total_hfcs'] === null) { + $invalidProperties[] = "'total_hfcs' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fuel_co2 + * + * @return float + */ + public function getFuelCo2() + { + return $this->container['fuel_co2']; + } + + /** + * Sets fuel_co2 + * + * @param float $fuel_co2 CO2 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCo2($fuel_co2) + { + if (is_null($fuel_co2)) { + throw new \InvalidArgumentException('non-nullable fuel_co2 cannot be null'); + } + $this->container['fuel_co2'] = $fuel_co2; + + return $this; + } + + /** + * Gets fuel_ch4 + * + * @return float + */ + public function getFuelCh4() + { + return $this->container['fuel_ch4']; + } + + /** + * Sets fuel_ch4 + * + * @param float $fuel_ch4 CH4 emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelCh4($fuel_ch4) + { + if (is_null($fuel_ch4)) { + throw new \InvalidArgumentException('non-nullable fuel_ch4 cannot be null'); + } + $this->container['fuel_ch4'] = $fuel_ch4; + + return $this; + } + + /** + * Gets fuel_n2_o + * + * @return float + */ + public function getFuelN2O() + { + return $this->container['fuel_n2_o']; + } + + /** + * Sets fuel_n2_o + * + * @param float $fuel_n2_o N2O emissions from fuel use, in tonnes-CO2e + * + * @return self + */ + public function setFuelN2O($fuel_n2_o) + { + if (is_null($fuel_n2_o)) { + throw new \InvalidArgumentException('non-nullable fuel_n2_o cannot be null'); + } + $this->container['fuel_n2_o'] = $fuel_n2_o; + + return $this; + } + + /** + * Gets hfcs_refrigerant_leakage + * + * @return float + */ + public function getHfcsRefrigerantLeakage() + { + return $this->container['hfcs_refrigerant_leakage']; + } + + /** + * Sets hfcs_refrigerant_leakage + * + * @param float $hfcs_refrigerant_leakage Emissions from refrigerant leakage, in tonnes-HFCs + * + * @return self + */ + public function setHfcsRefrigerantLeakage($hfcs_refrigerant_leakage) + { + if (is_null($hfcs_refrigerant_leakage)) { + throw new \InvalidArgumentException('non-nullable hfcs_refrigerant_leakage cannot be null'); + } + $this->container['hfcs_refrigerant_leakage'] = $hfcs_refrigerant_leakage; + + return $this; + } + + /** + * Gets total_co2 + * + * @return float + */ + public function getTotalCo2() + { + return $this->container['total_co2']; + } + + /** + * Sets total_co2 + * + * @param float $total_co2 Total CO2 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCo2($total_co2) + { + if (is_null($total_co2)) { + throw new \InvalidArgumentException('non-nullable total_co2 cannot be null'); + } + $this->container['total_co2'] = $total_co2; + + return $this; + } + + /** + * Gets total_ch4 + * + * @return float + */ + public function getTotalCh4() + { + return $this->container['total_ch4']; + } + + /** + * Sets total_ch4 + * + * @param float $total_ch4 Total CH4 scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalCh4($total_ch4) + { + if (is_null($total_ch4)) { + throw new \InvalidArgumentException('non-nullable total_ch4 cannot be null'); + } + $this->container['total_ch4'] = $total_ch4; + + return $this; + } + + /** + * Gets total_n2_o + * + * @return float + */ + public function getTotalN2O() + { + return $this->container['total_n2_o']; + } + + /** + * Sets total_n2_o + * + * @param float $total_n2_o Total N2O scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalN2O($total_n2_o) + { + if (is_null($total_n2_o)) { + throw new \InvalidArgumentException('non-nullable total_n2_o cannot be null'); + } + $this->container['total_n2_o'] = $total_n2_o; + + return $this; + } + + /** + * Gets total_hfcs + * + * @return float + */ + public function getTotalHfcs() + { + return $this->container['total_hfcs']; + } + + /** + * Sets total_hfcs + * + * @param float $total_hfcs Total HFCs scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotalHfcs($total_hfcs) + { + if (is_null($total_hfcs)) { + throw new \InvalidArgumentException('non-nullable total_hfcs cannot be null'); + } + $this->container['total_hfcs'] = $total_hfcs; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 1 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseScope3.php b/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseScope3.php new file mode 100644 index 00000000..04d55436 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildseafisheries200ResponseScope3.php @@ -0,0 +1,525 @@ + + */ +class PostWildseafisheries200ResponseScope3 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildseafisheries_200_response_scope3'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'electricity' => 'float', + 'fuel' => 'float', + 'bait' => 'float', + 'total' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'electricity' => null, + 'fuel' => null, + 'bait' => null, + 'total' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'electricity' => false, + 'fuel' => false, + 'bait' => false, + 'total' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'electricity' => 'electricity', + 'fuel' => 'fuel', + 'bait' => 'bait', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'electricity' => 'setElectricity', + 'fuel' => 'setFuel', + 'bait' => 'setBait', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'electricity' => 'getElectricity', + 'fuel' => 'getFuel', + 'bait' => 'getBait', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('electricity', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('bait', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['electricity'] === null) { + $invalidProperties[] = "'electricity' can't be null"; + } + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + if ($this->container['bait'] === null) { + $invalidProperties[] = "'bait' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets electricity + * + * @return float + */ + public function getElectricity() + { + return $this->container['electricity']; + } + + /** + * Sets electricity + * + * @param float $electricity Emissions from electricity, in tonnes-CO2e + * + * @return self + */ + public function setElectricity($electricity) + { + if (is_null($electricity)) { + throw new \InvalidArgumentException('non-nullable electricity cannot be null'); + } + $this->container['electricity'] = $electricity; + + return $this; + } + + /** + * Gets fuel + * + * @return float + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param float $fuel Emissions from fuel, in tonnes-CO2e + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets bait + * + * @return float + */ + public function getBait() + { + return $this->container['bait']; + } + + /** + * Sets bait + * + * @param float $bait Emissions from purchased bait, in tonnes-CO2e + * + * @return self + */ + public function setBait($bait) + { + if (is_null($bait)) { + throw new \InvalidArgumentException('non-nullable bait cannot be null'); + } + $this->container['bait'] = $bait; + + return $this; + } + + /** + * Gets total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total scope 3 emissions, in tonnes-CO2e + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequest.php b/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequest.php new file mode 100644 index 00000000..b3642abb --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequest.php @@ -0,0 +1,414 @@ + + */ +class PostWildseafisheriesRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildseafisheries_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'enterprises' => '\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'enterprises' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'enterprises' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'enterprises' => 'enterprises' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enterprises' => 'setEnterprises' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enterprises' => 'getEnterprises' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('enterprises', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['enterprises'] === null) { + $invalidProperties[] = "'enterprises' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets enterprises + * + * @return \OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInner[] + */ + public function getEnterprises() + { + return $this->container['enterprises']; + } + + /** + * Sets enterprises + * + * @param \OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInner[] $enterprises enterprises + * + * @return self + */ + public function setEnterprises($enterprises) + { + if (is_null($enterprises)) { + throw new \InvalidArgumentException('non-nullable enterprises cannot be null'); + } + $this->container['enterprises'] = $enterprises; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInner.php b/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInner.php new file mode 100644 index 00000000..5edf663c --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInner.php @@ -0,0 +1,1026 @@ + + */ +class PostWildseafisheriesRequestEnterprisesInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildseafisheries_request_enterprises_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'state' => 'string', + 'electricity_source' => 'string', + 'electricity_renewable' => 'float', + 'electricity_use' => 'float', + 'total_whole_weight_caught' => 'float', + 'diesel' => 'float', + 'petrol' => 'float', + 'lpg' => 'float', + 'refrigerants' => '\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner[]', + 'transports' => '\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerTransportsInner[]', + 'flights' => '\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerFlightsInner[]', + 'bait' => '\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerBaitInner[]', + 'custombait' => '\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerCustombaitInner[]', + 'carbon_offset' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'state' => null, + 'electricity_source' => null, + 'electricity_renewable' => null, + 'electricity_use' => null, + 'total_whole_weight_caught' => null, + 'diesel' => null, + 'petrol' => null, + 'lpg' => null, + 'refrigerants' => null, + 'transports' => null, + 'flights' => null, + 'bait' => null, + 'custombait' => null, + 'carbon_offset' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'state' => false, + 'electricity_source' => false, + 'electricity_renewable' => false, + 'electricity_use' => false, + 'total_whole_weight_caught' => false, + 'diesel' => false, + 'petrol' => false, + 'lpg' => false, + 'refrigerants' => false, + 'transports' => false, + 'flights' => false, + 'bait' => false, + 'custombait' => false, + 'carbon_offset' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'state' => 'state', + 'electricity_source' => 'electricitySource', + 'electricity_renewable' => 'electricityRenewable', + 'electricity_use' => 'electricityUse', + 'total_whole_weight_caught' => 'totalWholeWeightCaught', + 'diesel' => 'diesel', + 'petrol' => 'petrol', + 'lpg' => 'lpg', + 'refrigerants' => 'refrigerants', + 'transports' => 'transports', + 'flights' => 'flights', + 'bait' => 'bait', + 'custombait' => 'custombait', + 'carbon_offset' => 'carbonOffset' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'state' => 'setState', + 'electricity_source' => 'setElectricitySource', + 'electricity_renewable' => 'setElectricityRenewable', + 'electricity_use' => 'setElectricityUse', + 'total_whole_weight_caught' => 'setTotalWholeWeightCaught', + 'diesel' => 'setDiesel', + 'petrol' => 'setPetrol', + 'lpg' => 'setLpg', + 'refrigerants' => 'setRefrigerants', + 'transports' => 'setTransports', + 'flights' => 'setFlights', + 'bait' => 'setBait', + 'custombait' => 'setCustombait', + 'carbon_offset' => 'setCarbonOffset' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'state' => 'getState', + 'electricity_source' => 'getElectricitySource', + 'electricity_renewable' => 'getElectricityRenewable', + 'electricity_use' => 'getElectricityUse', + 'total_whole_weight_caught' => 'getTotalWholeWeightCaught', + 'diesel' => 'getDiesel', + 'petrol' => 'getPetrol', + 'lpg' => 'getLpg', + 'refrigerants' => 'getRefrigerants', + 'transports' => 'getTransports', + 'flights' => 'getFlights', + 'bait' => 'getBait', + 'custombait' => 'getCustombait', + 'carbon_offset' => 'getCarbonOffset' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATE_NSW = 'nsw'; + public const STATE_VIC = 'vic'; + public const STATE_QLD = 'qld'; + public const STATE_SA = 'sa'; + public const STATE_WA_NW = 'wa_nw'; + public const STATE_WA_SW = 'wa_sw'; + public const STATE_TAS = 'tas'; + public const STATE_NT = 'nt'; + public const STATE_ACT = 'act'; + public const ELECTRICITY_SOURCE_STATE_GRID = 'State Grid'; + public const ELECTRICITY_SOURCE_RENEWABLE = 'Renewable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_NSW, + self::STATE_VIC, + self::STATE_QLD, + self::STATE_SA, + self::STATE_WA_NW, + self::STATE_WA_SW, + self::STATE_TAS, + self::STATE_NT, + self::STATE_ACT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getElectricitySourceAllowableValues() + { + return [ + self::ELECTRICITY_SOURCE_STATE_GRID, + self::ELECTRICITY_SOURCE_RENEWABLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('electricity_source', $data ?? [], null); + $this->setIfExists('electricity_renewable', $data ?? [], null); + $this->setIfExists('electricity_use', $data ?? [], null); + $this->setIfExists('total_whole_weight_caught', $data ?? [], null); + $this->setIfExists('diesel', $data ?? [], null); + $this->setIfExists('petrol', $data ?? [], null); + $this->setIfExists('lpg', $data ?? [], null); + $this->setIfExists('refrigerants', $data ?? [], null); + $this->setIfExists('transports', $data ?? [], null); + $this->setIfExists('flights', $data ?? [], null); + $this->setIfExists('bait', $data ?? [], null); + $this->setIfExists('custombait', $data ?? [], null); + $this->setIfExists('carbon_offset', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'state', must be one of '%s'", + $this->container['state'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['electricity_source'] === null) { + $invalidProperties[] = "'electricity_source' can't be null"; + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!is_null($this->container['electricity_source']) && !in_array($this->container['electricity_source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'electricity_source', must be one of '%s'", + $this->container['electricity_source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['electricity_renewable'] === null) { + $invalidProperties[] = "'electricity_renewable' can't be null"; + } + if (($this->container['electricity_renewable'] > 1)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be smaller than or equal to 1."; + } + + if (($this->container['electricity_renewable'] < 0)) { + $invalidProperties[] = "invalid value for 'electricity_renewable', must be bigger than or equal to 0."; + } + + if ($this->container['electricity_use'] === null) { + $invalidProperties[] = "'electricity_use' can't be null"; + } + if ($this->container['total_whole_weight_caught'] === null) { + $invalidProperties[] = "'total_whole_weight_caught' can't be null"; + } + if ($this->container['diesel'] === null) { + $invalidProperties[] = "'diesel' can't be null"; + } + if ($this->container['petrol'] === null) { + $invalidProperties[] = "'petrol' can't be null"; + } + if ($this->container['lpg'] === null) { + $invalidProperties[] = "'lpg' can't be null"; + } + if ($this->container['refrigerants'] === null) { + $invalidProperties[] = "'refrigerants' can't be null"; + } + if ($this->container['transports'] === null) { + $invalidProperties[] = "'transports' can't be null"; + } + if ($this->container['flights'] === null) { + $invalidProperties[] = "'flights' can't be null"; + } + if ($this->container['bait'] === null) { + $invalidProperties[] = "'bait' can't be null"; + } + if ($this->container['custombait'] === null) { + $invalidProperties[] = "'custombait' can't be null"; + } + if ($this->container['carbon_offset'] === null) { + $invalidProperties[] = "'carbon_offset' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for this activity + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets electricity_source + * + * @return string + */ + public function getElectricitySource() + { + return $this->container['electricity_source']; + } + + /** + * Sets electricity_source + * + * @param string $electricity_source Source of electricity + * + * @return self + */ + public function setElectricitySource($electricity_source) + { + if (is_null($electricity_source)) { + throw new \InvalidArgumentException('non-nullable electricity_source cannot be null'); + } + $allowedValues = $this->getElectricitySourceAllowableValues(); + if (!in_array($electricity_source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'electricity_source', must be one of '%s'", + $electricity_source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['electricity_source'] = $electricity_source; + + return $this; + } + + /** + * Gets electricity_renewable + * + * @return float + */ + public function getElectricityRenewable() + { + return $this->container['electricity_renewable']; + } + + /** + * Sets electricity_renewable + * + * @param float $electricity_renewable Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` + * + * @return self + */ + public function setElectricityRenewable($electricity_renewable) + { + if (is_null($electricity_renewable)) { + throw new \InvalidArgumentException('non-nullable electricity_renewable cannot be null'); + } + + if (($electricity_renewable > 1)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostWildseafisheriesRequestEnterprisesInner., must be smaller than or equal to 1.'); + } + if (($electricity_renewable < 0)) { + throw new \InvalidArgumentException('invalid value for $electricity_renewable when calling PostWildseafisheriesRequestEnterprisesInner., must be bigger than or equal to 0.'); + } + + $this->container['electricity_renewable'] = $electricity_renewable; + + return $this; + } + + /** + * Gets electricity_use + * + * @return float + */ + public function getElectricityUse() + { + return $this->container['electricity_use']; + } + + /** + * Sets electricity_use + * + * @param float $electricity_use Electricity use in KWh (kilowatt hours) + * + * @return self + */ + public function setElectricityUse($electricity_use) + { + if (is_null($electricity_use)) { + throw new \InvalidArgumentException('non-nullable electricity_use cannot be null'); + } + $this->container['electricity_use'] = $electricity_use; + + return $this; + } + + /** + * Gets total_whole_weight_caught + * + * @return float + */ + public function getTotalWholeWeightCaught() + { + return $this->container['total_whole_weight_caught']; + } + + /** + * Sets total_whole_weight_caught + * + * @param float $total_whole_weight_caught Total whole weight caught in kg + * + * @return self + */ + public function setTotalWholeWeightCaught($total_whole_weight_caught) + { + if (is_null($total_whole_weight_caught)) { + throw new \InvalidArgumentException('non-nullable total_whole_weight_caught cannot be null'); + } + $this->container['total_whole_weight_caught'] = $total_whole_weight_caught; + + return $this; + } + + /** + * Gets diesel + * + * @return float + */ + public function getDiesel() + { + return $this->container['diesel']; + } + + /** + * Sets diesel + * + * @param float $diesel Diesel usage in L (litres) + * + * @return self + */ + public function setDiesel($diesel) + { + if (is_null($diesel)) { + throw new \InvalidArgumentException('non-nullable diesel cannot be null'); + } + $this->container['diesel'] = $diesel; + + return $this; + } + + /** + * Gets petrol + * + * @return float + */ + public function getPetrol() + { + return $this->container['petrol']; + } + + /** + * Sets petrol + * + * @param float $petrol Petrol usage in L (litres) + * + * @return self + */ + public function setPetrol($petrol) + { + if (is_null($petrol)) { + throw new \InvalidArgumentException('non-nullable petrol cannot be null'); + } + $this->container['petrol'] = $petrol; + + return $this; + } + + /** + * Gets lpg + * + * @return float + */ + public function getLpg() + { + return $this->container['lpg']; + } + + /** + * Sets lpg + * + * @param float $lpg LPG Fuel usage in L (litres) + * + * @return self + */ + public function setLpg($lpg) + { + if (is_null($lpg)) { + throw new \InvalidArgumentException('non-nullable lpg cannot be null'); + } + $this->container['lpg'] = $lpg; + + return $this; + } + + /** + * Gets refrigerants + * + * @return \OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner[] + */ + public function getRefrigerants() + { + return $this->container['refrigerants']; + } + + /** + * Sets refrigerants + * + * @param \OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner[] $refrigerants refrigerants + * + * @return self + */ + public function setRefrigerants($refrigerants) + { + if (is_null($refrigerants)) { + throw new \InvalidArgumentException('non-nullable refrigerants cannot be null'); + } + $this->container['refrigerants'] = $refrigerants; + + return $this; + } + + /** + * Gets transports + * + * @return \OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerTransportsInner[] + */ + public function getTransports() + { + return $this->container['transports']; + } + + /** + * Sets transports + * + * @param \OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerTransportsInner[] $transports Transportation + * + * @return self + */ + public function setTransports($transports) + { + if (is_null($transports)) { + throw new \InvalidArgumentException('non-nullable transports cannot be null'); + } + $this->container['transports'] = $transports; + + return $this; + } + + /** + * Gets flights + * + * @return \OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerFlightsInner[] + */ + public function getFlights() + { + return $this->container['flights']; + } + + /** + * Sets flights + * + * @param \OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerFlightsInner[] $flights CommercialFlight + * + * @return self + */ + public function setFlights($flights) + { + if (is_null($flights)) { + throw new \InvalidArgumentException('non-nullable flights cannot be null'); + } + $this->container['flights'] = $flights; + + return $this; + } + + /** + * Gets bait + * + * @return \OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerBaitInner[] + */ + public function getBait() + { + return $this->container['bait']; + } + + /** + * Sets bait + * + * @param \OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerBaitInner[] $bait Bait + * + * @return self + */ + public function setBait($bait) + { + if (is_null($bait)) { + throw new \InvalidArgumentException('non-nullable bait cannot be null'); + } + $this->container['bait'] = $bait; + + return $this; + } + + /** + * Gets custombait + * + * @return \OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerCustombaitInner[] + */ + public function getCustombait() + { + return $this->container['custombait']; + } + + /** + * Sets custombait + * + * @param \OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerCustombaitInner[] $custombait Custom bait + * + * @return self + */ + public function setCustombait($custombait) + { + if (is_null($custombait)) { + throw new \InvalidArgumentException('non-nullable custombait cannot be null'); + } + $this->container['custombait'] = $custombait; + + return $this; + } + + /** + * Gets carbon_offset + * + * @return float + */ + public function getCarbonOffset() + { + return $this->container['carbon_offset']; + } + + /** + * Sets carbon_offset + * + * @param float $carbon_offset Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) + * + * @return self + */ + public function setCarbonOffset($carbon_offset) + { + if (is_null($carbon_offset)) { + throw new \InvalidArgumentException('non-nullable carbon_offset cannot be null'); + } + $this->container['carbon_offset'] = $carbon_offset; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.php b/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.php new file mode 100644 index 00000000..fec0d22a --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.php @@ -0,0 +1,580 @@ + + */ +class PostWildseafisheriesRequestEnterprisesInnerBaitInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildseafisheries_request_enterprises_inner_bait_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'purchased' => 'float', + 'additional_ingredient' => 'float', + 'emissions_intensity' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'purchased' => null, + 'additional_ingredient' => null, + 'emissions_intensity' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'type' => false, + 'purchased' => false, + 'additional_ingredient' => false, + 'emissions_intensity' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'purchased' => 'purchased', + 'additional_ingredient' => 'additionalIngredient', + 'emissions_intensity' => 'emissionsIntensity' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'purchased' => 'setPurchased', + 'additional_ingredient' => 'setAdditionalIngredient', + 'emissions_intensity' => 'setEmissionsIntensity' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'purchased' => 'getPurchased', + 'additional_ingredient' => 'getAdditionalIngredient', + 'emissions_intensity' => 'getEmissionsIntensity' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_FISH_FRAMES = 'Fish Frames'; + public const TYPE_FISH_HEADS = 'Fish Heads'; + public const TYPE_SARDINES = 'Sardines'; + public const TYPE_SQUID = 'Squid'; + public const TYPE_WHOLE_FISH = 'Whole Fish'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_FISH_FRAMES, + self::TYPE_FISH_HEADS, + self::TYPE_SARDINES, + self::TYPE_SQUID, + self::TYPE_WHOLE_FISH, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('purchased', $data ?? [], null); + $this->setIfExists('additional_ingredient', $data ?? [], null); + $this->setIfExists('emissions_intensity', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['purchased'] === null) { + $invalidProperties[] = "'purchased' can't be null"; + } + if ($this->container['additional_ingredient'] === null) { + $invalidProperties[] = "'additional_ingredient' can't be null"; + } + if (($this->container['additional_ingredient'] > 1)) { + $invalidProperties[] = "invalid value for 'additional_ingredient', must be smaller than or equal to 1."; + } + + if (($this->container['additional_ingredient'] < 0)) { + $invalidProperties[] = "invalid value for 'additional_ingredient', must be bigger than or equal to 0."; + } + + if ($this->container['emissions_intensity'] === null) { + $invalidProperties[] = "'emissions_intensity' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Bait product type + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets purchased + * + * @return float + */ + public function getPurchased() + { + return $this->container['purchased']; + } + + /** + * Sets purchased + * + * @param float $purchased Purchased product in tonnes + * + * @return self + */ + public function setPurchased($purchased) + { + if (is_null($purchased)) { + throw new \InvalidArgumentException('non-nullable purchased cannot be null'); + } + $this->container['purchased'] = $purchased; + + return $this; + } + + /** + * Gets additional_ingredient + * + * @return float + */ + public function getAdditionalIngredient() + { + return $this->container['additional_ingredient']; + } + + /** + * Sets additional_ingredient + * + * @param float $additional_ingredient Additional ingredient fraction, from 0 to 1 + * + * @return self + */ + public function setAdditionalIngredient($additional_ingredient) + { + if (is_null($additional_ingredient)) { + throw new \InvalidArgumentException('non-nullable additional_ingredient cannot be null'); + } + + if (($additional_ingredient > 1)) { + throw new \InvalidArgumentException('invalid value for $additional_ingredient when calling PostWildseafisheriesRequestEnterprisesInnerBaitInner., must be smaller than or equal to 1.'); + } + if (($additional_ingredient < 0)) { + throw new \InvalidArgumentException('invalid value for $additional_ingredient when calling PostWildseafisheriesRequestEnterprisesInnerBaitInner., must be bigger than or equal to 0.'); + } + + $this->container['additional_ingredient'] = $additional_ingredient; + + return $this; + } + + /** + * Gets emissions_intensity + * + * @return float + */ + public function getEmissionsIntensity() + { + return $this->container['emissions_intensity']; + } + + /** + * Sets emissions_intensity + * + * @param float $emissions_intensity Emissions intensity of product, in kg CO2e/kg + * + * @return self + */ + public function setEmissionsIntensity($emissions_intensity) + { + if (is_null($emissions_intensity)) { + throw new \InvalidArgumentException('non-nullable emissions_intensity cannot be null'); + } + $this->container['emissions_intensity'] = $emissions_intensity; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.php b/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.php new file mode 100644 index 00000000..785bcd22 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.php @@ -0,0 +1,450 @@ + + */ +class PostWildseafisheriesRequestEnterprisesInnerCustombaitInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildseafisheries_request_enterprises_inner_custombait_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'purchased' => 'float', + 'emissions_intensity' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'purchased' => null, + 'emissions_intensity' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'purchased' => false, + 'emissions_intensity' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'purchased' => 'purchased', + 'emissions_intensity' => 'emissionsIntensity' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'purchased' => 'setPurchased', + 'emissions_intensity' => 'setEmissionsIntensity' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'purchased' => 'getPurchased', + 'emissions_intensity' => 'getEmissionsIntensity' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('purchased', $data ?? [], null); + $this->setIfExists('emissions_intensity', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['purchased'] === null) { + $invalidProperties[] = "'purchased' can't be null"; + } + if ($this->container['emissions_intensity'] === null) { + $invalidProperties[] = "'emissions_intensity' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets purchased + * + * @return float + */ + public function getPurchased() + { + return $this->container['purchased']; + } + + /** + * Sets purchased + * + * @param float $purchased Purchased product in tonnes + * + * @return self + */ + public function setPurchased($purchased) + { + if (is_null($purchased)) { + throw new \InvalidArgumentException('non-nullable purchased cannot be null'); + } + $this->container['purchased'] = $purchased; + + return $this; + } + + /** + * Gets emissions_intensity + * + * @return float + */ + public function getEmissionsIntensity() + { + return $this->container['emissions_intensity']; + } + + /** + * Sets emissions_intensity + * + * @param float $emissions_intensity Emissions intensity of product, in kg CO2e/kg + * + * @return self + */ + public function setEmissionsIntensity($emissions_intensity) + { + if (is_null($emissions_intensity)) { + throw new \InvalidArgumentException('non-nullable emissions_intensity cannot be null'); + } + $this->container['emissions_intensity'] = $emissions_intensity; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.php b/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.php new file mode 100644 index 00000000..5fca140a --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.php @@ -0,0 +1,450 @@ + + */ +class PostWildseafisheriesRequestEnterprisesInnerFlightsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildseafisheries_request_enterprises_inner_flights_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'commercial_flight_passengers' => 'float', + 'total_flight_distance' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'commercial_flight_passengers' => null, + 'total_flight_distance' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'commercial_flight_passengers' => false, + 'total_flight_distance' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'commercial_flight_passengers' => 'commercialFlightPassengers', + 'total_flight_distance' => 'totalFlightDistance' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'commercial_flight_passengers' => 'setCommercialFlightPassengers', + 'total_flight_distance' => 'setTotalFlightDistance' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'commercial_flight_passengers' => 'getCommercialFlightPassengers', + 'total_flight_distance' => 'getTotalFlightDistance' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('commercial_flight_passengers', $data ?? [], null); + $this->setIfExists('total_flight_distance', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['commercial_flight_passengers'] === null) { + $invalidProperties[] = "'commercial_flight_passengers' can't be null"; + } + if ($this->container['total_flight_distance'] === null) { + $invalidProperties[] = "'total_flight_distance' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets commercial_flight_passengers + * + * @return float + */ + public function getCommercialFlightPassengers() + { + return $this->container['commercial_flight_passengers']; + } + + /** + * Sets commercial_flight_passengers + * + * @param float $commercial_flight_passengers Commercial flight passengers per year + * + * @return self + */ + public function setCommercialFlightPassengers($commercial_flight_passengers) + { + if (is_null($commercial_flight_passengers)) { + throw new \InvalidArgumentException('non-nullable commercial_flight_passengers cannot be null'); + } + $this->container['commercial_flight_passengers'] = $commercial_flight_passengers; + + return $this; + } + + /** + * Gets total_flight_distance + * + * @return float + */ + public function getTotalFlightDistance() + { + return $this->container['total_flight_distance']; + } + + /** + * Sets total_flight_distance + * + * @param float $total_flight_distance Total commercial flight distance in km + * + * @return self + */ + public function setTotalFlightDistance($total_flight_distance) + { + if (is_null($total_flight_distance)) { + throw new \InvalidArgumentException('non-nullable total_flight_distance cannot be null'); + } + $this->container['total_flight_distance'] = $total_flight_distance; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.php b/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.php new file mode 100644 index 00000000..78cf1d72 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.php @@ -0,0 +1,666 @@ + + */ +class PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildseafisheries_request_enterprises_inner_refrigerants_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'refrigerant' => 'string', + 'annual_recharge' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'refrigerant' => null, + 'annual_recharge' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'refrigerant' => false, + 'annual_recharge' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'refrigerant' => 'refrigerant', + 'annual_recharge' => 'annualRecharge' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'refrigerant' => 'setRefrigerant', + 'annual_recharge' => 'setAnnualRecharge' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'refrigerant' => 'getRefrigerant', + 'annual_recharge' => 'getAnnualRecharge' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const REFRIGERANT_HFC_23 = 'HFC-23'; + public const REFRIGERANT_HFC_32 = 'HFC-32'; + public const REFRIGERANT_HFC_41 = 'HFC-41'; + public const REFRIGERANT_HFC_43_10MEE = 'HFC-43-10mee'; + public const REFRIGERANT_HFC_125 = 'HFC-125'; + public const REFRIGERANT_HFC_134 = 'HFC-134'; + public const REFRIGERANT_HFC_134A = 'HFC-134a'; + public const REFRIGERANT_HFC_143 = 'HFC-143'; + public const REFRIGERANT_HFC_143A = 'HFC-143a'; + public const REFRIGERANT_HFC_152A = 'HFC-152a'; + public const REFRIGERANT_HFC_227EA = 'HFC-227ea'; + public const REFRIGERANT_HFC_236FA = 'HFC-236fa'; + public const REFRIGERANT_HFC_245CA = 'HFC-245ca'; + public const REFRIGERANT_HFC_245FA = 'HFC-245fa'; + public const REFRIGERANT_HFC_365MFC = 'HFC-365mfc'; + public const REFRIGERANT_R438_A = 'R438A'; + public const REFRIGERANT_R448_A = 'R448A'; + public const REFRIGERANT_R_22 = 'R-22'; + public const REFRIGERANT_AMMONIA__R_717 = 'Ammonia (R-717)'; + public const REFRIGERANT_R_11 = 'R-11'; + public const REFRIGERANT_R_12 = 'R-12'; + public const REFRIGERANT_R_13 = 'R-13'; + public const REFRIGERANT_R_23 = 'R-23'; + public const REFRIGERANT_R_32 = 'R-32'; + public const REFRIGERANT_R_113 = 'R-113'; + public const REFRIGERANT_R_114 = 'R-114'; + public const REFRIGERANT_R_115 = 'R-115'; + public const REFRIGERANT_R_116 = 'R-116'; + public const REFRIGERANT_R_123 = 'R-123'; + public const REFRIGERANT_R_124 = 'R-124'; + public const REFRIGERANT_R_125 = 'R-125'; + public const REFRIGERANT_R_134A = 'R-134a'; + public const REFRIGERANT_R_141B = 'R-141b'; + public const REFRIGERANT_R_142B = 'R-142b'; + public const REFRIGERANT_R_143A = 'R-143a'; + public const REFRIGERANT_R_152A = 'R-152a'; + public const REFRIGERANT_R_218 = 'R-218'; + public const REFRIGERANT_R_227EA = 'R-227ea'; + public const REFRIGERANT_R_236FA = 'R-236fa'; + public const REFRIGERANT_R_245CA = 'R-245ca'; + public const REFRIGERANT_R_245FA = 'R-245fa'; + public const REFRIGERANT_R_C318 = 'R-C318'; + public const REFRIGERANT_R_401_A = 'R-401A'; + public const REFRIGERANT_R_401_B = 'R-401B'; + public const REFRIGERANT_R_401_C = 'R-401C'; + public const REFRIGERANT_R_402_A = 'R-402A'; + public const REFRIGERANT_R_402_B = 'R-402B'; + public const REFRIGERANT_R_403_A = 'R-403A'; + public const REFRIGERANT_R_403_B = 'R-403B'; + public const REFRIGERANT_R_404_A = 'R-404A'; + public const REFRIGERANT_R_405_A = 'R-405A'; + public const REFRIGERANT_R_406_A = 'R-406A'; + public const REFRIGERANT_R_407_A = 'R-407A'; + public const REFRIGERANT_R_407_B = 'R-407B'; + public const REFRIGERANT_R_407_C = 'R-407C'; + public const REFRIGERANT_R_407_D = 'R-407D'; + public const REFRIGERANT_R_407_E = 'R-407E'; + public const REFRIGERANT_R_408_A = 'R-408A'; + public const REFRIGERANT_R_409_A = 'R-409A'; + public const REFRIGERANT_R_409_B = 'R-409B'; + public const REFRIGERANT_R_410_A = 'R-410A'; + public const REFRIGERANT_R_411_A = 'R-411A'; + public const REFRIGERANT_R_411_B = 'R-411B'; + public const REFRIGERANT_R_412_A = 'R-412A'; + public const REFRIGERANT_R_413_A = 'R-413A'; + public const REFRIGERANT_R_414_A = 'R-414A'; + public const REFRIGERANT_R_414_B = 'R-414B'; + public const REFRIGERANT_R_415_A = 'R-415A'; + public const REFRIGERANT_R_415_B = 'R-415B'; + public const REFRIGERANT_R_416_A = 'R-416A'; + public const REFRIGERANT_R_417_A = 'R-417A'; + public const REFRIGERANT_R_418_A = 'R-418A'; + public const REFRIGERANT_R_419_A = 'R-419A'; + public const REFRIGERANT_R_420_A = 'R-420A'; + public const REFRIGERANT_R_421_A = 'R-421A'; + public const REFRIGERANT_R_421_B = 'R-421B'; + public const REFRIGERANT_R_422_A = 'R-422A'; + public const REFRIGERANT_R_422_B = 'R-422B'; + public const REFRIGERANT_R_422_C = 'R-422C'; + public const REFRIGERANT_R_422_D = 'R-422D'; + public const REFRIGERANT_R_423_A = 'R-423A'; + public const REFRIGERANT_R_424_A = 'R-424A'; + public const REFRIGERANT_R_425_A = 'R-425A'; + public const REFRIGERANT_R_426_A = 'R-426A'; + public const REFRIGERANT_R_427_A = 'R-427A'; + public const REFRIGERANT_R_428_A = 'R-428A'; + public const REFRIGERANT_R_500 = 'R-500'; + public const REFRIGERANT_R_502 = 'R-502'; + public const REFRIGERANT_R_503 = 'R-503'; + public const REFRIGERANT_R_507_A = 'R-507A'; + public const REFRIGERANT_R_508_A = 'R-508A'; + public const REFRIGERANT_R_508_B = 'R-508B'; + public const REFRIGERANT_R_509_A = 'R-509A'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRefrigerantAllowableValues() + { + return [ + self::REFRIGERANT_HFC_23, + self::REFRIGERANT_HFC_32, + self::REFRIGERANT_HFC_41, + self::REFRIGERANT_HFC_43_10MEE, + self::REFRIGERANT_HFC_125, + self::REFRIGERANT_HFC_134, + self::REFRIGERANT_HFC_134A, + self::REFRIGERANT_HFC_143, + self::REFRIGERANT_HFC_143A, + self::REFRIGERANT_HFC_152A, + self::REFRIGERANT_HFC_227EA, + self::REFRIGERANT_HFC_236FA, + self::REFRIGERANT_HFC_245CA, + self::REFRIGERANT_HFC_245FA, + self::REFRIGERANT_HFC_365MFC, + self::REFRIGERANT_R438_A, + self::REFRIGERANT_R448_A, + self::REFRIGERANT_R_22, + self::REFRIGERANT_AMMONIA__R_717, + self::REFRIGERANT_R_11, + self::REFRIGERANT_R_12, + self::REFRIGERANT_R_13, + self::REFRIGERANT_R_23, + self::REFRIGERANT_R_32, + self::REFRIGERANT_R_113, + self::REFRIGERANT_R_114, + self::REFRIGERANT_R_115, + self::REFRIGERANT_R_116, + self::REFRIGERANT_R_123, + self::REFRIGERANT_R_124, + self::REFRIGERANT_R_125, + self::REFRIGERANT_R_134A, + self::REFRIGERANT_R_141B, + self::REFRIGERANT_R_142B, + self::REFRIGERANT_R_143A, + self::REFRIGERANT_R_152A, + self::REFRIGERANT_R_218, + self::REFRIGERANT_R_227EA, + self::REFRIGERANT_R_236FA, + self::REFRIGERANT_R_245CA, + self::REFRIGERANT_R_245FA, + self::REFRIGERANT_R_C318, + self::REFRIGERANT_R_401_A, + self::REFRIGERANT_R_401_B, + self::REFRIGERANT_R_401_C, + self::REFRIGERANT_R_402_A, + self::REFRIGERANT_R_402_B, + self::REFRIGERANT_R_403_A, + self::REFRIGERANT_R_403_B, + self::REFRIGERANT_R_404_A, + self::REFRIGERANT_R_405_A, + self::REFRIGERANT_R_406_A, + self::REFRIGERANT_R_407_A, + self::REFRIGERANT_R_407_B, + self::REFRIGERANT_R_407_C, + self::REFRIGERANT_R_407_D, + self::REFRIGERANT_R_407_E, + self::REFRIGERANT_R_408_A, + self::REFRIGERANT_R_409_A, + self::REFRIGERANT_R_409_B, + self::REFRIGERANT_R_410_A, + self::REFRIGERANT_R_411_A, + self::REFRIGERANT_R_411_B, + self::REFRIGERANT_R_412_A, + self::REFRIGERANT_R_413_A, + self::REFRIGERANT_R_414_A, + self::REFRIGERANT_R_414_B, + self::REFRIGERANT_R_415_A, + self::REFRIGERANT_R_415_B, + self::REFRIGERANT_R_416_A, + self::REFRIGERANT_R_417_A, + self::REFRIGERANT_R_418_A, + self::REFRIGERANT_R_419_A, + self::REFRIGERANT_R_420_A, + self::REFRIGERANT_R_421_A, + self::REFRIGERANT_R_421_B, + self::REFRIGERANT_R_422_A, + self::REFRIGERANT_R_422_B, + self::REFRIGERANT_R_422_C, + self::REFRIGERANT_R_422_D, + self::REFRIGERANT_R_423_A, + self::REFRIGERANT_R_424_A, + self::REFRIGERANT_R_425_A, + self::REFRIGERANT_R_426_A, + self::REFRIGERANT_R_427_A, + self::REFRIGERANT_R_428_A, + self::REFRIGERANT_R_500, + self::REFRIGERANT_R_502, + self::REFRIGERANT_R_503, + self::REFRIGERANT_R_507_A, + self::REFRIGERANT_R_508_A, + self::REFRIGERANT_R_508_B, + self::REFRIGERANT_R_509_A, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('refrigerant', $data ?? [], null); + $this->setIfExists('annual_recharge', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['refrigerant'] === null) { + $invalidProperties[] = "'refrigerant' can't be null"; + } + $allowedValues = $this->getRefrigerantAllowableValues(); + if (!is_null($this->container['refrigerant']) && !in_array($this->container['refrigerant'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'refrigerant', must be one of '%s'", + $this->container['refrigerant'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['annual_recharge'] === null) { + $invalidProperties[] = "'annual_recharge' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets refrigerant + * + * @return string + */ + public function getRefrigerant() + { + return $this->container['refrigerant']; + } + + /** + * Sets refrigerant + * + * @param string $refrigerant Refrigerant type + * + * @return self + */ + public function setRefrigerant($refrigerant) + { + if (is_null($refrigerant)) { + throw new \InvalidArgumentException('non-nullable refrigerant cannot be null'); + } + $allowedValues = $this->getRefrigerantAllowableValues(); + if (!in_array($refrigerant, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'refrigerant', must be one of '%s'", + $refrigerant, + implode("', '", $allowedValues) + ) + ); + } + $this->container['refrigerant'] = $refrigerant; + + return $this; + } + + /** + * Gets annual_recharge + * + * @return float + */ + public function getAnnualRecharge() + { + return $this->container['annual_recharge']; + } + + /** + * Sets annual_recharge + * + * @param float $annual_recharge Amount of refrigerant annually recharged, kg product/year + * + * @return self + */ + public function setAnnualRecharge($annual_recharge) + { + if (is_null($annual_recharge)) { + throw new \InvalidArgumentException('non-nullable annual_recharge cannot be null'); + } + $this->container['annual_recharge'] = $annual_recharge; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.php b/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.php new file mode 100644 index 00000000..069dede0 --- /dev/null +++ b/examples/php-api-client/api-client/lib/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.php @@ -0,0 +1,585 @@ + + */ +class PostWildseafisheriesRequestEnterprisesInnerTransportsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'post_wildseafisheries_request_enterprises_inner_transports_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'fuel' => 'string', + 'distance' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'fuel' => null, + 'distance' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'type' => false, + 'fuel' => false, + 'distance' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'fuel' => 'fuel', + 'distance' => 'distance' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'fuel' => 'setFuel', + 'distance' => 'setDistance' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'fuel' => 'getFuel', + 'distance' => 'getDistance' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_NONE = 'None'; + public const TYPE_SMALL_CAR = 'Small Car'; + public const TYPE_MEDIUM_CAR = 'Medium Car'; + public const TYPE_LARGE_CAR = 'Large Car'; + public const TYPE_COURIER_VAN_UTILITY = 'Courier Van-Utility'; + public const TYPE__4_WD_MID_SIZE = '4WD Mid Size'; + public const TYPE_LIGHT_RIGID = 'Light Rigid'; + public const TYPE_MEDIUM_RIGID = 'Medium Rigid'; + public const TYPE_HEAVY_RIGID = 'Heavy Rigid'; + public const TYPE_HEAVY_BUS = 'Heavy Bus'; + public const FUEL_GASOLINE = 'Gasoline'; + public const FUEL_DIESEL_OIL = 'Diesel oil'; + public const FUEL_LIQUEFIED_PETROLEUM_GAS__LPG = 'Liquefied petroleum gas (LPG)'; + public const FUEL_FUEL_OIL = 'Fuel oil'; + public const FUEL_ETHANOL = 'Ethanol'; + public const FUEL_BIODIESEL = 'Biodiesel'; + public const FUEL_RENEWABLE_DIESEL = 'Renewable diesel'; + public const FUEL_OTHER_BIOFUELS = 'Other biofuels'; + public const FUEL_LIQUIFIED_NATURAL_GAS = 'Liquified natural gas'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_NONE, + self::TYPE_SMALL_CAR, + self::TYPE_MEDIUM_CAR, + self::TYPE_LARGE_CAR, + self::TYPE_COURIER_VAN_UTILITY, + self::TYPE__4_WD_MID_SIZE, + self::TYPE_LIGHT_RIGID, + self::TYPE_MEDIUM_RIGID, + self::TYPE_HEAVY_RIGID, + self::TYPE_HEAVY_BUS, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFuelAllowableValues() + { + return [ + self::FUEL_GASOLINE, + self::FUEL_DIESEL_OIL, + self::FUEL_LIQUEFIED_PETROLEUM_GAS__LPG, + self::FUEL_FUEL_OIL, + self::FUEL_ETHANOL, + self::FUEL_BIODIESEL, + self::FUEL_RENEWABLE_DIESEL, + self::FUEL_OTHER_BIOFUELS, + self::FUEL_LIQUIFIED_NATURAL_GAS, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('distance', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['fuel'] === null) { + $invalidProperties[] = "'fuel' can't be null"; + } + $allowedValues = $this->getFuelAllowableValues(); + if (!is_null($this->container['fuel']) && !in_array($this->container['fuel'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'fuel', must be one of '%s'", + $this->container['fuel'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['distance'] === null) { + $invalidProperties[] = "'distance' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Transport type + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets fuel + * + * @return string + */ + public function getFuel() + { + return $this->container['fuel']; + } + + /** + * Sets fuel + * + * @param string $fuel Fuel type + * + * @return self + */ + public function setFuel($fuel) + { + if (is_null($fuel)) { + throw new \InvalidArgumentException('non-nullable fuel cannot be null'); + } + $allowedValues = $this->getFuelAllowableValues(); + if (!in_array($fuel, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'fuel', must be one of '%s'", + $fuel, + implode("', '", $allowedValues) + ) + ); + } + $this->container['fuel'] = $fuel; + + return $this; + } + + /** + * Gets distance + * + * @return float + */ + public function getDistance() + { + return $this->container['distance']; + } + + /** + * Sets distance + * + * @param float $distance Distance in km + * + * @return self + */ + public function setDistance($distance) + { + if (is_null($distance)) { + throw new \InvalidArgumentException('non-nullable distance cannot be null'); + } + $this->container['distance'] = $distance; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/examples/php-api-client/api-client/lib/ObjectSerializer.php b/examples/php-api-client/api-client/lib/ObjectSerializer.php new file mode 100644 index 00000000..efe725da --- /dev/null +++ b/examples/php-api-client/api-client/lib/ObjectSerializer.php @@ -0,0 +1,600 @@ +format('Y-m-d') : $data->format(self::$dateTimeFormat); + } + + if (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } + + if (is_object($data)) { + $values = []; + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + foreach ($data::openAPITypes() as $property => $openAPIType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + $callable = [$openAPIType, 'getAllowableEnumValues']; + if (is_callable($callable)) { + /** array $callable */ + $allowedEnumTypes = $callable(); + if (!in_array($value, $allowedEnumTypes, true)) { + $imploded = implode("', '", $allowedEnumTypes); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + } + } + } + if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } + } + } else { + foreach($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); + } + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp($timestamp) + { + if (!is_string($timestamp)) return $timestamp; + + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the path, by url-encoding. + * + * @param string $value a string which will be part of the path + * + * @return string the serialized object + */ + public static function toPathValue($value) + { + return rawurlencode(self::toString($value)); + } + + /** + * Checks if a value is empty, based on its OpenAPI type. + * + * @param mixed $value + * @param string $openApiType + * + * @return bool true if $value is empty + */ + private static function isEmptyValue($value, string $openApiType): bool + { + # If empty() returns false, it is not empty regardless of its type. + if (!empty($value)) { + return false; + } + + # Null is always empty, as we cannot send a real "null" value in a query parameter. + if ($value === null) { + return true; + } + + switch ($openApiType) { + # For numeric values, false and '' are considered empty. + # This comparison is safe for floating point values, since the previous call to empty() will + # filter out values that don't match 0. + case 'int': + case 'integer': + return $value !== 0; + + case 'number': + case 'float': + return $value !== 0 && $value !== 0.0; + + # For boolean values, '' is considered empty + case 'bool': + case 'boolean': + return !in_array($value, [false, 0], true); + + # For string values, '' is considered empty. + case 'string': + return $value === ''; + + # For all the other types, any value at this point can be considered empty. + default: + return true; + } + } + + /** + * Take query parameter properties and turn it into an array suitable for + * native http_build_query or GuzzleHttp\Psr7\Query::build. + * + * @param mixed $value Parameter value + * @param string $paramName Parameter name + * @param string $openApiType OpenAPIType eg. array or object + * @param string $style Parameter serialization style + * @param bool $explode Parameter explode option + * @param bool $required Whether query param is required or not + * + * @return array + */ + public static function toQueryValue( + $value, + string $paramName, + string $openApiType = 'string', + string $style = 'form', + bool $explode = true, + bool $required = true + ): array { + + # Check if we should omit this parameter from the query. This should only happen when: + # - Parameter is NOT required; AND + # - its value is set to a value that is equivalent to "empty", depending on its OpenAPI type. For + # example, 0 as "int" or "boolean" is NOT an empty value. + if (self::isEmptyValue($value, $openApiType)) { + if ($required) { + return ["{$paramName}" => '']; + } else { + return []; + } + } + + # Handle DateTime objects in query + if($openApiType === "\\DateTime" && $value instanceof \DateTime) { + return ["{$paramName}" => $value->format(self::$dateTimeFormat)]; + } + + $query = []; + $value = (in_array($openApiType, ['object', 'array'], true)) ? (array)$value : $value; + + // since \GuzzleHttp\Psr7\Query::build fails with nested arrays + // need to flatten array first + $flattenArray = function ($arr, $name, &$result = []) use (&$flattenArray, $style, $explode) { + if (!is_array($arr)) return $arr; + + foreach ($arr as $k => $v) { + $prop = ($style === 'deepObject') ? $prop = "{$name}[{$k}]" : $k; + + if (is_array($v)) { + $flattenArray($v, $prop, $result); + } else { + if ($style !== 'deepObject' && !$explode) { + // push key itself + $result[] = $prop; + } + $result[$prop] = $v; + } + } + return $result; + }; + + $value = $flattenArray($value, $paramName); + + // https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values + if ($openApiType === 'array' && $style === 'deepObject' && $explode) { + return $value; + } + + if ($openApiType === 'object' && ($style === 'deepObject' || $explode)) { + return $value; + } + + if ('boolean' === $openApiType && is_bool($value)) { + $value = self::convertBoolToQueryStringFormat($value); + } + + // handle style in serializeCollection + $query[$paramName] = ($explode) ? $value : self::serializeCollection((array)$value, $style); + + return $query; + } + + /** + * Convert boolean value to format for query string. + * + * @param bool $value Boolean value + * + * @return int|string Boolean value in format + */ + public static function convertBoolToQueryStringFormat(bool $value) + { + if (Configuration::BOOLEAN_FORMAT_STRING == Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString()) { + return $value ? 'true' : 'false'; + } + + return (int) $value; + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the header. If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601 + * + * @param string $value a string which will be part of the header + * + * @return string the header string + */ + public static function toHeaderValue($value) + { + $callable = [$value, 'toHeaderValue']; + if (is_callable($callable)) { + return $callable(); + } + + return self::toString($value); + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the parameter. If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601 + * If it's a boolean, convert it to "true" or "false". + * + * @param float|int|bool|\DateTime $value the value of the parameter + * + * @return string the header string + */ + public static function toString($value) + { + if ($value instanceof \DateTime) { // datetime in ISO8601 format + return $value->format(self::$dateTimeFormat); + } elseif (is_bool($value)) { + return $value ? 'true' : 'false'; + } else { + return (string) $value; + } + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $style)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($style) { + case 'pipeDelimited': + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'spaceDelimited': + case 'ssv': + return implode(' ', $collection); + + case 'simple': + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[]|null $httpHeaders HTTP headers + * + * @return object|array|null a single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } + + if (strcasecmp(substr($class, -2), '[]') === 0) { + $data = is_string($data) ? json_decode($data) : $data; + + if (!is_array($data)) { + throw new \InvalidArgumentException("Invalid array '$class'"); + } + + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } + + if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array + $data = is_string($data) ? json_decode($data) : $data; + settype($data, 'array'); + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } + + if ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === 'mixed') { + settype($data, gettype($data)); + return $data; + } + + if ($class === '\DateTime') { + // Some APIs return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + try { + return new \DateTime($data); + } catch (\Exception $exception) { + // Some APIs return a date-time with too high nanosecond + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new \DateTime(self::sanitizeTimestamp($data)); + } + } else { + return null; + } + } + + if ($class === '\SplFileObject') { + $data = Utils::streamFor($data); + + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if ( + is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } + + /** @psalm-suppress ParadoxicalCondition */ + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } + + + if (method_exists($class, 'getAllowableEnumValues')) { + if (!in_array($data, $class::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + $data = is_string($data) ? json_decode($data) : $data; + + if (is_array($data)) { + $data = (object)$data; + } + + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\OpenAPI\Client\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter)) { + continue; + } + + if (!isset($data->{$instance::attributeMap()[$property]})) { + if ($instance::isNullable($property)) { + $instance->$propertySetter(null); + } + + continue; + } + + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } + + /** + * Build a query string from an array of key value pairs. + * + * This function can use the return value of `parse()` to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like `http_build_query()` would). + * + * The function is copied from https://github.com/guzzle/psr7/blob/a243f80a1ca7fe8ceed4deee17f12c1930efe662/src/Query.php#L59-L112 + * with a modification which is described in https://github.com/guzzle/psr7/pull/603 + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 + * to encode using RFC3986, or PHP_QUERY_RFC1738 + * to encode using RFC1738. + */ + public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): string + { + if (!$params) { + return ''; + } + + if ($encoding === false) { + $encoder = function (string $str): string { + return $str; + }; + } elseif ($encoding === PHP_QUERY_RFC3986) { + $encoder = 'rawurlencode'; + } elseif ($encoding === PHP_QUERY_RFC1738) { + $encoder = 'urlencode'; + } else { + throw new \InvalidArgumentException('Invalid type'); + } + + $castBool = Configuration::BOOLEAN_FORMAT_INT == Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString() + ? function ($v) { return (int) $v; } + : function ($v) { return $v ? 'true' : 'false'; }; + + $qs = ''; + foreach ($params as $k => $v) { + $k = $encoder((string) $k); + if (!is_array($v)) { + $qs .= $k; + $v = is_bool($v) ? $castBool($v) : $v; + if ($v !== null) { + $qs .= '='.$encoder((string) $v); + } + $qs .= '&'; + } else { + foreach ($v as $vv) { + $qs .= $k; + $vv = is_bool($vv) ? $castBool($vv) : $vv; + if ($vv !== null) { + $qs .= '='.$encoder((string) $vv); + } + $qs .= '&'; + } + } + } + + return $qs ? (string) substr($qs, 0, -1) : ''; + } +} diff --git a/examples/php-api-client/api-client/phpunit.xml.dist b/examples/php-api-client/api-client/phpunit.xml.dist new file mode 100644 index 00000000..485899aa --- /dev/null +++ b/examples/php-api-client/api-client/phpunit.xml.dist @@ -0,0 +1,18 @@ + + + + + ./lib/Api + ./lib/Model + + + + + ./test/Api + ./test/Model + + + + + + diff --git a/examples/php-api-client/api-client/run_test.sh b/examples/php-api-client/api-client/run_test.sh new file mode 100755 index 00000000..cb1cecc6 --- /dev/null +++ b/examples/php-api-client/api-client/run_test.sh @@ -0,0 +1 @@ +php ./example.php \ No newline at end of file diff --git a/examples/php-api-client/api-client/setup_local.sh b/examples/php-api-client/api-client/setup_local.sh new file mode 100755 index 00000000..03105477 --- /dev/null +++ b/examples/php-api-client/api-client/setup_local.sh @@ -0,0 +1 @@ +composer install \ No newline at end of file diff --git a/examples/php-api-client/api-client/test/Api/GAFApiTest.php b/examples/php-api-client/api-client/test/Api/GAFApiTest.php new file mode 100644 index 00000000..aeb67a24 --- /dev/null +++ b/examples/php-api-client/api-client/test/Api/GAFApiTest.php @@ -0,0 +1,314 @@ + [ - // Add your enterprise data here - // See lib/Model/PostAquacultureRequestEnterprisesInner.php for structure - ] + // Create seasonal data for cows + $springSeason = new PostBeefRequestBeefInnerClassesBullsGt1Autumn([ + 'head' => 50, + 'liveweight' => 450, + 'liveweight_gain' => 0.5 + ]); + + $summerSeason = new PostBeefRequestBeefInnerClassesBullsGt1Autumn([ + 'head' => 50, + 'liveweight' => 440, + 'liveweight_gain' => 0.3 + ]); + + $autumnSeason = new PostBeefRequestBeefInnerClassesBullsGt1Autumn([ + 'head' => 50, + 'liveweight' => 460, + 'liveweight_gain' => 0.4 + ]); + + $winterSeason = new PostBeefRequestBeefInnerClassesBullsGt1Autumn([ + 'head' => 50, + 'liveweight' => 450, + 'liveweight_gain' => 0.4 + ]); + + // Create cows class (greater than 2 years old) + $cowsGt2 = new PostBeefRequestBeefInnerClassesCowsGt2([ + 'spring' => $springSeason, + 'summer' => $summerSeason, + 'autumn' => $autumnSeason, + 'winter' => $winterSeason, + 'head_sold' => 25, + 'sale_weight' => 500 + ]); + + // Create classes object with cows + $classes = new PostBeefRequestBeefInnerClasses([ + 'cows_gt2' => $cowsGt2 + ]); + + // Create fertiliser object + $fertiliser = new PostBeefRequestBeefInnerFertiliser([ + 'single_superphosphate' => 5.0, + 'pasture_dryland' => 10.0, + 'pasture_irrigated' => 2.0, + 'crops_dryland' => 8.0, + 'crops_irrigated' => 1.0 + ]); + + // Create mineral supplementation object + $mineralSupplementation = new PostBeefRequestBeefInnerMineralSupplementation([ + 'mineral_block' => 2.0, + 'mineral_block_urea' => 0.3, + 'weaner_block' => 1.0, + 'weaner_block_urea' => 0.2, + 'dry_season_mix' => 1.5, + 'dry_season_mix_urea' => 0.25 + ]); + + // Create cows calving object + $cowsCalving = new PostBeefRequestBeefInnerCowsCalving([ + 'spring' => 0.2, + 'summer' => 0.1, + 'autumn' => 0.5, + 'winter' => 0.2 + ]); + + // Create beef inner object + $beefInner = new PostBeefRequestBeefInner([ + 'id' => 'beef_cattle_001', + 'classes' => $classes, + 'limestone' => 10.0, + 'limestone_fraction' => 0.8, + 'fertiliser' => $fertiliser, + 'diesel' => 1000, + 'petrol' => 200, + 'lpg' => 100, + 'mineral_supplementation' => $mineralSupplementation, + 'electricity_source' => 'State Grid', + 'electricity_renewable' => 0.2, + 'electricity_use' => 5000, + 'grain_feed' => 10.0, + 'hay_feed' => 5.0, + 'cottonseed_feed' => 2.0, + 'herbicide' => 50.0, + 'herbicide_other' => 20.0, + 'cows_calving' => $cowsCalving + ]); + + // Create main request object + $request = new PostBeefRequest([ + 'state' => 'qld', + 'north_of_tropic_of_capricorn' => true, + 'rainfall_above600' => true, + 'beef' => [$beefInner], + 'burning' => [], + 'vegetation' => [] ]); + // Configure API $config = Configuration::getDefaultConfiguration(); $config->setHost('https://emissionscalculator-mtls.staging.aiaapi.com/calculator/3.0.0'); - $config->setCertFile(__DIR__ . '/cert.pem'); $config->setKeyFile(__DIR__ . '/key.pem'); // Initialize API $api = new GAFApi(new Client(), $config); + echo "Calling beef API...\n"; + echo "================================\n"; + // Make the API call - $result = $api->postAquaculture($request); + $result = $api->postBeef($request); // Print the result + echo "Success! API call completed.\n\n"; + echo "Response:\n"; print_r($result); + echo "\n================================\n"; + echo "API call complete!\n"; + } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; + echo "File: " . $e->getFile() . "\n"; + echo "Line: " . $e->getLine() . "\n"; } \ No newline at end of file diff --git a/examples/python-api-client/api-client/test_api.py b/examples/python-api-client/api-client/test_api.py index f61ec039..7c8b0cc4 100755 --- a/examples/python-api-client/api-client/test_api.py +++ b/examples/python-api-client/api-client/test_api.py @@ -20,7 +20,45 @@ def create_valid_beef_input(): "beef": [ { "id": "beef_cattle_001", - "classes": {}, # All optional fields - can be empty dict + "classes": { + # Example: Cows greater than 2 years old + "cowsGt2": { + "spring": { + "head": 50, # number of animals + "liveweight": 450, # average kg/head + "liveweightGain": 0.5, # kg/day + "crudeProtein": None, # optional + "dryMatterDigestibility": None # optional + }, + "summer": { + "head": 50, + "liveweight": 440, + "liveweightGain": 0.3, + "crudeProtein": None, + "dryMatterDigestibility": None + }, + "autumn": { + "head": 50, + "liveweight": 460, + "liveweightGain": 0.4, + "crudeProtein": None, + "dryMatterDigestibility": None + }, + "winter": { + "head": 50, + "liveweight": 450, + "liveweightGain": 0.4, + "crudeProtein": None, + "dryMatterDigestibility": None + }, + "headSold": 25, # required: number sold + "saleWeight": 500, # required: weight at sale in kg/head + "headPurchased": None, # optional + "purchasedWeight": None, # optional + "source": None, # optional + "purchases": None # optional + } + }, "limestone": 10.0, "limestoneFraction": 0.8, # Fraction between 0 and 1 "fertiliser": { diff --git a/examples/python-api-client/resources/test_api.py b/examples/python-api-client/resources/test_api.py index f61ec039..7c8b0cc4 100755 --- a/examples/python-api-client/resources/test_api.py +++ b/examples/python-api-client/resources/test_api.py @@ -20,7 +20,45 @@ def create_valid_beef_input(): "beef": [ { "id": "beef_cattle_001", - "classes": {}, # All optional fields - can be empty dict + "classes": { + # Example: Cows greater than 2 years old + "cowsGt2": { + "spring": { + "head": 50, # number of animals + "liveweight": 450, # average kg/head + "liveweightGain": 0.5, # kg/day + "crudeProtein": None, # optional + "dryMatterDigestibility": None # optional + }, + "summer": { + "head": 50, + "liveweight": 440, + "liveweightGain": 0.3, + "crudeProtein": None, + "dryMatterDigestibility": None + }, + "autumn": { + "head": 50, + "liveweight": 460, + "liveweightGain": 0.4, + "crudeProtein": None, + "dryMatterDigestibility": None + }, + "winter": { + "head": 50, + "liveweight": 450, + "liveweightGain": 0.4, + "crudeProtein": None, + "dryMatterDigestibility": None + }, + "headSold": 25, # required: number sold + "saleWeight": 500, # required: weight at sale in kg/head + "headPurchased": None, # optional + "purchasedWeight": None, # optional + "source": None, # optional + "purchases": None # optional + } + }, "limestone": 10.0, "limestoneFraction": 0.8, # Fraction between 0 and 1 "fertiliser": { From 45d66672ed780ceee6dc65e95a3a30ff6dd8654f Mon Sep 17 00:00:00 2001 From: Eddie Sholl Date: Mon, 27 Oct 2025 14:31:03 +1100 Subject: [PATCH 6/8] Trim out unneeded generated files --- .gitignore | 3 +- examples/php-api-client/README.md | 31 + .../api-client/.openapi-generator/FILES | 584 --------- .../api-client/docs/Api/GAFApi.md | 1147 ----------------- .../docs/Model/PostAquaculture200Response.md | 16 - ...uaculture200ResponseCarbonSequestration.md | 10 - .../PostAquaculture200ResponseIntensities.md | 11 - ...Aquaculture200ResponseIntermediateInner.md | 15 - ...nseIntermediateInnerCarbonSequestration.md | 9 - .../Model/PostAquaculture200ResponseNet.md | 9 - ...tAquaculture200ResponsePurchasedOffsets.md | 9 - .../Model/PostAquaculture200ResponseScope1.md | 19 - .../Model/PostAquaculture200ResponseScope2.md | 10 - .../Model/PostAquaculture200ResponseScope3.md | 16 - .../docs/Model/PostAquacultureRequest.md | 9 - .../PostAquacultureRequestEnterprisesInner.md | 25 - ...cultureRequestEnterprisesInnerBaitInner.md | 12 - ...eRequestEnterprisesInnerCustomBaitInner.md | 10 - ...eRequestEnterprisesInnerFluidWasteInner.md | 13 - ...tAquacultureRequestEnterprisesInnerFuel.md | 11 - ...EnterprisesInnerFuelStationaryFuelInner.md | 10 - ...tEnterprisesInnerFuelTransportFuelInner.md | 10 - ...uestEnterprisesInnerInboundFreightInner.md | 10 - ...equestEnterprisesInnerRefrigerantsInner.md | 10 - ...ultureRequestEnterprisesInnerSolidWaste.md | 10 - .../docs/Model/PostBeef200Response.md | 15 - .../PostBeef200ResponseIntermediateInner.md | 15 - ...200ResponseIntermediateInnerIntensities.md | 11 - .../docs/Model/PostBeef200ResponseNet.md | 10 - .../docs/Model/PostBeef200ResponseScope1.md | 25 - .../docs/Model/PostBeef200ResponseScope3.md | 17 - .../api-client/docs/Model/PostBeefRequest.md | 14 - .../docs/Model/PostBeefRequestBeefInner.md | 26 - .../Model/PostBeefRequestBeefInnerClasses.md | 24 - ...PostBeefRequestBeefInnerClassesBullsGt1.md | 18 - ...efRequestBeefInnerClassesBullsGt1Autumn.md | 13 - ...tBeefInnerClassesBullsGt1PurchasesInner.md | 11 - ...efRequestBeefInnerClassesBullsGt1Traded.md | 18 - .../PostBeefRequestBeefInnerClassesCowsGt2.md | 18 - ...eefRequestBeefInnerClassesCowsGt2Traded.md | 18 - ...tBeefRequestBeefInnerClassesHeifers1To2.md | 18 - ...equestBeefInnerClassesHeifers1To2Traded.md | 18 - ...stBeefRequestBeefInnerClassesHeifersGt2.md | 18 - ...RequestBeefInnerClassesHeifersGt2Traded.md | 18 - ...stBeefRequestBeefInnerClassesHeifersLt1.md | 18 - ...RequestBeefInnerClassesHeifersLt1Traded.md | 18 - ...stBeefRequestBeefInnerClassesSteers1To2.md | 18 - ...RequestBeefInnerClassesSteers1To2Traded.md | 18 - ...ostBeefRequestBeefInnerClassesSteersGt2.md | 18 - ...fRequestBeefInnerClassesSteersGt2Traded.md | 18 - ...ostBeefRequestBeefInnerClassesSteersLt1.md | 18 - ...fRequestBeefInnerClassesSteersLt1Traded.md | 18 - .../PostBeefRequestBeefInnerCowsCalving.md | 12 - .../PostBeefRequestBeefInnerFertiliser.md | 17 - ...eefInnerFertiliserOtherFertilisersInner.md | 11 - ...fRequestBeefInnerMineralSupplementation.md | 14 - .../docs/Model/PostBeefRequestBurningInner.md | 10 - .../PostBeefRequestBurningInnerBurning.md | 15 - .../Model/PostBeefRequestVegetationInner.md | 11 - ...ostBeefRequestVegetationInnerVegetation.md | 13 - .../docs/Model/PostBuffalo200Response.md | 15 - .../PostBuffalo200ResponseIntensities.md | 11 - ...PostBuffalo200ResponseIntermediateInner.md | 15 - .../docs/Model/PostBuffalo200ResponseNet.md | 9 - .../Model/PostBuffalo200ResponseScope1.md | 23 - .../Model/PostBuffalo200ResponseScope3.md | 16 - .../docs/Model/PostBuffaloRequest.md | 12 - .../Model/PostBuffaloRequestBuffalosInner.md | 25 - .../PostBuffaloRequestBuffalosInnerClasses.md | 16 - ...BuffaloRequestBuffalosInnerClassesBulls.md | 15 - ...oRequestBuffalosInnerClassesBullsAutumn.md | 9 - ...BuffalosInnerClassesBullsPurchasesInner.md | 10 - ...BuffaloRequestBuffalosInnerClassesCalfs.md | 15 - ...tBuffaloRequestBuffalosInnerClassesCows.md | 15 - ...uffaloRequestBuffalosInnerClassesSteers.md | 15 - ...loRequestBuffalosInnerClassesTradeBulls.md | 15 - ...loRequestBuffalosInnerClassesTradeCalfs.md | 15 - ...aloRequestBuffalosInnerClassesTradeCows.md | 15 - ...oRequestBuffalosInnerClassesTradeSteers.md | 15 - ...tBuffaloRequestBuffalosInnerCowsCalving.md | 12 - ...faloRequestBuffalosInnerSeasonalCalving.md | 12 - .../PostBuffaloRequestVegetationInner.md | 10 - .../docs/Model/PostCotton200Response.md | 15 - .../PostCotton200ResponseIntermediateInner.md | 15 - ...200ResponseIntermediateInnerIntensities.md | 22 - .../docs/Model/PostCotton200ResponseNet.md | 10 - .../docs/Model/PostCotton200ResponseScope1.md | 23 - .../docs/Model/PostCotton200ResponseScope3.md | 14 - .../docs/Model/PostCottonRequest.md | 13 - .../docs/Model/PostCottonRequestCropsInner.md | 35 - .../Model/PostCottonRequestVegetationInner.md | 10 - .../docs/Model/PostDairy200Response.md | 15 - .../Model/PostDairy200ResponseIntensities.md | 10 - .../PostDairy200ResponseIntermediateInner.md | 15 - .../docs/Model/PostDairy200ResponseNet.md | 9 - .../docs/Model/PostDairy200ResponseScope1.md | 28 - .../docs/Model/PostDairy200ResponseScope3.md | 15 - .../api-client/docs/Model/PostDairyRequest.md | 13 - .../docs/Model/PostDairyRequestDairyInner.md | 30 - .../Model/PostDairyRequestDairyInnerAreas.md | 12 - .../PostDairyRequestDairyInnerClasses.md | 13 - ...ryRequestDairyInnerClassesDairyBullsGt1.md | 12 - ...ryRequestDairyInnerClassesDairyBullsLt1.md | 12 - ...DairyRequestDairyInnerClassesHeifersGt1.md | 12 - ...DairyRequestDairyInnerClassesHeifersLt1.md | 12 - ...airyRequestDairyInnerClassesMilkingCows.md | 12 - ...questDairyInnerClassesMilkingCowsAutumn.md | 14 - ...stDairyInnerManureManagementMilkingCows.md | 13 - ...airyRequestDairyInnerSeasonalFertiliser.md | 12 - ...questDairyInnerSeasonalFertiliserAutumn.md | 12 - .../Model/PostDairyRequestVegetationInner.md | 10 - .../docs/Model/PostDeer200Response.md | 15 - .../Model/PostDeer200ResponseIntensities.md | 11 - .../PostDeer200ResponseIntermediateInner.md | 15 - .../docs/Model/PostDeer200ResponseNet.md | 9 - .../api-client/docs/Model/PostDeerRequest.md | 12 - .../docs/Model/PostDeerRequestDeersInner.md | 25 - .../Model/PostDeerRequestDeersInnerClasses.md | 16 - ...eerRequestDeersInnerClassesBreedingDoes.md | 15 - .../PostDeerRequestDeersInnerClassesBucks.md | 15 - .../PostDeerRequestDeersInnerClassesFawn.md | 15 - ...stDeerRequestDeersInnerClassesOtherDoes.md | 15 - ...tDeerRequestDeersInnerClassesTradeBucks.md | 15 - ...stDeerRequestDeersInnerClassesTradeDoes.md | 15 - ...stDeerRequestDeersInnerClassesTradeFawn.md | 15 - ...rRequestDeersInnerClassesTradeOtherDoes.md | 15 - .../PostDeerRequestDeersInnerDoesFawning.md | 12 - ...ostDeerRequestDeersInnerSeasonalFawning.md | 12 - .../Model/PostDeerRequestVegetationInner.md | 10 - .../docs/Model/PostFeedlot200Response.md | 15 - ...PostFeedlot200ResponseIntermediateInner.md | 15 - ...200ResponseIntermediateInnerIntensities.md | 11 - ...tFeedlot200ResponseIntermediateInnerNet.md | 9 - .../Model/PostFeedlot200ResponseScope1.md | 26 - .../Model/PostFeedlot200ResponseScope3.md | 16 - .../docs/Model/PostFeedlotRequest.md | 11 - .../Model/PostFeedlotRequestFeedlotsInner.md | 29 - ...tFeedlotRequestFeedlotsInnerGroupsInner.md | 9 - ...questFeedlotsInnerGroupsInnerStaysInner.md | 17 - ...ostFeedlotRequestFeedlotsInnerPurchases.md | 24 - ...uestFeedlotsInnerPurchasesBullsGt1Inner.md | 11 - .../PostFeedlotRequestFeedlotsInnerSales.md | 24 - ...tRequestFeedlotsInnerSalesBullsGt1Inner.md | 10 - .../PostFeedlotRequestVegetationInner.md | 10 - .../docs/Model/PostGoat200Response.md | 15 - .../Model/PostGoat200ResponseIntensities.md | 14 - .../PostGoat200ResponseIntermediateInner.md | 15 - .../docs/Model/PostGoat200ResponseNet.md | 9 - .../api-client/docs/Model/PostGoatRequest.md | 12 - .../docs/Model/PostGoatRequestGoatsInner.md | 24 - .../Model/PostGoatRequestGoatsInnerClasses.md | 21 - ...estGoatsInnerClassesBreedingDoesNannies.md | 20 - ...tGoatRequestGoatsInnerClassesBucksBilly.md | 20 - .../PostGoatRequestGoatsInnerClassesKids.md | 20 - ...tsInnerClassesMaidenBreedingDoesNannies.md | 20 - ...GoatsInnerClassesOtherDoesCulledFemales.md | 20 - ...atsInnerClassesTradeBreedingDoesNannies.md | 20 - ...tGoatRequestGoatsInnerClassesTradeBucks.md | 20 - ...stGoatRequestGoatsInnerClassesTradeDoes.md | 20 - ...stGoatRequestGoatsInnerClassesTradeKids.md | 20 - ...erClassesTradeMaidenBreedingDoesNannies.md | 20 - ...InnerClassesTradeOtherDoesCulledFemales.md | 20 - ...oatRequestGoatsInnerClassesTradeWethers.md | 20 - ...PostGoatRequestGoatsInnerClassesWethers.md | 20 - .../Model/PostGoatRequestVegetationInner.md | 10 - .../docs/Model/PostGrains200Response.md | 16 - .../PostGrains200ResponseIntermediateInner.md | 15 - ...ediateInnerIntensitiesWithSequestration.md | 11 - .../docs/Model/PostGrainsRequest.md | 13 - .../docs/Model/PostGrainsRequestCropsInner.md | 30 - .../docs/Model/PostHorticulture200Response.md | 15 - ...orticulture200ResponseIntermediateInner.md | 15 - ...ediateInnerIntensitiesWithSequestration.md | 11 - .../PostHorticulture200ResponseScope1.md | 25 - .../docs/Model/PostHorticultureRequest.md | 13 - .../PostHorticultureRequestCropsInner.md | 31 - ...ltureRequestCropsInnerRefrigerantsInner.md | 10 - .../docs/Model/PostPork200Response.md | 15 - .../Model/PostPork200ResponseIntensities.md | 11 - .../PostPork200ResponseIntermediateInner.md | 15 - .../docs/Model/PostPork200ResponseNet.md | 9 - .../docs/Model/PostPork200ResponseScope1.md | 25 - .../docs/Model/PostPork200ResponseScope3.md | 17 - .../api-client/docs/Model/PostPorkRequest.md | 13 - .../docs/Model/PostPorkRequestPorkInner.md | 23 - .../Model/PostPorkRequestPorkInnerClasses.md | 15 - .../PostPorkRequestPorkInnerClassesBoars.md | 18 - .../PostPorkRequestPorkInnerClassesGilts.md | 18 - .../PostPorkRequestPorkInnerClassesGrowers.md | 18 - ...orkRequestPorkInnerClassesSlaughterPigs.md | 18 - .../PostPorkRequestPorkInnerClassesSows.md | 18 - ...stPorkRequestPorkInnerClassesSowsManure.md | 12 - ...RequestPorkInnerClassesSowsManureSpring.md | 13 - .../PostPorkRequestPorkInnerClassesSuckers.md | 18 - .../PostPorkRequestPorkInnerClassesWeaners.md | 18 - ...stPorkRequestPorkInnerFeedProductsInner.md | 12 - ...stPorkInnerFeedProductsInnerIngredients.md | 20 - .../Model/PostPorkRequestVegetationInner.md | 10 - .../docs/Model/PostPoultry200Response.md | 16 - .../PostPoultry200ResponseIntensities.md | 14 - ...try200ResponseIntermediateBroilersInner.md | 15 - ...nseIntermediateBroilersInnerIntensities.md | 11 - ...ultry200ResponseIntermediateLayersInner.md | 15 - ...ponseIntermediateLayersInnerIntensities.md | 11 - .../docs/Model/PostPoultry200ResponseNet.md | 11 - .../Model/PostPoultry200ResponseScope1.md | 19 - .../Model/PostPoultry200ResponseScope3.md | 15 - .../docs/Model/PostPoultryRequest.md | 14 - .../Model/PostPoultryRequestBroilersInner.md | 28 - ...tPoultryRequestBroilersInnerGroupsInner.md | 14 - ...equestBroilersInnerGroupsInnerFeedInner.md | 12 - ...ersInnerGroupsInnerFeedInnerIngredients.md | 13 - ...ilersInnerGroupsInnerMeatChickenGrowers.md | 18 - ...roilersInnerMeatChickenGrowersPurchases.md | 10 - ...BroilersInnerMeatChickenLayersPurchases.md | 10 - ...yRequestBroilersInnerMeatOtherPurchases.md | 10 - ...stPoultryRequestBroilersInnerSalesInner.md | 11 - .../Model/PostPoultryRequestLayersInner.md | 32 - .../PostPoultryRequestLayersInnerLayers.md | 12 - ...tPoultryRequestLayersInnerLayersEggSale.md | 10 - ...oultryRequestLayersInnerLayersPurchases.md | 10 - ...ltryRequestLayersInnerMeatChickenLayers.md | 12 - ...uestLayersInnerMeatChickenLayersEggSale.md | 10 - .../PostPoultryRequestVegetationInner.md | 11 - .../docs/Model/PostProcessing200Response.md | 16 - ...stProcessing200ResponseIntensitiesInner.md | 12 - ...tProcessing200ResponseIntermediateInner.md | 15 - .../Model/PostProcessing200ResponseNet.md | 9 - .../Model/PostProcessing200ResponseScope1.md | 20 - .../Model/PostProcessing200ResponseScope3.md | 12 - .../docs/Model/PostProcessingRequest.md | 10 - .../PostProcessingRequestProductsInner.md | 19 - ...stProcessingRequestProductsInnerProduct.md | 10 - .../docs/Model/PostRice200Response.md | 15 - .../Model/PostRice200ResponseIntensities.md | 12 - .../PostRice200ResponseIntermediateInner.md | 15 - ...200ResponseIntermediateInnerIntensities.md | 12 - .../docs/Model/PostRice200ResponseScope1.md | 24 - .../api-client/docs/Model/PostRiceRequest.md | 13 - .../docs/Model/PostRiceRequestCropsInner.md | 31 - .../docs/Model/PostSheep200Response.md | 15 - .../PostSheep200ResponseIntermediateInner.md | 15 - ...200ResponseIntermediateInnerIntensities.md | 14 - .../docs/Model/PostSheep200ResponseNet.md | 10 - .../api-client/docs/Model/PostSheepRequest.md | 13 - .../docs/Model/PostSheepRequestSheepInner.md | 27 - .../PostSheepRequestSheepInnerClasses.md | 24 - .../PostSheepRequestSheepInnerClassesRams.md | 20 - ...SheepRequestSheepInnerClassesRamsAutumn.md | 14 - ...tSheepRequestSheepInnerClassesTradeEwes.md | 20 - ...stSheepInnerClassesTradeLambsAndHoggets.md | 20 - .../PostSheepRequestSheepInnerEwesLambing.md | 12 - ...stSheepRequestSheepInnerSeasonalLambing.md | 12 - .../Model/PostSheepRequestVegetationInner.md | 10 - .../docs/Model/PostSheepbeef200Response.md | 17 - .../PostSheepbeef200ResponseIntensities.md | 17 - .../PostSheepbeef200ResponseIntermediate.md | 10 - ...ostSheepbeef200ResponseIntermediateBeef.md | 14 - ...stSheepbeef200ResponseIntermediateSheep.md | 14 - .../docs/Model/PostSheepbeef200ResponseNet.md | 11 - .../docs/Model/PostSheepbeefRequest.md | 15 - .../PostSheepbeefRequestVegetationInner.md | 11 - .../docs/Model/PostSugar200Response.md | 15 - .../PostSugar200ResponseIntermediateInner.md | 15 - ...200ResponseIntermediateInnerIntensities.md | 11 - .../api-client/docs/Model/PostSugarRequest.md | 13 - .../docs/Model/PostSugarRequestCropsInner.md | 30 - .../docs/Model/PostVineyard200Response.md | 15 - ...ostVineyard200ResponseIntermediateInner.md | 15 - ...200ResponseIntermediateInnerIntensities.md | 11 - .../docs/Model/PostVineyard200ResponseNet.md | 10 - .../Model/PostVineyard200ResponseScope1.md | 23 - .../Model/PostVineyard200ResponseScope3.md | 18 - .../docs/Model/PostVineyardRequest.md | 10 - .../PostVineyardRequestVegetationInner.md | 10 - .../PostVineyardRequestVineyardsInner.md | 33 - .../Model/PostWildcatchfishery200Response.md | 16 - ...tWildcatchfishery200ResponseIntensities.md | 11 - ...atchfishery200ResponseIntermediateInner.md | 15 - .../PostWildcatchfishery200ResponseScope1.md | 19 - .../docs/Model/PostWildcatchfisheryRequest.md | 9 - ...WildcatchfisheryRequestEnterprisesInner.md | 25 - ...fisheryRequestEnterprisesInnerBaitInner.md | 12 - .../Model/PostWildseafisheries200Response.md | 15 - ...eafisheries200ResponseIntermediateInner.md | 16 - ...200ResponseIntermediateInnerIntensities.md | 11 - .../PostWildseafisheries200ResponseScope1.md | 17 - .../PostWildseafisheries200ResponseScope3.md | 12 - .../docs/Model/PostWildseafisheriesRequest.md | 9 - ...WildseafisheriesRequestEnterprisesInner.md | 23 - ...sheriesRequestEnterprisesInnerBaitInner.md | 12 - ...sRequestEnterprisesInnerCustombaitInner.md | 10 - ...riesRequestEnterprisesInnerFlightsInner.md | 10 - ...equestEnterprisesInnerRefrigerantsInner.md | 10 - ...sRequestEnterprisesInnerTransportsInner.md | 11 - .../api-client/test/Api/GAFApiTest.php | 314 ----- ...ture200ResponseCarbonSequestrationTest.php | 100 -- ...tAquaculture200ResponseIntensitiesTest.php | 109 -- ...termediateInnerCarbonSequestrationTest.php | 91 -- ...ulture200ResponseIntermediateInnerTest.php | 145 --- .../PostAquaculture200ResponseNetTest.php | 91 -- ...culture200ResponsePurchasedOffsetsTest.php | 91 -- .../PostAquaculture200ResponseScope1Test.php | 181 --- .../PostAquaculture200ResponseScope2Test.php | 100 -- .../PostAquaculture200ResponseScope3Test.php | 154 --- .../Model/PostAquaculture200ResponseTest.php | 154 --- ...reRequestEnterprisesInnerBaitInnerTest.php | 118 -- ...estEnterprisesInnerCustomBaitInnerTest.php | 100 -- ...estEnterprisesInnerFluidWasteInnerTest.php | 127 -- ...prisesInnerFuelStationaryFuelInnerTest.php | 100 -- ...cultureRequestEnterprisesInnerFuelTest.php | 109 -- ...rprisesInnerFuelTransportFuelInnerTest.php | 100 -- ...nterprisesInnerInboundFreightInnerTest.php | 100 -- ...tEnterprisesInnerRefrigerantsInnerTest.php | 100 -- ...eRequestEnterprisesInnerSolidWasteTest.php | 100 -- ...AquacultureRequestEnterprisesInnerTest.php | 235 ---- .../test/Model/PostAquacultureRequestTest.php | 91 -- ...sponseIntermediateInnerIntensitiesTest.php | 109 -- ...stBeef200ResponseIntermediateInnerTest.php | 145 --- .../test/Model/PostBeef200ResponseNetTest.php | 100 -- .../Model/PostBeef200ResponseScope1Test.php | 235 ---- .../Model/PostBeef200ResponseScope3Test.php | 163 --- .../test/Model/PostBeef200ResponseTest.php | 145 --- ...uestBeefInnerClassesBullsGt1AutumnTest.php | 127 -- ...InnerClassesBullsGt1PurchasesInnerTest.php | 109 -- ...eefRequestBeefInnerClassesBullsGt1Test.php | 172 --- ...uestBeefInnerClassesBullsGt1TradedTest.php | 172 --- ...BeefRequestBeefInnerClassesCowsGt2Test.php | 172 --- ...questBeefInnerClassesCowsGt2TradedTest.php | 172 --- ...RequestBeefInnerClassesHeifers1To2Test.php | 172 --- ...tBeefInnerClassesHeifers1To2TradedTest.php | 172 --- ...fRequestBeefInnerClassesHeifersGt2Test.php | 172 --- ...stBeefInnerClassesHeifersGt2TradedTest.php | 172 --- ...fRequestBeefInnerClassesHeifersLt1Test.php | 172 --- ...stBeefInnerClassesHeifersLt1TradedTest.php | 172 --- ...fRequestBeefInnerClassesSteers1To2Test.php | 172 --- ...stBeefInnerClassesSteers1To2TradedTest.php | 172 --- ...efRequestBeefInnerClassesSteersGt2Test.php | 172 --- ...estBeefInnerClassesSteersGt2TradedTest.php | 172 --- ...efRequestBeefInnerClassesSteersLt1Test.php | 172 --- ...estBeefInnerClassesSteersLt1TradedTest.php | 172 --- .../PostBeefRequestBeefInnerClassesTest.php | 226 ---- ...ostBeefRequestBeefInnerCowsCalvingTest.php | 118 -- ...nerFertiliserOtherFertilisersInnerTest.php | 109 -- ...PostBeefRequestBeefInnerFertiliserTest.php | 163 --- ...estBeefInnerMineralSupplementationTest.php | 136 -- .../Model/PostBeefRequestBeefInnerTest.php | 244 ---- ...PostBeefRequestBurningInnerBurningTest.php | 145 --- .../Model/PostBeefRequestBurningInnerTest.php | 100 -- .../test/Model/PostBeefRequestTest.php | 136 -- .../PostBeefRequestVegetationInnerTest.php | 109 -- ...efRequestVegetationInnerVegetationTest.php | 127 -- .../PostBuffalo200ResponseIntensitiesTest.php | 109 -- ...uffalo200ResponseIntermediateInnerTest.php | 145 --- .../Model/PostBuffalo200ResponseNetTest.php | 91 -- .../PostBuffalo200ResponseScope1Test.php | 217 ---- .../PostBuffalo200ResponseScope3Test.php | 154 --- .../test/Model/PostBuffalo200ResponseTest.php | 145 --- ...estBuffalosInnerClassesBullsAutumnTest.php | 91 -- ...losInnerClassesBullsPurchasesInnerTest.php | 100 -- ...loRequestBuffalosInnerClassesBullsTest.php | 145 --- ...loRequestBuffalosInnerClassesCalfsTest.php | 145 --- ...aloRequestBuffalosInnerClassesCowsTest.php | 145 --- ...oRequestBuffalosInnerClassesSteersTest.php | 145 --- ...BuffaloRequestBuffalosInnerClassesTest.php | 154 --- ...uestBuffalosInnerClassesTradeBullsTest.php | 145 --- ...uestBuffalosInnerClassesTradeCalfsTest.php | 145 --- ...questBuffalosInnerClassesTradeCowsTest.php | 145 --- ...estBuffalosInnerClassesTradeSteersTest.php | 145 --- ...aloRequestBuffalosInnerCowsCalvingTest.php | 118 -- ...equestBuffalosInnerSeasonalCalvingTest.php | 118 -- .../PostBuffaloRequestBuffalosInnerTest.php | 235 ---- .../test/Model/PostBuffaloRequestTest.php | 118 -- .../PostBuffaloRequestVegetationInnerTest.php | 100 -- ...sponseIntermediateInnerIntensitiesTest.php | 208 --- ...Cotton200ResponseIntermediateInnerTest.php | 145 --- .../Model/PostCotton200ResponseNetTest.php | 100 -- .../Model/PostCotton200ResponseScope1Test.php | 217 ---- .../Model/PostCotton200ResponseScope3Test.php | 136 -- .../test/Model/PostCotton200ResponseTest.php | 145 --- .../Model/PostCottonRequestCropsInnerTest.php | 325 ----- .../test/Model/PostCottonRequestTest.php | 127 -- .../PostCottonRequestVegetationInnerTest.php | 100 -- .../PostDairy200ResponseIntensitiesTest.php | 100 -- ...tDairy200ResponseIntermediateInnerTest.php | 145 --- .../Model/PostDairy200ResponseNetTest.php | 91 -- .../Model/PostDairy200ResponseScope1Test.php | 262 ---- .../Model/PostDairy200ResponseScope3Test.php | 145 --- .../test/Model/PostDairy200ResponseTest.php | 145 --- .../PostDairyRequestDairyInnerAreasTest.php | 118 -- ...uestDairyInnerClassesDairyBullsGt1Test.php | 118 -- ...uestDairyInnerClassesDairyBullsLt1Test.php | 118 -- ...RequestDairyInnerClassesHeifersGt1Test.php | 118 -- ...RequestDairyInnerClassesHeifersLt1Test.php | 118 -- ...DairyInnerClassesMilkingCowsAutumnTest.php | 136 -- ...equestDairyInnerClassesMilkingCowsTest.php | 118 -- .../PostDairyRequestDairyInnerClassesTest.php | 127 -- ...ryInnerManureManagementMilkingCowsTest.php | 127 -- ...DairyInnerSeasonalFertiliserAutumnTest.php | 118 -- ...equestDairyInnerSeasonalFertiliserTest.php | 118 -- .../Model/PostDairyRequestDairyInnerTest.php | 280 ---- .../test/Model/PostDairyRequestTest.php | 127 -- .../PostDairyRequestVegetationInnerTest.php | 100 -- .../PostDeer200ResponseIntensitiesTest.php | 109 -- ...stDeer200ResponseIntermediateInnerTest.php | 145 --- .../test/Model/PostDeer200ResponseNetTest.php | 91 -- .../test/Model/PostDeer200ResponseTest.php | 145 --- ...questDeersInnerClassesBreedingDoesTest.php | 145 --- ...tDeerRequestDeersInnerClassesBucksTest.php | 145 --- ...stDeerRequestDeersInnerClassesFawnTest.php | 145 --- ...rRequestDeersInnerClassesOtherDoesTest.php | 145 --- .../PostDeerRequestDeersInnerClassesTest.php | 154 --- ...RequestDeersInnerClassesTradeBucksTest.php | 145 --- ...rRequestDeersInnerClassesTradeDoesTest.php | 145 --- ...rRequestDeersInnerClassesTradeFawnTest.php | 145 --- ...estDeersInnerClassesTradeOtherDoesTest.php | 145 --- ...stDeerRequestDeersInnerDoesFawningTest.php | 118 -- ...erRequestDeersInnerSeasonalFawningTest.php | 118 -- .../Model/PostDeerRequestDeersInnerTest.php | 235 ---- .../test/Model/PostDeerRequestTest.php | 118 -- .../PostDeerRequestVegetationInnerTest.php | 100 -- ...sponseIntermediateInnerIntensitiesTest.php | 109 -- ...lot200ResponseIntermediateInnerNetTest.php | 91 -- ...eedlot200ResponseIntermediateInnerTest.php | 145 --- .../PostFeedlot200ResponseScope1Test.php | 244 ---- .../PostFeedlot200ResponseScope3Test.php | 154 --- .../test/Model/PostFeedlot200ResponseTest.php | 145 --- ...FeedlotsInnerGroupsInnerStaysInnerTest.php | 163 --- ...lotRequestFeedlotsInnerGroupsInnerTest.php | 91 -- ...eedlotsInnerPurchasesBullsGt1InnerTest.php | 109 -- ...edlotRequestFeedlotsInnerPurchasesTest.php | 226 ---- ...estFeedlotsInnerSalesBullsGt1InnerTest.php | 100 -- ...stFeedlotRequestFeedlotsInnerSalesTest.php | 226 ---- .../PostFeedlotRequestFeedlotsInnerTest.php | 271 ---- .../test/Model/PostFeedlotRequestTest.php | 109 -- .../PostFeedlotRequestVegetationInnerTest.php | 100 -- .../PostGoat200ResponseIntensitiesTest.php | 136 -- ...stGoat200ResponseIntermediateInnerTest.php | 145 --- .../test/Model/PostGoat200ResponseNetTest.php | 91 -- .../test/Model/PostGoat200ResponseTest.php | 145 --- ...atsInnerClassesBreedingDoesNanniesTest.php | 190 --- ...RequestGoatsInnerClassesBucksBillyTest.php | 190 --- ...stGoatRequestGoatsInnerClassesKidsTest.php | 190 --- ...erClassesMaidenBreedingDoesNanniesTest.php | 190 --- ...InnerClassesOtherDoesCulledFemalesTest.php | 190 --- .../PostGoatRequestGoatsInnerClassesTest.php | 199 --- ...nerClassesTradeBreedingDoesNanniesTest.php | 190 --- ...RequestGoatsInnerClassesTradeBucksTest.php | 190 --- ...tRequestGoatsInnerClassesTradeDoesTest.php | 190 --- ...tRequestGoatsInnerClassesTradeKidsTest.php | 190 --- ...ssesTradeMaidenBreedingDoesNanniesTest.php | 190 --- ...ClassesTradeOtherDoesCulledFemalesTest.php | 190 --- ...questGoatsInnerClassesTradeWethersTest.php | 190 --- ...oatRequestGoatsInnerClassesWethersTest.php | 190 --- .../Model/PostGoatRequestGoatsInnerTest.php | 226 ---- .../test/Model/PostGoatRequestTest.php | 118 -- .../PostGoatRequestVegetationInnerTest.php | 100 -- ...eInnerIntensitiesWithSequestrationTest.php | 109 -- ...Grains200ResponseIntermediateInnerTest.php | 145 --- .../test/Model/PostGrains200ResponseTest.php | 154 --- .../Model/PostGrainsRequestCropsInnerTest.php | 280 ---- .../test/Model/PostGrainsRequestTest.php | 127 -- ...eInnerIntensitiesWithSequestrationTest.php | 109 -- ...ulture200ResponseIntermediateInnerTest.php | 145 --- .../PostHorticulture200ResponseScope1Test.php | 235 ---- .../Model/PostHorticulture200ResponseTest.php | 145 --- ...RequestCropsInnerRefrigerantsInnerTest.php | 100 -- .../PostHorticultureRequestCropsInnerTest.php | 289 ----- .../Model/PostHorticultureRequestTest.php | 127 -- .../PostPork200ResponseIntensitiesTest.php | 109 -- ...stPork200ResponseIntermediateInnerTest.php | 145 --- .../test/Model/PostPork200ResponseNetTest.php | 91 -- .../Model/PostPork200ResponseScope1Test.php | 235 ---- .../Model/PostPork200ResponseScope3Test.php | 163 --- .../test/Model/PostPork200ResponseTest.php | 145 --- ...stPorkRequestPorkInnerClassesBoarsTest.php | 172 --- ...stPorkRequestPorkInnerClassesGiltsTest.php | 172 --- ...PorkRequestPorkInnerClassesGrowersTest.php | 172 --- ...questPorkInnerClassesSlaughterPigsTest.php | 172 --- ...stPorkInnerClassesSowsManureSpringTest.php | 127 -- ...kRequestPorkInnerClassesSowsManureTest.php | 118 -- ...ostPorkRequestPorkInnerClassesSowsTest.php | 172 --- ...PorkRequestPorkInnerClassesSuckersTest.php | 172 --- .../PostPorkRequestPorkInnerClassesTest.php | 145 --- ...PorkRequestPorkInnerClassesWeanersTest.php | 172 --- ...kInnerFeedProductsInnerIngredientsTest.php | 190 --- ...kRequestPorkInnerFeedProductsInnerTest.php | 118 -- .../Model/PostPorkRequestPorkInnerTest.php | 217 ---- .../test/Model/PostPorkRequestTest.php | 127 -- .../PostPorkRequestVegetationInnerTest.php | 100 -- .../PostPoultry200ResponseIntensitiesTest.php | 136 -- ...termediateBroilersInnerIntensitiesTest.php | 109 -- ...0ResponseIntermediateBroilersInnerTest.php | 145 --- ...IntermediateLayersInnerIntensitiesTest.php | 109 -- ...200ResponseIntermediateLayersInnerTest.php | 145 --- .../Model/PostPoultry200ResponseNetTest.php | 109 -- .../PostPoultry200ResponseScope1Test.php | 181 --- .../PostPoultry200ResponseScope3Test.php | 145 --- .../test/Model/PostPoultry200ResponseTest.php | 154 --- ...nerGroupsInnerFeedInnerIngredientsTest.php | 127 -- ...tBroilersInnerGroupsInnerFeedInnerTest.php | 118 -- ...InnerGroupsInnerMeatChickenGrowersTest.php | 172 --- ...tryRequestBroilersInnerGroupsInnerTest.php | 136 -- ...rsInnerMeatChickenGrowersPurchasesTest.php | 100 -- ...ersInnerMeatChickenLayersPurchasesTest.php | 100 -- ...estBroilersInnerMeatOtherPurchasesTest.php | 100 -- ...ltryRequestBroilersInnerSalesInnerTest.php | 109 -- .../PostPoultryRequestBroilersInnerTest.php | 262 ---- ...tryRequestLayersInnerLayersEggSaleTest.php | 100 -- ...yRequestLayersInnerLayersPurchasesTest.php | 100 -- ...ostPoultryRequestLayersInnerLayersTest.php | 118 -- ...ayersInnerMeatChickenLayersEggSaleTest.php | 100 -- ...equestLayersInnerMeatChickenLayersTest.php | 118 -- .../PostPoultryRequestLayersInnerTest.php | 298 ----- .../test/Model/PostPoultryRequestTest.php | 136 -- .../PostPoultryRequestVegetationInnerTest.php | 109 -- ...cessing200ResponseIntensitiesInnerTest.php | 118 -- ...essing200ResponseIntermediateInnerTest.php | 145 --- .../PostProcessing200ResponseNetTest.php | 91 -- .../PostProcessing200ResponseScope1Test.php | 190 --- .../PostProcessing200ResponseScope3Test.php | 118 -- .../Model/PostProcessing200ResponseTest.php | 154 --- ...cessingRequestProductsInnerProductTest.php | 100 -- ...PostProcessingRequestProductsInnerTest.php | 181 --- .../test/Model/PostProcessingRequestTest.php | 100 -- .../PostRice200ResponseIntensitiesTest.php | 118 -- ...sponseIntermediateInnerIntensitiesTest.php | 118 -- ...stRice200ResponseIntermediateInnerTest.php | 145 --- .../Model/PostRice200ResponseScope1Test.php | 226 ---- .../test/Model/PostRice200ResponseTest.php | 145 --- .../Model/PostRiceRequestCropsInnerTest.php | 289 ----- .../test/Model/PostRiceRequestTest.php | 127 -- ...sponseIntermediateInnerIntensitiesTest.php | 136 -- ...tSheep200ResponseIntermediateInnerTest.php | 145 --- .../Model/PostSheep200ResponseNetTest.php | 100 -- .../test/Model/PostSheep200ResponseTest.php | 145 --- ...RequestSheepInnerClassesRamsAutumnTest.php | 136 -- ...tSheepRequestSheepInnerClassesRamsTest.php | 190 --- .../PostSheepRequestSheepInnerClassesTest.php | 226 ---- ...pRequestSheepInnerClassesTradeEwesTest.php | 190 --- ...epInnerClassesTradeLambsAndHoggetsTest.php | 190 --- ...tSheepRequestSheepInnerEwesLambingTest.php | 118 -- ...epRequestSheepInnerSeasonalLambingTest.php | 118 -- .../Model/PostSheepRequestSheepInnerTest.php | 253 ---- .../test/Model/PostSheepRequestTest.php | 127 -- .../PostSheepRequestVegetationInnerTest.php | 100 -- ...ostSheepbeef200ResponseIntensitiesTest.php | 163 --- ...eepbeef200ResponseIntermediateBeefTest.php | 136 -- ...epbeef200ResponseIntermediateSheepTest.php | 136 -- ...stSheepbeef200ResponseIntermediateTest.php | 100 -- .../Model/PostSheepbeef200ResponseNetTest.php | 109 -- .../Model/PostSheepbeef200ResponseTest.php | 163 --- .../test/Model/PostSheepbeefRequestTest.php | 145 --- ...ostSheepbeefRequestVegetationInnerTest.php | 109 -- ...sponseIntermediateInnerIntensitiesTest.php | 109 -- ...tSugar200ResponseIntermediateInnerTest.php | 145 --- .../test/Model/PostSugar200ResponseTest.php | 145 --- .../Model/PostSugarRequestCropsInnerTest.php | 280 ---- .../test/Model/PostSugarRequestTest.php | 127 -- ...sponseIntermediateInnerIntensitiesTest.php | 109 -- ...neyard200ResponseIntermediateInnerTest.php | 145 --- .../Model/PostVineyard200ResponseNetTest.php | 100 -- .../PostVineyard200ResponseScope1Test.php | 217 ---- .../PostVineyard200ResponseScope3Test.php | 172 --- .../Model/PostVineyard200ResponseTest.php | 145 --- .../test/Model/PostVineyardRequestTest.php | 100 -- ...PostVineyardRequestVegetationInnerTest.php | 100 -- .../PostVineyardRequestVineyardsInnerTest.php | 307 ----- ...catchfishery200ResponseIntensitiesTest.php | 109 -- ...ishery200ResponseIntermediateInnerTest.php | 145 --- ...tWildcatchfishery200ResponseScope1Test.php | 181 --- .../PostWildcatchfishery200ResponseTest.php | 154 --- ...ryRequestEnterprisesInnerBaitInnerTest.php | 118 -- ...atchfisheryRequestEnterprisesInnerTest.php | 235 ---- .../Model/PostWildcatchfisheryRequestTest.php | 91 -- ...sponseIntermediateInnerIntensitiesTest.php | 109 -- ...heries200ResponseIntermediateInnerTest.php | 154 --- ...tWildseafisheries200ResponseScope1Test.php | 163 --- ...tWildseafisheries200ResponseScope3Test.php | 118 -- .../PostWildseafisheries200ResponseTest.php | 145 --- ...esRequestEnterprisesInnerBaitInnerTest.php | 118 -- ...estEnterprisesInnerCustombaitInnerTest.php | 100 -- ...equestEnterprisesInnerFlightsInnerTest.php | 100 -- ...tEnterprisesInnerRefrigerantsInnerTest.php | 100 -- ...eafisheriesRequestEnterprisesInnerTest.php | 217 ---- ...estEnterprisesInnerTransportsInnerTest.php | 109 -- .../Model/PostWildseafisheriesRequestTest.php | 91 -- examples/php-api-client/generate.sh | 13 +- 588 files changed, 40 insertions(+), 49262 deletions(-) create mode 100644 examples/php-api-client/README.md delete mode 100644 examples/php-api-client/api-client/docs/Api/GAFApi.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseCarbonSequestration.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseNet.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponsePurchasedOffsets.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope2.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope3.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerBaitInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuel.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeef200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeef200ResponseNet.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope3.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClasses.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerCowsCalving.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliser.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerMineralSupplementation.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInnerBurning.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInnerVegetation.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffalo200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseNet.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope3.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClasses.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBulls.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCows.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesSteers.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerCowsCalving.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostBuffaloRequestVegetationInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostCotton200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostCotton200ResponseNet.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope3.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostCottonRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostCottonRequestCropsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostCottonRequestVegetationInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairy200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairy200ResponseNet.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope3.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerAreas.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClasses.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersGt1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersLt1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCows.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliser.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDairyRequestVegetationInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeer200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeer200ResponseNet.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClasses.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBreedingDoes.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBucks.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesFawn.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesOtherDoes.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeBucks.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeDoes.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeFawn.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerDoesFawning.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerSeasonalFawning.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostDeerRequestVegetationInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlot200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerNet.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope3.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchases.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSales.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostFeedlotRequestVegetationInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoat200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoat200ResponseNet.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClasses.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBucksBilly.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesKids.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBucks.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeDoes.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeKids.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeWethers.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesWethers.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGoatRequestVegetationInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGrains200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGrainsRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostGrainsRequestCropsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostHorticulture200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseScope1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostHorticultureRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPork200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPork200ResponseNet.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope3.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClasses.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesBoars.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGilts.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGrowers.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSows.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManure.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSuckers.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesWeaners.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPorkRequestVegetationInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseNet.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope3.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerSalesInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayers.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersEggSale.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersPurchases.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayers.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostPoultryRequestVegetationInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessing200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntensitiesInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseNet.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope3.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessingRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInnerProduct.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostRice200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostRice200ResponseScope1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostRiceRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostRiceRequestCropsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheep200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheep200ResponseNet.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClasses.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRams.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRamsAutumn.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeEwes.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerEwesLambing.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerSeasonalLambing.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepRequestVegetationInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeef200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediate.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateBeef.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateSheep.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseNet.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeefRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSheepbeefRequestVegetationInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSugar200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSugarRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostSugarRequestCropsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyard200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseNet.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope3.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyardRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyardRequestVegetationInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostVineyardRequestVineyardsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseScope1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheries200Response.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope1.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope3.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequest.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md delete mode 100644 examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md delete mode 100644 examples/php-api-client/api-client/test/Api/GAFApiTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseCarbonSequestrationTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestrationTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseNetTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponsePurchasedOffsetsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseScope1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseScope2Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseScope3Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquaculture200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerBaitInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerFuelTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerSolidWasteTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestEnterprisesInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostAquacultureRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeef200ResponseIntermediateInnerIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeef200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeef200ResponseNetTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeef200ResponseScope1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeef200ResponseScope3Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeef200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesBullsGt1AutumnTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesBullsGt1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesBullsGt1TradedTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesCowsGt2Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesCowsGt2TradedTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesHeifers1To2Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesHeifers1To2TradedTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesHeifersGt2Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesHeifersGt2TradedTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesHeifersLt1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesHeifersLt1TradedTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesSteers1To2Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesSteers1To2TradedTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesSteersGt2Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesSteersGt2TradedTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesSteersLt1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesSteersLt1TradedTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerClassesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerCowsCalvingTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerFertiliserTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerMineralSupplementationTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBeefInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBurningInnerBurningTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestBurningInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestVegetationInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBeefRequestVegetationInnerVegetationTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffalo200ResponseIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffalo200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffalo200ResponseNetTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffalo200ResponseScope1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffalo200ResponseScope3Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffalo200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumnTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesBullsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesCalfsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesCowsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesSteersTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesTradeBullsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesTradeCowsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteersTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerCowsCalvingTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerSeasonalCalvingTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestBuffalosInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostBuffaloRequestVegetationInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostCotton200ResponseIntermediateInnerIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostCotton200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostCotton200ResponseNetTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostCotton200ResponseScope1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostCotton200ResponseScope3Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostCotton200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostCottonRequestCropsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostCottonRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostCottonRequestVegetationInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairy200ResponseIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairy200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairy200ResponseNetTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairy200ResponseScope1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairy200ResponseScope3Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairy200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerAreasTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerClassesHeifersGt1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerClassesHeifersLt1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumnTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerClassesMilkingCowsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerClassesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerManureManagementMilkingCowsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumnTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerSeasonalFertiliserTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestDairyInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDairyRequestVegetationInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeer200ResponseIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeer200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeer200ResponseNetTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeer200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesBreedingDoesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesBucksTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesFawnTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesOtherDoesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesTradeBucksTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesTradeDoesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesTradeFawnTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerClassesTradeOtherDoesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerDoesFawningTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerSeasonalFawningTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestDeersInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostDeerRequestVegetationInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlot200ResponseIntermediateInnerIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlot200ResponseIntermediateInnerNetTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlot200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlot200ResponseScope1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlot200ResponseScope3Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlot200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1InnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestFeedlotsInnerPurchasesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1InnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestFeedlotsInnerSalesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestFeedlotsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostFeedlotRequestVegetationInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoat200ResponseIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoat200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoat200ResponseNetTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoat200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNanniesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesBucksBillyTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesKidsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNanniesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemalesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNanniesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTradeBucksTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTradeDoesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTradeKidsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNanniesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemalesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesTradeWethersTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerClassesWethersTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestGoatsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGoatRequestVegetationInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestrationTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGrains200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGrains200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGrainsRequestCropsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostGrainsRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestrationTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostHorticulture200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostHorticulture200ResponseScope1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostHorticulture200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostHorticultureRequestCropsInnerRefrigerantsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostHorticultureRequestCropsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostHorticultureRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPork200ResponseIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPork200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPork200ResponseNetTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPork200ResponseScope1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPork200ResponseScope3Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPork200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesBoarsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesGiltsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesGrowersTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesSlaughterPigsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesSowsManureSpringTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesSowsManureTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesSowsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesSuckersTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerClassesWeanersTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredientsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerFeedProductsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestPorkInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPorkRequestVegetationInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseIntermediateBroilersInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseIntermediateLayersInnerIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseIntermediateLayersInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseNetTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseScope1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseScope3Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultry200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredientsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowersTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerGroupsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchasesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchasesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerMeatOtherPurchasesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerSalesInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestBroilersInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestLayersInnerLayersEggSaleTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestLayersInnerLayersPurchasesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestLayersInnerLayersTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSaleTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestLayersInnerMeatChickenLayersTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestLayersInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostPoultryRequestVegetationInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostProcessing200ResponseIntensitiesInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostProcessing200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostProcessing200ResponseNetTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostProcessing200ResponseScope1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostProcessing200ResponseScope3Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostProcessing200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostProcessingRequestProductsInnerProductTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostProcessingRequestProductsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostProcessingRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostRice200ResponseIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostRice200ResponseIntermediateInnerIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostRice200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostRice200ResponseScope1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostRice200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostRiceRequestCropsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostRiceRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheep200ResponseIntermediateInnerIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheep200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheep200ResponseNetTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheep200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerClassesRamsAutumnTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerClassesRamsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerClassesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerClassesTradeEwesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggetsTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerEwesLambingTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerSeasonalLambingTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestSheepInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepRequestVegetationInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeef200ResponseIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeef200ResponseIntermediateBeefTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeef200ResponseIntermediateSheepTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeef200ResponseIntermediateTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeef200ResponseNetTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeef200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeefRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSheepbeefRequestVegetationInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSugar200ResponseIntermediateInnerIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSugar200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSugar200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSugarRequestCropsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostSugarRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostVineyard200ResponseIntermediateInnerIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostVineyard200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostVineyard200ResponseNetTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostVineyard200ResponseScope1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostVineyard200ResponseScope3Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostVineyard200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostVineyardRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostVineyardRequestVegetationInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostVineyardRequestVineyardsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildcatchfishery200ResponseIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildcatchfishery200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildcatchfishery200ResponseScope1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildcatchfishery200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildcatchfisheryRequestEnterprisesInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildcatchfisheryRequestTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheries200ResponseIntermediateInnerIntensitiesTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheries200ResponseIntermediateInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheries200ResponseScope1Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheries200ResponseScope3Test.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheries200ResponseTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheriesRequestEnterprisesInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInnerTest.php delete mode 100644 examples/php-api-client/api-client/test/Model/PostWildseafisheriesRequestTest.php diff --git a/.gitignore b/.gitignore index 111d5663..e8b9955f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ **/dist .turbo .npmrc -*.pem \ No newline at end of file +*.pem +openapitools.json \ No newline at end of file diff --git a/examples/php-api-client/README.md b/examples/php-api-client/README.md new file mode 100644 index 00000000..f11311e9 --- /dev/null +++ b/examples/php-api-client/README.md @@ -0,0 +1,31 @@ +# Example PHP API client for the AIA Carbon Calculators API + +This example shows how to call the REST API available at https://emissionscalculator-mtls.production.aiaapi.com/calculator/3.0.0 using a simple PHP script. + +## Running the example + +You can execute a simple request to the `beef` endpoint using the example provided. You just need to update the calls `$config->setCertFile` and `$config->setKeyFile` in [example.php](./api-client/example.php) so they point to your client certificate and key files. This allows the client to authenticate with the endpoint via mTLS. Once that has been done you just need to run: + +``` +cd api-client +composer install +php example.php +``` + +## Code generation + +The PHP API client has been generated using the [openapi-generator-cli](https://www.npmjs.com/package/@openapitools/openapi-generator-cli) tool. The generation can be reproduced with a script like: + +``` +API_CLIENT_DIR=api-client +API_VERSION=3.0.0 +rm -rf $API_CLIENT_DIR + +npm -g install @openapitools/openapi-generator-cli +openapi-generator-cli generate \ + -i https://d2awla29kxgk7i.cloudfront.net/api/$API_VERSION/openapi.json \ + -g php \ + -o $API_CLIENT_DIR +``` + +For now, the PHP generator does not support all the configuration needed for an mTLS connection out of the box. Several fixes have been applied to the generated code in the `api-client` folder to let this work end to end. Once this [PR](https://github.com/OpenAPITools/openapi-generator/pull/22229) has been merged and released, it will be possible to make requests via mTLS without any code changes to the generated PHP client code needed. diff --git a/examples/php-api-client/api-client/.openapi-generator/FILES b/examples/php-api-client/api-client/.openapi-generator/FILES index d8d279f2..be621d80 100644 --- a/examples/php-api-client/api-client/.openapi-generator/FILES +++ b/examples/php-api-client/api-client/.openapi-generator/FILES @@ -4,298 +4,6 @@ .travis.yml README.md composer.json -docs/Api/GAFApi.md -docs/Model/PostAquaculture200Response.md -docs/Model/PostAquaculture200ResponseCarbonSequestration.md -docs/Model/PostAquaculture200ResponseIntensities.md -docs/Model/PostAquaculture200ResponseIntermediateInner.md -docs/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md -docs/Model/PostAquaculture200ResponseNet.md -docs/Model/PostAquaculture200ResponsePurchasedOffsets.md -docs/Model/PostAquaculture200ResponseScope1.md -docs/Model/PostAquaculture200ResponseScope2.md -docs/Model/PostAquaculture200ResponseScope3.md -docs/Model/PostAquacultureRequest.md -docs/Model/PostAquacultureRequestEnterprisesInner.md -docs/Model/PostAquacultureRequestEnterprisesInnerBaitInner.md -docs/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md -docs/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md -docs/Model/PostAquacultureRequestEnterprisesInnerFuel.md -docs/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md -docs/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md -docs/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md -docs/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md -docs/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.md -docs/Model/PostBeef200Response.md -docs/Model/PostBeef200ResponseIntermediateInner.md -docs/Model/PostBeef200ResponseIntermediateInnerIntensities.md -docs/Model/PostBeef200ResponseNet.md -docs/Model/PostBeef200ResponseScope1.md -docs/Model/PostBeef200ResponseScope3.md -docs/Model/PostBeefRequest.md -docs/Model/PostBeefRequestBeefInner.md -docs/Model/PostBeefRequestBeefInnerClasses.md -docs/Model/PostBeefRequestBeefInnerClassesBullsGt1.md -docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md -docs/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md -docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.md -docs/Model/PostBeefRequestBeefInnerClassesCowsGt2.md -docs/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.md -docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2.md -docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md -docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2.md -docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md -docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1.md -docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md -docs/Model/PostBeefRequestBeefInnerClassesSteers1To2.md -docs/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.md -docs/Model/PostBeefRequestBeefInnerClassesSteersGt2.md -docs/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.md -docs/Model/PostBeefRequestBeefInnerClassesSteersLt1.md -docs/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.md -docs/Model/PostBeefRequestBeefInnerCowsCalving.md -docs/Model/PostBeefRequestBeefInnerFertiliser.md -docs/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md -docs/Model/PostBeefRequestBeefInnerMineralSupplementation.md -docs/Model/PostBeefRequestBurningInner.md -docs/Model/PostBeefRequestBurningInnerBurning.md -docs/Model/PostBeefRequestVegetationInner.md -docs/Model/PostBeefRequestVegetationInnerVegetation.md -docs/Model/PostBuffalo200Response.md -docs/Model/PostBuffalo200ResponseIntensities.md -docs/Model/PostBuffalo200ResponseIntermediateInner.md -docs/Model/PostBuffalo200ResponseNet.md -docs/Model/PostBuffalo200ResponseScope1.md -docs/Model/PostBuffalo200ResponseScope3.md -docs/Model/PostBuffaloRequest.md -docs/Model/PostBuffaloRequestBuffalosInner.md -docs/Model/PostBuffaloRequestBuffalosInnerClasses.md -docs/Model/PostBuffaloRequestBuffalosInnerClassesBulls.md -docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md -docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md -docs/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.md -docs/Model/PostBuffaloRequestBuffalosInnerClassesCows.md -docs/Model/PostBuffaloRequestBuffalosInnerClassesSteers.md -docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md -docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md -docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.md -docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md -docs/Model/PostBuffaloRequestBuffalosInnerCowsCalving.md -docs/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.md -docs/Model/PostBuffaloRequestVegetationInner.md -docs/Model/PostCotton200Response.md -docs/Model/PostCotton200ResponseIntermediateInner.md -docs/Model/PostCotton200ResponseIntermediateInnerIntensities.md -docs/Model/PostCotton200ResponseNet.md -docs/Model/PostCotton200ResponseScope1.md -docs/Model/PostCotton200ResponseScope3.md -docs/Model/PostCottonRequest.md -docs/Model/PostCottonRequestCropsInner.md -docs/Model/PostCottonRequestVegetationInner.md -docs/Model/PostDairy200Response.md -docs/Model/PostDairy200ResponseIntensities.md -docs/Model/PostDairy200ResponseIntermediateInner.md -docs/Model/PostDairy200ResponseNet.md -docs/Model/PostDairy200ResponseScope1.md -docs/Model/PostDairy200ResponseScope3.md -docs/Model/PostDairyRequest.md -docs/Model/PostDairyRequestDairyInner.md -docs/Model/PostDairyRequestDairyInnerAreas.md -docs/Model/PostDairyRequestDairyInnerClasses.md -docs/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.md -docs/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.md -docs/Model/PostDairyRequestDairyInnerClassesHeifersGt1.md -docs/Model/PostDairyRequestDairyInnerClassesHeifersLt1.md -docs/Model/PostDairyRequestDairyInnerClassesMilkingCows.md -docs/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md -docs/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.md -docs/Model/PostDairyRequestDairyInnerSeasonalFertiliser.md -docs/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md -docs/Model/PostDairyRequestVegetationInner.md -docs/Model/PostDeer200Response.md -docs/Model/PostDeer200ResponseIntensities.md -docs/Model/PostDeer200ResponseIntermediateInner.md -docs/Model/PostDeer200ResponseNet.md -docs/Model/PostDeerRequest.md -docs/Model/PostDeerRequestDeersInner.md -docs/Model/PostDeerRequestDeersInnerClasses.md -docs/Model/PostDeerRequestDeersInnerClassesBreedingDoes.md -docs/Model/PostDeerRequestDeersInnerClassesBucks.md -docs/Model/PostDeerRequestDeersInnerClassesFawn.md -docs/Model/PostDeerRequestDeersInnerClassesOtherDoes.md -docs/Model/PostDeerRequestDeersInnerClassesTradeBucks.md -docs/Model/PostDeerRequestDeersInnerClassesTradeDoes.md -docs/Model/PostDeerRequestDeersInnerClassesTradeFawn.md -docs/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.md -docs/Model/PostDeerRequestDeersInnerDoesFawning.md -docs/Model/PostDeerRequestDeersInnerSeasonalFawning.md -docs/Model/PostDeerRequestVegetationInner.md -docs/Model/PostFeedlot200Response.md -docs/Model/PostFeedlot200ResponseIntermediateInner.md -docs/Model/PostFeedlot200ResponseIntermediateInnerIntensities.md -docs/Model/PostFeedlot200ResponseIntermediateInnerNet.md -docs/Model/PostFeedlot200ResponseScope1.md -docs/Model/PostFeedlot200ResponseScope3.md -docs/Model/PostFeedlotRequest.md -docs/Model/PostFeedlotRequestFeedlotsInner.md -docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.md -docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md -docs/Model/PostFeedlotRequestFeedlotsInnerPurchases.md -docs/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md -docs/Model/PostFeedlotRequestFeedlotsInnerSales.md -docs/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md -docs/Model/PostFeedlotRequestVegetationInner.md -docs/Model/PostGoat200Response.md -docs/Model/PostGoat200ResponseIntensities.md -docs/Model/PostGoat200ResponseIntermediateInner.md -docs/Model/PostGoat200ResponseNet.md -docs/Model/PostGoatRequest.md -docs/Model/PostGoatRequestGoatsInner.md -docs/Model/PostGoatRequestGoatsInnerClasses.md -docs/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md -docs/Model/PostGoatRequestGoatsInnerClassesBucksBilly.md -docs/Model/PostGoatRequestGoatsInnerClassesKids.md -docs/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md -docs/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md -docs/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md -docs/Model/PostGoatRequestGoatsInnerClassesTradeBucks.md -docs/Model/PostGoatRequestGoatsInnerClassesTradeDoes.md -docs/Model/PostGoatRequestGoatsInnerClassesTradeKids.md -docs/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md -docs/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md -docs/Model/PostGoatRequestGoatsInnerClassesTradeWethers.md -docs/Model/PostGoatRequestGoatsInnerClassesWethers.md -docs/Model/PostGoatRequestVegetationInner.md -docs/Model/PostGrains200Response.md -docs/Model/PostGrains200ResponseIntermediateInner.md -docs/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md -docs/Model/PostGrainsRequest.md -docs/Model/PostGrainsRequestCropsInner.md -docs/Model/PostHorticulture200Response.md -docs/Model/PostHorticulture200ResponseIntermediateInner.md -docs/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md -docs/Model/PostHorticulture200ResponseScope1.md -docs/Model/PostHorticultureRequest.md -docs/Model/PostHorticultureRequestCropsInner.md -docs/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.md -docs/Model/PostPork200Response.md -docs/Model/PostPork200ResponseIntensities.md -docs/Model/PostPork200ResponseIntermediateInner.md -docs/Model/PostPork200ResponseNet.md -docs/Model/PostPork200ResponseScope1.md -docs/Model/PostPork200ResponseScope3.md -docs/Model/PostPorkRequest.md -docs/Model/PostPorkRequestPorkInner.md -docs/Model/PostPorkRequestPorkInnerClasses.md -docs/Model/PostPorkRequestPorkInnerClassesBoars.md -docs/Model/PostPorkRequestPorkInnerClassesGilts.md -docs/Model/PostPorkRequestPorkInnerClassesGrowers.md -docs/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.md -docs/Model/PostPorkRequestPorkInnerClassesSows.md -docs/Model/PostPorkRequestPorkInnerClassesSowsManure.md -docs/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.md -docs/Model/PostPorkRequestPorkInnerClassesSuckers.md -docs/Model/PostPorkRequestPorkInnerClassesWeaners.md -docs/Model/PostPorkRequestPorkInnerFeedProductsInner.md -docs/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md -docs/Model/PostPorkRequestVegetationInner.md -docs/Model/PostPoultry200Response.md -docs/Model/PostPoultry200ResponseIntensities.md -docs/Model/PostPoultry200ResponseIntermediateBroilersInner.md -docs/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md -docs/Model/PostPoultry200ResponseIntermediateLayersInner.md -docs/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.md -docs/Model/PostPoultry200ResponseNet.md -docs/Model/PostPoultry200ResponseScope1.md -docs/Model/PostPoultry200ResponseScope3.md -docs/Model/PostPoultryRequest.md -docs/Model/PostPoultryRequestBroilersInner.md -docs/Model/PostPoultryRequestBroilersInnerGroupsInner.md -docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md -docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md -docs/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md -docs/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md -docs/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md -docs/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.md -docs/Model/PostPoultryRequestBroilersInnerSalesInner.md -docs/Model/PostPoultryRequestLayersInner.md -docs/Model/PostPoultryRequestLayersInnerLayers.md -docs/Model/PostPoultryRequestLayersInnerLayersEggSale.md -docs/Model/PostPoultryRequestLayersInnerLayersPurchases.md -docs/Model/PostPoultryRequestLayersInnerMeatChickenLayers.md -docs/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md -docs/Model/PostPoultryRequestVegetationInner.md -docs/Model/PostProcessing200Response.md -docs/Model/PostProcessing200ResponseIntensitiesInner.md -docs/Model/PostProcessing200ResponseIntermediateInner.md -docs/Model/PostProcessing200ResponseNet.md -docs/Model/PostProcessing200ResponseScope1.md -docs/Model/PostProcessing200ResponseScope3.md -docs/Model/PostProcessingRequest.md -docs/Model/PostProcessingRequestProductsInner.md -docs/Model/PostProcessingRequestProductsInnerProduct.md -docs/Model/PostRice200Response.md -docs/Model/PostRice200ResponseIntensities.md -docs/Model/PostRice200ResponseIntermediateInner.md -docs/Model/PostRice200ResponseIntermediateInnerIntensities.md -docs/Model/PostRice200ResponseScope1.md -docs/Model/PostRiceRequest.md -docs/Model/PostRiceRequestCropsInner.md -docs/Model/PostSheep200Response.md -docs/Model/PostSheep200ResponseIntermediateInner.md -docs/Model/PostSheep200ResponseIntermediateInnerIntensities.md -docs/Model/PostSheep200ResponseNet.md -docs/Model/PostSheepRequest.md -docs/Model/PostSheepRequestSheepInner.md -docs/Model/PostSheepRequestSheepInnerClasses.md -docs/Model/PostSheepRequestSheepInnerClassesRams.md -docs/Model/PostSheepRequestSheepInnerClassesRamsAutumn.md -docs/Model/PostSheepRequestSheepInnerClassesTradeEwes.md -docs/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md -docs/Model/PostSheepRequestSheepInnerEwesLambing.md -docs/Model/PostSheepRequestSheepInnerSeasonalLambing.md -docs/Model/PostSheepRequestVegetationInner.md -docs/Model/PostSheepbeef200Response.md -docs/Model/PostSheepbeef200ResponseIntensities.md -docs/Model/PostSheepbeef200ResponseIntermediate.md -docs/Model/PostSheepbeef200ResponseIntermediateBeef.md -docs/Model/PostSheepbeef200ResponseIntermediateSheep.md -docs/Model/PostSheepbeef200ResponseNet.md -docs/Model/PostSheepbeefRequest.md -docs/Model/PostSheepbeefRequestVegetationInner.md -docs/Model/PostSugar200Response.md -docs/Model/PostSugar200ResponseIntermediateInner.md -docs/Model/PostSugar200ResponseIntermediateInnerIntensities.md -docs/Model/PostSugarRequest.md -docs/Model/PostSugarRequestCropsInner.md -docs/Model/PostVineyard200Response.md -docs/Model/PostVineyard200ResponseIntermediateInner.md -docs/Model/PostVineyard200ResponseIntermediateInnerIntensities.md -docs/Model/PostVineyard200ResponseNet.md -docs/Model/PostVineyard200ResponseScope1.md -docs/Model/PostVineyard200ResponseScope3.md -docs/Model/PostVineyardRequest.md -docs/Model/PostVineyardRequestVegetationInner.md -docs/Model/PostVineyardRequestVineyardsInner.md -docs/Model/PostWildcatchfishery200Response.md -docs/Model/PostWildcatchfishery200ResponseIntensities.md -docs/Model/PostWildcatchfishery200ResponseIntermediateInner.md -docs/Model/PostWildcatchfishery200ResponseScope1.md -docs/Model/PostWildcatchfisheryRequest.md -docs/Model/PostWildcatchfisheryRequestEnterprisesInner.md -docs/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md -docs/Model/PostWildseafisheries200Response.md -docs/Model/PostWildseafisheries200ResponseIntermediateInner.md -docs/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.md -docs/Model/PostWildseafisheries200ResponseScope1.md -docs/Model/PostWildseafisheries200ResponseScope3.md -docs/Model/PostWildseafisheriesRequest.md -docs/Model/PostWildseafisheriesRequestEnterprisesInner.md -docs/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md -docs/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md -docs/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md -docs/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md -docs/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md git_push.sh lib/Api/GAFApi.php lib/ApiException.php @@ -596,295 +304,3 @@ lib/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.php lib/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.php lib/ObjectSerializer.php phpunit.xml.dist -test/Api/GAFApiTest.php -test/Model/PostAquaculture200ResponseCarbonSequestrationTest.php -test/Model/PostAquaculture200ResponseIntensitiesTest.php -test/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestrationTest.php -test/Model/PostAquaculture200ResponseIntermediateInnerTest.php -test/Model/PostAquaculture200ResponseNetTest.php -test/Model/PostAquaculture200ResponsePurchasedOffsetsTest.php -test/Model/PostAquaculture200ResponseScope1Test.php -test/Model/PostAquaculture200ResponseScope2Test.php -test/Model/PostAquaculture200ResponseScope3Test.php -test/Model/PostAquaculture200ResponseTest.php -test/Model/PostAquacultureRequestEnterprisesInnerBaitInnerTest.php -test/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInnerTest.php -test/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInnerTest.php -test/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInnerTest.php -test/Model/PostAquacultureRequestEnterprisesInnerFuelTest.php -test/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInnerTest.php -test/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInnerTest.php -test/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInnerTest.php -test/Model/PostAquacultureRequestEnterprisesInnerSolidWasteTest.php -test/Model/PostAquacultureRequestEnterprisesInnerTest.php -test/Model/PostAquacultureRequestTest.php -test/Model/PostBeef200ResponseIntermediateInnerIntensitiesTest.php -test/Model/PostBeef200ResponseIntermediateInnerTest.php -test/Model/PostBeef200ResponseNetTest.php -test/Model/PostBeef200ResponseScope1Test.php -test/Model/PostBeef200ResponseScope3Test.php -test/Model/PostBeef200ResponseTest.php -test/Model/PostBeefRequestBeefInnerClassesBullsGt1AutumnTest.php -test/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInnerTest.php -test/Model/PostBeefRequestBeefInnerClassesBullsGt1Test.php -test/Model/PostBeefRequestBeefInnerClassesBullsGt1TradedTest.php -test/Model/PostBeefRequestBeefInnerClassesCowsGt2Test.php -test/Model/PostBeefRequestBeefInnerClassesCowsGt2TradedTest.php -test/Model/PostBeefRequestBeefInnerClassesHeifers1To2Test.php -test/Model/PostBeefRequestBeefInnerClassesHeifers1To2TradedTest.php -test/Model/PostBeefRequestBeefInnerClassesHeifersGt2Test.php -test/Model/PostBeefRequestBeefInnerClassesHeifersGt2TradedTest.php -test/Model/PostBeefRequestBeefInnerClassesHeifersLt1Test.php -test/Model/PostBeefRequestBeefInnerClassesHeifersLt1TradedTest.php -test/Model/PostBeefRequestBeefInnerClassesSteers1To2Test.php -test/Model/PostBeefRequestBeefInnerClassesSteers1To2TradedTest.php -test/Model/PostBeefRequestBeefInnerClassesSteersGt2Test.php -test/Model/PostBeefRequestBeefInnerClassesSteersGt2TradedTest.php -test/Model/PostBeefRequestBeefInnerClassesSteersLt1Test.php -test/Model/PostBeefRequestBeefInnerClassesSteersLt1TradedTest.php -test/Model/PostBeefRequestBeefInnerClassesTest.php -test/Model/PostBeefRequestBeefInnerCowsCalvingTest.php -test/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInnerTest.php -test/Model/PostBeefRequestBeefInnerFertiliserTest.php -test/Model/PostBeefRequestBeefInnerMineralSupplementationTest.php -test/Model/PostBeefRequestBeefInnerTest.php -test/Model/PostBeefRequestBurningInnerBurningTest.php -test/Model/PostBeefRequestBurningInnerTest.php -test/Model/PostBeefRequestTest.php -test/Model/PostBeefRequestVegetationInnerTest.php -test/Model/PostBeefRequestVegetationInnerVegetationTest.php -test/Model/PostBuffalo200ResponseIntensitiesTest.php -test/Model/PostBuffalo200ResponseIntermediateInnerTest.php -test/Model/PostBuffalo200ResponseNetTest.php -test/Model/PostBuffalo200ResponseScope1Test.php -test/Model/PostBuffalo200ResponseScope3Test.php -test/Model/PostBuffalo200ResponseTest.php -test/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumnTest.php -test/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInnerTest.php -test/Model/PostBuffaloRequestBuffalosInnerClassesBullsTest.php -test/Model/PostBuffaloRequestBuffalosInnerClassesCalfsTest.php -test/Model/PostBuffaloRequestBuffalosInnerClassesCowsTest.php -test/Model/PostBuffaloRequestBuffalosInnerClassesSteersTest.php -test/Model/PostBuffaloRequestBuffalosInnerClassesTest.php -test/Model/PostBuffaloRequestBuffalosInnerClassesTradeBullsTest.php -test/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfsTest.php -test/Model/PostBuffaloRequestBuffalosInnerClassesTradeCowsTest.php -test/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteersTest.php -test/Model/PostBuffaloRequestBuffalosInnerCowsCalvingTest.php -test/Model/PostBuffaloRequestBuffalosInnerSeasonalCalvingTest.php -test/Model/PostBuffaloRequestBuffalosInnerTest.php -test/Model/PostBuffaloRequestTest.php -test/Model/PostBuffaloRequestVegetationInnerTest.php -test/Model/PostCotton200ResponseIntermediateInnerIntensitiesTest.php -test/Model/PostCotton200ResponseIntermediateInnerTest.php -test/Model/PostCotton200ResponseNetTest.php -test/Model/PostCotton200ResponseScope1Test.php -test/Model/PostCotton200ResponseScope3Test.php -test/Model/PostCotton200ResponseTest.php -test/Model/PostCottonRequestCropsInnerTest.php -test/Model/PostCottonRequestTest.php -test/Model/PostCottonRequestVegetationInnerTest.php -test/Model/PostDairy200ResponseIntensitiesTest.php -test/Model/PostDairy200ResponseIntermediateInnerTest.php -test/Model/PostDairy200ResponseNetTest.php -test/Model/PostDairy200ResponseScope1Test.php -test/Model/PostDairy200ResponseScope3Test.php -test/Model/PostDairy200ResponseTest.php -test/Model/PostDairyRequestDairyInnerAreasTest.php -test/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1Test.php -test/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1Test.php -test/Model/PostDairyRequestDairyInnerClassesHeifersGt1Test.php -test/Model/PostDairyRequestDairyInnerClassesHeifersLt1Test.php -test/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumnTest.php -test/Model/PostDairyRequestDairyInnerClassesMilkingCowsTest.php -test/Model/PostDairyRequestDairyInnerClassesTest.php -test/Model/PostDairyRequestDairyInnerManureManagementMilkingCowsTest.php -test/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumnTest.php -test/Model/PostDairyRequestDairyInnerSeasonalFertiliserTest.php -test/Model/PostDairyRequestDairyInnerTest.php -test/Model/PostDairyRequestTest.php -test/Model/PostDairyRequestVegetationInnerTest.php -test/Model/PostDeer200ResponseIntensitiesTest.php -test/Model/PostDeer200ResponseIntermediateInnerTest.php -test/Model/PostDeer200ResponseNetTest.php -test/Model/PostDeer200ResponseTest.php -test/Model/PostDeerRequestDeersInnerClassesBreedingDoesTest.php -test/Model/PostDeerRequestDeersInnerClassesBucksTest.php -test/Model/PostDeerRequestDeersInnerClassesFawnTest.php -test/Model/PostDeerRequestDeersInnerClassesOtherDoesTest.php -test/Model/PostDeerRequestDeersInnerClassesTest.php -test/Model/PostDeerRequestDeersInnerClassesTradeBucksTest.php -test/Model/PostDeerRequestDeersInnerClassesTradeDoesTest.php -test/Model/PostDeerRequestDeersInnerClassesTradeFawnTest.php -test/Model/PostDeerRequestDeersInnerClassesTradeOtherDoesTest.php -test/Model/PostDeerRequestDeersInnerDoesFawningTest.php -test/Model/PostDeerRequestDeersInnerSeasonalFawningTest.php -test/Model/PostDeerRequestDeersInnerTest.php -test/Model/PostDeerRequestTest.php -test/Model/PostDeerRequestVegetationInnerTest.php -test/Model/PostFeedlot200ResponseIntermediateInnerIntensitiesTest.php -test/Model/PostFeedlot200ResponseIntermediateInnerNetTest.php -test/Model/PostFeedlot200ResponseIntermediateInnerTest.php -test/Model/PostFeedlot200ResponseScope1Test.php -test/Model/PostFeedlot200ResponseScope3Test.php -test/Model/PostFeedlot200ResponseTest.php -test/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInnerTest.php -test/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerTest.php -test/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1InnerTest.php -test/Model/PostFeedlotRequestFeedlotsInnerPurchasesTest.php -test/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1InnerTest.php -test/Model/PostFeedlotRequestFeedlotsInnerSalesTest.php -test/Model/PostFeedlotRequestFeedlotsInnerTest.php -test/Model/PostFeedlotRequestTest.php -test/Model/PostFeedlotRequestVegetationInnerTest.php -test/Model/PostGoat200ResponseIntensitiesTest.php -test/Model/PostGoat200ResponseIntermediateInnerTest.php -test/Model/PostGoat200ResponseNetTest.php -test/Model/PostGoat200ResponseTest.php -test/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNanniesTest.php -test/Model/PostGoatRequestGoatsInnerClassesBucksBillyTest.php -test/Model/PostGoatRequestGoatsInnerClassesKidsTest.php -test/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNanniesTest.php -test/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemalesTest.php -test/Model/PostGoatRequestGoatsInnerClassesTest.php -test/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNanniesTest.php -test/Model/PostGoatRequestGoatsInnerClassesTradeBucksTest.php -test/Model/PostGoatRequestGoatsInnerClassesTradeDoesTest.php -test/Model/PostGoatRequestGoatsInnerClassesTradeKidsTest.php -test/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNanniesTest.php -test/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemalesTest.php -test/Model/PostGoatRequestGoatsInnerClassesTradeWethersTest.php -test/Model/PostGoatRequestGoatsInnerClassesWethersTest.php -test/Model/PostGoatRequestGoatsInnerTest.php -test/Model/PostGoatRequestTest.php -test/Model/PostGoatRequestVegetationInnerTest.php -test/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestrationTest.php -test/Model/PostGrains200ResponseIntermediateInnerTest.php -test/Model/PostGrains200ResponseTest.php -test/Model/PostGrainsRequestCropsInnerTest.php -test/Model/PostGrainsRequestTest.php -test/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestrationTest.php -test/Model/PostHorticulture200ResponseIntermediateInnerTest.php -test/Model/PostHorticulture200ResponseScope1Test.php -test/Model/PostHorticulture200ResponseTest.php -test/Model/PostHorticultureRequestCropsInnerRefrigerantsInnerTest.php -test/Model/PostHorticultureRequestCropsInnerTest.php -test/Model/PostHorticultureRequestTest.php -test/Model/PostPork200ResponseIntensitiesTest.php -test/Model/PostPork200ResponseIntermediateInnerTest.php -test/Model/PostPork200ResponseNetTest.php -test/Model/PostPork200ResponseScope1Test.php -test/Model/PostPork200ResponseScope3Test.php -test/Model/PostPork200ResponseTest.php -test/Model/PostPorkRequestPorkInnerClassesBoarsTest.php -test/Model/PostPorkRequestPorkInnerClassesGiltsTest.php -test/Model/PostPorkRequestPorkInnerClassesGrowersTest.php -test/Model/PostPorkRequestPorkInnerClassesSlaughterPigsTest.php -test/Model/PostPorkRequestPorkInnerClassesSowsManureSpringTest.php -test/Model/PostPorkRequestPorkInnerClassesSowsManureTest.php -test/Model/PostPorkRequestPorkInnerClassesSowsTest.php -test/Model/PostPorkRequestPorkInnerClassesSuckersTest.php -test/Model/PostPorkRequestPorkInnerClassesTest.php -test/Model/PostPorkRequestPorkInnerClassesWeanersTest.php -test/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredientsTest.php -test/Model/PostPorkRequestPorkInnerFeedProductsInnerTest.php -test/Model/PostPorkRequestPorkInnerTest.php -test/Model/PostPorkRequestTest.php -test/Model/PostPorkRequestVegetationInnerTest.php -test/Model/PostPoultry200ResponseIntensitiesTest.php -test/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensitiesTest.php -test/Model/PostPoultry200ResponseIntermediateBroilersInnerTest.php -test/Model/PostPoultry200ResponseIntermediateLayersInnerIntensitiesTest.php -test/Model/PostPoultry200ResponseIntermediateLayersInnerTest.php -test/Model/PostPoultry200ResponseNetTest.php -test/Model/PostPoultry200ResponseScope1Test.php -test/Model/PostPoultry200ResponseScope3Test.php -test/Model/PostPoultry200ResponseTest.php -test/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredientsTest.php -test/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerTest.php -test/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowersTest.php -test/Model/PostPoultryRequestBroilersInnerGroupsInnerTest.php -test/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchasesTest.php -test/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchasesTest.php -test/Model/PostPoultryRequestBroilersInnerMeatOtherPurchasesTest.php -test/Model/PostPoultryRequestBroilersInnerSalesInnerTest.php -test/Model/PostPoultryRequestBroilersInnerTest.php -test/Model/PostPoultryRequestLayersInnerLayersEggSaleTest.php -test/Model/PostPoultryRequestLayersInnerLayersPurchasesTest.php -test/Model/PostPoultryRequestLayersInnerLayersTest.php -test/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSaleTest.php -test/Model/PostPoultryRequestLayersInnerMeatChickenLayersTest.php -test/Model/PostPoultryRequestLayersInnerTest.php -test/Model/PostPoultryRequestTest.php -test/Model/PostPoultryRequestVegetationInnerTest.php -test/Model/PostProcessing200ResponseIntensitiesInnerTest.php -test/Model/PostProcessing200ResponseIntermediateInnerTest.php -test/Model/PostProcessing200ResponseNetTest.php -test/Model/PostProcessing200ResponseScope1Test.php -test/Model/PostProcessing200ResponseScope3Test.php -test/Model/PostProcessing200ResponseTest.php -test/Model/PostProcessingRequestProductsInnerProductTest.php -test/Model/PostProcessingRequestProductsInnerTest.php -test/Model/PostProcessingRequestTest.php -test/Model/PostRice200ResponseIntensitiesTest.php -test/Model/PostRice200ResponseIntermediateInnerIntensitiesTest.php -test/Model/PostRice200ResponseIntermediateInnerTest.php -test/Model/PostRice200ResponseScope1Test.php -test/Model/PostRice200ResponseTest.php -test/Model/PostRiceRequestCropsInnerTest.php -test/Model/PostRiceRequestTest.php -test/Model/PostSheep200ResponseIntermediateInnerIntensitiesTest.php -test/Model/PostSheep200ResponseIntermediateInnerTest.php -test/Model/PostSheep200ResponseNetTest.php -test/Model/PostSheep200ResponseTest.php -test/Model/PostSheepRequestSheepInnerClassesRamsAutumnTest.php -test/Model/PostSheepRequestSheepInnerClassesRamsTest.php -test/Model/PostSheepRequestSheepInnerClassesTest.php -test/Model/PostSheepRequestSheepInnerClassesTradeEwesTest.php -test/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggetsTest.php -test/Model/PostSheepRequestSheepInnerEwesLambingTest.php -test/Model/PostSheepRequestSheepInnerSeasonalLambingTest.php -test/Model/PostSheepRequestSheepInnerTest.php -test/Model/PostSheepRequestTest.php -test/Model/PostSheepRequestVegetationInnerTest.php -test/Model/PostSheepbeef200ResponseIntensitiesTest.php -test/Model/PostSheepbeef200ResponseIntermediateBeefTest.php -test/Model/PostSheepbeef200ResponseIntermediateSheepTest.php -test/Model/PostSheepbeef200ResponseIntermediateTest.php -test/Model/PostSheepbeef200ResponseNetTest.php -test/Model/PostSheepbeef200ResponseTest.php -test/Model/PostSheepbeefRequestTest.php -test/Model/PostSheepbeefRequestVegetationInnerTest.php -test/Model/PostSugar200ResponseIntermediateInnerIntensitiesTest.php -test/Model/PostSugar200ResponseIntermediateInnerTest.php -test/Model/PostSugar200ResponseTest.php -test/Model/PostSugarRequestCropsInnerTest.php -test/Model/PostSugarRequestTest.php -test/Model/PostVineyard200ResponseIntermediateInnerIntensitiesTest.php -test/Model/PostVineyard200ResponseIntermediateInnerTest.php -test/Model/PostVineyard200ResponseNetTest.php -test/Model/PostVineyard200ResponseScope1Test.php -test/Model/PostVineyard200ResponseScope3Test.php -test/Model/PostVineyard200ResponseTest.php -test/Model/PostVineyardRequestTest.php -test/Model/PostVineyardRequestVegetationInnerTest.php -test/Model/PostVineyardRequestVineyardsInnerTest.php -test/Model/PostWildcatchfishery200ResponseIntensitiesTest.php -test/Model/PostWildcatchfishery200ResponseIntermediateInnerTest.php -test/Model/PostWildcatchfishery200ResponseScope1Test.php -test/Model/PostWildcatchfishery200ResponseTest.php -test/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInnerTest.php -test/Model/PostWildcatchfisheryRequestEnterprisesInnerTest.php -test/Model/PostWildcatchfisheryRequestTest.php -test/Model/PostWildseafisheries200ResponseIntermediateInnerIntensitiesTest.php -test/Model/PostWildseafisheries200ResponseIntermediateInnerTest.php -test/Model/PostWildseafisheries200ResponseScope1Test.php -test/Model/PostWildseafisheries200ResponseScope3Test.php -test/Model/PostWildseafisheries200ResponseTest.php -test/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInnerTest.php -test/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInnerTest.php -test/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInnerTest.php -test/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInnerTest.php -test/Model/PostWildseafisheriesRequestEnterprisesInnerTest.php -test/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInnerTest.php -test/Model/PostWildseafisheriesRequestTest.php diff --git a/examples/php-api-client/api-client/docs/Api/GAFApi.md b/examples/php-api-client/api-client/docs/Api/GAFApi.md deleted file mode 100644 index 9e3d94fb..00000000 --- a/examples/php-api-client/api-client/docs/Api/GAFApi.md +++ /dev/null @@ -1,1147 +0,0 @@ -# OpenAPI\Client\GAFApi - -All URIs are relative to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0, except if the operation defines another base path. - -| Method | HTTP request | Description | -| ------------- | ------------- | ------------- | -| [**postAquaculture()**](GAFApi.md#postAquaculture) | **POST** /aquaculture | Perform aquaculture calculation | -| [**postBeef()**](GAFApi.md#postBeef) | **POST** /beef | Perform beef calculation | -| [**postBuffalo()**](GAFApi.md#postBuffalo) | **POST** /buffalo | Perform buffalo calculation | -| [**postCotton()**](GAFApi.md#postCotton) | **POST** /cotton | Perform cotton calculation | -| [**postDairy()**](GAFApi.md#postDairy) | **POST** /dairy | Perform dairy calculation | -| [**postDeer()**](GAFApi.md#postDeer) | **POST** /deer | Perform deer calculation | -| [**postFeedlot()**](GAFApi.md#postFeedlot) | **POST** /feedlot | Perform feedlot calculation | -| [**postGoat()**](GAFApi.md#postGoat) | **POST** /goat | Perform goat calculation | -| [**postGrains()**](GAFApi.md#postGrains) | **POST** /grains | Perform grains calculation | -| [**postHorticulture()**](GAFApi.md#postHorticulture) | **POST** /horticulture | Perform horticulture calculation | -| [**postPork()**](GAFApi.md#postPork) | **POST** /pork | Perform pork calculation | -| [**postPoultry()**](GAFApi.md#postPoultry) | **POST** /poultry | Perform poultry calculation | -| [**postProcessing()**](GAFApi.md#postProcessing) | **POST** /processing | Perform processing calculation | -| [**postRice()**](GAFApi.md#postRice) | **POST** /rice | Perform rice calculation | -| [**postSheep()**](GAFApi.md#postSheep) | **POST** /sheep | Perform sheep calculation | -| [**postSheepbeef()**](GAFApi.md#postSheepbeef) | **POST** /sheepbeef | Perform sheepbeef calculation | -| [**postSugar()**](GAFApi.md#postSugar) | **POST** /sugar | Perform sugar calculation | -| [**postVineyard()**](GAFApi.md#postVineyard) | **POST** /vineyard | Perform vineyard calculation | -| [**postWildcatchfishery()**](GAFApi.md#postWildcatchfishery) | **POST** /wildcatchfishery | Perform wildcatchfishery calculation | -| [**postWildseafisheries()**](GAFApi.md#postWildseafisheries) | **POST** /wildseafisheries | Perform wildseafisheries calculation | - - -## `postAquaculture()` - -```php -postAquaculture($post_aquaculture_request): \OpenAPI\Client\Model\PostAquaculture200Response -``` - -Perform aquaculture calculation - -Retrieve a simple JSON response - -### Example - -```php -postAquaculture($post_aquaculture_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postAquaculture: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_aquaculture_request** | [**\OpenAPI\Client\Model\PostAquacultureRequest**](../Model/PostAquacultureRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostAquaculture200Response**](../Model/PostAquaculture200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postBeef()` - -```php -postBeef($post_beef_request): \OpenAPI\Client\Model\PostBeef200Response -``` - -Perform beef calculation - -Retrieve a simple JSON response - -### Example - -```php -postBeef($post_beef_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postBeef: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_beef_request** | [**\OpenAPI\Client\Model\PostBeefRequest**](../Model/PostBeefRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostBeef200Response**](../Model/PostBeef200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postBuffalo()` - -```php -postBuffalo($post_buffalo_request): \OpenAPI\Client\Model\PostBuffalo200Response -``` - -Perform buffalo calculation - -Retrieve a simple JSON response - -### Example - -```php -postBuffalo($post_buffalo_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postBuffalo: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_buffalo_request** | [**\OpenAPI\Client\Model\PostBuffaloRequest**](../Model/PostBuffaloRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostBuffalo200Response**](../Model/PostBuffalo200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postCotton()` - -```php -postCotton($post_cotton_request): \OpenAPI\Client\Model\PostCotton200Response -``` - -Perform cotton calculation - -Retrieve a simple JSON response - -### Example - -```php -postCotton($post_cotton_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postCotton: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_cotton_request** | [**\OpenAPI\Client\Model\PostCottonRequest**](../Model/PostCottonRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostCotton200Response**](../Model/PostCotton200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postDairy()` - -```php -postDairy($post_dairy_request): \OpenAPI\Client\Model\PostDairy200Response -``` - -Perform dairy calculation - -Retrieve a simple JSON response - -### Example - -```php -postDairy($post_dairy_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postDairy: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_dairy_request** | [**\OpenAPI\Client\Model\PostDairyRequest**](../Model/PostDairyRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostDairy200Response**](../Model/PostDairy200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postDeer()` - -```php -postDeer($post_deer_request): \OpenAPI\Client\Model\PostDeer200Response -``` - -Perform deer calculation - -Retrieve a simple JSON response - -### Example - -```php -postDeer($post_deer_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postDeer: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_deer_request** | [**\OpenAPI\Client\Model\PostDeerRequest**](../Model/PostDeerRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostDeer200Response**](../Model/PostDeer200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postFeedlot()` - -```php -postFeedlot($post_feedlot_request): \OpenAPI\Client\Model\PostFeedlot200Response -``` - -Perform feedlot calculation - -Retrieve a simple JSON response - -### Example - -```php -postFeedlot($post_feedlot_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postFeedlot: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_feedlot_request** | [**\OpenAPI\Client\Model\PostFeedlotRequest**](../Model/PostFeedlotRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostFeedlot200Response**](../Model/PostFeedlot200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postGoat()` - -```php -postGoat($post_goat_request): \OpenAPI\Client\Model\PostGoat200Response -``` - -Perform goat calculation - -Retrieve a simple JSON response - -### Example - -```php -postGoat($post_goat_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postGoat: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_goat_request** | [**\OpenAPI\Client\Model\PostGoatRequest**](../Model/PostGoatRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostGoat200Response**](../Model/PostGoat200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postGrains()` - -```php -postGrains($post_grains_request): \OpenAPI\Client\Model\PostGrains200Response -``` - -Perform grains calculation - -Retrieve a simple JSON response - -### Example - -```php -postGrains($post_grains_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postGrains: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_grains_request** | [**\OpenAPI\Client\Model\PostGrainsRequest**](../Model/PostGrainsRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostGrains200Response**](../Model/PostGrains200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postHorticulture()` - -```php -postHorticulture($post_horticulture_request): \OpenAPI\Client\Model\PostHorticulture200Response -``` - -Perform horticulture calculation - -Retrieve a simple JSON response - -### Example - -```php -postHorticulture($post_horticulture_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postHorticulture: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_horticulture_request** | [**\OpenAPI\Client\Model\PostHorticultureRequest**](../Model/PostHorticultureRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostHorticulture200Response**](../Model/PostHorticulture200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postPork()` - -```php -postPork($post_pork_request): \OpenAPI\Client\Model\PostPork200Response -``` - -Perform pork calculation - -Retrieve a simple JSON response - -### Example - -```php -postPork($post_pork_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postPork: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_pork_request** | [**\OpenAPI\Client\Model\PostPorkRequest**](../Model/PostPorkRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostPork200Response**](../Model/PostPork200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postPoultry()` - -```php -postPoultry($post_poultry_request): \OpenAPI\Client\Model\PostPoultry200Response -``` - -Perform poultry calculation - -Retrieve a simple JSON response - -### Example - -```php -postPoultry($post_poultry_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postPoultry: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_poultry_request** | [**\OpenAPI\Client\Model\PostPoultryRequest**](../Model/PostPoultryRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostPoultry200Response**](../Model/PostPoultry200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postProcessing()` - -```php -postProcessing($post_processing_request): \OpenAPI\Client\Model\PostProcessing200Response -``` - -Perform processing calculation - -Retrieve a simple JSON response - -### Example - -```php -postProcessing($post_processing_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postProcessing: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_processing_request** | [**\OpenAPI\Client\Model\PostProcessingRequest**](../Model/PostProcessingRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostProcessing200Response**](../Model/PostProcessing200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postRice()` - -```php -postRice($post_rice_request): \OpenAPI\Client\Model\PostRice200Response -``` - -Perform rice calculation - -Retrieve a simple JSON response - -### Example - -```php -postRice($post_rice_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postRice: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_rice_request** | [**\OpenAPI\Client\Model\PostRiceRequest**](../Model/PostRiceRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostRice200Response**](../Model/PostRice200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postSheep()` - -```php -postSheep($post_sheep_request): \OpenAPI\Client\Model\PostSheep200Response -``` - -Perform sheep calculation - -Retrieve a simple JSON response - -### Example - -```php -postSheep($post_sheep_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postSheep: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_sheep_request** | [**\OpenAPI\Client\Model\PostSheepRequest**](../Model/PostSheepRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostSheep200Response**](../Model/PostSheep200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postSheepbeef()` - -```php -postSheepbeef($post_sheepbeef_request): \OpenAPI\Client\Model\PostSheepbeef200Response -``` - -Perform sheepbeef calculation - -Retrieve a simple JSON response - -### Example - -```php -postSheepbeef($post_sheepbeef_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postSheepbeef: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_sheepbeef_request** | [**\OpenAPI\Client\Model\PostSheepbeefRequest**](../Model/PostSheepbeefRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostSheepbeef200Response**](../Model/PostSheepbeef200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postSugar()` - -```php -postSugar($post_sugar_request): \OpenAPI\Client\Model\PostSugar200Response -``` - -Perform sugar calculation - -Retrieve a simple JSON response - -### Example - -```php -postSugar($post_sugar_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postSugar: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_sugar_request** | [**\OpenAPI\Client\Model\PostSugarRequest**](../Model/PostSugarRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostSugar200Response**](../Model/PostSugar200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postVineyard()` - -```php -postVineyard($post_vineyard_request): \OpenAPI\Client\Model\PostVineyard200Response -``` - -Perform vineyard calculation - -Retrieve a simple JSON response - -### Example - -```php -postVineyard($post_vineyard_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postVineyard: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_vineyard_request** | [**\OpenAPI\Client\Model\PostVineyardRequest**](../Model/PostVineyardRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostVineyard200Response**](../Model/PostVineyard200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postWildcatchfishery()` - -```php -postWildcatchfishery($post_wildcatchfishery_request): \OpenAPI\Client\Model\PostWildcatchfishery200Response -``` - -Perform wildcatchfishery calculation - -Retrieve a simple JSON response - -### Example - -```php -postWildcatchfishery($post_wildcatchfishery_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postWildcatchfishery: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_wildcatchfishery_request** | [**\OpenAPI\Client\Model\PostWildcatchfisheryRequest**](../Model/PostWildcatchfisheryRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostWildcatchfishery200Response**](../Model/PostWildcatchfishery200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `postWildseafisheries()` - -```php -postWildseafisheries($post_wildseafisheries_request): \OpenAPI\Client\Model\PostWildseafisheries200Response -``` - -Perform wildseafisheries calculation - -Retrieve a simple JSON response - -### Example - -```php -postWildseafisheries($post_wildseafisheries_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling GAFApi->postWildseafisheries: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **post_wildseafisheries_request** | [**\OpenAPI\Client\Model\PostWildseafisheriesRequest**](../Model/PostWildseafisheriesRequest.md)| | | - -### Return type - -[**\OpenAPI\Client\Model\PostWildseafisheries200Response**](../Model/PostWildseafisheries200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200Response.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200Response.md deleted file mode 100644 index 1234262d..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquaculture200Response.md +++ /dev/null @@ -1,16 +0,0 @@ -# # PostAquaculture200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope1**](PostAquaculture200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | -**purchased_offsets** | [**\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntensities**](PostAquaculture200ResponseIntensities.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInner[]**](PostAquaculture200ResponseIntermediateInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseCarbonSequestration.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseCarbonSequestration.md deleted file mode 100644 index 795878e3..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseCarbonSequestration.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostAquaculture200ResponseCarbonSequestration - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Annual amount of carbon sequestered, in tonnes-CO2e | -**intermediate** | **float[]** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntensities.md deleted file mode 100644 index e03b3471..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntensities.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostAquaculture200ResponseIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total_harvest_weight_kg** | **float** | Total harvest weight in kg | -**aquaculture_excluding_carbon_offsets** | **float** | Aquaculture emissions intensity excluding sequestration, in kg-CO2e/kg | -**aquaculture_including_carbon_offsets** | **float** | Aquaculture emissions intensity including sequestration, in kg-CO2e/kg | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInner.md deleted file mode 100644 index 595d8cfc..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostAquaculture200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope1**](PostAquaculture200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntensities**](PostAquaculture200ResponseIntensities.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md deleted file mode 100644 index e8327981..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostAquaculture200ResponseIntermediateInnerCarbonSequestration - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Annual amount of carbon sequestered, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseNet.md deleted file mode 100644 index 811f9e80..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseNet.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostAquaculture200ResponseNet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponsePurchasedOffsets.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponsePurchasedOffsets.md deleted file mode 100644 index 89247204..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponsePurchasedOffsets.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostAquaculture200ResponsePurchasedOffsets - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Annual amount of carbon sequestered, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope1.md deleted file mode 100644 index fca5c80a..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope1.md +++ /dev/null @@ -1,19 +0,0 @@ -# # PostAquaculture200ResponseScope1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | -**waste_water_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | -**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope2.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope2.md deleted file mode 100644 index c8193a0e..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope2.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostAquaculture200ResponseScope2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**total** | **float** | Total scope 2 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope3.md deleted file mode 100644 index c0d1082b..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquaculture200ResponseScope3.md +++ /dev/null @@ -1,16 +0,0 @@ -# # PostAquaculture200ResponseScope3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**purchased_bait** | **float** | Emissions from purchased bait, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**commercial_flights** | **float** | Emissions from commercial flights, in tonnes-CO2e | -**inbound_freight** | **float** | Emissions from inbound freight, in tonnes-CO2e | -**outbound_freight** | **float** | Emissions from outbound freight, in tonnes-CO2e | -**solid_waste_sent_offsite** | **float** | Emissions from solid waste sent offsite, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequest.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequest.md deleted file mode 100644 index a1f164c0..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostAquacultureRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enterprises** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInner[]**](PostAquacultureRequestEnterprisesInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInner.md deleted file mode 100644 index 0046a900..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInner.md +++ /dev/null @@ -1,25 +0,0 @@ -# # PostAquacultureRequestEnterprisesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**production_system** | **string** | Production system of the aquaculture enterprise | -**total_harvest_kg** | **float** | Total harvest in kg | -**refrigerants** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerRefrigerantsInner[]**](PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md) | Refrigerant type | -**bait** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerBaitInner[]**](PostAquacultureRequestEnterprisesInnerBaitInner.md) | Bait purchases | -**custom_bait** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerCustomBaitInner[]**](PostAquacultureRequestEnterprisesInnerCustomBaitInner.md) | Custom bait purchases | -**inbound_freight** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods to the enterprise | -**outbound_freight** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods from the enterprise | -**total_commercial_flights_km** | **float** | Total distance of commercial flights, in km (kilometers) | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**electricity_source** | **string** | Source of electricity | -**fuel** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | -**fluid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | -**solid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | -**carbon_offsets** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerBaitInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerBaitInner.md deleted file mode 100644 index 96410166..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerBaitInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostAquacultureRequestEnterprisesInnerBaitInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **string** | Bait product type | -**purchased_tonnes** | **float** | Purchased product in tonnes | -**additional_ingredients** | **float** | Additional ingredient fraction, from 0 to 1 | -**emissions_intensity** | **float** | Emissions intensity of additional ingredients, in kg CO2e/kg bait (default 0) | [default to 0] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md deleted file mode 100644 index 1f5ee2e2..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostAquacultureRequestEnterprisesInnerCustomBaitInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**purchased_tonnes** | **float** | Purchased product in tonnes | -**emissions_intensity** | **float** | Emissions intensity of product, in kg CO2e/kg bait | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md deleted file mode 100644 index 229287e6..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostAquacultureRequestEnterprisesInnerFluidWasteInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fluid_waste_kl** | **float** | Amount of fluid waste, in kL (kilolitres) | -**fluid_waste_treatment_type** | **string** | Type of fluid waste treatment | -**average_inlet_cod** | **float** | Average inlet COD (mg per litre) | -**average_outlet_cod** | **float** | Average outlet COD (mg per litre) | -**flared_combusted_fraction** | **float** | Fraction of waste flared or combusted, between 0 and 1 | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuel.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuel.md deleted file mode 100644 index 6d18fa59..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuel.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostAquacultureRequestEnterprisesInnerFuel - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transport_fuel** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner[]**](PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md) | A list of fuels used in transportation and vehicles | -**stationary_fuel** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner[]**](PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md) | A list of fuels used in stationary applications | -**natural_gas** | **float** | Amount of natural gas consumed in Mj (megajoules) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md deleted file mode 100644 index fad44f00..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **string** | Type of fuel | -**amount_litres** | **float** | Amount of fuel consumed (litres) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md deleted file mode 100644 index e9c8cab3..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **string** | Type of fuel | -**amount_litres** | **float** | Amount of fuel consumed (litres) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md deleted file mode 100644 index 3bc9d3df..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostAquacultureRequestEnterprisesInnerInboundFreightInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **string** | Type of freight used | -**total_km_tonnes** | **float** | Total distance of freight, in kilometre tonnes | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md deleted file mode 100644 index e92dec8c..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostAquacultureRequestEnterprisesInnerRefrigerantsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**refrigerant** | **string** | Refrigerant type | -**charge_size** | **float** | Amount of refrigerant contained in the appliance, in kg | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.md b/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.md deleted file mode 100644 index c7bcf5b9..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostAquacultureRequestEnterprisesInnerSolidWaste.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostAquacultureRequestEnterprisesInnerSolidWaste - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sent_offsite_tonnes** | **float** | Amount of solid waste sent offsite to landfill, in tonnes | -**onsite_composting_tonnes** | **float** | Amount of solid waste composted on site, in tonnes | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeef200Response.md b/examples/php-api-client/api-client/docs/Model/PostBeef200Response.md deleted file mode 100644 index 80f1070a..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeef200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostBeef200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInner[]**](PostBeef200ResponseIntermediateInner.md) | | -**net** | [**\OpenAPI\Client\Model\PostBeef200ResponseNet**](PostBeef200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities**](PostBeef200ResponseIntermediateInnerIntensities.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInner.md deleted file mode 100644 index c514ee93..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostBeef200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**intensities** | [**\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities**](PostBeef200ResponseIntermediateInnerIntensities.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index c17f23b3..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostBeef200ResponseIntermediateInnerIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**liveweight_beef_produced_kg** | **float** | Amount of beef produced in kg liveweight | -**beef_excluding_sequestration** | **float** | Beef excluding sequestration, in kg-CO2e/kg liveweight | -**beef_including_sequestration** | **float** | Beef including sequestration, in kg-CO2e/kg liveweight | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseNet.md deleted file mode 100644 index a700c0dd..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseNet.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostBeef200ResponseNet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | -**beef** | **float** | Net emissions of beef, in tonnes-CO2e/year | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope1.md deleted file mode 100644 index 761abcfe..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope1.md +++ /dev/null @@ -1,25 +0,0 @@ -# # PostBeef200ResponseScope1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | -**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | -**urine_and_dung_n2_o** | **float** | N2O emissions from urine and dung, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**savannah_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | -**savannah_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope3.md deleted file mode 100644 index d398c3ca..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeef200ResponseScope3.md +++ /dev/null @@ -1,17 +0,0 @@ -# # PostBeef200ResponseScope3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | -**purchased_mineral_supplementation** | **float** | Emissions from purchased mineral supplementation, in tonnes-CO2e | -**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**lime** | **float** | Emissions from lime, in tonnes-CO2e | -**purchased_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequest.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequest.md deleted file mode 100644 index 0eded94a..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# # PostBeefRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**beef** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInner[]**](PostBeefRequestBeefInner.md) | | -**burning** | [**\OpenAPI\Client\Model\PostBeefRequestBurningInner[]**](PostBeefRequestBurningInner.md) | | -**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInner[]**](PostBeefRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInner.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInner.md deleted file mode 100644 index 0f7294c4..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInner.md +++ /dev/null @@ -1,26 +0,0 @@ -# # PostBeefRequestBeefInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**classes** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClasses**](PostBeefRequestBeefInnerClasses.md) | | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**mineral_supplementation** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation**](PostBeefRequestBeefInnerMineralSupplementation.md) | | -**electricity_source** | **string** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | -**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | -**cottonseed_feed** | **float** | Cotton seed purchased for cattle feed in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**cows_calving** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerCowsCalving**](PostBeefRequestBeefInnerCowsCalving.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClasses.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClasses.md deleted file mode 100644 index 0aacda7a..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClasses.md +++ /dev/null @@ -1,24 +0,0 @@ -# # PostBeefRequestBeefInnerClasses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bulls_gt1** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1**](PostBeefRequestBeefInnerClassesBullsGt1.md) | | [optional] -**bulls_gt1_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Traded**](PostBeefRequestBeefInnerClassesBullsGt1Traded.md) | | [optional] -**steers_lt1** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersLt1**](PostBeefRequestBeefInnerClassesSteersLt1.md) | | [optional] -**steers_lt1_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersLt1Traded**](PostBeefRequestBeefInnerClassesSteersLt1Traded.md) | | [optional] -**steers1_to2** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteers1To2**](PostBeefRequestBeefInnerClassesSteers1To2.md) | | [optional] -**steers1_to2_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteers1To2Traded**](PostBeefRequestBeefInnerClassesSteers1To2Traded.md) | | [optional] -**steers_gt2** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersGt2**](PostBeefRequestBeefInnerClassesSteersGt2.md) | | [optional] -**steers_gt2_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesSteersGt2Traded**](PostBeefRequestBeefInnerClassesSteersGt2Traded.md) | | [optional] -**cows_gt2** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesCowsGt2**](PostBeefRequestBeefInnerClassesCowsGt2.md) | | [optional] -**cows_gt2_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesCowsGt2Traded**](PostBeefRequestBeefInnerClassesCowsGt2Traded.md) | | [optional] -**heifers_lt1** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersLt1**](PostBeefRequestBeefInnerClassesHeifersLt1.md) | | [optional] -**heifers_lt1_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersLt1Traded**](PostBeefRequestBeefInnerClassesHeifersLt1Traded.md) | | [optional] -**heifers1_to2** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifers1To2**](PostBeefRequestBeefInnerClassesHeifers1To2.md) | | [optional] -**heifers1_to2_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifers1To2Traded**](PostBeefRequestBeefInnerClassesHeifers1To2Traded.md) | | [optional] -**heifers_gt2** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersGt2**](PostBeefRequestBeefInnerClassesHeifersGt2.md) | | [optional] -**heifers_gt2_traded** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesHeifersGt2Traded**](PostBeefRequestBeefInnerClassesHeifersGt2Traded.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1.md deleted file mode 100644 index 303ab2c5..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesBullsGt1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md deleted file mode 100644 index 3c190732..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostBeefRequestBeefInnerClassesBullsGt1Autumn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals (head) | -**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | -**liveweight_gain** | **float** | Average liveweight gain in kg/day (kilogram per day) | -**crude_protein** | **float** | Crude protein percent, between 0 and 100 | [optional] -**dry_matter_digestibility** | **float** | Dry matter digestibility percent, between 0 and 100 | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md deleted file mode 100644 index 17e135c7..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals purchased (head) | -**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | -**purchase_source** | **string** | Source location of livestock purchase | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.md deleted file mode 100644 index e4cbf4ff..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesBullsGt1Traded.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesBullsGt1Traded - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2.md deleted file mode 100644 index cc78984f..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesCowsGt2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.md deleted file mode 100644 index 11f6f1d6..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesCowsGt2Traded.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesCowsGt2Traded - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2.md deleted file mode 100644 index 3ccb1e03..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesHeifers1To2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md deleted file mode 100644 index 5ab0e46d..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesHeifers1To2Traded - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2.md deleted file mode 100644 index c29fabda..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesHeifersGt2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md deleted file mode 100644 index 1778a28d..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesHeifersGt2Traded - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1.md deleted file mode 100644 index e20d7f3b..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesHeifersLt1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md deleted file mode 100644 index 1fc1faa5..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesHeifersLt1Traded - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2.md deleted file mode 100644 index ff832ce0..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesSteers1To2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.md deleted file mode 100644 index 42339287..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteers1To2Traded.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesSteers1To2Traded - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2.md deleted file mode 100644 index a53080cd..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesSteersGt2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.md deleted file mode 100644 index 152909b3..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersGt2Traded.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesSteersGt2Traded - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1.md deleted file mode 100644 index d6432c63..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesSteersLt1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.md deleted file mode 100644 index 35b1f9a8..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerClassesSteersLt1Traded.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostBeefRequestBeefInnerClassesSteersLt1Traded - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **string** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner[]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerCowsCalving.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerCowsCalving.md deleted file mode 100644 index 1dc4d37a..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerCowsCalving.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostBeefRequestBeefInnerCowsCalving - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**spring** | **float** | | -**summer** | **float** | | -**autumn** | **float** | | -**winter** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliser.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliser.md deleted file mode 100644 index feb3381b..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliser.md +++ /dev/null @@ -1,17 +0,0 @@ -# # PostBeefRequestBeefInnerFertiliser - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**single_superphosphate** | **float** | Single superphosphate usage in tonnes | -**other_type** | **string** | Other N fertiliser type. Deprecation note: Use `otherFertilisers` instead | [optional] -**pasture_dryland** | **float** | Urea fertiliser used for dryland pasture, in tonnes Urea | -**pasture_irrigated** | **float** | Urea fertiliser used for irrigated pasture, in tonnes Urea | -**crops_dryland** | **float** | Urea fertiliser used for dryland crops, in tonnes Urea | -**crops_irrigated** | **float** | Urea fertiliser used for irrigated crops, in tonnes Urea | -**other_dryland** | **float** | Other N fertiliser used for dryland. Deprecation note: Use `otherFertilisers` instead | [optional] -**other_irrigated** | **float** | Other N fertiliser used for irrigated. Deprecation note: Use `otherFertilisers` instead | [optional] -**other_fertilisers** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliserOtherFertilisersInner[]**](PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md) | Array of Other N fertiliser. Version note: If this field is set and has a length > 0, the `other` fields within this object are ignored, and this array is used instead | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md deleted file mode 100644 index 653852a4..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostBeefRequestBeefInnerFertiliserOtherFertilisersInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**other_type** | **string** | Other N fertiliser type | -**other_dryland** | **float** | Other N fertiliser used for dryland. From v1.1.0, supply tonnes of product. For earlier versions, supply tonnes of N | -**other_irrigated** | **float** | Other N fertiliser used for irrigated. From v1.1.0, supply tonnes of product. For earlier versions, supply tonnes of N | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerMineralSupplementation.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerMineralSupplementation.md deleted file mode 100644 index 640b474a..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBeefInnerMineralSupplementation.md +++ /dev/null @@ -1,14 +0,0 @@ -# # PostBeefRequestBeefInnerMineralSupplementation - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mineral_block** | **float** | Mineral block product used, in tonnes | [default to 0] -**mineral_block_urea** | **float** | Fraction of urea content, between 0 and 1 | [default to 0] -**weaner_block** | **float** | Weaner block product used, in tonnes | [default to 0] -**weaner_block_urea** | **float** | Fraction of urea content, between 0 and 1 | [default to 0] -**dry_season_mix** | **float** | Dry season mix product used, in tonnes | [default to 0] -**dry_season_mix_urea** | **float** | Fraction of urea content, between 0 and 1 | [default to 0] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInner.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInner.md deleted file mode 100644 index e14e0789..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostBeefRequestBurningInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**burning** | [**\OpenAPI\Client\Model\PostBeefRequestBurningInnerBurning**](PostBeefRequestBurningInnerBurning.md) | | -**allocation_to_beef** | **float[]** | The proportion of the burning that is allocated to each beef | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInnerBurning.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInnerBurning.md deleted file mode 100644 index 03a4164d..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestBurningInnerBurning.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostBeefRequestBurningInnerBurning - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel** | **string** | The fuel class size that was burnt | [default to 'coarse'] -**season** | **string** | The time relative to the fire season in which the burning took place | [default to 'early dry season'] -**patchiness** | **string** | The patchiness of the savannah/vegetation that was burnt | [default to 'high'] -**rainfall_zone** | **string** | The rainfall zone in which the burning took place | [default to 'low'] -**years_since_last_fire** | **float** | Time since the last fire, in years | [default to 0] -**fire_scar_area** | **float** | The total area of the fire scar, in ha (hectares) | [default to 0] -**vegetation** | **string** | The vegetation class that was burnt | [default to 'Melaleuca woodland'] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInner.md deleted file mode 100644 index a30b4b01..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostBeefRequestVegetationInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**beef_proportion** | **float** | The proportion of the sequestration that is allocated to beef. Deprecation note: Please use `allocationToBeef` instead | [optional] -**allocation_to_beef** | **float[]** | The proportion of the sequestration that is allocated to each beef | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInnerVegetation.md b/examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInnerVegetation.md deleted file mode 100644 index 910d817a..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBeefRequestVegetationInnerVegetation.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostBeefRequestVegetationInnerVegetation - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**region** | **string** | The rainfall region that the vegetation is in | -**tree_species** | **string** | The species of tree | -**soil** | **string** | The soil type the tree is in | -**area** | **float** | The area of trees, in ha (hectares) | -**age** | **float** | The age of the trees, in years | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffalo200Response.md b/examples/php-api-client/api-client/docs/Model/PostBuffalo200Response.md deleted file mode 100644 index 0fe3db4f..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffalo200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostBuffalo200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**net** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseNet**](PostBuffalo200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseIntensities**](PostBuffalo200ResponseIntensities.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseIntermediateInner[]**](PostBuffalo200ResponseIntermediateInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntensities.md deleted file mode 100644 index ca5ae1f6..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntensities.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostBuffalo200ResponseIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**liveweight_produced_kg** | **float** | Amount of buffalo meat produced in kg liveweight | -**buffalo_meat_excluding_sequestration** | **float** | Buffalo meat (breeding herd) excluding sequestration, in kg-CO2e/kg liveweight | -**buffalo_meat_including_sequestration** | **float** | Buffalo meat (breeding herd) including sequestration, in kg-CO2e/kg liveweight | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntermediateInner.md deleted file mode 100644 index d28e6927..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostBuffalo200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | -**net** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseNet**](PostBuffalo200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseIntensities**](PostBuffalo200ResponseIntensities.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseNet.md deleted file mode 100644 index 5ce8d53c..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseNet.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostBuffalo200ResponseNet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope1.md deleted file mode 100644 index 8e32ce84..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope1.md +++ /dev/null @@ -1,23 +0,0 @@ -# # PostBuffalo200ResponseScope1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | -**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | -**urine_and_dung_n2_o** | **float** | N2O emissions from urine and dung, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope3.md deleted file mode 100644 index 6c768769..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffalo200ResponseScope3.md +++ /dev/null @@ -1,16 +0,0 @@ -# # PostBuffalo200ResponseScope3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | -**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**lime** | **float** | Emissions from lime, in tonnes-CO2e | -**purchased_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequest.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequest.md deleted file mode 100644 index 7901c800..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostBuffaloRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**buffalos** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInner[]**](PostBuffaloRequestBuffalosInner.md) | | -**vegetation** | [**\OpenAPI\Client\Model\PostBuffaloRequestVegetationInner[]**](PostBuffaloRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInner.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInner.md deleted file mode 100644 index b2b8c4f9..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInner.md +++ /dev/null @@ -1,25 +0,0 @@ -# # PostBuffaloRequestBuffalosInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**classes** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClasses**](PostBuffaloRequestBuffalosInnerClasses.md) | | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**electricity_source** | **string** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | -**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**cows_calving** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerCowsCalving**](PostBuffaloRequestBuffalosInnerCowsCalving.md) | | -**seasonal_calving** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerSeasonalCalving**](PostBuffaloRequestBuffalosInnerSeasonalCalving.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClasses.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClasses.md deleted file mode 100644 index 155c9989..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClasses.md +++ /dev/null @@ -1,16 +0,0 @@ -# # PostBuffaloRequestBuffalosInnerClasses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bulls** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBulls**](PostBuffaloRequestBuffalosInnerClassesBulls.md) | | [optional] -**trade_bulls** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeBulls**](PostBuffaloRequestBuffalosInnerClassesTradeBulls.md) | | [optional] -**cows** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesCows**](PostBuffaloRequestBuffalosInnerClassesCows.md) | | [optional] -**trade_cows** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeCows**](PostBuffaloRequestBuffalosInnerClassesTradeCows.md) | | [optional] -**steers** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesSteers**](PostBuffaloRequestBuffalosInnerClassesSteers.md) | | [optional] -**trade_steers** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeSteers**](PostBuffaloRequestBuffalosInnerClassesTradeSteers.md) | | [optional] -**calfs** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesCalfs**](PostBuffaloRequestBuffalosInnerClassesCalfs.md) | | [optional] -**trade_calfs** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesTradeCalfs**](PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBulls.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBulls.md deleted file mode 100644 index 5de730c5..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBulls.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostBuffaloRequestBuffalosInnerClassesBulls - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md deleted file mode 100644 index 4caffb32..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostBuffaloRequestBuffalosInnerClassesBullsAutumn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals (head) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md deleted file mode 100644 index 491aaea3..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals purchased (head) | -**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.md deleted file mode 100644 index 525402ce..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCalfs.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostBuffaloRequestBuffalosInnerClassesCalfs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCows.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCows.md deleted file mode 100644 index 5dde32b7..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesCows.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostBuffaloRequestBuffalosInnerClassesCows - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesSteers.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesSteers.md deleted file mode 100644 index 6302440a..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesSteers.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostBuffaloRequestBuffalosInnerClassesSteers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md deleted file mode 100644 index 268424ed..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostBuffaloRequestBuffalosInnerClassesTradeBulls - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md deleted file mode 100644 index f0498fd0..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostBuffaloRequestBuffalosInnerClassesTradeCalfs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.md deleted file mode 100644 index 405cbbcb..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeCows.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostBuffaloRequestBuffalosInnerClassesTradeCows - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md deleted file mode 100644 index d1022c08..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostBuffaloRequestBuffalosInnerClassesTradeSteers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerCowsCalving.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerCowsCalving.md deleted file mode 100644 index d3c17def..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerCowsCalving.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostBuffaloRequestBuffalosInnerCowsCalving - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**spring** | **float** | | -**summer** | **float** | | -**autumn** | **float** | | -**winter** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.md deleted file mode 100644 index 2072acac..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestBuffalosInnerSeasonalCalving.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostBuffaloRequestBuffalosInnerSeasonalCalving - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**spring** | **float** | | -**summer** | **float** | | -**autumn** | **float** | | -**winter** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestVegetationInner.md deleted file mode 100644 index 190a07cb..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostBuffaloRequestVegetationInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostBuffaloRequestVegetationInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**buffalo_proportion** | **float[]** | The proportion of the sequestration that is allocated to Buffalo | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCotton200Response.md b/examples/php-api-client/api-client/docs/Model/PostCotton200Response.md deleted file mode 100644 index 4dc0e54b..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostCotton200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostCotton200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostCotton200ResponseIntermediateInner[]**](PostCotton200ResponseIntermediateInner.md) | | -**net** | [**\OpenAPI\Client\Model\PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostCotton200ResponseIntermediateInnerIntensities[]**](PostCotton200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each crop (in order) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInner.md deleted file mode 100644 index d382e94e..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostCotton200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostCotton200ResponseIntermediateInnerIntensities**](PostCotton200ResponseIntermediateInnerIntensities.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index 9190fdf9..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,22 +0,0 @@ -# # PostCotton200ResponseIntermediateInnerIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cotton_yield_produced_tonnes** | **float** | Cotton yield produced in tonnes | -**bales_produced** | **float** | Number of bales produced | -**lint_produced_tonnes** | **float** | Cotton lint produced in tonnes | -**seed_produced_tonnes** | **float** | Cotton seed produced in tonnes | -**tonnes_crop_excluding_sequestration** | **float** | Emissions intensity excluding sequestration, in t-CO2e/t crop | -**tonnes_crop_including_sequestration** | **float** | Emissions intensity including sequestration, in t-CO2e/t crop | -**bales_excluding_sequestration** | **float** | Emissions intensity excluding sequestration, in t-CO2e/bale | -**bales_including_sequestration** | **float** | Emissions intensity including sequestration, in t-CO2e/bale | -**lint_including_sequestration** | **float** | Emissions intensity of lint including sequestration, in t-CO2e/kg | -**lint_excluding_sequestration** | **float** | Emissions intensity of lint excluding sequestration, in t-CO2e/kg | -**seed_including_sequestration** | **float** | Emissions intensity of seed including sequestration, in t-CO2e/kg | -**seed_excluding_sequestration** | **float** | Emissions intensity of seed excluding sequestration, in t-CO2e/kg | -**lint_economic_allocation** | **float** | Emissions intensity of lint using economic allocation, in t-CO2e/kg | -**seed_economic_allocation** | **float** | Emissions intensity of seed using economic allocation, in t-CO2e/kg | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseNet.md deleted file mode 100644 index 0a9f41c9..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseNet.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostCotton200ResponseNet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | -**crops** | **float[]** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope1.md deleted file mode 100644 index 6f91c650..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope1.md +++ /dev/null @@ -1,23 +0,0 @@ -# # PostCotton200ResponseScope1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | -**field_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | -**field_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope3.md deleted file mode 100644 index 51b6d663..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostCotton200ResponseScope3.md +++ /dev/null @@ -1,14 +0,0 @@ -# # PostCotton200ResponseScope3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**lime** | **float** | Emissions from lime, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCottonRequest.md b/examples/php-api-client/api-client/docs/Model/PostCottonRequest.md deleted file mode 100644 index 7c68fecf..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostCottonRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostCottonRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**crops** | [**\OpenAPI\Client\Model\PostCottonRequestCropsInner[]**](PostCottonRequestCropsInner.md) | | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**vegetation** | [**\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]**](PostCottonRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCottonRequestCropsInner.md b/examples/php-api-client/api-client/docs/Model/PostCottonRequestCropsInner.md deleted file mode 100644 index 53d8fad9..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostCottonRequestCropsInner.md +++ /dev/null @@ -1,35 +0,0 @@ -# # PostCottonRequestCropsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**average_cotton_yield** | **float** | Average cotton yield, in t/ha (tonnes per hectare) | -**area_sown** | **float** | Area sown, in ha (hectares) | -**average_weight_per_bale_kg** | **float** | Average weight of unprocessed cotton per bale, in kg | -**cotton_lint_per_bale_kg** | **float** | Average weight of cotton lint per bale, in kg | -**cotton_seed_per_bale_kg** | **float** | Average weight of cotton seed produced per bale, in kg | -**waste_per_bale_kg** | **float** | Average weight of cotton waste produced per bale, in kg | -**urea_application** | **float** | Urea application, in kg Urea/ha (kilograms of urea per hectare) | -**other_fertiliser_type** | **string** | Other N fertiliser type | [optional] -**other_fertiliser_application** | **float** | Other N fertiliser application, in kg/ha (kilograms per hectare) | -**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | [default to 0] -**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | [default to 0] -**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | [default to 0] -**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | [default to 0] -**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | [default to 0] -**single_super_phosphate** | **float** | Single superphosphate use, in kg/ha (kilograms per hectare) | -**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | -**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt. If included, this should only ever be 0 for cotton | [default to 0] -**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | -**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | -**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**diesel_use** | **float** | Diesel usage in L (litres) | -**petrol_use** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostCottonRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostCottonRequestVegetationInner.md deleted file mode 100644 index 838981d0..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostCottonRequestVegetationInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostCottonRequestVegetationInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**allocation_to_crops** | **float[]** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairy200Response.md b/examples/php-api-client/api-client/docs/Model/PostDairy200Response.md deleted file mode 100644 index 102a48e1..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairy200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostDairy200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostDairy200ResponseScope1**](PostDairy200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostDairy200ResponseScope3**](PostDairy200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**net** | [**\OpenAPI\Client\Model\PostDairy200ResponseNet**](PostDairy200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostDairy200ResponseIntensities**](PostDairy200ResponseIntensities.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostDairy200ResponseIntermediateInner[]**](PostDairy200ResponseIntermediateInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntensities.md deleted file mode 100644 index 622ba663..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntensities.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostDairy200ResponseIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**milk_solids_produced_tonnes** | **float** | Milk solids produced in tonnes | -**intensity** | **float** | Dairy intensities including carbon sequestration, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntermediateInner.md deleted file mode 100644 index cb885d44..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostDairy200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostDairy200ResponseScope1**](PostDairy200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostDairy200ResponseScope3**](PostDairy200ResponseScope3.md) | | -**net** | [**\OpenAPI\Client\Model\PostDairy200ResponseNet**](PostDairy200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostDairy200ResponseIntensities**](PostDairy200ResponseIntensities.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseNet.md deleted file mode 100644 index 4953587e..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseNet.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostDairy200ResponseNet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope1.md deleted file mode 100644 index 2d03e3c2..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope1.md +++ /dev/null @@ -1,28 +0,0 @@ -# # PostDairy200ResponseScope1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | -**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | -**manure_management_n2_o** | **float** | N2O emissions from manure management, in tonnes-CO2e | -**animal_waste_n2_o** | **float** | N2O emissions from animal waste, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**urine_and_dung_n2_o** | **float** | N2O emissions from urine and dung, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**transport_n2_o** | **float** | N2O emissions from transport, in tonnes-CO2e | -**transport_ch4** | **float** | CH4 emissions from transport, in tonnes-CO2e | -**transport_co2** | **float** | CO2 emissions from transport, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope3.md deleted file mode 100644 index 0ad53a22..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairy200ResponseScope3.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostDairy200ResponseScope3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | -**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**lime** | **float** | Emissions from lime, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequest.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequest.md deleted file mode 100644 index 69a584a3..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairyRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostDairyRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**production_system** | **string** | Production system | -**dairy** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInner[]**](PostDairyRequestDairyInner.md) | | -**vegetation** | [**\OpenAPI\Client\Model\PostDairyRequestVegetationInner[]**](PostDairyRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInner.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInner.md deleted file mode 100644 index 7f755959..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# # PostDairyRequestDairyInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**classes** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClasses**](PostDairyRequestDairyInnerClasses.md) | | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**seasonal_fertiliser** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliser**](PostDairyRequestDairyInnerSeasonalFertiliser.md) | | -**areas** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerAreas**](PostDairyRequestDairyInnerAreas.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | -**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | -**cottonseed_feed** | **float** | Cotton seed purchased for cattle feed in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**manure_management_milking_cows** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerManureManagementMilkingCows**](PostDairyRequestDairyInnerManureManagementMilkingCows.md) | | -**manure_management_other_dairy_cows** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerManureManagementMilkingCows**](PostDairyRequestDairyInnerManureManagementMilkingCows.md) | | -**emissions_allocation_to_red_meat_production** | **float** | Allocation as a fraction, from 0 to 1 | -**truck_type** | **string** | Type of truck used for cattle transport | -**distance_cattle_transported** | **float** | Distance cattle are transported between farms, in km (kilometres) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerAreas.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerAreas.md deleted file mode 100644 index 203c6644..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerAreas.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostDairyRequestDairyInnerAreas - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cropped_dryland** | **float** | | [default to 0] -**cropped_irrigated** | **float** | | [default to 0] -**improved_pasture_dryland** | **float** | | [default to 0] -**improved_pasture_irrigated** | **float** | | [default to 0] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClasses.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClasses.md deleted file mode 100644 index 90e01f4f..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClasses.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostDairyRequestDairyInnerClasses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**milking_cows** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCows**](PostDairyRequestDairyInnerClassesMilkingCows.md) | | -**heifers_lt1** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesHeifersLt1**](PostDairyRequestDairyInnerClassesHeifersLt1.md) | | -**heifers_gt1** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesHeifersGt1**](PostDairyRequestDairyInnerClassesHeifersGt1.md) | | -**dairy_bulls_lt1** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesDairyBullsLt1**](PostDairyRequestDairyInnerClassesDairyBullsLt1.md) | | -**dairy_bulls_gt1** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesDairyBullsGt1**](PostDairyRequestDairyInnerClassesDairyBullsGt1.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.md deleted file mode 100644 index ccb7c86d..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsGt1.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostDairyRequestDairyInnerClassesDairyBullsGt1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.md deleted file mode 100644 index 15503545..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesDairyBullsLt1.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostDairyRequestDairyInnerClassesDairyBullsLt1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersGt1.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersGt1.md deleted file mode 100644 index 891c80c0..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersGt1.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostDairyRequestDairyInnerClassesHeifersGt1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersLt1.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersLt1.md deleted file mode 100644 index 974702d9..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesHeifersLt1.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostDairyRequestDairyInnerClassesHeifersLt1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCows.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCows.md deleted file mode 100644 index aca55608..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCows.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostDairyRequestDairyInnerClassesMilkingCows - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md deleted file mode 100644 index 2719aaae..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md +++ /dev/null @@ -1,14 +0,0 @@ -# # PostDairyRequestDairyInnerClassesMilkingCowsAutumn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals (head) | -**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | -**liveweight_gain** | **float** | Average liveweight gain in kg/day (kilogram per day) | -**crude_protein** | **float** | Crude protein percent, between 0 and 100. Note: If no value is provided, zero will be assumed. This will result in large, negative output values. This input will become mandatory in a future version. | [optional] -**dry_matter_digestibility** | **float** | Dry matter digestibility percent, between 0 and 100. Note: If no value is provided, zero will be assumed. This will result in large, negative output values. This input will become mandatory in a future version. | [optional] -**milk_production** | **float** | Milk produced in L/day/head (litres per day per head) | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.md deleted file mode 100644 index 0a6efa46..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerManureManagementMilkingCows.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostDairyRequestDairyInnerManureManagementMilkingCows - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pasture** | **float** | | -**anaerobic_lagoon** | **float** | | -**sump_and_dispersal** | **float** | | -**drain_to_paddocks** | **float** | | -**soild_storage** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliser.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliser.md deleted file mode 100644 index 4846274c..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliser.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostDairyRequestDairyInnerSeasonalFertiliser - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md deleted file mode 100644 index c7bb1442..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostDairyRequestDairyInnerSeasonalFertiliserAutumn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**crops_irrigated** | **float** | | -**crops_dryland** | **float** | | -**pasture_irrigated** | **float** | | -**pasture_dryland** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDairyRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostDairyRequestVegetationInner.md deleted file mode 100644 index e541d3a2..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDairyRequestVegetationInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostDairyRequestVegetationInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**dairy_proportion** | **float[]** | The proportion of the sequestration that is allocated to dairy | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeer200Response.md b/examples/php-api-client/api-client/docs/Model/PostDeer200Response.md deleted file mode 100644 index 1c60bf4d..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeer200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostDeer200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**net** | [**\OpenAPI\Client\Model\PostDeer200ResponseNet**](PostDeer200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostDeer200ResponseIntensities**](PostDeer200ResponseIntensities.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostDeer200ResponseIntermediateInner[]**](PostDeer200ResponseIntermediateInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntensities.md deleted file mode 100644 index eab17eb1..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntensities.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostDeer200ResponseIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**liveweight_produced_kg** | **float** | Deer meat produced in kg liveweight | -**deer_meat_excluding_sequestration** | **float** | Deer meat (breeding herd) excluding sequestration, in kg-CO2e/kg liveweight | -**deer_meat_including_sequestration** | **float** | Deer meat (breeding herd) including sequestration, in kg-CO2e/kg liveweight | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntermediateInner.md deleted file mode 100644 index dd7727fe..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostDeer200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | -**net** | [**\OpenAPI\Client\Model\PostDeer200ResponseNet**](PostDeer200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostDeer200ResponseIntensities**](PostDeer200ResponseIntensities.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseNet.md deleted file mode 100644 index 94de1430..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeer200ResponseNet.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostDeer200ResponseNet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequest.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequest.md deleted file mode 100644 index 1aa11dea..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeerRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostDeerRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**deers** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInner[]**](PostDeerRequestDeersInner.md) | | -**vegetation** | [**\OpenAPI\Client\Model\PostDeerRequestVegetationInner[]**](PostDeerRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInner.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInner.md deleted file mode 100644 index efeb4a97..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInner.md +++ /dev/null @@ -1,25 +0,0 @@ -# # PostDeerRequestDeersInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**classes** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClasses**](PostDeerRequestDeersInnerClasses.md) | | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**electricity_source** | **string** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | -**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**does_fawning** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerDoesFawning**](PostDeerRequestDeersInnerDoesFawning.md) | | -**seasonal_fawning** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerSeasonalFawning**](PostDeerRequestDeersInnerSeasonalFawning.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClasses.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClasses.md deleted file mode 100644 index 47e6f623..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClasses.md +++ /dev/null @@ -1,16 +0,0 @@ -# # PostDeerRequestDeersInnerClasses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bucks** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesBucks**](PostDeerRequestDeersInnerClassesBucks.md) | | [optional] -**trade_bucks** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeBucks**](PostDeerRequestDeersInnerClassesTradeBucks.md) | | [optional] -**breeding_does** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesBreedingDoes**](PostDeerRequestDeersInnerClassesBreedingDoes.md) | | [optional] -**trade_does** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeDoes**](PostDeerRequestDeersInnerClassesTradeDoes.md) | | [optional] -**other_does** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesOtherDoes**](PostDeerRequestDeersInnerClassesOtherDoes.md) | | [optional] -**trade_other_does** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeOtherDoes**](PostDeerRequestDeersInnerClassesTradeOtherDoes.md) | | [optional] -**fawn** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesFawn**](PostDeerRequestDeersInnerClassesFawn.md) | | [optional] -**trade_fawn** | [**\OpenAPI\Client\Model\PostDeerRequestDeersInnerClassesTradeFawn**](PostDeerRequestDeersInnerClassesTradeFawn.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBreedingDoes.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBreedingDoes.md deleted file mode 100644 index 01b863c4..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBreedingDoes.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostDeerRequestDeersInnerClassesBreedingDoes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBucks.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBucks.md deleted file mode 100644 index ee0b7f5c..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesBucks.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostDeerRequestDeersInnerClassesBucks - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesFawn.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesFawn.md deleted file mode 100644 index b81dc144..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesFawn.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostDeerRequestDeersInnerClassesFawn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesOtherDoes.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesOtherDoes.md deleted file mode 100644 index 7e847f20..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesOtherDoes.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostDeerRequestDeersInnerClassesOtherDoes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeBucks.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeBucks.md deleted file mode 100644 index 5ef65877..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeBucks.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostDeerRequestDeersInnerClassesTradeBucks - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeDoes.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeDoes.md deleted file mode 100644 index 444a1704..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeDoes.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostDeerRequestDeersInnerClassesTradeDoes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeFawn.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeFawn.md deleted file mode 100644 index 9becf67a..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeFawn.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostDeerRequestDeersInnerClassesTradeFawn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.md deleted file mode 100644 index b5fe5525..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerClassesTradeOtherDoes.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostDeerRequestDeersInnerClassesTradeOtherDoes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerDoesFawning.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerDoesFawning.md deleted file mode 100644 index b2fdf0f0..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerDoesFawning.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostDeerRequestDeersInnerDoesFawning - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**spring** | **float** | | -**summer** | **float** | | -**autumn** | **float** | | -**winter** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerSeasonalFawning.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerSeasonalFawning.md deleted file mode 100644 index 7eaa6934..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeerRequestDeersInnerSeasonalFawning.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostDeerRequestDeersInnerSeasonalFawning - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**spring** | **float** | | -**summer** | **float** | | -**autumn** | **float** | | -**winter** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostDeerRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostDeerRequestVegetationInner.md deleted file mode 100644 index 93720aa5..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostDeerRequestVegetationInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostDeerRequestVegetationInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**deer_proportion** | **float[]** | The proportion of the sequestration that is allocated to deer | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlot200Response.md b/examples/php-api-client/api-client/docs/Model/PostFeedlot200Response.md deleted file mode 100644 index 29b7478b..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlot200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostFeedlot200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseScope1**](PostFeedlot200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseScope3**](PostFeedlot200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInner[]**](PostFeedlot200ResponseIntermediateInner.md) | | -**net** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerNet**](PostFeedlot200ResponseIntermediateInnerNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerIntensities**](PostFeedlot200ResponseIntermediateInnerIntensities.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInner.md deleted file mode 100644 index 1046148d..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostFeedlot200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseScope1**](PostFeedlot200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseScope3**](PostFeedlot200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | -**net** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerNet**](PostFeedlot200ResponseIntermediateInnerNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostFeedlot200ResponseIntermediateInnerIntensities**](PostFeedlot200ResponseIntermediateInnerIntensities.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index 60e1bac1..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostFeedlot200ResponseIntermediateInnerIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**liveweight_produced_kg** | **float** | Amount of meat produced in kg liveweight | -**beef_including_sequestration** | **float** | Beef including carbon sequestration, in kg-CO2e/kg liveweight | -**beef_excluding_sequestration** | **float** | Beef excluding carbon sequestration, in kg-CO2e/kg liveweight | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerNet.md b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerNet.md deleted file mode 100644 index d38b1f3c..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseIntermediateInnerNet.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostFeedlot200ResponseIntermediateInnerNet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope1.md deleted file mode 100644 index 4bfd8c06..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope1.md +++ /dev/null @@ -1,26 +0,0 @@ -# # PostFeedlot200ResponseScope1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**transport_co2** | **float** | CO2 emissions from transport, in tonnes-CO2e | -**transport_ch4** | **float** | CH4 emissions from transport, in tonnes-CO2e | -**transport_n2_o** | **float** | N2O emissions from transport, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**manure_direct_n2_o** | **float** | CH4 emissions from manure management (direct), in tonnes-CO2e | -**manure_indirect_n2_o** | **float** | CH4 emissions from manure management (indirect), in tonnes-CO2e | -**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | -**manure_applied_to_soil_n2_o** | **float** | CH4 emissions from manure applied to soil, in tonnes-CO2e | -**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope3.md deleted file mode 100644 index 3dc66d1c..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlot200ResponseScope3.md +++ /dev/null @@ -1,16 +0,0 @@ -# # PostFeedlot200ResponseScope3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**lime** | **float** | Emissions from lime, in tonnes-CO2e | -**feed** | **float** | Emissions from feed, in tonnes-CO2e | -**purchase_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequest.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequest.md deleted file mode 100644 index 8d2025d0..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostFeedlotRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**feedlots** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInner[]**](PostFeedlotRequestFeedlotsInner.md) | | -**vegetation** | [**\OpenAPI\Client\Model\PostFeedlotRequestVegetationInner[]**](PostFeedlotRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInner.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInner.md deleted file mode 100644 index 5bc7f085..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInner.md +++ /dev/null @@ -1,29 +0,0 @@ -# # PostFeedlotRequestFeedlotsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for the feedlot enterprise | [optional] -**system** | **string** | Type of feedlot/production system | -**groups** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerGroupsInner[]**](PostFeedlotRequestFeedlotsInnerGroupsInner.md) | | -**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**purchases** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchases**](PostFeedlotRequestFeedlotsInnerPurchases.md) | | -**sales** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSales**](PostFeedlotRequestFeedlotsInnerSales.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**electricity_source** | **string** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | -**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | -**cottonseed_feed** | **float** | Cotton seed purchased for cattle feed in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**distance_cattle_transported** | **float** | Distance cattle are transported to farm, in km (kilometres) | -**truck_type** | **string** | Type of truck used for cattle transport | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.md deleted file mode 100644 index 734890a3..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInner.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostFeedlotRequestFeedlotsInnerGroupsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stays** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner[]**](PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md deleted file mode 100644 index c4d36914..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md +++ /dev/null @@ -1,17 +0,0 @@ -# # PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**livestock** | **float** | Number of animals (head) | -**stay_average_duration** | **float** | Average stay length in feedlot, in days | -**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | -**dry_matter_digestibility** | **float** | Percent dry matter digestibility of the feed eaten, from 0 to 100 | -**crude_protein** | **float** | Percent crude protein of the whole diet, from 0 to 100 | -**nitrogen_retention** | **float** | Percent nitrogen retention of intake, from 0 to 100 | -**daily_intake** | **float** | Daily intake of dry matter in kilograms per head per day | -**ndf** | **float** | Percent Neutral detergent fibre (NDF) of intake, from 0 to 100 | -**ether_extract** | **float** | Percent ether extract of intake, from 0 to 100 | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchases.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchases.md deleted file mode 100644 index 7c66c8f7..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchases.md +++ /dev/null @@ -1,24 +0,0 @@ -# # PostFeedlotRequestFeedlotsInnerPurchases - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bulls_gt1** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for bulls whose age is greater than 1 year old | [optional] -**bulls_gt1_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded bulls whose age is greater than 1 year old | [optional] -**steers_lt1** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Steers whose age is less than 1 year old | [optional] -**steers_lt1_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Steers whose age is less than 1 year old | [optional] -**steers1_to2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Steers whose age is between 1 and 2 years old | [optional] -**steers1_to2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Steers whose age is between 1 and 2 years old | [optional] -**steers_gt2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Steers whose age is greater than 2 years old | [optional] -**steers_gt2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Steers whose age is greater than 2 years old | [optional] -**cows_gt2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Cows whose age is greater than 2 years old | [optional] -**cows_gt2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Cows whose age is greater than 2 years old | [optional] -**heifers_lt1** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Heifers whose age is less than 1 year old | [optional] -**heifers_lt1_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Heifers whose age is less than 1 year old | [optional] -**heifers1_to2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Heifers whose age is between 1 and 2 years old | [optional] -**heifers1_to2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Heifers whose age is between 1 and 2 years old | [optional] -**heifers_gt2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Heifers whose age is greater than 2 years old | [optional] -**heifers_gt2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Heifers whose age is greater than 2 years old | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md deleted file mode 100644 index f36bed58..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals purchased (head) | -**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | -**purchase_source** | **string** | Source location of trading cattle purchases | [default to 'sth NSW/VIC/sth SA'] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSales.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSales.md deleted file mode 100644 index de196817..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSales.md +++ /dev/null @@ -1,24 +0,0 @@ -# # PostFeedlotRequestFeedlotsInnerSales - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bulls_gt1** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for bulls whose age is greater than 1 year old | -**bulls_gt1_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded bulls whose age is greater than 1 year old | -**steers_lt1** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Steers whose age is less than 1 year old | -**steers_lt1_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Steers whose age is less than 1 year old | -**steers1_to2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Steers whose age is between 1 and 2 years old | -**steers1_to2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Steers whose age is between 1 and 2 years old | -**steers_gt2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Steers whose age is greater than 2 years old | -**steers_gt2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Steers whose age is greater than 2 years old | -**cows_gt2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Cows whose age is greater than 2 years old | -**cows_gt2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Cows whose age is greater than 2 years old | -**heifers_lt1** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Heifers whose age is less than 1 year old | -**heifers_lt1_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Heifers whose age is less than 1 year old | -**heifers1_to2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Heifers whose age is between 1 and 2 years old | -**heifers1_to2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Heifers whose age is between 1 and 2 years old | -**heifers_gt2** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Heifers whose age is greater than 2 years old | -**heifers_gt2_traded** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner[]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Heifers whose age is greater than 2 years old | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md deleted file mode 100644 index e20fd85d..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestVegetationInner.md deleted file mode 100644 index 219015b4..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostFeedlotRequestVegetationInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostFeedlotRequestVegetationInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**feedlot_proportion** | **float[]** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoat200Response.md b/examples/php-api-client/api-client/docs/Model/PostGoat200Response.md deleted file mode 100644 index 2e387b36..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoat200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostGoat200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**net** | [**\OpenAPI\Client\Model\PostGoat200ResponseNet**](PostGoat200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostGoat200ResponseIntensities**](PostGoat200ResponseIntensities.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostGoat200ResponseIntermediateInner[]**](PostGoat200ResponseIntermediateInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntensities.md deleted file mode 100644 index fc89a9ea..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntensities.md +++ /dev/null @@ -1,14 +0,0 @@ -# # PostGoat200ResponseIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount_meat_produced** | **float** | Amount of goat meat produced in kg liveweight | -**amount_wool_produced** | **float** | Amount of wool produced in kg greasy | -**goat_meat_breeding_including_sequestration** | **float** | Goat meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight | -**goat_meat_breeding_excluding_sequestration** | **float** | Goat meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight | -**wool_including_sequestration** | **float** | Wool production including carbon sequestration, in kg-CO2e/kg greasy | -**wool_excluding_sequestration** | **float** | Wool production excluding carbon sequestration, in kg-CO2e/kg greasy | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntermediateInner.md deleted file mode 100644 index 420e12d0..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostGoat200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**net** | [**\OpenAPI\Client\Model\PostGoat200ResponseNet**](PostGoat200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostGoat200ResponseIntensities**](PostGoat200ResponseIntensities.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseNet.md deleted file mode 100644 index 4c485851..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoat200ResponseNet.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostGoat200ResponseNet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequest.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequest.md deleted file mode 100644 index c2ee7b94..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostGoatRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**goats** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInner[]**](PostGoatRequestGoatsInner.md) | | -**vegetation** | [**\OpenAPI\Client\Model\PostGoatRequestVegetationInner[]**](PostGoatRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInner.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInner.md deleted file mode 100644 index cc6cf69a..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInner.md +++ /dev/null @@ -1,24 +0,0 @@ -# # PostGoatRequestGoatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**classes** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClasses**](PostGoatRequestGoatsInnerClasses.md) | | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**mineral_supplementation** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation**](PostBeefRequestBeefInnerMineralSupplementation.md) | | -**electricity_source** | **string** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | -**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClasses.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClasses.md deleted file mode 100644 index 91e3f6c5..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClasses.md +++ /dev/null @@ -1,21 +0,0 @@ -# # PostGoatRequestGoatsInnerClasses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bucks_billy** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesBucksBilly**](PostGoatRequestGoatsInnerClassesBucksBilly.md) | | [optional] -**trade_bucks** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeBucks**](PostGoatRequestGoatsInnerClassesTradeBucks.md) | | [optional] -**wethers** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesWethers**](PostGoatRequestGoatsInnerClassesWethers.md) | | [optional] -**trade_wethers** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeWethers**](PostGoatRequestGoatsInnerClassesTradeWethers.md) | | [optional] -**maiden_breeding_does_nannies** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md) | | [optional] -**trade_maiden_breeding_does_nannies** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md) | | [optional] -**breeding_does_nannies** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md) | | [optional] -**trade_breeding_does_nannies** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md) | | [optional] -**other_does_culled_females** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales**](PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md) | | [optional] -**trade_other_does_culled_females** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales**](PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md) | | [optional] -**kids** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesKids**](PostGoatRequestGoatsInnerClassesKids.md) | | [optional] -**trade_kids** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeKids**](PostGoatRequestGoatsInnerClassesTradeKids.md) | | [optional] -**trade_does** | [**\OpenAPI\Client\Model\PostGoatRequestGoatsInnerClassesTradeDoes**](PostGoatRequestGoatsInnerClassesTradeDoes.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md deleted file mode 100644 index 87cbf948..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostGoatRequestGoatsInnerClassesBreedingDoesNannies - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBucksBilly.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBucksBilly.md deleted file mode 100644 index efcfd2ef..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesBucksBilly.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostGoatRequestGoatsInnerClassesBucksBilly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesKids.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesKids.md deleted file mode 100644 index f72b4ac8..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesKids.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostGoatRequestGoatsInnerClassesKids - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md deleted file mode 100644 index 2ca3dfb0..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md deleted file mode 100644 index aa1ed5a0..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md deleted file mode 100644 index 7af83652..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBucks.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBucks.md deleted file mode 100644 index 4529872c..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeBucks.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostGoatRequestGoatsInnerClassesTradeBucks - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeDoes.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeDoes.md deleted file mode 100644 index 2bdfebd0..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeDoes.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostGoatRequestGoatsInnerClassesTradeDoes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeKids.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeKids.md deleted file mode 100644 index 2714cfad..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeKids.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostGoatRequestGoatsInnerClassesTradeKids - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md deleted file mode 100644 index a7b8561b..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md deleted file mode 100644 index d72b278d..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeWethers.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeWethers.md deleted file mode 100644 index 4140cbc6..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesTradeWethers.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostGoatRequestGoatsInnerClassesTradeWethers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesWethers.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesWethers.md deleted file mode 100644 index 582ebfae..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestGoatsInnerClassesWethers.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostGoatRequestGoatsInnerClassesWethers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGoatRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostGoatRequestVegetationInner.md deleted file mode 100644 index 9bd68ee7..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGoatRequestVegetationInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostGoatRequestVegetationInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**goat_proportion** | **float[]** | The proportion of the sequestration that is allocated to goat | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGrains200Response.md b/examples/php-api-client/api-client/docs/Model/PostGrains200Response.md deleted file mode 100644 index 15c561a5..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGrains200Response.md +++ /dev/null @@ -1,16 +0,0 @@ -# # PostGrains200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostGrains200ResponseIntermediateInner[]**](PostGrains200ResponseIntermediateInner.md) | | -**net** | [**\OpenAPI\Client\Model\PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | -**intensities_with_sequestration** | [**\OpenAPI\Client\Model\PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration[]**](PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md) | Emissions intensity for each crop (in order), in t-CO2e/t crop | -**intensities** | **float[]** | Emissions intensity for each crop (in order), in t-CO2e/t crop | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInner.md deleted file mode 100644 index af78bbda..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostGrains200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**intensities_with_sequestration** | [**\OpenAPI\Client\Model\PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration**](PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md b/examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md deleted file mode 100644 index 9257c913..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**grain_produced_tonnes** | **float** | Grain produced in tonnes | -**grains_excluding_sequestration** | **float** | Grains excluding sequestration, in t-CO2e/t grain | -**grains_including_sequestration** | **float** | Grains including sequestration, in t-CO2e/t grain | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGrainsRequest.md b/examples/php-api-client/api-client/docs/Model/PostGrainsRequest.md deleted file mode 100644 index e871c236..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGrainsRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostGrainsRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**crops** | [**\OpenAPI\Client\Model\PostGrainsRequestCropsInner[]**](PostGrainsRequestCropsInner.md) | | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**vegetation** | [**\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]**](PostCottonRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostGrainsRequestCropsInner.md b/examples/php-api-client/api-client/docs/Model/PostGrainsRequestCropsInner.md deleted file mode 100644 index 15f93699..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostGrainsRequestCropsInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# # PostGrainsRequestCropsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**type** | **string** | Crop type. Note that the following crop types are now deprecated, the relevant full calculator should be used instead: 'Cotton', 'Rice', 'Sugar Cane' | -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**production_system** | **string** | Production system of this crop. Note that the following production systems are now deprecated, the relevant full calculator should be used instead: 'Cotton', 'Rice', 'Sugar cane' | -**average_grain_yield** | **float** | Average grain yield, in t/ha (tonnes per hectare) | -**area_sown** | **float** | Area sown, in ha (hectares) | -**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | -**urea_application** | **float** | Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) | -**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | -**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | -**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | -**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | -**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | -**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | -**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | -**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | -**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**diesel_use** | **float** | Diesel usage in L (litres) | -**petrol_use** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostHorticulture200Response.md b/examples/php-api-client/api-client/docs/Model/PostHorticulture200Response.md deleted file mode 100644 index aebbcb90..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostHorticulture200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostHorticulture200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostHorticulture200ResponseScope1**](PostHorticulture200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInner[]**](PostHorticulture200ResponseIntermediateInner.md) | | -**net** | [**\OpenAPI\Client\Model\PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration[]**](PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md) | Emissions intensity for each crop (in order) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInner.md deleted file mode 100644 index 096ad905..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostHorticulture200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostHorticulture200ResponseScope1**](PostHorticulture200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**intensities_with_sequestration** | [**\OpenAPI\Client\Model\PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration**](PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md b/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md deleted file mode 100644 index eb75ac53..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**crop_produced_tonnes** | **float** | Horticultural crop produced in tonnes | -**tonnes_crop_excluding_sequestration** | **float** | Emissions intensity excluding sequestration, in t-CO2e/t crop | -**tonnes_crop_including_sequestration** | **float** | Emissions intensity including sequestration, in t-CO2e/t crop | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseScope1.md deleted file mode 100644 index 571168c2..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostHorticulture200ResponseScope1.md +++ /dev/null @@ -1,25 +0,0 @@ -# # PostHorticulture200ResponseScope1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | -**field_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | -**field_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | -**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostHorticultureRequest.md b/examples/php-api-client/api-client/docs/Model/PostHorticultureRequest.md deleted file mode 100644 index e278b6e1..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostHorticultureRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostHorticultureRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**crops** | [**\OpenAPI\Client\Model\PostHorticultureRequestCropsInner[]**](PostHorticultureRequestCropsInner.md) | | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**vegetation** | [**\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]**](PostCottonRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInner.md b/examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInner.md deleted file mode 100644 index 6ae5b2e6..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInner.md +++ /dev/null @@ -1,31 +0,0 @@ -# # PostHorticultureRequestCropsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**type** | **string** | Crop type | -**average_yield** | **float** | Average crop yield, in t/ha (tonnes per hectare) | -**area_sown** | **float** | Area sown, in ha (hectares) | -**urea_application** | **float** | Urea application, in kg Urea/ha (kilograms of urea per hectare) | -**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | -**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | -**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | -**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | -**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | -**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | -**urease_inhibitor_used** | **bool** | Urease inhibitor used. Deprecation note: No longer used (since v1.1.0) | [optional] -**nitrification_inhibitor_used** | **bool** | Nitrification inhibitor used. Deprecation note: No longer used (since v1.1.0) | [optional] -**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | -**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | -**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | -**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**diesel_use** | **float** | Diesel usage in L (litres) | -**petrol_use** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**refrigerants** | [**\OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[]**](PostHorticultureRequestCropsInnerRefrigerantsInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.md b/examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.md deleted file mode 100644 index f464aa72..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostHorticultureRequestCropsInnerRefrigerantsInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostHorticultureRequestCropsInnerRefrigerantsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**refrigerant** | **string** | Refrigerant type | -**charge_size** | **float** | Amount of refrigerant contained in the appliance, in kg | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPork200Response.md b/examples/php-api-client/api-client/docs/Model/PostPork200Response.md deleted file mode 100644 index cb318058..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPork200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostPork200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostPork200ResponseScope1**](PostPork200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostPork200ResponseScope3**](PostPork200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**net** | [**\OpenAPI\Client\Model\PostPork200ResponseNet**](PostPork200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostPork200ResponseIntensities**](PostPork200ResponseIntensities.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostPork200ResponseIntermediateInner[]**](PostPork200ResponseIntermediateInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntensities.md deleted file mode 100644 index c35b335f..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntensities.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostPork200ResponseIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pork_meat_including_sequestration** | **float** | Pork meat including carbon sequestration, in kg-CO2e/kg liveweight | -**pork_meat_excluding_sequestration** | **float** | Pork meat excluding carbon sequestration, in kg-CO2e/kg liveweight | -**liveweight_produced_kg** | **float** | Pork meat produced in kg liveweight | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntermediateInner.md deleted file mode 100644 index ff07d8a3..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostPork200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | | -**scope1** | [**\OpenAPI\Client\Model\PostPork200ResponseScope1**](PostPork200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostPork200ResponseScope3**](PostPork200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**net** | [**\OpenAPI\Client\Model\PostPork200ResponseNet**](PostPork200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostPork200ResponseIntensities**](PostPork200ResponseIntensities.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseNet.md deleted file mode 100644 index 46d3b1e6..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseNet.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostPork200ResponseNet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope1.md deleted file mode 100644 index d78ad3a3..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope1.md +++ /dev/null @@ -1,25 +0,0 @@ -# # PostPork200ResponseScope1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | -**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | -**manure_management_direct_n2_o** | **float** | CH4 emissions from manure management (direct), in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**atmospheric_deposition_indirect_n2_o** | **float** | N2O emissions from atmospheric deposition indirect, in tonnes-CO2e | -**leaching_and_runoff_soil_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**leaching_and_runoff_mmsn2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope3.md deleted file mode 100644 index 275eb124..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPork200ResponseScope3.md +++ /dev/null @@ -1,17 +0,0 @@ -# # PostPork200ResponseScope3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | -**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**lime** | **float** | Emissions from lime, in tonnes-CO2e | -**purchased_livestock** | **float** | Emissions from purchased pigs, in tonnes-CO2e | -**bedding** | **float** | Emissions from purchased bedding, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequest.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequest.md deleted file mode 100644 index 73bd9edc..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostPorkRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude. Deprecation note: This field is deprecated | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**pork** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInner[]**](PostPorkRequestPorkInner.md) | | -**vegetation** | [**\OpenAPI\Client\Model\PostPorkRequestVegetationInner[]**](PostPorkRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInner.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInner.md deleted file mode 100644 index 03ccfd62..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInner.md +++ /dev/null @@ -1,23 +0,0 @@ -# # PostPorkRequestPorkInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**classes** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClasses**](PostPorkRequestPorkInnerClasses.md) | | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**electricity_source** | **string** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**bedding_hay_barley_straw** | **float** | Hay, barley, straw, etc. purchased for pig bedding, in tonnes | -**feed_products** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerFeedProductsInner[]**](PostPorkRequestPorkInnerFeedProductsInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClasses.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClasses.md deleted file mode 100644 index ca87738a..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClasses.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostPorkRequestPorkInnerClasses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sows** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSows**](PostPorkRequestPorkInnerClassesSows.md) | | [optional] -**boars** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesBoars**](PostPorkRequestPorkInnerClassesBoars.md) | | [optional] -**gilts** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesGilts**](PostPorkRequestPorkInnerClassesGilts.md) | | [optional] -**suckers** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSuckers**](PostPorkRequestPorkInnerClassesSuckers.md) | | [optional] -**weaners** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesWeaners**](PostPorkRequestPorkInnerClassesWeaners.md) | | [optional] -**growers** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesGrowers**](PostPorkRequestPorkInnerClassesGrowers.md) | | [optional] -**slaughter_pigs** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSlaughterPigs**](PostPorkRequestPorkInnerClassesSlaughterPigs.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesBoars.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesBoars.md deleted file mode 100644 index 42028afb..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesBoars.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostPorkRequestPorkInnerClassesBoars - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Pig numbers in autumn | -**winter** | **float** | Pig numbers in winter | -**spring** | **float** | Pig numbers in spring | -**summer** | **float** | Pig numbers in summer | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] -**manure** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGilts.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGilts.md deleted file mode 100644 index dfeade54..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGilts.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostPorkRequestPorkInnerClassesGilts - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Pig numbers in autumn | -**winter** | **float** | Pig numbers in winter | -**spring** | **float** | Pig numbers in spring | -**summer** | **float** | Pig numbers in summer | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] -**manure** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGrowers.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGrowers.md deleted file mode 100644 index 818d6946..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesGrowers.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostPorkRequestPorkInnerClassesGrowers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Pig numbers in autumn | -**winter** | **float** | Pig numbers in winter | -**spring** | **float** | Pig numbers in spring | -**summer** | **float** | Pig numbers in summer | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] -**manure** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.md deleted file mode 100644 index fa3b3b30..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSlaughterPigs.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostPorkRequestPorkInnerClassesSlaughterPigs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Pig numbers in autumn | -**winter** | **float** | Pig numbers in winter | -**spring** | **float** | Pig numbers in spring | -**summer** | **float** | Pig numbers in summer | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] -**manure** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSows.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSows.md deleted file mode 100644 index 14383569..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSows.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostPorkRequestPorkInnerClassesSows - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Pig numbers in autumn | -**winter** | **float** | Pig numbers in winter | -**spring** | **float** | Pig numbers in spring | -**summer** | **float** | Pig numbers in summer | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] -**manure** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManure.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManure.md deleted file mode 100644 index 9c957cbb..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManure.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostPorkRequestPorkInnerClassesSowsManure - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**spring** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | -**summer** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | -**autumn** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | -**winter** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.md deleted file mode 100644 index 772b029e..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSowsManureSpring.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostPorkRequestPorkInnerClassesSowsManureSpring - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**outdoor_systems** | **float** | Amount of volatile solids sent to outoor systems in t (tonnes) | [optional] -**covered_anaerobic_pond** | **float** | Amount of volatile solids sent to covered anaerobic pond in t (tonnes) | [optional] -**uncovered_anaerobic_pond** | **float** | Amount of volatile solids sent to uncovered anaerobic pond in t (tonnes) | [optional] -**deep_litter** | **float** | Amount of volatile solids sent to deep litter in t (tonnes) | [optional] -**undefined_system** | **float** | Amount of volatile solids where manure management system is not known or defined, in t (tonnes) | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSuckers.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSuckers.md deleted file mode 100644 index 624b7cc5..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesSuckers.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostPorkRequestPorkInnerClassesSuckers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Pig numbers in autumn | -**winter** | **float** | Pig numbers in winter | -**spring** | **float** | Pig numbers in spring | -**summer** | **float** | Pig numbers in summer | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] -**manure** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesWeaners.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesWeaners.md deleted file mode 100644 index a8cd9476..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerClassesWeaners.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostPorkRequestPorkInnerClassesWeaners - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Pig numbers in autumn | -**winter** | **float** | Pig numbers in winter | -**spring** | **float** | Pig numbers in spring | -**summer** | **float** | Pig numbers in summer | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] -**manure** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInner.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInner.md deleted file mode 100644 index dce99f7f..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostPorkRequestPorkInnerFeedProductsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**feed_purchased** | **float** | Pig feed purchased, in tonnes | -**additional_ingredients** | **float** | Fraction of additional ingredient in feed mix, from 0 to 1 | -**emissions_intensity** | **float** | Emissions intensity of feed product in GHG (kg CO2-e/kg input) | -**ingredients** | [**\OpenAPI\Client\Model\PostPorkRequestPorkInnerFeedProductsInnerIngredients**](PostPorkRequestPorkInnerFeedProductsInnerIngredients.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md deleted file mode 100644 index 5f9bf55c..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostPorkRequestPorkInnerFeedProductsInnerIngredients - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**wheat** | **float** | | [optional] -**barley** | **float** | | [optional] -**whey_powder** | **float** | | [optional] -**canola_meal** | **float** | | [optional] -**soybean_meal** | **float** | | [optional] -**meat_meal** | **float** | | [optional] -**blood_meal** | **float** | | [optional] -**fishmeal** | **float** | | [optional] -**tallow** | **float** | | [optional] -**wheat_bran** | **float** | | [optional] -**beet_pulp** | **float** | | [optional] -**mill_mix** | **float** | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPorkRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostPorkRequestVegetationInner.md deleted file mode 100644 index 7ea772c7..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPorkRequestVegetationInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostPorkRequestVegetationInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**allocated_proportion** | **float[]** | The proportion of the sequestration that is allocated to the activity | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200Response.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200Response.md deleted file mode 100644 index 492edffb..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultry200Response.md +++ /dev/null @@ -1,16 +0,0 @@ -# # PostPoultry200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostPoultry200ResponseScope1**](PostPoultry200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostPoultry200ResponseScope3**](PostPoultry200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate_broilers** | [**\OpenAPI\Client\Model\PostPoultry200ResponseIntermediateBroilersInner[]**](PostPoultry200ResponseIntermediateBroilersInner.md) | | -**intermediate_layers** | [**\OpenAPI\Client\Model\PostPoultry200ResponseIntermediateLayersInner[]**](PostPoultry200ResponseIntermediateLayersInner.md) | | -**net** | [**\OpenAPI\Client\Model\PostPoultry200ResponseNet**](PostPoultry200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostPoultry200ResponseIntensities**](PostPoultry200ResponseIntensities.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntensities.md deleted file mode 100644 index 079c536e..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntensities.md +++ /dev/null @@ -1,14 +0,0 @@ -# # PostPoultry200ResponseIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**poultry_meat_including_sequestration** | **float** | Poultry meat including carbon sequestration, in kg-CO2e/kg liveweight | -**poultry_meat_excluding_sequestration** | **float** | Poultry meat excluding carbon sequestration, in kg-CO2e/kg liveweight | -**poultry_eggs_including_sequestration** | **float** | Poultry eggs including carbon sequestration, in kg-CO2e/kg liveweight | -**poultry_eggs_excluding_sequestration** | **float** | Poultry eggs excluding carbon sequestration, in kg-CO2e/kg liveweight | -**meat_produced_kg** | **float** | Poultry meat produced in kg | -**eggs_produced_kg** | **float** | Amount of eggs produced, in kg | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInner.md deleted file mode 100644 index 29847d18..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostPoultry200ResponseIntermediateBroilersInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | | -**scope1** | [**\OpenAPI\Client\Model\PostPoultry200ResponseScope1**](PostPoultry200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostPoultry200ResponseScope3**](PostPoultry200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostPoultry200ResponseIntermediateBroilersInnerIntensities**](PostPoultry200ResponseIntermediateBroilersInnerIntensities.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md deleted file mode 100644 index addd767d..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostPoultry200ResponseIntermediateBroilersInnerIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**poultry_meat_including_sequestration** | **float** | Poultry meat including carbon sequestration, in kg-CO2e/kg liveweight | -**poultry_meat_excluding_sequestration** | **float** | Poultry meat excluding carbon sequestration, in kg-CO2e/kg liveweight | -**meat_produced_kg** | **float** | Poultry meat produced in kg liveweight | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInner.md deleted file mode 100644 index 1f036c55..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostPoultry200ResponseIntermediateLayersInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | | -**scope1** | [**\OpenAPI\Client\Model\PostPoultry200ResponseScope1**](PostPoultry200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostPoultry200ResponseScope3**](PostPoultry200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostPoultry200ResponseIntermediateLayersInnerIntensities**](PostPoultry200ResponseIntermediateLayersInnerIntensities.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.md deleted file mode 100644 index b9528fb9..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseIntermediateLayersInnerIntensities.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostPoultry200ResponseIntermediateLayersInnerIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**poultry_eggs_including_sequestration** | **float** | Poultry eggs including carbon sequestration, in kg-CO2e/kg eggs | -**poultry_eggs_excluding_sequestration** | **float** | Poultry eggs excluding carbon sequestration, in kg-CO2e/kg eggs | -**eggs_produced_kg** | **float** | Poultry eggs produced in kg | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseNet.md deleted file mode 100644 index c23b8efd..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseNet.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostPoultry200ResponseNet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | -**broilers** | **float** | Net emissions of broilers, in tonnes-CO2e/year | -**layers** | **float** | Net emissions of layers, in tonnes-CO2e/year | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope1.md deleted file mode 100644 index 4540c8ac..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope1.md +++ /dev/null @@ -1,19 +0,0 @@ -# # PostPoultry200ResponseScope1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | -**manure_management_n2_o** | **float** | N2O emissions from manure management, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope3.md deleted file mode 100644 index 9c5012ca..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultry200ResponseScope3.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostPoultry200ResponseScope3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | -**purchased_hay** | **float** | Emissions from purchased hay, in tonnes-CO2e | -**purchased_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequest.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequest.md deleted file mode 100644 index ca9e7009..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# # PostPoultryRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**broilers** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInner[]**](PostPoultryRequestBroilersInner.md) | | -**layers** | [**\OpenAPI\Client\Model\PostPoultryRequestLayersInner[]**](PostPoultryRequestLayersInner.md) | | -**vegetation** | [**\OpenAPI\Client\Model\PostPoultryRequestVegetationInner[]**](PostPoultryRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInner.md deleted file mode 100644 index b97f28fa..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInner.md +++ /dev/null @@ -1,28 +0,0 @@ -# # PostPoultryRequestBroilersInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**groups** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInner[]**](PostPoultryRequestBroilersInnerGroupsInner.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**electricity_source** | **string** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**hay** | **float** | Hay purchased in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**manure_waste_allocation** | **float** | Fraction allocation of manure waste, from 0 to 1. Note: only for pasture range, paddock and free range systems | -**waste_handled_drylot_or_storage** | **float** | Fraction of waste handled through dryland and solid storage, from 0 to 1 | -**litter_recycled** | **float** | Fraction of litter recycled, from 0 to 1 | -**litter_recycle_frequency** | **float** | Number of litter cycles per year | -**purchased_free_range** | **float** | Fraction of chickens purchased that are free range. Note: fraction of chickens purchased that are conventional is `1 - purchasedFreeRange` | -**meat_chicken_growers_purchases** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases**](PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md) | | -**meat_chicken_layers_purchases** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenLayersPurchases**](PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md) | | -**meat_other_purchases** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatOtherPurchases**](PostPoultryRequestBroilersInnerMeatOtherPurchases.md) | | -**sales** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerSalesInner[]**](PostPoultryRequestBroilersInnerSalesInner.md) | Broiler sales | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInner.md deleted file mode 100644 index 8ed49a52..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# # PostPoultryRequestBroilersInnerGroupsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meat_chicken_growers** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers**](PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md) | | -**meat_chicken_layers** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers**](PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md) | | -**meat_other** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers**](PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md) | | -**feed** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInner[]**](PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md) | | -**custom_feed_purchased** | **float** | Custom feed purchased, in tonnes | -**custom_feed_emission_intensity** | **float** | Emissions intensity of custom feed in GHG (kg CO2-e/kg input) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md deleted file mode 100644 index 65874343..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostPoultryRequestBroilersInnerGroupsInnerFeedInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ingredients** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients**](PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md) | | -**feed_purchased** | **float** | Feed purchased, in tonnes | -**additional_ingredient** | **float** | Fraction of additional ingredients in feed mix, from 0 to 1 | -**emission_intensity** | **float** | Emissions intensity of feed product in GHG (kg CO2-e/kg input) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md deleted file mode 100644 index 2e944c48..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**wheat** | **float** | | [optional] -**barley** | **float** | | [optional] -**sorghum** | **float** | | [optional] -**soybean** | **float** | | [optional] -**millrun** | **float** | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md deleted file mode 100644 index f696d318..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**birds** | **float** | Total number of birds/head | -**average_stay_length50** | **float** | Average length of stay until 50% of the flock is depleted, in days | -**liveweight50** | **float** | Average liveweight during the 50% depletion period, in kg | -**average_stay_length100** | **float** | Average length of stay until 100% of the flock is depleted, in days | -**liveweight100** | **float** | Average liveweight during the 100% depletion period, in kg | -**dry_matter_intake** | **float** | Dry matter intake, in kg/head/day | [optional] -**dry_matter_digestibility** | **float** | Dry matter digestibility fraction, from 0 to 1 | [optional] -**crude_protein** | **float** | Crude protein fraction, from 0 to 1 | [optional] -**manure_ash** | **float** | Manure ash fraction, from 0 to 1 | [optional] -**nitrogen_retention_rate** | **float** | Nitrogen retention rate fraction, from 0 to 1 | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md deleted file mode 100644 index 17b52954..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals purchased (head) | -**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md deleted file mode 100644 index fcb32906..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostPoultryRequestBroilersInnerMeatChickenLayersPurchases - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals purchased (head) | -**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.md deleted file mode 100644 index 1f365730..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerMeatOtherPurchases.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostPoultryRequestBroilersInnerMeatOtherPurchases - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals purchased (head) | -**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerSalesInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerSalesInner.md deleted file mode 100644 index 93892364..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestBroilersInnerSalesInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostPoultryRequestBroilersInnerSalesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meat_chicken_growers_sales** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | | -**meat_chicken_layers** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | | -**meat_other** | [**\OpenAPI\Client\Model\PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInner.md deleted file mode 100644 index 35f8a59f..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# # PostPoultryRequestLayersInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**layers** | [**\OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayers**](PostPoultryRequestLayersInnerLayers.md) | | -**meat_chicken_layers** | [**\OpenAPI\Client\Model\PostPoultryRequestLayersInnerMeatChickenLayers**](PostPoultryRequestLayersInnerMeatChickenLayers.md) | | -**feed** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerGroupsInnerFeedInner[]**](PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md) | | -**purchased_free_range** | **float** | Fraction of chickens purchased that are free range. Note: fraction of chickens purchased that are conventional is `1 - purchasedFreeRange` | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**electricity_source** | **string** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**hay** | **float** | Hay purchased in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**manure_waste_allocation** | **float** | Fraction allocation of manure waste, from 0 to 1. Note: only for pasture range, paddock and free range systems | -**waste_handled_drylot_or_storage** | **float** | Fraction of waste handled through dryland and solid storage, from 0 to 1 | -**litter_recycled** | **float** | Fraction of litter recycled, from 0 to 1 | -**litter_recycle_frequency** | **float** | Number of litter cycles per year | -**meat_chicken_layers_purchases** | [**\OpenAPI\Client\Model\PostPoultryRequestBroilersInnerMeatChickenLayersPurchases**](PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md) | | -**layers_purchases** | [**\OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayersPurchases**](PostPoultryRequestLayersInnerLayersPurchases.md) | | -**custom_feed_purchased** | **float** | Custom feed purchased, in tonnes | -**custom_feed_emission_intensity** | **float** | Emissions intensity of custom feed in GHG (kg CO2-e/kg input) | -**meat_chicken_layers_egg_sale** | [**\OpenAPI\Client\Model\PostPoultryRequestLayersInnerMeatChickenLayersEggSale**](PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md) | | -**layers_egg_sale** | [**\OpenAPI\Client\Model\PostPoultryRequestLayersInnerLayersEggSale**](PostPoultryRequestLayersInnerLayersEggSale.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayers.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayers.md deleted file mode 100644 index 1c596016..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayers.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostPoultryRequestLayersInnerLayers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Flock numbers in autumn | -**winter** | **float** | Flock numbers in winter | -**spring** | **float** | Flock numbers in spring | -**summer** | **float** | Flock numbers in summer | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersEggSale.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersEggSale.md deleted file mode 100644 index 6ccb62a0..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersEggSale.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostPoultryRequestLayersInnerLayersEggSale - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**eggs_produced** | **float** | Number of eggs produced in a year per bird | -**average_weight** | **float** | Average egg weight in grams | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersPurchases.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersPurchases.md deleted file mode 100644 index 9d075b08..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerLayersPurchases.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostPoultryRequestLayersInnerLayersPurchases - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals purchased (head) | -**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayers.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayers.md deleted file mode 100644 index d963ae22..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayers.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostPoultryRequestLayersInnerMeatChickenLayers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Flock numbers in autumn | -**winter** | **float** | Flock numbers in winter | -**spring** | **float** | Flock numbers in spring | -**summer** | **float** | Flock numbers in summer | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md deleted file mode 100644 index baceb65e..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostPoultryRequestLayersInnerMeatChickenLayersEggSale - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**eggs_produced** | **float** | Number of eggs produced in a year per bird | -**average_weight** | **float** | Average egg weight in grams | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostPoultryRequestVegetationInner.md deleted file mode 100644 index 75fd2985..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostPoultryRequestVegetationInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostPoultryRequestVegetationInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**broilers_proportion** | **float[]** | The proportion of the sequestration that is allocated to broilers | -**layers_proportion** | **float[]** | The proportion of the sequestration that is allocated to layers | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessing200Response.md b/examples/php-api-client/api-client/docs/Model/PostProcessing200Response.md deleted file mode 100644 index f7105354..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostProcessing200Response.md +++ /dev/null @@ -1,16 +0,0 @@ -# # PostProcessing200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostProcessing200ResponseScope1**](PostProcessing200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostProcessing200ResponseScope3**](PostProcessing200ResponseScope3.md) | | -**purchased_offsets** | [**\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | -**net** | [**\OpenAPI\Client\Model\PostProcessing200ResponseNet**](PostProcessing200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostProcessing200ResponseIntensitiesInner[]**](PostProcessing200ResponseIntensitiesInner.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostProcessing200ResponseIntermediateInner[]**](PostProcessing200ResponseIntermediateInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntensitiesInner.md b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntensitiesInner.md deleted file mode 100644 index f3649eaa..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntensitiesInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostProcessing200ResponseIntensitiesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**units_produced** | **float** | Number of processed product units produced | -**unit_of_product** | **string** | Unit type of the product being produced (used by \"unitsProduced\") | -**processing_excluding_carbon_offsets** | **float** | Processing emissions intensity excluding carbon offsets, in kg-CO2e/number of units produced | -**processing_including_carbon_offsets** | **float** | Processing emissions intensity including carbon offsets, in kg-CO2e/number of units produced | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntermediateInner.md deleted file mode 100644 index e64a5dfd..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostProcessing200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostProcessing200ResponseScope1**](PostProcessing200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostProcessing200ResponseScope3**](PostProcessing200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostProcessing200ResponseIntensitiesInner**](PostProcessing200ResponseIntensitiesInner.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseNet.md deleted file mode 100644 index 25b57eaf..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseNet.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostProcessing200ResponseNet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope1.md deleted file mode 100644 index 2637a607..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope1.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostProcessing200ResponseScope1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | -**purchased_co2** | **float** | Emissions from purchased CO2, in tonnes-CO2e | -**wastewater_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | -**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope3.md deleted file mode 100644 index 677c73c1..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostProcessing200ResponseScope3.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostProcessing200ResponseScope3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**solid_waste_sent_offsite** | **float** | Emissions from solid waste sent offsite, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessingRequest.md b/examples/php-api-client/api-client/docs/Model/PostProcessingRequest.md deleted file mode 100644 index 5d57748f..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostProcessingRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostProcessingRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**products** | [**\OpenAPI\Client\Model\PostProcessingRequestProductsInner[]**](PostProcessingRequestProductsInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInner.md b/examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInner.md deleted file mode 100644 index 65d4f871..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInner.md +++ /dev/null @@ -1,19 +0,0 @@ -# # PostProcessingRequestProductsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**product** | [**\OpenAPI\Client\Model\PostProcessingRequestProductsInnerProduct**](PostProcessingRequestProductsInnerProduct.md) | | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**electricity_source** | **string** | Source of electricity | -**fuel** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | -**refrigerants** | [**\OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[]**](PostHorticultureRequestCropsInnerRefrigerantsInner.md) | Refrigerant type | -**fluid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | -**solid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | -**purchased_co2** | **float** | Quantity of CO2 purchased, in kg CO2 | -**carbon_offsets** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInnerProduct.md b/examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInnerProduct.md deleted file mode 100644 index 47be86f7..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostProcessingRequestProductsInnerProduct.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostProcessingRequestProductsInnerProduct - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**unit** | **string** | | -**amount_made_per_year** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostRice200Response.md b/examples/php-api-client/api-client/docs/Model/PostRice200Response.md deleted file mode 100644 index 7e48e11a..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostRice200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostRice200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostRice200ResponseScope1**](PostRice200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostRice200ResponseIntermediateInner[]**](PostRice200ResponseIntermediateInner.md) | | -**net** | [**\OpenAPI\Client\Model\PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostRice200ResponseIntensities**](PostRice200ResponseIntensities.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntensities.md deleted file mode 100644 index bf834b51..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntensities.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostRice200ResponseIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rice_produced_tonnes** | **float** | Rice produced in tonnes | -**rice_excluding_sequestration** | **float** | Rice excluding sequestration, in t-CO2e/t rice | -**rice_including_sequestration** | **float** | Rice including sequestration, in t-CO2e/t rice | -**intensity** | **float** | Emissions intensity of rice production. Deprecation note: Use `riceIncludingSequestration` instead | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInner.md deleted file mode 100644 index e7774490..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostRice200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostRice200ResponseScope1**](PostRice200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**intensities** | [**\OpenAPI\Client\Model\PostRice200ResponseIntermediateInnerIntensities**](PostRice200ResponseIntermediateInnerIntensities.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index cdc1a824..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostRice200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostRice200ResponseIntermediateInnerIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rice_produced_tonnes** | **float** | Rice produced in tonnes | -**rice_excluding_sequestration** | **float** | Rice excluding sequestration, in t-CO2e/t rice | -**rice_including_sequestration** | **float** | Rice including sequestration, in t-CO2e/t rice | -**intensity** | **float** | Emissions intensity of rice production. Deprecation note: Use `riceIncludingSequestration` instead | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostRice200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostRice200ResponseScope1.md deleted file mode 100644 index e5b4095f..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostRice200ResponseScope1.md +++ /dev/null @@ -1,24 +0,0 @@ -# # PostRice200ResponseScope1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**field_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | -**rice_cultivation_ch4** | **float** | CH4 emissions from rice cultivation, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**field_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | -**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostRiceRequest.md b/examples/php-api-client/api-client/docs/Model/PostRiceRequest.md deleted file mode 100644 index d5b7df5e..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostRiceRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostRiceRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**crops** | [**\OpenAPI\Client\Model\PostRiceRequestCropsInner[]**](PostRiceRequestCropsInner.md) | | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**vegetation** | [**\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]**](PostCottonRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostRiceRequestCropsInner.md b/examples/php-api-client/api-client/docs/Model/PostRiceRequestCropsInner.md deleted file mode 100644 index 05912466..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostRiceRequestCropsInner.md +++ /dev/null @@ -1,31 +0,0 @@ -# # PostRiceRequestCropsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**average_rice_yield** | **float** | Average rice yield, in t/ha (tonnes per hectare) | -**area_sown** | **float** | Area sown, in ha (hectares) | -**growing_season_days** | **float** | The length of the growing season for this crop, in days | -**water_regime_type** | **string** | | -**water_regime_sub_type** | **string** | | -**rice_preseason_flooding_period** | **string** | | -**urea_application** | **float** | Urea application, in kg Urea/ha (kilograms of urea per hectare) | -**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | -**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | -**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | -**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | -**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | -**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | -**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | -**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | -**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**diesel_use** | **float** | Diesel usage in L (litres) | -**petrol_use** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheep200Response.md b/examples/php-api-client/api-client/docs/Model/PostSheep200Response.md deleted file mode 100644 index bc3fd526..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheep200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostSheep200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInner[]**](PostSheep200ResponseIntermediateInner.md) | | -**net** | [**\OpenAPI\Client\Model\PostSheep200ResponseNet**](PostSheep200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities**](PostSheep200ResponseIntermediateInnerIntensities.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInner.md deleted file mode 100644 index 20461aaf..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostSheep200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**intensities** | [**\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities**](PostSheep200ResponseIntermediateInnerIntensities.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index a86735a0..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,14 +0,0 @@ -# # PostSheep200ResponseIntermediateInnerIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**wool_produced_kg** | **float** | Greasy wool produced in kg | -**sheep_meat_produced_kg** | **float** | Sheep meat produced in kg liveweight | -**wool_including_sequestration** | **float** | Wool production including carbon sequestration, in kg-CO2e/kg greasy | -**wool_excluding_sequestration** | **float** | Wool production excluding carbon sequestration, in kg-CO2e/kg greasy | -**sheep_meat_breeding_including_sequestration** | **float** | Sheep meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight | -**sheep_meat_breeding_excluding_sequestration** | **float** | Sheep meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseNet.md deleted file mode 100644 index dc966891..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheep200ResponseNet.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostSheep200ResponseNet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | -**sheep** | **float** | Net emissions of sheep, in tonnes-CO2e/year | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequest.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequest.md deleted file mode 100644 index 310d015e..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostSheepRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**sheep** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInner[]**](PostSheepRequestSheepInner.md) | | -**vegetation** | [**\OpenAPI\Client\Model\PostSheepRequestVegetationInner[]**](PostSheepRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInner.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInner.md deleted file mode 100644 index d9676494..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInner.md +++ /dev/null @@ -1,27 +0,0 @@ -# # PostSheepRequestSheepInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**classes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClasses**](PostSheepRequestSheepInnerClasses.md) | | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**fertiliser** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**mineral_supplementation** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInnerMineralSupplementation**](PostBeefRequestBeefInnerMineralSupplementation.md) | | -**electricity_source** | **string** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | -**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**merino_percent** | **float** | Percent of sheep purchases that are of type Merino, from 0 to 100 | -**ewes_lambing** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerEwesLambing**](PostSheepRequestSheepInnerEwesLambing.md) | | -**seasonal_lambing** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerSeasonalLambing**](PostSheepRequestSheepInnerSeasonalLambing.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClasses.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClasses.md deleted file mode 100644 index 214d3bbb..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClasses.md +++ /dev/null @@ -1,24 +0,0 @@ -# # PostSheepRequestSheepInnerClasses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rams** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**trade_rams** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**wethers** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**trade_wethers** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**maiden_breeding_ewes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**trade_maiden_breeding_ewes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**breeding_ewes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | -**trade_breeding_ewes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**other_ewes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**trade_other_ewes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**ewe_lambs** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | -**trade_ewe_lambs** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**wether_lambs** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | -**trade_wether_lambs** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**trade_ewes** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesTradeEwes**](PostSheepRequestSheepInnerClassesTradeEwes.md) | | [optional] -**trade_lambs_and_hoggets** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesTradeLambsAndHoggets**](PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRams.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRams.md deleted file mode 100644 index fe7b582d..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRams.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostSheepRequestSheepInnerClassesRams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**head_shorn** | **float** | Number of sheep shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRamsAutumn.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRamsAutumn.md deleted file mode 100644 index db154478..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesRamsAutumn.md +++ /dev/null @@ -1,14 +0,0 @@ -# # PostSheepRequestSheepInnerClassesRamsAutumn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals (head) | -**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | -**liveweight_gain** | **float** | Average liveweight gain in kg/day (kilogram per day) | -**crude_protein** | **float** | Crude protein percent, between 0 and 100 | [optional] -**dry_matter_digestibility** | **float** | Dry matter digestibility percent, between 0 and 100 | [optional] -**feed_availability** | **float** | Feed availability, in t/ha (tonnes per hectare) | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeEwes.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeEwes.md deleted file mode 100644 index 479bcfdf..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeEwes.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostSheepRequestSheepInnerClassesTradeEwes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**head_shorn** | **float** | Number of sheep shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md deleted file mode 100644 index b22a1795..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md +++ /dev/null @@ -1,20 +0,0 @@ -# # PostSheepRequestSheepInnerClassesTradeLambsAndHoggets - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**winter** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**spring** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**summer** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**head_shorn** | **float** | Number of sheep shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**\OpenAPI\Client\Model\PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner[]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerEwesLambing.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerEwesLambing.md deleted file mode 100644 index 7fd48350..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerEwesLambing.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostSheepRequestSheepInnerEwesLambing - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | | -**winter** | **float** | | -**spring** | **float** | | -**summer** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerSeasonalLambing.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerSeasonalLambing.md deleted file mode 100644 index 55f62adb..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepRequestSheepInnerSeasonalLambing.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostSheepRequestSheepInnerSeasonalLambing - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | | -**winter** | **float** | | -**spring** | **float** | | -**summer** | **float** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostSheepRequestVegetationInner.md deleted file mode 100644 index 89747bee..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepRequestVegetationInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostSheepRequestVegetationInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**sheep_proportion** | **float[]** | The proportion of the sequestration that is allocated to sheep | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200Response.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200Response.md deleted file mode 100644 index edbb7fe4..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200Response.md +++ /dev/null @@ -1,17 +0,0 @@ -# # PostSheepbeef200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediate**](PostSheepbeef200ResponseIntermediate.md) | | -**intermediate_beef** | [**\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInner[]**](PostBeef200ResponseIntermediateInner.md) | | -**intermediate_sheep** | [**\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInner[]**](PostSheep200ResponseIntermediateInner.md) | | -**net** | [**\OpenAPI\Client\Model\PostSheepbeef200ResponseNet**](PostSheepbeef200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostSheepbeef200ResponseIntensities**](PostSheepbeef200ResponseIntensities.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntensities.md deleted file mode 100644 index 6000ee2c..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntensities.md +++ /dev/null @@ -1,17 +0,0 @@ -# # PostSheepbeef200ResponseIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**beef_including_sequestration** | **float** | Beef including carbon sequestration, in kg-CO2e/kg liveweight | -**beef_excluding_sequestration** | **float** | Beef excluding carbon sequestration, in kg-CO2e/kg liveweight | -**liveweight_beef_produced_kg** | **float** | Liveweight produced in kg | -**wool_including_sequestration** | **float** | Wool production including carbon sequestration, in kg-CO2e/kg greasy | -**wool_excluding_sequestration** | **float** | Wool production excluding carbon sequestration, in kg-CO2e/kg greasy | -**sheep_meat_breeding_including_sequestration** | **float** | Sheep meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight | -**sheep_meat_breeding_excluding_sequestration** | **float** | Sheep meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight | -**wool_produced_kg** | **float** | Greasy wool produced in kg | -**sheep_meat_produced_kg** | **float** | Sheep meat produced in kg liveweight | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediate.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediate.md deleted file mode 100644 index 821fde80..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediate.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostSheepbeef200ResponseIntermediate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**beef** | [**\OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediateBeef**](PostSheepbeef200ResponseIntermediateBeef.md) | | -**sheep** | [**\OpenAPI\Client\Model\PostSheepbeef200ResponseIntermediateSheep**](PostSheepbeef200ResponseIntermediateSheep.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateBeef.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateBeef.md deleted file mode 100644 index 6bf1feb2..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateBeef.md +++ /dev/null @@ -1,14 +0,0 @@ -# # PostSheepbeef200ResponseIntermediateBeef - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostBeef200ResponseIntermediateInnerIntensities**](PostBeef200ResponseIntermediateInnerIntensities.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateSheep.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateSheep.md deleted file mode 100644 index f702a129..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseIntermediateSheep.md +++ /dev/null @@ -1,14 +0,0 @@ -# # PostSheepbeef200ResponseIntermediateSheep - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostSheep200ResponseIntermediateInnerIntensities**](PostSheep200ResponseIntermediateInnerIntensities.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseNet.md deleted file mode 100644 index ac50a44a..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepbeef200ResponseNet.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostSheepbeef200ResponseNet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | -**beef** | **float** | Net emissions of beef, in tonnes-CO2e/year | -**sheep** | **float** | Net emissions of sheep, in tonnes-CO2e/year | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeefRequest.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeefRequest.md deleted file mode 100644 index 99a18a09..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepbeefRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostSheepbeefRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**beef** | [**\OpenAPI\Client\Model\PostBeefRequestBeefInner[]**](PostBeefRequestBeefInner.md) | | -**sheep** | [**\OpenAPI\Client\Model\PostSheepRequestSheepInner[]**](PostSheepRequestSheepInner.md) | | -**burning** | [**\OpenAPI\Client\Model\PostBeefRequestBurningInnerBurning[]**](PostBeefRequestBurningInnerBurning.md) | | -**vegetation** | [**\OpenAPI\Client\Model\PostSheepbeefRequestVegetationInner[]**](PostSheepbeefRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSheepbeefRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostSheepbeefRequestVegetationInner.md deleted file mode 100644 index 98781e7d..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSheepbeefRequestVegetationInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostSheepbeefRequestVegetationInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**beef_proportion** | **float[]** | The proportion of the sequestration that is allocated to beef | -**sheep_proportion** | **float[]** | The proportion of the sequestration that is allocated to sheep | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSugar200Response.md b/examples/php-api-client/api-client/docs/Model/PostSugar200Response.md deleted file mode 100644 index 42d9f3ee..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSugar200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostSugar200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostSugar200ResponseIntermediateInner[]**](PostSugar200ResponseIntermediateInner.md) | | -**net** | [**\OpenAPI\Client\Model\PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostSugar200ResponseIntermediateInnerIntensities[]**](PostSugar200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each crop (in order), in t-CO2e/t crop | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInner.md deleted file mode 100644 index 872dd05e..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostSugar200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**intensities** | [**\OpenAPI\Client\Model\PostSugar200ResponseIntermediateInnerIntensities**](PostSugar200ResponseIntermediateInnerIntensities.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index 181d2c30..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSugar200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostSugar200ResponseIntermediateInnerIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sugar_excluding_sequestration** | **float** | Sugar emissions intensity excluding sequestration, in kg-CO2e/kg sugar | -**sugar_including_sequestration** | **float** | Sugar emissions intensity including sequestration, in kg-CO2e/kg sugar | -**sugar_produced_kg** | **float** | Sugar produced in kg | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSugarRequest.md b/examples/php-api-client/api-client/docs/Model/PostSugarRequest.md deleted file mode 100644 index a41ef1a2..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSugarRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# # PostSugarRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**crops** | [**\OpenAPI\Client\Model\PostSugarRequestCropsInner[]**](PostSugarRequestCropsInner.md) | | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**vegetation** | [**\OpenAPI\Client\Model\PostCottonRequestVegetationInner[]**](PostCottonRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostSugarRequestCropsInner.md b/examples/php-api-client/api-client/docs/Model/PostSugarRequestCropsInner.md deleted file mode 100644 index f5626421..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostSugarRequestCropsInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# # PostSugarRequestCropsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**production_system** | **string** | Production system of this crop | -**average_cane_yield** | **float** | Average cane/crop yield, in t/ha (tonnes per hectare) | -**percent_milled_cane_yield** | **float** | Percentage of cane yield that becomes milled sugar, from 0 to 1 | [optional] -**area_sown** | **float** | Area sown, in ha (hectares) | -**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | -**urea_application** | **float** | Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) | -**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | -**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | -**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | -**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | -**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | -**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | -**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | -**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | -**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**diesel_use** | **float** | Diesel usage in L (litres) | -**petrol_use** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyard200Response.md b/examples/php-api-client/api-client/docs/Model/PostVineyard200Response.md deleted file mode 100644 index 63c0c52a..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostVineyard200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostVineyard200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostVineyard200ResponseScope1**](PostVineyard200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostVineyard200ResponseScope3**](PostVineyard200ResponseScope3.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInner[]**](PostVineyard200ResponseIntermediateInner.md) | | -**net** | [**\OpenAPI\Client\Model\PostVineyard200ResponseNet**](PostVineyard200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInnerIntensities[]**](PostVineyard200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each vineyard (in order), in t-CO2e/t yield | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInner.md deleted file mode 100644 index 75d569eb..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostVineyard200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostVineyard200ResponseScope1**](PostVineyard200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostVineyard200ResponseScope3**](PostVineyard200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**intensities** | [**\OpenAPI\Client\Model\PostVineyard200ResponseIntermediateInnerIntensities**](PostVineyard200ResponseIntermediateInnerIntensities.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index f3ab6178..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostVineyard200ResponseIntermediateInnerIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vineyards_excluding_sequestration** | **float** | Vineyard emissions intensity excluding sequestration, in kg-CO2e/kg crop | -**vineyards_including_sequestration** | **float** | Vineyard emissions intensity including sequestration, in kg-CO2e/kg crop | -**crop_produced_kg** | **float** | Vineyard crop produced in kg | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseNet.md b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseNet.md deleted file mode 100644 index 5b6cd6d0..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseNet.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostVineyard200ResponseNet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | -**vineyards** | **float[]** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope1.md deleted file mode 100644 index 38709d9d..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope1.md +++ /dev/null @@ -1,23 +0,0 @@ -# # PostVineyard200ResponseScope1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**waste_water_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | -**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope3.md deleted file mode 100644 index 9a7169b7..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostVineyard200ResponseScope3.md +++ /dev/null @@ -1,18 +0,0 @@ -# # PostVineyard200ResponseScope3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**lime** | **float** | Emissions from lime, in tonnes-CO2e | -**commercial_flights** | **float** | Emissions from commercial flights, in tonnes-CO2e | -**inbound_freight** | **float** | Emissions from inbound freight, in tonnes-CO2e | -**solid_waste_sent_offsite** | **float** | Emissions from solid waste sent offsite, in tonnes-CO2e | -**outbound_freight** | **float** | Emissions from outbound freight, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyardRequest.md b/examples/php-api-client/api-client/docs/Model/PostVineyardRequest.md deleted file mode 100644 index 099ac6a8..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostVineyardRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostVineyardRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vineyards** | [**\OpenAPI\Client\Model\PostVineyardRequestVineyardsInner[]**](PostVineyardRequestVineyardsInner.md) | | -**vegetation** | [**\OpenAPI\Client\Model\PostVineyardRequestVegetationInner[]**](PostVineyardRequestVegetationInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyardRequestVegetationInner.md b/examples/php-api-client/api-client/docs/Model/PostVineyardRequestVegetationInner.md deleted file mode 100644 index b0fbd8b7..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostVineyardRequestVegetationInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostVineyardRequestVegetationInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**\OpenAPI\Client\Model\PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**allocation_to_vineyards** | **float[]** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostVineyardRequestVineyardsInner.md b/examples/php-api-client/api-client/docs/Model/PostVineyardRequestVineyardsInner.md deleted file mode 100644 index 1ee01729..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostVineyardRequestVineyardsInner.md +++ /dev/null @@ -1,33 +0,0 @@ -# # PostVineyardRequestVineyardsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | -**irrigated** | **bool** | Is the crop irrigated? | -**area_planted** | **float** | Area planted, in ha (hectares) | -**average_yield** | **float** | Average yield, in t/ha (tonnes per hectare) | -**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | -**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | -**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | -**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | -**urea_application** | **float** | Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) | -**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | -**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**electricity_source** | **string** | Source of electricity | -**fuel** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | -**fluid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | -**solid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | -**inbound_freight** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods to the enterprise | -**outbound_freight** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods from the enterprise | -**total_commercial_flights_km** | **float** | Total distance of commercial flights, in km (kilometers) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200Response.md b/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200Response.md deleted file mode 100644 index 6b3fa928..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200Response.md +++ /dev/null @@ -1,16 +0,0 @@ -# # PostWildcatchfishery200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostWildcatchfishery200ResponseScope1**](PostWildcatchfishery200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | -**purchased_offsets** | [**\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntensities**](PostWildcatchfishery200ResponseIntensities.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntermediateInner[]**](PostWildcatchfishery200ResponseIntermediateInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntensities.md b/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntensities.md deleted file mode 100644 index 86e490b1..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntensities.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostWildcatchfishery200ResponseIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total_harvest_weight_kg** | **float** | Total harvest weight in kg | -**wild_catch_fishery_excluding_carbon_offsets** | **float** | Wild catch fishery emissions intensity excluding sequestration, in kg-CO2e/kg harvest weight | -**wild_catch_fishery_including_carbon_offsets** | **float** | Wild catch fishery emissions intensity including sequestration, in kg-CO2e/kg harvest weight | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntermediateInner.md deleted file mode 100644 index 9d116b98..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseIntermediateInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostWildcatchfishery200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostWildcatchfishery200ResponseScope1**](PostWildcatchfishery200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostWildcatchfishery200ResponseIntensities**](PostWildcatchfishery200ResponseIntensities.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**carbon_sequestration** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseScope1.md deleted file mode 100644 index 36f6ce4b..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildcatchfishery200ResponseScope1.md +++ /dev/null @@ -1,19 +0,0 @@ -# # PostWildcatchfishery200ResponseScope1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**waste_water_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | -**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | -**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequest.md b/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequest.md deleted file mode 100644 index 3e88b5b8..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostWildcatchfisheryRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enterprises** | [**\OpenAPI\Client\Model\PostWildcatchfisheryRequestEnterprisesInner[]**](PostWildcatchfisheryRequestEnterprisesInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInner.md b/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInner.md deleted file mode 100644 index 17487984..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInner.md +++ /dev/null @@ -1,25 +0,0 @@ -# # PostWildcatchfisheryRequestEnterprisesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**production_system** | **string** | Production system of the wild catch fishery enterprise | -**total_harvest_kg** | **float** | Total harvest in kg | -**refrigerants** | [**\OpenAPI\Client\Model\PostHorticultureRequestCropsInnerRefrigerantsInner[]**](PostHorticultureRequestCropsInnerRefrigerantsInner.md) | Refrigerant type | -**bait** | [**\OpenAPI\Client\Model\PostWildcatchfisheryRequestEnterprisesInnerBaitInner[]**](PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md) | Bait purchases | -**custom_bait** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerCustomBaitInner[]**](PostAquacultureRequestEnterprisesInnerCustomBaitInner.md) | Custom bait purchases | -**inbound_freight** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods to the enterprise | -**outbound_freight** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerInboundFreightInner[]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods from the enterprise | -**total_commercial_flights_km** | **float** | Total distance of commercial flights, in km (kilometers) | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**electricity_source** | **string** | Source of electricity | -**fuel** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | -**fluid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerFluidWasteInner[]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | -**solid_waste** | [**\OpenAPI\Client\Model\PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | -**carbon_offsets** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md b/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md deleted file mode 100644 index a4f3a4e6..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostWildcatchfisheryRequestEnterprisesInnerBaitInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **string** | Bait product type | -**purchased_tonnes** | **float** | Purchased product in tonnes | -**additional_ingredients** | **float** | Additional ingredient fraction, from 0 to 1 | -**emissions_intensity** | **float** | Emissions intensity of additional ingredients, in kg CO2e/kg bait (default 0) | [default to 0] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200Response.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200Response.md deleted file mode 100644 index 9e98bb8c..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PostWildseafisheries200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**\OpenAPI\Client\Model\PostWildseafisheries200ResponseScope1**](PostWildseafisheries200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostWildseafisheries200ResponseScope3**](PostWildseafisheries200ResponseScope3.md) | | -**purchased_offsets** | [**\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | -**intermediate** | [**\OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInner[]**](PostWildseafisheries200ResponseIntermediateInner.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**intensities** | [**\OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInnerIntensities[]**](PostWildseafisheries200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each enterprise (in order), in t-CO2e/t product caught | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInner.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInner.md deleted file mode 100644 index f32a9fe8..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInner.md +++ /dev/null @@ -1,16 +0,0 @@ -# # PostWildseafisheries200ResponseIntermediateInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | -**scope1** | [**\OpenAPI\Client\Model\PostWildseafisheries200ResponseScope1**](PostWildseafisheries200ResponseScope1.md) | | -**scope2** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**\OpenAPI\Client\Model\PostWildseafisheries200ResponseScope3**](PostWildseafisheries200ResponseScope3.md) | | -**purchased_offsets** | [**\OpenAPI\Client\Model\PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**intensities** | [**\OpenAPI\Client\Model\PostWildseafisheries200ResponseIntermediateInnerIntensities**](PostWildseafisheries200ResponseIntermediateInnerIntensities.md) | | -**net** | [**\OpenAPI\Client\Model\PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index ee2ab1b9..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostWildseafisheries200ResponseIntermediateInnerIntensities - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**intensity_excluding_carbon_offset** | **float** | Wild sea fisheries emissions intensity excluding carbon offsets, in kg-CO2e/kg | -**intensity_including_carbon_offset** | **float** | Wild sea fisheries emissions intensity including carbon offsets, in kg-CO2e/kg | -**total_harvest_weight_tonnes** | **float** | Total harvest weight in tonnes | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope1.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope1.md deleted file mode 100644 index ce74038e..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope1.md +++ /dev/null @@ -1,17 +0,0 @@ -# # PostWildseafisheries200ResponseScope1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope3.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope3.md deleted file mode 100644 index a26caea9..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildseafisheries200ResponseScope3.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostWildseafisheries200ResponseScope3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**bait** | **float** | Emissions from purchased bait, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequest.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequest.md deleted file mode 100644 index 4f9f5473..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostWildseafisheriesRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enterprises** | [**\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInner[]**](PostWildseafisheriesRequestEnterprisesInner.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInner.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInner.md deleted file mode 100644 index a589e745..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInner.md +++ /dev/null @@ -1,23 +0,0 @@ -# # PostWildseafisheriesRequestEnterprisesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier for this activity | [optional] -**state** | **string** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**electricity_source** | **string** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**total_whole_weight_caught** | **float** | Total whole weight caught in kg | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**refrigerants** | [**\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner[]**](PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md) | | -**transports** | [**\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerTransportsInner[]**](PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md) | Transportation | -**flights** | [**\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerFlightsInner[]**](PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md) | CommercialFlight | -**bait** | [**\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerBaitInner[]**](PostWildseafisheriesRequestEnterprisesInnerBaitInner.md) | Bait | -**custombait** | [**\OpenAPI\Client\Model\PostWildseafisheriesRequestEnterprisesInnerCustombaitInner[]**](PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md) | Custom bait | -**carbon_offset** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md deleted file mode 100644 index 4e68e47d..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PostWildseafisheriesRequestEnterprisesInnerBaitInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **string** | Bait product type | -**purchased** | **float** | Purchased product in tonnes | -**additional_ingredient** | **float** | Additional ingredient fraction, from 0 to 1 | -**emissions_intensity** | **float** | Emissions intensity of product, in kg CO2e/kg | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md deleted file mode 100644 index 18bd2859..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostWildseafisheriesRequestEnterprisesInnerCustombaitInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**purchased** | **float** | Purchased product in tonnes | -**emissions_intensity** | **float** | Emissions intensity of product, in kg CO2e/kg | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md deleted file mode 100644 index 5b494762..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostWildseafisheriesRequestEnterprisesInnerFlightsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**commercial_flight_passengers** | **float** | Commercial flight passengers per year | -**total_flight_distance** | **float** | Total commercial flight distance in km | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md deleted file mode 100644 index e89a19b3..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**refrigerant** | **string** | Refrigerant type | -**annual_recharge** | **float** | Amount of refrigerant annually recharged, kg product/year | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md b/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md deleted file mode 100644 index 9a72b262..00000000 --- a/examples/php-api-client/api-client/docs/Model/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PostWildseafisheriesRequestEnterprisesInnerTransportsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **string** | Transport type | -**fuel** | **string** | Fuel type | -**distance** | **float** | Distance in km | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/php-api-client/api-client/test/Api/GAFApiTest.php b/examples/php-api-client/api-client/test/Api/GAFApiTest.php deleted file mode 100644 index aeb67a24..00000000 --- a/examples/php-api-client/api-client/test/Api/GAFApiTest.php +++ /dev/null @@ -1,314 +0,0 @@ - Date: Mon, 27 Oct 2025 14:39:24 +1100 Subject: [PATCH 7/8] Trimming the unneeded generated files from python api client --- examples/python-api-client/README.md | 31 + .../api-client/.openapi-generator/FILES | 585 ------- .../api-client/docs/GAFApi.md | 1428 ----------------- .../docs/PostAquaculture200Response.md | 37 - ...uaculture200ResponseCarbonSequestration.md | 31 - .../PostAquaculture200ResponseIntensities.md | 31 - ...Aquaculture200ResponseIntermediateInner.md | 36 - ...nseIntermediateInnerCarbonSequestration.md | 30 - .../docs/PostAquaculture200ResponseNet.md | 30 - ...tAquaculture200ResponsePurchasedOffsets.md | 30 - .../docs/PostAquaculture200ResponseScope1.md | 40 - .../docs/PostAquaculture200ResponseScope2.md | 31 - .../docs/PostAquaculture200ResponseScope3.md | 37 - .../api-client/docs/PostAquacultureRequest.md | 30 - .../PostAquacultureRequestEnterprisesInner.md | 46 - ...cultureRequestEnterprisesInnerBaitInner.md | 32 - ...eRequestEnterprisesInnerCustomBaitInner.md | 30 - ...eRequestEnterprisesInnerFluidWasteInner.md | 33 - ...tAquacultureRequestEnterprisesInnerFuel.md | 32 - ...EnterprisesInnerFuelStationaryFuelInner.md | 30 - ...tEnterprisesInnerFuelTransportFuelInner.md | 30 - ...uestEnterprisesInnerInboundFreightInner.md | 30 - ...equestEnterprisesInnerRefrigerantsInner.md | 30 - ...ultureRequestEnterprisesInnerSolidWaste.md | 31 - .../api-client/docs/PostBeef200Response.md | 36 - .../PostBeef200ResponseIntermediateInner.md | 36 - ...200ResponseIntermediateInnerIntensities.md | 31 - .../api-client/docs/PostBeef200ResponseNet.md | 30 - .../docs/PostBeef200ResponseScope1.md | 46 - .../docs/PostBeef200ResponseScope3.md | 38 - .../api-client/docs/PostBeefRequest.md | 35 - .../docs/PostBeefRequestBeefInner.md | 46 - .../docs/PostBeefRequestBeefInnerClasses.md | 45 - ...PostBeefRequestBeefInnerClassesBullsGt1.md | 39 - ...efRequestBeefInnerClassesBullsGt1Autumn.md | 33 - ...tBeefInnerClassesBullsGt1PurchasesInner.md | 32 - ...efRequestBeefInnerClassesBullsGt1Traded.md | 39 - .../PostBeefRequestBeefInnerClassesCowsGt2.md | 39 - ...eefRequestBeefInnerClassesCowsGt2Traded.md | 39 - ...tBeefRequestBeefInnerClassesHeifers1To2.md | 39 - ...equestBeefInnerClassesHeifers1To2Traded.md | 39 - ...stBeefRequestBeefInnerClassesHeifersGt2.md | 39 - ...RequestBeefInnerClassesHeifersGt2Traded.md | 39 - ...stBeefRequestBeefInnerClassesHeifersLt1.md | 39 - ...RequestBeefInnerClassesHeifersLt1Traded.md | 39 - ...stBeefRequestBeefInnerClassesSteers1To2.md | 39 - ...RequestBeefInnerClassesSteers1To2Traded.md | 39 - ...ostBeefRequestBeefInnerClassesSteersGt2.md | 39 - ...fRequestBeefInnerClassesSteersGt2Traded.md | 39 - ...ostBeefRequestBeefInnerClassesSteersLt1.md | 39 - ...fRequestBeefInnerClassesSteersLt1Traded.md | 39 - .../PostBeefRequestBeefInnerCowsCalving.md | 33 - .../PostBeefRequestBeefInnerFertiliser.md | 38 - ...eefInnerFertiliserOtherFertilisersInner.md | 32 - ...fRequestBeefInnerMineralSupplementation.md | 35 - .../docs/PostBeefRequestBurningInner.md | 31 - .../PostBeefRequestBurningInnerBurning.md | 36 - .../docs/PostBeefRequestVegetationInner.md | 32 - ...ostBeefRequestVegetationInnerVegetation.md | 34 - .../api-client/docs/PostBuffalo200Response.md | 36 - .../docs/PostBuffalo200ResponseIntensities.md | 31 - ...PostBuffalo200ResponseIntermediateInner.md | 36 - .../docs/PostBuffalo200ResponseNet.md | 30 - .../docs/PostBuffalo200ResponseScope1.md | 44 - .../docs/PostBuffalo200ResponseScope3.md | 37 - .../api-client/docs/PostBuffaloRequest.md | 33 - .../docs/PostBuffaloRequestBuffalosInner.md | 45 - .../PostBuffaloRequestBuffalosInnerClasses.md | 37 - ...BuffaloRequestBuffalosInnerClassesBulls.md | 36 - ...oRequestBuffalosInnerClassesBullsAutumn.md | 29 - ...BuffalosInnerClassesBullsPurchasesInner.md | 30 - ...BuffaloRequestBuffalosInnerClassesCalfs.md | 36 - ...tBuffaloRequestBuffalosInnerClassesCows.md | 36 - ...uffaloRequestBuffalosInnerClassesSteers.md | 36 - ...loRequestBuffalosInnerClassesTradeBulls.md | 36 - ...loRequestBuffalosInnerClassesTradeCalfs.md | 36 - ...aloRequestBuffalosInnerClassesTradeCows.md | 36 - ...oRequestBuffalosInnerClassesTradeSteers.md | 36 - ...tBuffaloRequestBuffalosInnerCowsCalving.md | 33 - ...faloRequestBuffalosInnerSeasonalCalving.md | 33 - .../docs/PostBuffaloRequestVegetationInner.md | 31 - .../api-client/docs/PostCotton200Response.md | 36 - .../PostCotton200ResponseIntermediateInner.md | 36 - ...200ResponseIntermediateInnerIntensities.md | 43 - .../docs/PostCotton200ResponseNet.md | 31 - .../docs/PostCotton200ResponseScope1.md | 44 - .../docs/PostCotton200ResponseScope3.md | 35 - .../api-client/docs/PostCottonRequest.md | 34 - .../docs/PostCottonRequestCropsInner.md | 55 - .../docs/PostCottonRequestVegetationInner.md | 30 - .../api-client/docs/PostDairy200Response.md | 36 - .../docs/PostDairy200ResponseIntensities.md | 30 - .../PostDairy200ResponseIntermediateInner.md | 36 - .../docs/PostDairy200ResponseNet.md | 29 - .../docs/PostDairy200ResponseScope1.md | 49 - .../docs/PostDairy200ResponseScope3.md | 36 - .../api-client/docs/PostDairyRequest.md | 34 - .../docs/PostDairyRequestDairyInner.md | 50 - .../docs/PostDairyRequestDairyInnerAreas.md | 33 - .../docs/PostDairyRequestDairyInnerClasses.md | 34 - ...ryRequestDairyInnerClassesDairyBullsGt1.md | 33 - ...ryRequestDairyInnerClassesDairyBullsLt1.md | 33 - ...DairyRequestDairyInnerClassesHeifersGt1.md | 33 - ...DairyRequestDairyInnerClassesHeifersLt1.md | 33 - ...airyRequestDairyInnerClassesMilkingCows.md | 33 - ...questDairyInnerClassesMilkingCowsAutumn.md | 34 - ...stDairyInnerManureManagementMilkingCows.md | 34 - ...airyRequestDairyInnerSeasonalFertiliser.md | 33 - ...questDairyInnerSeasonalFertiliserAutumn.md | 33 - .../docs/PostDairyRequestVegetationInner.md | 31 - .../api-client/docs/PostDeer200Response.md | 36 - .../docs/PostDeer200ResponseIntensities.md | 31 - .../PostDeer200ResponseIntermediateInner.md | 36 - .../api-client/docs/PostDeer200ResponseNet.md | 30 - .../api-client/docs/PostDeerRequest.md | 33 - .../docs/PostDeerRequestDeersInner.md | 45 - .../docs/PostDeerRequestDeersInnerClasses.md | 37 - ...eerRequestDeersInnerClassesBreedingDoes.md | 36 - .../PostDeerRequestDeersInnerClassesBucks.md | 36 - .../PostDeerRequestDeersInnerClassesFawn.md | 36 - ...stDeerRequestDeersInnerClassesOtherDoes.md | 36 - ...tDeerRequestDeersInnerClassesTradeBucks.md | 36 - ...stDeerRequestDeersInnerClassesTradeDoes.md | 36 - ...stDeerRequestDeersInnerClassesTradeFawn.md | 36 - ...rRequestDeersInnerClassesTradeOtherDoes.md | 36 - .../PostDeerRequestDeersInnerDoesFawning.md | 33 - ...ostDeerRequestDeersInnerSeasonalFawning.md | 33 - .../docs/PostDeerRequestVegetationInner.md | 31 - .../api-client/docs/PostFeedlot200Response.md | 36 - ...PostFeedlot200ResponseIntermediateInner.md | 35 - ...200ResponseIntermediateInnerIntensities.md | 31 - ...tFeedlot200ResponseIntermediateInnerNet.md | 30 - .../docs/PostFeedlot200ResponseScope1.md | 47 - .../docs/PostFeedlot200ResponseScope3.md | 37 - .../api-client/docs/PostFeedlotRequest.md | 32 - .../docs/PostFeedlotRequestFeedlotsInner.md | 50 - ...tFeedlotRequestFeedlotsInnerGroupsInner.md | 29 - ...questFeedlotsInnerGroupsInnerStaysInner.md | 38 - ...ostFeedlotRequestFeedlotsInnerPurchases.md | 45 - ...uestFeedlotsInnerPurchasesBullsGt1Inner.md | 31 - .../PostFeedlotRequestFeedlotsInnerSales.md | 45 - ...tRequestFeedlotsInnerSalesBullsGt1Inner.md | 30 - .../docs/PostFeedlotRequestVegetationInner.md | 30 - .../api-client/docs/PostGoat200Response.md | 36 - .../docs/PostGoat200ResponseIntensities.md | 34 - .../PostGoat200ResponseIntermediateInner.md | 36 - .../api-client/docs/PostGoat200ResponseNet.md | 30 - .../api-client/docs/PostGoatRequest.md | 33 - .../docs/PostGoatRequestGoatsInner.md | 44 - .../docs/PostGoatRequestGoatsInnerClasses.md | 42 - ...estGoatsInnerClassesBreedingDoesNannies.md | 41 - ...tGoatRequestGoatsInnerClassesBucksBilly.md | 41 - .../PostGoatRequestGoatsInnerClassesKids.md | 41 - ...tsInnerClassesMaidenBreedingDoesNannies.md | 41 - ...GoatsInnerClassesOtherDoesCulledFemales.md | 41 - ...atsInnerClassesTradeBreedingDoesNannies.md | 41 - ...tGoatRequestGoatsInnerClassesTradeBucks.md | 41 - ...stGoatRequestGoatsInnerClassesTradeDoes.md | 41 - ...stGoatRequestGoatsInnerClassesTradeKids.md | 41 - ...erClassesTradeMaidenBreedingDoesNannies.md | 41 - ...InnerClassesTradeOtherDoesCulledFemales.md | 41 - ...oatRequestGoatsInnerClassesTradeWethers.md | 41 - ...PostGoatRequestGoatsInnerClassesWethers.md | 41 - .../docs/PostGoatRequestVegetationInner.md | 31 - .../api-client/docs/PostGrains200Response.md | 37 - .../PostGrains200ResponseIntermediateInner.md | 36 - ...ediateInnerIntensitiesWithSequestration.md | 31 - .../api-client/docs/PostGrainsRequest.md | 34 - .../docs/PostGrainsRequestCropsInner.md | 50 - .../docs/PostHorticulture200Response.md | 36 - ...orticulture200ResponseIntermediateInner.md | 36 - ...ediateInnerIntensitiesWithSequestration.md | 32 - .../docs/PostHorticulture200ResponseScope1.md | 46 - .../docs/PostHorticultureRequest.md | 34 - .../docs/PostHorticultureRequestCropsInner.md | 51 - ...ltureRequestCropsInnerRefrigerantsInner.md | 30 - .../api-client/docs/PostPork200Response.md | 36 - .../docs/PostPork200ResponseIntensities.md | 31 - .../PostPork200ResponseIntermediateInner.md | 35 - .../api-client/docs/PostPork200ResponseNet.md | 30 - .../docs/PostPork200ResponseScope1.md | 46 - .../docs/PostPork200ResponseScope3.md | 38 - .../api-client/docs/PostPorkRequest.md | 34 - .../docs/PostPorkRequestPorkInner.md | 43 - .../docs/PostPorkRequestPorkInnerClasses.md | 36 - .../PostPorkRequestPorkInnerClassesBoars.md | 39 - .../PostPorkRequestPorkInnerClassesGilts.md | 39 - .../PostPorkRequestPorkInnerClassesGrowers.md | 39 - ...orkRequestPorkInnerClassesSlaughterPigs.md | 39 - .../PostPorkRequestPorkInnerClassesSows.md | 39 - ...stPorkRequestPorkInnerClassesSowsManure.md | 32 - ...RequestPorkInnerClassesSowsManureSpring.md | 33 - .../PostPorkRequestPorkInnerClassesSuckers.md | 39 - .../PostPorkRequestPorkInnerClassesWeaners.md | 39 - ...stPorkRequestPorkInnerFeedProductsInner.md | 33 - ...stPorkInnerFeedProductsInnerIngredients.md | 41 - .../docs/PostPorkRequestVegetationInner.md | 31 - .../api-client/docs/PostPoultry200Response.md | 37 - .../docs/PostPoultry200ResponseIntensities.md | 34 - ...try200ResponseIntermediateBroilersInner.md | 35 - ...nseIntermediateBroilersInnerIntensities.md | 31 - ...ultry200ResponseIntermediateLayersInner.md | 35 - ...ponseIntermediateLayersInnerIntensities.md | 31 - .../docs/PostPoultry200ResponseNet.md | 31 - .../docs/PostPoultry200ResponseScope1.md | 40 - .../docs/PostPoultry200ResponseScope3.md | 36 - .../api-client/docs/PostPoultryRequest.md | 35 - .../docs/PostPoultryRequestBroilersInner.md | 48 - ...tPoultryRequestBroilersInnerGroupsInner.md | 35 - ...equestBroilersInnerGroupsInnerFeedInner.md | 33 - ...ersInnerGroupsInnerFeedInnerIngredients.md | 34 - ...ilersInnerGroupsInnerMeatChickenGrowers.md | 39 - ...roilersInnerMeatChickenGrowersPurchases.md | 31 - ...BroilersInnerMeatChickenLayersPurchases.md | 31 - ...yRequestBroilersInnerMeatOtherPurchases.md | 31 - ...stPoultryRequestBroilersInnerSalesInner.md | 32 - .../docs/PostPoultryRequestLayersInner.md | 52 - .../PostPoultryRequestLayersInnerLayers.md | 33 - ...tPoultryRequestLayersInnerLayersEggSale.md | 31 - ...oultryRequestLayersInnerLayersPurchases.md | 31 - ...ltryRequestLayersInnerMeatChickenLayers.md | 33 - ...uestLayersInnerMeatChickenLayersEggSale.md | 31 - .../docs/PostPoultryRequestVegetationInner.md | 32 - .../docs/PostProcessing200Response.md | 37 - ...stProcessing200ResponseIntensitiesInner.md | 32 - ...tProcessing200ResponseIntermediateInner.md | 35 - .../docs/PostProcessing200ResponseNet.md | 30 - .../docs/PostProcessing200ResponseScope1.md | 41 - .../docs/PostProcessing200ResponseScope3.md | 33 - .../api-client/docs/PostProcessingRequest.md | 31 - .../PostProcessingRequestProductsInner.md | 40 - ...stProcessingRequestProductsInnerProduct.md | 31 - .../api-client/docs/PostRice200Response.md | 36 - .../docs/PostRice200ResponseIntensities.md | 33 - .../PostRice200ResponseIntermediateInner.md | 36 - ...200ResponseIntermediateInnerIntensities.md | 32 - .../docs/PostRice200ResponseScope1.md | 45 - .../api-client/docs/PostRiceRequest.md | 34 - .../docs/PostRiceRequestCropsInner.md | 51 - .../api-client/docs/PostSheep200Response.md | 36 - .../PostSheep200ResponseIntermediateInner.md | 35 - ...200ResponseIntermediateInnerIntensities.md | 34 - .../docs/PostSheep200ResponseNet.md | 30 - .../api-client/docs/PostSheepRequest.md | 34 - .../docs/PostSheepRequestSheepInner.md | 47 - .../docs/PostSheepRequestSheepInnerClasses.md | 44 - .../PostSheepRequestSheepInnerClassesRams.md | 40 - ...SheepRequestSheepInnerClassesRamsAutumn.md | 34 - ...tSheepRequestSheepInnerClassesTradeEwes.md | 41 - ...stSheepInnerClassesTradeLambsAndHoggets.md | 41 - .../PostSheepRequestSheepInnerEwesLambing.md | 33 - ...stSheepRequestSheepInnerSeasonalLambing.md | 33 - .../docs/PostSheepRequestVegetationInner.md | 31 - .../docs/PostSheepbeef200Response.md | 38 - .../PostSheepbeef200ResponseIntensities.md | 37 - .../PostSheepbeef200ResponseIntermediate.md | 31 - ...ostSheepbeef200ResponseIntermediateBeef.md | 35 - ...stSheepbeef200ResponseIntermediateSheep.md | 35 - .../docs/PostSheepbeef200ResponseNet.md | 31 - .../api-client/docs/PostSheepbeefRequest.md | 36 - .../PostSheepbeefRequestVegetationInner.md | 32 - .../api-client/docs/PostSugar200Response.md | 36 - .../PostSugar200ResponseIntermediateInner.md | 36 - ...200ResponseIntermediateInnerIntensities.md | 31 - .../api-client/docs/PostSugarRequest.md | 34 - .../docs/PostSugarRequestCropsInner.md | 50 - .../docs/PostVineyard200Response.md | 36 - ...ostVineyard200ResponseIntermediateInner.md | 36 - ...200ResponseIntermediateInnerIntensities.md | 31 - .../docs/PostVineyard200ResponseNet.md | 31 - .../docs/PostVineyard200ResponseScope1.md | 44 - .../docs/PostVineyard200ResponseScope3.md | 39 - .../api-client/docs/PostVineyardRequest.md | 31 - .../PostVineyardRequestVegetationInner.md | 30 - .../docs/PostVineyardRequestVineyardsInner.md | 53 - .../docs/PostWildcatchfishery200Response.md | 37 - ...tWildcatchfishery200ResponseIntensities.md | 31 - ...atchfishery200ResponseIntermediateInner.md | 36 - .../PostWildcatchfishery200ResponseScope1.md | 40 - .../docs/PostWildcatchfisheryRequest.md | 30 - ...WildcatchfisheryRequestEnterprisesInner.md | 46 - ...fisheryRequestEnterprisesInnerBaitInner.md | 32 - .../docs/PostWildseafisheries200Response.md | 36 - ...eafisheries200ResponseIntermediateInner.md | 37 - ...200ResponseIntermediateInnerIntensities.md | 31 - .../PostWildseafisheries200ResponseScope1.md | 38 - .../PostWildseafisheries200ResponseScope3.md | 33 - .../docs/PostWildseafisheriesRequest.md | 30 - ...WildseafisheriesRequestEnterprisesInner.md | 43 - ...sheriesRequestEnterprisesInnerBaitInner.md | 32 - ...sRequestEnterprisesInnerCustombaitInner.md | 30 - ...riesRequestEnterprisesInnerFlightsInner.md | 30 - ...equestEnterprisesInnerRefrigerantsInner.md | 30 - ...sRequestEnterprisesInnerTransportsInner.md | 31 - .../api-client/test/__init__.py | 0 .../api-client/test/test_gaf_api.py | 172 -- .../test/test_post_aquaculture200_response.py | 103 -- ...ulture200_response_carbon_sequestration.py | 59 - ...ost_aquaculture200_response_intensities.py | 57 - ...aculture200_response_intermediate_inner.py | 89 - ...intermediate_inner_carbon_sequestration.py | 53 - .../test_post_aquaculture200_response_net.py | 53 - ...uaculture200_response_purchased_offsets.py | 53 - ...est_post_aquaculture200_response_scope1.py | 73 - ...est_post_aquaculture200_response_scope2.py | 55 - ...est_post_aquaculture200_response_scope3.py | 67 - .../test/test_post_aquaculture_request.py | 61 - ...t_aquaculture_request_enterprises_inner.py | 139 -- ...re_request_enterprises_inner_bait_inner.py | 59 - ...est_enterprises_inner_custom_bait_inner.py | 55 - ...est_enterprises_inner_fluid_waste_inner.py | 61 - ...aculture_request_enterprises_inner_fuel.py | 73 - ...prises_inner_fuel_stationary_fuel_inner.py | 55 - ...rprises_inner_fuel_transport_fuel_inner.py | 55 - ...enterprises_inner_inbound_freight_inner.py | 55 - ...st_enterprises_inner_refrigerants_inner.py | 55 - ...e_request_enterprises_inner_solid_waste.py | 55 - .../test/test_post_beef200_response.py | 97 -- ...ost_beef200_response_intermediate_inner.py | 85 - ...response_intermediate_inner_intensities.py | 57 - .../test/test_post_beef200_response_net.py | 55 - .../test/test_post_beef200_response_scope1.py | 85 - .../test/test_post_beef200_response_scope3.py | 69 - .../api-client/test/test_post_beef_request.py | 87 - .../test/test_post_beef_request_beef_inner.py | 102 -- ...st_post_beef_request_beef_inner_classes.py | 99 -- ...ef_request_beef_inner_classes_bulls_gt1.py | 87 - ...est_beef_inner_classes_bulls_gt1_autumn.py | 59 - ...inner_classes_bulls_gt1_purchases_inner.py | 57 - ...est_beef_inner_classes_bulls_gt1_traded.py | 87 - ...eef_request_beef_inner_classes_cows_gt2.py | 87 - ...uest_beef_inner_classes_cows_gt2_traded.py | 87 - ...request_beef_inner_classes_heifers1_to2.py | 87 - ..._beef_inner_classes_heifers1_to2_traded.py | 87 - ..._request_beef_inner_classes_heifers_gt2.py | 87 - ...t_beef_inner_classes_heifers_gt2_traded.py | 87 - ..._request_beef_inner_classes_heifers_lt1.py | 87 - ...t_beef_inner_classes_heifers_lt1_traded.py | 87 - ..._request_beef_inner_classes_steers1_to2.py | 87 - ...t_beef_inner_classes_steers1_to2_traded.py | 87 - ...f_request_beef_inner_classes_steers_gt2.py | 87 - ...st_beef_inner_classes_steers_gt2_traded.py | 87 - ...f_request_beef_inner_classes_steers_lt1.py | 87 - ...st_beef_inner_classes_steers_lt1_traded.py | 87 - ...st_beef_request_beef_inner_cows_calving.py | 59 - ...post_beef_request_beef_inner_fertiliser.py | 69 - ...nner_fertiliser_other_fertilisers_inner.py | 57 - ...uest_beef_inner_mineral_supplementation.py | 63 - .../test_post_beef_request_burning_inner.py | 63 - ...post_beef_request_burning_inner_burning.py | 65 - ...test_post_beef_request_vegetation_inner.py | 64 - ...eef_request_vegetation_inner_vegetation.py | 61 - .../test/test_post_buffalo200_response.py | 97 -- ...st_post_buffalo200_response_intensities.py | 57 - ..._buffalo200_response_intermediate_inner.py | 89 - .../test/test_post_buffalo200_response_net.py | 53 - .../test_post_buffalo200_response_scope1.py | 81 - .../test_post_buffalo200_response_scope3.py | 67 - .../test/test_post_buffalo_request.py | 75 - ...est_post_buffalo_request_buffalos_inner.py | 100 -- ..._buffalo_request_buffalos_inner_classes.py | 75 - ...lo_request_buffalos_inner_classes_bulls.py | 84 - ...est_buffalos_inner_classes_bulls_autumn.py | 53 - ...los_inner_classes_bulls_purchases_inner.py | 55 - ...lo_request_buffalos_inner_classes_calfs.py | 84 - ...alo_request_buffalos_inner_classes_cows.py | 84 - ...o_request_buffalos_inner_classes_steers.py | 84 - ...uest_buffalos_inner_classes_trade_bulls.py | 84 - ...uest_buffalos_inner_classes_trade_calfs.py | 84 - ...quest_buffalos_inner_classes_trade_cows.py | 84 - ...est_buffalos_inner_classes_trade_steers.py | 84 - ...alo_request_buffalos_inner_cows_calving.py | 59 - ...request_buffalos_inner_seasonal_calving.py | 59 - ...t_post_buffalo_request_vegetation_inner.py | 63 - .../test/test_post_cotton200_response.py | 101 -- ...t_cotton200_response_intermediate_inner.py | 89 - ...response_intermediate_inner_intensities.py | 79 - .../test/test_post_cotton200_response_net.py | 59 - .../test_post_cotton200_response_scope1.py | 81 - .../test_post_cotton200_response_scope3.py | 63 - .../test/test_post_cotton_request.py | 77 - .../test_post_cotton_request_crops_inner.py | 103 -- ...st_post_cotton_request_vegetation_inner.py | 63 - .../test/test_post_dairy200_response.py | 97 -- ...test_post_dairy200_response_intensities.py | 55 - ...st_dairy200_response_intermediate_inner.py | 89 - .../test/test_post_dairy200_response_net.py | 53 - .../test_post_dairy200_response_scope1.py | 91 -- .../test_post_dairy200_response_scope3.py | 65 - .../test/test_post_dairy_request.py | 77 - .../test_post_dairy_request_dairy_inner.py | 118 -- ...st_post_dairy_request_dairy_inner_areas.py | 59 - ..._post_dairy_request_dairy_inner_classes.py | 81 - ...est_dairy_inner_classes_dairy_bulls_gt1.py | 75 - ...est_dairy_inner_classes_dairy_bulls_lt1.py | 75 - ...request_dairy_inner_classes_heifers_gt1.py | 75 - ...request_dairy_inner_classes_heifers_lt1.py | 75 - ...equest_dairy_inner_classes_milking_cows.py | 75 - ...dairy_inner_classes_milking_cows_autumn.py | 60 - ...ry_inner_manure_management_milking_cows.py | 61 - ...request_dairy_inner_seasonal_fertiliser.py | 75 - ..._dairy_inner_seasonal_fertiliser_autumn.py | 59 - ...est_post_dairy_request_vegetation_inner.py | 63 - .../test/test_post_deer200_response.py | 97 -- .../test_post_deer200_response_intensities.py | 57 - ...ost_deer200_response_intermediate_inner.py | 89 - .../test/test_post_deer200_response_net.py | 53 - .../api-client/test/test_post_deer_request.py | 75 - .../test_post_deer_request_deers_inner.py | 100 -- ...t_post_deer_request_deers_inner_classes.py | 75 - ...quest_deers_inner_classes_breeding_does.py | 84 - ..._deer_request_deers_inner_classes_bucks.py | 84 - ...t_deer_request_deers_inner_classes_fawn.py | 84 - ..._request_deers_inner_classes_other_does.py | 84 - ...request_deers_inner_classes_trade_bucks.py | 84 - ..._request_deers_inner_classes_trade_does.py | 84 - ..._request_deers_inner_classes_trade_fawn.py | 84 - ...st_deers_inner_classes_trade_other_does.py | 84 - ...t_deer_request_deers_inner_does_fawning.py | 59 - ...er_request_deers_inner_seasonal_fawning.py | 59 - ...test_post_deer_request_vegetation_inner.py | 63 - .../test/test_post_feedlot200_response.py | 97 -- ..._feedlot200_response_intermediate_inner.py | 89 - ...response_intermediate_inner_intensities.py | 57 - ...dlot200_response_intermediate_inner_net.py | 53 - .../test_post_feedlot200_response_scope1.py | 87 - .../test_post_feedlot200_response_scope3.py | 67 - .../test/test_post_feedlot_request.py | 73 - ...est_post_feedlot_request_feedlots_inner.py | 112 -- ...lot_request_feedlots_inner_groups_inner.py | 61 - ...feedlots_inner_groups_inner_stays_inner.py | 69 - ...eedlot_request_feedlots_inner_purchases.py | 131 -- ...eedlots_inner_purchases_bulls_gt1_inner.py | 57 - ...st_feedlot_request_feedlots_inner_sales.py | 211 --- ...st_feedlots_inner_sales_bulls_gt1_inner.py | 55 - ...t_post_feedlot_request_vegetation_inner.py | 63 - .../test/test_post_goat200_response.py | 97 -- .../test_post_goat200_response_intensities.py | 63 - ...ost_goat200_response_intermediate_inner.py | 89 - .../test/test_post_goat200_response_net.py | 53 - .../api-client/test/test_post_goat_request.py | 75 - .../test_post_goat_request_goats_inner.py | 94 -- ...t_post_goat_request_goats_inner_classes.py | 90 -- ...ats_inner_classes_breeding_does_nannies.py | 92 -- ...request_goats_inner_classes_bucks_billy.py | 92 -- ...t_goat_request_goats_inner_classes_kids.py | 92 -- ...er_classes_maiden_breeding_does_nannies.py | 92 -- ...inner_classes_other_does_culled_females.py | 92 -- ...ner_classes_trade_breeding_does_nannies.py | 92 -- ...request_goats_inner_classes_trade_bucks.py | 92 -- ..._request_goats_inner_classes_trade_does.py | 92 -- ..._request_goats_inner_classes_trade_kids.py | 92 -- ...sses_trade_maiden_breeding_does_nannies.py | 92 -- ...classes_trade_other_does_culled_females.py | 92 -- ...quest_goats_inner_classes_trade_wethers.py | 92 -- ...oat_request_goats_inner_classes_wethers.py | 92 -- ...test_post_goat_request_vegetation_inner.py | 63 - .../test/test_post_grains200_response.py | 107 -- ...t_grains200_response_intermediate_inner.py | 89 - ...te_inner_intensities_with_sequestration.py | 57 - .../test/test_post_grains_request.py | 77 - .../test_post_grains_request_crops_inner.py | 94 -- .../test_post_horticulture200_response.py | 101 -- ...iculture200_response_intermediate_inner.py | 89 - ...te_inner_intensities_with_sequestration.py | 57 - ...st_post_horticulture200_response_scope1.py | 85 - .../test/test_post_horticulture_request.py | 77 - ...t_post_horticulture_request_crops_inner.py | 102 -- ..._request_crops_inner_refrigerants_inner.py | 55 - .../test/test_post_pork200_response.py | 97 -- .../test_post_pork200_response_intensities.py | 57 - ...ost_pork200_response_intermediate_inner.py | 85 - .../test/test_post_pork200_response_net.py | 53 - .../test/test_post_pork200_response_scope1.py | 85 - .../test/test_post_pork200_response_scope3.py | 69 - .../api-client/test/test_post_pork_request.py | 77 - .../test/test_post_pork_request_pork_inner.py | 96 -- ...st_post_pork_request_pork_inner_classes.py | 72 - ...t_pork_request_pork_inner_classes_boars.py | 76 - ...t_pork_request_pork_inner_classes_gilts.py | 76 - ...pork_request_pork_inner_classes_growers.py | 76 - ...quest_pork_inner_classes_slaughter_pigs.py | 76 - ...st_pork_request_pork_inner_classes_sows.py | 76 - ..._request_pork_inner_classes_sows_manure.py | 75 - ...t_pork_inner_classes_sows_manure_spring.py | 56 - ...pork_request_pork_inner_classes_suckers.py | 76 - ...pork_request_pork_inner_classes_weaners.py | 76 - ..._request_pork_inner_feed_products_inner.py | 63 - ...k_inner_feed_products_inner_ingredients.py | 63 - ...test_post_pork_request_vegetation_inner.py | 63 - .../test/test_post_poultry200_response.py | 107 -- ...st_post_poultry200_response_intensities.py | 63 - ...00_response_intermediate_broilers_inner.py | 89 - ...intermediate_broilers_inner_intensities.py | 57 - ...y200_response_intermediate_layers_inner.py | 89 - ...e_intermediate_layers_inner_intensities.py | 57 - .../test/test_post_poultry200_response_net.py | 57 - .../test_post_poultry200_response_scope1.py | 73 - .../test_post_poultry200_response_scope3.py | 65 - .../test/test_post_poultry_request.py | 87 - ...est_post_poultry_request_broilers_inner.py | 118 -- ...try_request_broilers_inner_groups_inner.py | 83 - ..._broilers_inner_groups_inner_feed_inner.py | 63 - ...ner_groups_inner_feed_inner_ingredients.py | 56 - ...inner_groups_inner_meat_chicken_growers.py | 66 - ...rs_inner_meat_chicken_growers_purchases.py | 55 - ...ers_inner_meat_chicken_layers_purchases.py | 55 - ...est_broilers_inner_meat_other_purchases.py | 55 - ...ltry_request_broilers_inner_sales_inner.py | 69 - .../test_post_poultry_request_layers_inner.py | 130 -- ...ost_poultry_request_layers_inner_layers.py | 59 - ...ry_request_layers_inner_layers_egg_sale.py | 55 - ...y_request_layers_inner_layers_purchases.py | 55 - ...equest_layers_inner_meat_chicken_layers.py | 59 - ...yers_inner_meat_chicken_layers_egg_sale.py | 55 - ...t_post_poultry_request_vegetation_inner.py | 69 - .../test/test_post_processing200_response.py | 107 -- ...rocessing200_response_intensities_inner.py | 59 - ...ocessing200_response_intermediate_inner.py | 89 - .../test_post_processing200_response_net.py | 53 - ...test_post_processing200_response_scope1.py | 75 - ...test_post_processing200_response_scope3.py | 59 - .../test/test_post_processing_request.py | 63 - ..._post_processing_request_products_inner.py | 99 -- ...ocessing_request_products_inner_product.py | 55 - .../test/test_post_rice200_response.py | 97 -- .../test_post_rice200_response_intensities.py | 59 - ...ost_rice200_response_intermediate_inner.py | 85 - ...response_intermediate_inner_intensities.py | 59 - .../test/test_post_rice200_response_scope1.py | 83 - .../api-client/test/test_post_rice_request.py | 77 - .../test_post_rice_request_crops_inner.py | 96 -- .../test/test_post_sheep200_response.py | 97 -- ...st_sheep200_response_intermediate_inner.py | 85 - ...response_intermediate_inner_intensities.py | 63 - .../test/test_post_sheep200_response_net.py | 55 - .../test/test_post_sheep_request.py | 77 - .../test_post_sheep_request_sheep_inner.py | 108 -- ..._post_sheep_request_sheep_inner_classes.py | 108 -- ..._sheep_request_sheep_inner_classes_rams.py | 92 -- ...request_sheep_inner_classes_rams_autumn.py | 60 - ..._request_sheep_inner_classes_trade_ewes.py | 92 -- ...p_inner_classes_trade_lambs_and_hoggets.py | 92 -- ..._sheep_request_sheep_inner_ewes_lambing.py | 59 - ...ep_request_sheep_inner_seasonal_lambing.py | 59 - ...est_post_sheep_request_vegetation_inner.py | 63 - .../test/test_post_sheepbeef200_response.py | 113 -- ..._post_sheepbeef200_response_intensities.py | 69 - ...post_sheepbeef200_response_intermediate.py | 63 - ...sheepbeef200_response_intermediate_beef.py | 83 - ...heepbeef200_response_intermediate_sheep.py | 83 - .../test_post_sheepbeef200_response_net.py | 57 - .../test/test_post_sheepbeef_request.py | 97 -- ...post_sheepbeef_request_vegetation_inner.py | 69 - .../test/test_post_sugar200_response.py | 101 -- ...st_sugar200_response_intermediate_inner.py | 85 - ...response_intermediate_inner_intensities.py | 57 - .../test/test_post_sugar_request.py | 77 - .../test_post_sugar_request_crops_inner.py | 93 -- .../test/test_post_vineyard200_response.py | 101 -- ...vineyard200_response_intermediate_inner.py | 85 - ...response_intermediate_inner_intensities.py | 57 - .../test_post_vineyard200_response_net.py | 59 - .../test_post_vineyard200_response_scope1.py | 81 - .../test_post_vineyard200_response_scope3.py | 71 - .../test/test_post_vineyard_request.py | 71 - ..._post_vineyard_request_vegetation_inner.py | 63 - ...t_post_vineyard_request_vineyards_inner.py | 132 -- .../test_post_wildcatchfishery200_response.py | 103 -- ...ildcatchfishery200_response_intensities.py | 57 - ...hfishery200_response_intermediate_inner.py | 89 - ...ost_wildcatchfishery200_response_scope1.py | 73 - .../test_post_wildcatchfishery_request.py | 61 - ...dcatchfishery_request_enterprises_inner.py | 139 -- ...ry_request_enterprises_inner_bait_inner.py | 59 - .../test_post_wildseafisheries200_response.py | 101 -- ...isheries200_response_intermediate_inner.py | 91 -- ...response_intermediate_inner_intensities.py | 57 - ...ost_wildseafisheries200_response_scope1.py | 69 - ...ost_wildseafisheries200_response_scope3.py | 59 - .../test_post_wildseafisheries_request.py | 61 - ...dseafisheries_request_enterprises_inner.py | 120 -- ...es_request_enterprises_inner_bait_inner.py | 59 - ...uest_enterprises_inner_custombait_inner.py | 55 - ...request_enterprises_inner_flights_inner.py | 55 - ...st_enterprises_inner_refrigerants_inner.py | 55 - ...uest_enterprises_inner_transports_inner.py | 57 - examples/python-api-client/generate.sh | 13 +- 588 files changed, 38 insertions(+), 35026 deletions(-) create mode 100644 examples/python-api-client/README.md delete mode 100644 examples/python-api-client/api-client/docs/GAFApi.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseCarbonSequestration.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseNet.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponsePurchasedOffsets.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope1.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope2.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope3.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerBaitInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuel.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerSolidWaste.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeef200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeef200ResponseNet.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeef200ResponseScope1.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeef200ResponseScope3.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClasses.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Traded.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2Traded.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2Traded.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2Traded.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1Traded.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerCowsCalving.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliser.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerMineralSupplementation.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBurningInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestBurningInnerBurning.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestVegetationInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostBeefRequestVegetationInnerVegetation.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffalo200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffalo200ResponseNet.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope1.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope3.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClasses.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBulls.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCalfs.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCows.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesSteers.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCows.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerCowsCalving.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerSeasonalCalving.md delete mode 100644 examples/python-api-client/api-client/docs/PostBuffaloRequestVegetationInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostCotton200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostCotton200ResponseNet.md delete mode 100644 examples/python-api-client/api-client/docs/PostCotton200ResponseScope1.md delete mode 100644 examples/python-api-client/api-client/docs/PostCotton200ResponseScope3.md delete mode 100644 examples/python-api-client/api-client/docs/PostCottonRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostCottonRequestCropsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostCottonRequestVegetationInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairy200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairy200ResponseIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairy200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairy200ResponseNet.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairy200ResponseScope1.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairy200ResponseScope3.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairyRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerAreas.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClasses.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsGt1.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsLt1.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersGt1.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersLt1.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCows.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerManureManagementMilkingCows.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliser.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md delete mode 100644 examples/python-api-client/api-client/docs/PostDairyRequestVegetationInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeer200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeer200ResponseIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeer200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeer200ResponseNet.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeerRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClasses.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBreedingDoes.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBucks.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesFawn.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesOtherDoes.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeBucks.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeDoes.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeFawn.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeOtherDoes.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerDoesFawning.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerSeasonalFawning.md delete mode 100644 examples/python-api-client/api-client/docs/PostDeerRequestVegetationInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlot200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerNet.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope1.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope3.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchases.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSales.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md delete mode 100644 examples/python-api-client/api-client/docs/PostFeedlotRequestVegetationInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoat200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoat200ResponseIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoat200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoat200ResponseNet.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClasses.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBucksBilly.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesKids.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBucks.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeDoes.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeKids.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeWethers.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesWethers.md delete mode 100644 examples/python-api-client/api-client/docs/PostGoatRequestVegetationInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostGrains200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md delete mode 100644 examples/python-api-client/api-client/docs/PostGrainsRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostGrainsRequestCropsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostHorticulture200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md delete mode 100644 examples/python-api-client/api-client/docs/PostHorticulture200ResponseScope1.md delete mode 100644 examples/python-api-client/api-client/docs/PostHorticultureRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInnerRefrigerantsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostPork200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostPork200ResponseIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostPork200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostPork200ResponseNet.md delete mode 100644 examples/python-api-client/api-client/docs/PostPork200ResponseScope1.md delete mode 100644 examples/python-api-client/api-client/docs/PostPork200ResponseScope3.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClasses.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesBoars.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGilts.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGrowers.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSlaughterPigs.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSows.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManure.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManureSpring.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSuckers.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesWeaners.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md delete mode 100644 examples/python-api-client/api-client/docs/PostPorkRequestVegetationInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultry200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInnerIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseNet.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseScope1.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultry200ResponseScope3.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatOtherPurchases.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerSalesInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestLayersInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayers.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersEggSale.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersPurchases.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayers.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md delete mode 100644 examples/python-api-client/api-client/docs/PostPoultryRequestVegetationInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostProcessing200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostProcessing200ResponseIntensitiesInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostProcessing200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostProcessing200ResponseNet.md delete mode 100644 examples/python-api-client/api-client/docs/PostProcessing200ResponseScope1.md delete mode 100644 examples/python-api-client/api-client/docs/PostProcessing200ResponseScope3.md delete mode 100644 examples/python-api-client/api-client/docs/PostProcessingRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostProcessingRequestProductsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostProcessingRequestProductsInnerProduct.md delete mode 100644 examples/python-api-client/api-client/docs/PostRice200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostRice200ResponseIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostRice200ResponseScope1.md delete mode 100644 examples/python-api-client/api-client/docs/PostRiceRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostRiceRequestCropsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheep200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheep200ResponseNet.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClasses.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRams.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRamsAutumn.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeEwes.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerEwesLambing.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerSeasonalLambing.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepRequestVegetationInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepbeef200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediate.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateBeef.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateSheep.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepbeef200ResponseNet.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepbeefRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostSheepbeefRequestVegetationInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostSugar200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostSugarRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostSugarRequestCropsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostVineyard200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostVineyard200ResponseNet.md delete mode 100644 examples/python-api-client/api-client/docs/PostVineyard200ResponseScope1.md delete mode 100644 examples/python-api-client/api-client/docs/PostVineyard200ResponseScope3.md delete mode 100644 examples/python-api-client/api-client/docs/PostVineyardRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostVineyardRequestVegetationInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostVineyardRequestVineyardsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildcatchfishery200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseScope1.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildcatchfisheryRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheries200Response.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInnerIntensities.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope1.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope3.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheriesRequest.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md delete mode 100644 examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md delete mode 100644 examples/python-api-client/api-client/test/__init__.py delete mode 100644 examples/python-api-client/api-client/test/test_gaf_api.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_carbon_sequestration.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner_carbon_sequestration.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_net.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_purchased_offsets.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope2.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope3.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_bait_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_custom_bait_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fluid_waste_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_inbound_freight_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_refrigerants_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_solid_waste.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef200_response_net.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef200_response_scope1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef200_response_scope3.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_autumn.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_traded.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2_traded.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2_traded.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2_traded.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1_traded.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2_traded.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2_traded.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1_traded.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_cows_calving.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_mineral_supplementation.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_burning_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_burning_inner_burning.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner_vegetation.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo200_response_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo200_response_net.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo200_response_scope1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo200_response_scope3.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_autumn.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_calfs.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_cows.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_steers.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_bulls.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_calfs.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_cows.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_steers.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_cows_calving.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_seasonal_calving.py delete mode 100644 examples/python-api-client/api-client/test/test_post_buffalo_request_vegetation_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_cotton200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_cotton200_response_net.py delete mode 100644 examples/python-api-client/api-client/test/test_post_cotton200_response_scope1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_cotton200_response_scope3.py delete mode 100644 examples/python-api-client/api-client/test/test_post_cotton_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_cotton_request_crops_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_cotton_request_vegetation_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy200_response_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy200_response_net.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy200_response_scope1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy200_response_scope3.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_areas.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_gt1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_lt1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows_autumn.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_manure_management_milking_cows.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py delete mode 100644 examples/python-api-client/api-client/test/test_post_dairy_request_vegetation_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer200_response_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer200_response_net.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_breeding_does.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_bucks.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_fawn.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_other_does.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_bucks.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_does.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_fawn.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_other_does.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_does_fawning.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_seasonal_fawning.py delete mode 100644 examples/python-api-client/api-client/test/test_post_deer_request_vegetation_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_net.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot200_response_scope1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot200_response_scope3.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_feedlot_request_vegetation_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat200_response_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat200_response_net.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_breeding_does_nannies.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_bucks_billy.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_kids.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_other_does_culled_females.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_bucks.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_does.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_kids.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_other_does_culled_females.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_wethers.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_wethers.py delete mode 100644 examples/python-api-client/api-client/test/test_post_goat_request_vegetation_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_grains200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner_intensities_with_sequestration.py delete mode 100644 examples/python-api-client/api-client/test/test_post_grains_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_grains_request_crops_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_horticulture200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py delete mode 100644 examples/python-api-client/api-client/test/test_post_horticulture200_response_scope1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_horticulture_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner_refrigerants_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork200_response_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork200_response_net.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork200_response_scope1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork200_response_scope3.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_boars.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_gilts.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_growers.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_slaughter_pigs.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure_spring.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_suckers.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_weaners.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner_ingredients.py delete mode 100644 examples/python-api-client/api-client/test/test_post_pork_request_vegetation_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_net.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_scope1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry200_response_scope3.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_other_purchases.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_sales_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_egg_sale.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_purchases.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py delete mode 100644 examples/python-api-client/api-client/test/test_post_poultry_request_vegetation_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_processing200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_processing200_response_intensities_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_processing200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_processing200_response_net.py delete mode 100644 examples/python-api-client/api-client/test/test_post_processing200_response_scope1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_processing200_response_scope3.py delete mode 100644 examples/python-api-client/api-client/test/test_post_processing_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_processing_request_products_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_processing_request_products_inner_product.py delete mode 100644 examples/python-api-client/api-client/test/test_post_rice200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_rice200_response_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_rice200_response_scope1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_rice_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_rice_request_crops_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheep200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheep200_response_net.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams_autumn.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_ewes.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_ewes_lambing.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_seasonal_lambing.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheep_request_vegetation_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_beef.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_sheep.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef200_response_net.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sheepbeef_request_vegetation_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sugar200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sugar_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_sugar_request_crops_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_vineyard200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_vineyard200_response_net.py delete mode 100644 examples/python-api-client/api-client/test/test_post_vineyard200_response_scope1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_vineyard200_response_scope3.py delete mode 100644 examples/python-api-client/api-client/test/test_post_vineyard_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_vineyard_request_vegetation_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_vineyard_request_vineyards_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_scope1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildcatchfishery_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner_bait_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries200_response.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner_intensities.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope1.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope3.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries_request.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_bait_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_custombait_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_flights_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py delete mode 100644 examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_transports_inner.py diff --git a/examples/python-api-client/README.md b/examples/python-api-client/README.md new file mode 100644 index 00000000..f11311e9 --- /dev/null +++ b/examples/python-api-client/README.md @@ -0,0 +1,31 @@ +# Example PHP API client for the AIA Carbon Calculators API + +This example shows how to call the REST API available at https://emissionscalculator-mtls.production.aiaapi.com/calculator/3.0.0 using a simple PHP script. + +## Running the example + +You can execute a simple request to the `beef` endpoint using the example provided. You just need to update the calls `$config->setCertFile` and `$config->setKeyFile` in [example.php](./api-client/example.php) so they point to your client certificate and key files. This allows the client to authenticate with the endpoint via mTLS. Once that has been done you just need to run: + +``` +cd api-client +composer install +php example.php +``` + +## Code generation + +The PHP API client has been generated using the [openapi-generator-cli](https://www.npmjs.com/package/@openapitools/openapi-generator-cli) tool. The generation can be reproduced with a script like: + +``` +API_CLIENT_DIR=api-client +API_VERSION=3.0.0 +rm -rf $API_CLIENT_DIR + +npm -g install @openapitools/openapi-generator-cli +openapi-generator-cli generate \ + -i https://d2awla29kxgk7i.cloudfront.net/api/$API_VERSION/openapi.json \ + -g php \ + -o $API_CLIENT_DIR +``` + +For now, the PHP generator does not support all the configuration needed for an mTLS connection out of the box. Several fixes have been applied to the generated code in the `api-client` folder to let this work end to end. Once this [PR](https://github.com/OpenAPITools/openapi-generator/pull/22229) has been merged and released, it will be possible to make requests via mTLS without any code changes to the generated PHP client code needed. diff --git a/examples/python-api-client/api-client/.openapi-generator/FILES b/examples/python-api-client/api-client/.openapi-generator/FILES index 5bcf5dd0..75994241 100644 --- a/examples/python-api-client/api-client/.openapi-generator/FILES +++ b/examples/python-api-client/api-client/.openapi-generator/FILES @@ -4,298 +4,6 @@ .openapi-generator-ignore .travis.yml README.md -docs/GAFApi.md -docs/PostAquaculture200Response.md -docs/PostAquaculture200ResponseCarbonSequestration.md -docs/PostAquaculture200ResponseIntensities.md -docs/PostAquaculture200ResponseIntermediateInner.md -docs/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md -docs/PostAquaculture200ResponseNet.md -docs/PostAquaculture200ResponsePurchasedOffsets.md -docs/PostAquaculture200ResponseScope1.md -docs/PostAquaculture200ResponseScope2.md -docs/PostAquaculture200ResponseScope3.md -docs/PostAquacultureRequest.md -docs/PostAquacultureRequestEnterprisesInner.md -docs/PostAquacultureRequestEnterprisesInnerBaitInner.md -docs/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md -docs/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md -docs/PostAquacultureRequestEnterprisesInnerFuel.md -docs/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md -docs/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md -docs/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md -docs/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md -docs/PostAquacultureRequestEnterprisesInnerSolidWaste.md -docs/PostBeef200Response.md -docs/PostBeef200ResponseIntermediateInner.md -docs/PostBeef200ResponseIntermediateInnerIntensities.md -docs/PostBeef200ResponseNet.md -docs/PostBeef200ResponseScope1.md -docs/PostBeef200ResponseScope3.md -docs/PostBeefRequest.md -docs/PostBeefRequestBeefInner.md -docs/PostBeefRequestBeefInnerClasses.md -docs/PostBeefRequestBeefInnerClassesBullsGt1.md -docs/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md -docs/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md -docs/PostBeefRequestBeefInnerClassesBullsGt1Traded.md -docs/PostBeefRequestBeefInnerClassesCowsGt2.md -docs/PostBeefRequestBeefInnerClassesCowsGt2Traded.md -docs/PostBeefRequestBeefInnerClassesHeifers1To2.md -docs/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md -docs/PostBeefRequestBeefInnerClassesHeifersGt2.md -docs/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md -docs/PostBeefRequestBeefInnerClassesHeifersLt1.md -docs/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md -docs/PostBeefRequestBeefInnerClassesSteers1To2.md -docs/PostBeefRequestBeefInnerClassesSteers1To2Traded.md -docs/PostBeefRequestBeefInnerClassesSteersGt2.md -docs/PostBeefRequestBeefInnerClassesSteersGt2Traded.md -docs/PostBeefRequestBeefInnerClassesSteersLt1.md -docs/PostBeefRequestBeefInnerClassesSteersLt1Traded.md -docs/PostBeefRequestBeefInnerCowsCalving.md -docs/PostBeefRequestBeefInnerFertiliser.md -docs/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md -docs/PostBeefRequestBeefInnerMineralSupplementation.md -docs/PostBeefRequestBurningInner.md -docs/PostBeefRequestBurningInnerBurning.md -docs/PostBeefRequestVegetationInner.md -docs/PostBeefRequestVegetationInnerVegetation.md -docs/PostBuffalo200Response.md -docs/PostBuffalo200ResponseIntensities.md -docs/PostBuffalo200ResponseIntermediateInner.md -docs/PostBuffalo200ResponseNet.md -docs/PostBuffalo200ResponseScope1.md -docs/PostBuffalo200ResponseScope3.md -docs/PostBuffaloRequest.md -docs/PostBuffaloRequestBuffalosInner.md -docs/PostBuffaloRequestBuffalosInnerClasses.md -docs/PostBuffaloRequestBuffalosInnerClassesBulls.md -docs/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md -docs/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md -docs/PostBuffaloRequestBuffalosInnerClassesCalfs.md -docs/PostBuffaloRequestBuffalosInnerClassesCows.md -docs/PostBuffaloRequestBuffalosInnerClassesSteers.md -docs/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md -docs/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md -docs/PostBuffaloRequestBuffalosInnerClassesTradeCows.md -docs/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md -docs/PostBuffaloRequestBuffalosInnerCowsCalving.md -docs/PostBuffaloRequestBuffalosInnerSeasonalCalving.md -docs/PostBuffaloRequestVegetationInner.md -docs/PostCotton200Response.md -docs/PostCotton200ResponseIntermediateInner.md -docs/PostCotton200ResponseIntermediateInnerIntensities.md -docs/PostCotton200ResponseNet.md -docs/PostCotton200ResponseScope1.md -docs/PostCotton200ResponseScope3.md -docs/PostCottonRequest.md -docs/PostCottonRequestCropsInner.md -docs/PostCottonRequestVegetationInner.md -docs/PostDairy200Response.md -docs/PostDairy200ResponseIntensities.md -docs/PostDairy200ResponseIntermediateInner.md -docs/PostDairy200ResponseNet.md -docs/PostDairy200ResponseScope1.md -docs/PostDairy200ResponseScope3.md -docs/PostDairyRequest.md -docs/PostDairyRequestDairyInner.md -docs/PostDairyRequestDairyInnerAreas.md -docs/PostDairyRequestDairyInnerClasses.md -docs/PostDairyRequestDairyInnerClassesDairyBullsGt1.md -docs/PostDairyRequestDairyInnerClassesDairyBullsLt1.md -docs/PostDairyRequestDairyInnerClassesHeifersGt1.md -docs/PostDairyRequestDairyInnerClassesHeifersLt1.md -docs/PostDairyRequestDairyInnerClassesMilkingCows.md -docs/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md -docs/PostDairyRequestDairyInnerManureManagementMilkingCows.md -docs/PostDairyRequestDairyInnerSeasonalFertiliser.md -docs/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md -docs/PostDairyRequestVegetationInner.md -docs/PostDeer200Response.md -docs/PostDeer200ResponseIntensities.md -docs/PostDeer200ResponseIntermediateInner.md -docs/PostDeer200ResponseNet.md -docs/PostDeerRequest.md -docs/PostDeerRequestDeersInner.md -docs/PostDeerRequestDeersInnerClasses.md -docs/PostDeerRequestDeersInnerClassesBreedingDoes.md -docs/PostDeerRequestDeersInnerClassesBucks.md -docs/PostDeerRequestDeersInnerClassesFawn.md -docs/PostDeerRequestDeersInnerClassesOtherDoes.md -docs/PostDeerRequestDeersInnerClassesTradeBucks.md -docs/PostDeerRequestDeersInnerClassesTradeDoes.md -docs/PostDeerRequestDeersInnerClassesTradeFawn.md -docs/PostDeerRequestDeersInnerClassesTradeOtherDoes.md -docs/PostDeerRequestDeersInnerDoesFawning.md -docs/PostDeerRequestDeersInnerSeasonalFawning.md -docs/PostDeerRequestVegetationInner.md -docs/PostFeedlot200Response.md -docs/PostFeedlot200ResponseIntermediateInner.md -docs/PostFeedlot200ResponseIntermediateInnerIntensities.md -docs/PostFeedlot200ResponseIntermediateInnerNet.md -docs/PostFeedlot200ResponseScope1.md -docs/PostFeedlot200ResponseScope3.md -docs/PostFeedlotRequest.md -docs/PostFeedlotRequestFeedlotsInner.md -docs/PostFeedlotRequestFeedlotsInnerGroupsInner.md -docs/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md -docs/PostFeedlotRequestFeedlotsInnerPurchases.md -docs/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md -docs/PostFeedlotRequestFeedlotsInnerSales.md -docs/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md -docs/PostFeedlotRequestVegetationInner.md -docs/PostGoat200Response.md -docs/PostGoat200ResponseIntensities.md -docs/PostGoat200ResponseIntermediateInner.md -docs/PostGoat200ResponseNet.md -docs/PostGoatRequest.md -docs/PostGoatRequestGoatsInner.md -docs/PostGoatRequestGoatsInnerClasses.md -docs/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md -docs/PostGoatRequestGoatsInnerClassesBucksBilly.md -docs/PostGoatRequestGoatsInnerClassesKids.md -docs/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md -docs/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md -docs/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md -docs/PostGoatRequestGoatsInnerClassesTradeBucks.md -docs/PostGoatRequestGoatsInnerClassesTradeDoes.md -docs/PostGoatRequestGoatsInnerClassesTradeKids.md -docs/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md -docs/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md -docs/PostGoatRequestGoatsInnerClassesTradeWethers.md -docs/PostGoatRequestGoatsInnerClassesWethers.md -docs/PostGoatRequestVegetationInner.md -docs/PostGrains200Response.md -docs/PostGrains200ResponseIntermediateInner.md -docs/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md -docs/PostGrainsRequest.md -docs/PostGrainsRequestCropsInner.md -docs/PostHorticulture200Response.md -docs/PostHorticulture200ResponseIntermediateInner.md -docs/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md -docs/PostHorticulture200ResponseScope1.md -docs/PostHorticultureRequest.md -docs/PostHorticultureRequestCropsInner.md -docs/PostHorticultureRequestCropsInnerRefrigerantsInner.md -docs/PostPork200Response.md -docs/PostPork200ResponseIntensities.md -docs/PostPork200ResponseIntermediateInner.md -docs/PostPork200ResponseNet.md -docs/PostPork200ResponseScope1.md -docs/PostPork200ResponseScope3.md -docs/PostPorkRequest.md -docs/PostPorkRequestPorkInner.md -docs/PostPorkRequestPorkInnerClasses.md -docs/PostPorkRequestPorkInnerClassesBoars.md -docs/PostPorkRequestPorkInnerClassesGilts.md -docs/PostPorkRequestPorkInnerClassesGrowers.md -docs/PostPorkRequestPorkInnerClassesSlaughterPigs.md -docs/PostPorkRequestPorkInnerClassesSows.md -docs/PostPorkRequestPorkInnerClassesSowsManure.md -docs/PostPorkRequestPorkInnerClassesSowsManureSpring.md -docs/PostPorkRequestPorkInnerClassesSuckers.md -docs/PostPorkRequestPorkInnerClassesWeaners.md -docs/PostPorkRequestPorkInnerFeedProductsInner.md -docs/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md -docs/PostPorkRequestVegetationInner.md -docs/PostPoultry200Response.md -docs/PostPoultry200ResponseIntensities.md -docs/PostPoultry200ResponseIntermediateBroilersInner.md -docs/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md -docs/PostPoultry200ResponseIntermediateLayersInner.md -docs/PostPoultry200ResponseIntermediateLayersInnerIntensities.md -docs/PostPoultry200ResponseNet.md -docs/PostPoultry200ResponseScope1.md -docs/PostPoultry200ResponseScope3.md -docs/PostPoultryRequest.md -docs/PostPoultryRequestBroilersInner.md -docs/PostPoultryRequestBroilersInnerGroupsInner.md -docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md -docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md -docs/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md -docs/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md -docs/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md -docs/PostPoultryRequestBroilersInnerMeatOtherPurchases.md -docs/PostPoultryRequestBroilersInnerSalesInner.md -docs/PostPoultryRequestLayersInner.md -docs/PostPoultryRequestLayersInnerLayers.md -docs/PostPoultryRequestLayersInnerLayersEggSale.md -docs/PostPoultryRequestLayersInnerLayersPurchases.md -docs/PostPoultryRequestLayersInnerMeatChickenLayers.md -docs/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md -docs/PostPoultryRequestVegetationInner.md -docs/PostProcessing200Response.md -docs/PostProcessing200ResponseIntensitiesInner.md -docs/PostProcessing200ResponseIntermediateInner.md -docs/PostProcessing200ResponseNet.md -docs/PostProcessing200ResponseScope1.md -docs/PostProcessing200ResponseScope3.md -docs/PostProcessingRequest.md -docs/PostProcessingRequestProductsInner.md -docs/PostProcessingRequestProductsInnerProduct.md -docs/PostRice200Response.md -docs/PostRice200ResponseIntensities.md -docs/PostRice200ResponseIntermediateInner.md -docs/PostRice200ResponseIntermediateInnerIntensities.md -docs/PostRice200ResponseScope1.md -docs/PostRiceRequest.md -docs/PostRiceRequestCropsInner.md -docs/PostSheep200Response.md -docs/PostSheep200ResponseIntermediateInner.md -docs/PostSheep200ResponseIntermediateInnerIntensities.md -docs/PostSheep200ResponseNet.md -docs/PostSheepRequest.md -docs/PostSheepRequestSheepInner.md -docs/PostSheepRequestSheepInnerClasses.md -docs/PostSheepRequestSheepInnerClassesRams.md -docs/PostSheepRequestSheepInnerClassesRamsAutumn.md -docs/PostSheepRequestSheepInnerClassesTradeEwes.md -docs/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md -docs/PostSheepRequestSheepInnerEwesLambing.md -docs/PostSheepRequestSheepInnerSeasonalLambing.md -docs/PostSheepRequestVegetationInner.md -docs/PostSheepbeef200Response.md -docs/PostSheepbeef200ResponseIntensities.md -docs/PostSheepbeef200ResponseIntermediate.md -docs/PostSheepbeef200ResponseIntermediateBeef.md -docs/PostSheepbeef200ResponseIntermediateSheep.md -docs/PostSheepbeef200ResponseNet.md -docs/PostSheepbeefRequest.md -docs/PostSheepbeefRequestVegetationInner.md -docs/PostSugar200Response.md -docs/PostSugar200ResponseIntermediateInner.md -docs/PostSugar200ResponseIntermediateInnerIntensities.md -docs/PostSugarRequest.md -docs/PostSugarRequestCropsInner.md -docs/PostVineyard200Response.md -docs/PostVineyard200ResponseIntermediateInner.md -docs/PostVineyard200ResponseIntermediateInnerIntensities.md -docs/PostVineyard200ResponseNet.md -docs/PostVineyard200ResponseScope1.md -docs/PostVineyard200ResponseScope3.md -docs/PostVineyardRequest.md -docs/PostVineyardRequestVegetationInner.md -docs/PostVineyardRequestVineyardsInner.md -docs/PostWildcatchfishery200Response.md -docs/PostWildcatchfishery200ResponseIntensities.md -docs/PostWildcatchfishery200ResponseIntermediateInner.md -docs/PostWildcatchfishery200ResponseScope1.md -docs/PostWildcatchfisheryRequest.md -docs/PostWildcatchfisheryRequestEnterprisesInner.md -docs/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md -docs/PostWildseafisheries200Response.md -docs/PostWildseafisheries200ResponseIntermediateInner.md -docs/PostWildseafisheries200ResponseIntermediateInnerIntensities.md -docs/PostWildseafisheries200ResponseScope1.md -docs/PostWildseafisheries200ResponseScope3.md -docs/PostWildseafisheriesRequest.md -docs/PostWildseafisheriesRequestEnterprisesInner.md -docs/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md -docs/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md -docs/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md -docs/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md -docs/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md git_push.sh openapi_client/__init__.py openapi_client/api/__init__.py @@ -603,297 +311,4 @@ requirements.txt setup.cfg setup.py test-requirements.txt -test/__init__.py -test/test_gaf_api.py -test/test_post_aquaculture200_response.py -test/test_post_aquaculture200_response_carbon_sequestration.py -test/test_post_aquaculture200_response_intensities.py -test/test_post_aquaculture200_response_intermediate_inner.py -test/test_post_aquaculture200_response_intermediate_inner_carbon_sequestration.py -test/test_post_aquaculture200_response_net.py -test/test_post_aquaculture200_response_purchased_offsets.py -test/test_post_aquaculture200_response_scope1.py -test/test_post_aquaculture200_response_scope2.py -test/test_post_aquaculture200_response_scope3.py -test/test_post_aquaculture_request.py -test/test_post_aquaculture_request_enterprises_inner.py -test/test_post_aquaculture_request_enterprises_inner_bait_inner.py -test/test_post_aquaculture_request_enterprises_inner_custom_bait_inner.py -test/test_post_aquaculture_request_enterprises_inner_fluid_waste_inner.py -test/test_post_aquaculture_request_enterprises_inner_fuel.py -test/test_post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py -test/test_post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py -test/test_post_aquaculture_request_enterprises_inner_inbound_freight_inner.py -test/test_post_aquaculture_request_enterprises_inner_refrigerants_inner.py -test/test_post_aquaculture_request_enterprises_inner_solid_waste.py -test/test_post_beef200_response.py -test/test_post_beef200_response_intermediate_inner.py -test/test_post_beef200_response_intermediate_inner_intensities.py -test/test_post_beef200_response_net.py -test/test_post_beef200_response_scope1.py -test/test_post_beef200_response_scope3.py -test/test_post_beef_request.py -test/test_post_beef_request_beef_inner.py -test/test_post_beef_request_beef_inner_classes.py -test/test_post_beef_request_beef_inner_classes_bulls_gt1.py -test/test_post_beef_request_beef_inner_classes_bulls_gt1_autumn.py -test/test_post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py -test/test_post_beef_request_beef_inner_classes_bulls_gt1_traded.py -test/test_post_beef_request_beef_inner_classes_cows_gt2.py -test/test_post_beef_request_beef_inner_classes_cows_gt2_traded.py -test/test_post_beef_request_beef_inner_classes_heifers1_to2.py -test/test_post_beef_request_beef_inner_classes_heifers1_to2_traded.py -test/test_post_beef_request_beef_inner_classes_heifers_gt2.py -test/test_post_beef_request_beef_inner_classes_heifers_gt2_traded.py -test/test_post_beef_request_beef_inner_classes_heifers_lt1.py -test/test_post_beef_request_beef_inner_classes_heifers_lt1_traded.py -test/test_post_beef_request_beef_inner_classes_steers1_to2.py -test/test_post_beef_request_beef_inner_classes_steers1_to2_traded.py -test/test_post_beef_request_beef_inner_classes_steers_gt2.py -test/test_post_beef_request_beef_inner_classes_steers_gt2_traded.py -test/test_post_beef_request_beef_inner_classes_steers_lt1.py -test/test_post_beef_request_beef_inner_classes_steers_lt1_traded.py -test/test_post_beef_request_beef_inner_cows_calving.py -test/test_post_beef_request_beef_inner_fertiliser.py -test/test_post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py -test/test_post_beef_request_beef_inner_mineral_supplementation.py -test/test_post_beef_request_burning_inner.py -test/test_post_beef_request_burning_inner_burning.py -test/test_post_beef_request_vegetation_inner.py -test/test_post_beef_request_vegetation_inner_vegetation.py -test/test_post_buffalo200_response.py -test/test_post_buffalo200_response_intensities.py -test/test_post_buffalo200_response_intermediate_inner.py -test/test_post_buffalo200_response_net.py -test/test_post_buffalo200_response_scope1.py -test/test_post_buffalo200_response_scope3.py -test/test_post_buffalo_request.py -test/test_post_buffalo_request_buffalos_inner.py -test/test_post_buffalo_request_buffalos_inner_classes.py -test/test_post_buffalo_request_buffalos_inner_classes_bulls.py -test/test_post_buffalo_request_buffalos_inner_classes_bulls_autumn.py -test/test_post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py -test/test_post_buffalo_request_buffalos_inner_classes_calfs.py -test/test_post_buffalo_request_buffalos_inner_classes_cows.py -test/test_post_buffalo_request_buffalos_inner_classes_steers.py -test/test_post_buffalo_request_buffalos_inner_classes_trade_bulls.py -test/test_post_buffalo_request_buffalos_inner_classes_trade_calfs.py -test/test_post_buffalo_request_buffalos_inner_classes_trade_cows.py -test/test_post_buffalo_request_buffalos_inner_classes_trade_steers.py -test/test_post_buffalo_request_buffalos_inner_cows_calving.py -test/test_post_buffalo_request_buffalos_inner_seasonal_calving.py -test/test_post_buffalo_request_vegetation_inner.py -test/test_post_cotton200_response.py -test/test_post_cotton200_response_intermediate_inner.py -test/test_post_cotton200_response_intermediate_inner_intensities.py -test/test_post_cotton200_response_net.py -test/test_post_cotton200_response_scope1.py -test/test_post_cotton200_response_scope3.py -test/test_post_cotton_request.py -test/test_post_cotton_request_crops_inner.py -test/test_post_cotton_request_vegetation_inner.py -test/test_post_dairy200_response.py -test/test_post_dairy200_response_intensities.py -test/test_post_dairy200_response_intermediate_inner.py -test/test_post_dairy200_response_net.py -test/test_post_dairy200_response_scope1.py -test/test_post_dairy200_response_scope3.py -test/test_post_dairy_request.py -test/test_post_dairy_request_dairy_inner.py -test/test_post_dairy_request_dairy_inner_areas.py -test/test_post_dairy_request_dairy_inner_classes.py -test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py -test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py -test/test_post_dairy_request_dairy_inner_classes_heifers_gt1.py -test/test_post_dairy_request_dairy_inner_classes_heifers_lt1.py -test/test_post_dairy_request_dairy_inner_classes_milking_cows.py -test/test_post_dairy_request_dairy_inner_classes_milking_cows_autumn.py -test/test_post_dairy_request_dairy_inner_manure_management_milking_cows.py -test/test_post_dairy_request_dairy_inner_seasonal_fertiliser.py -test/test_post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py -test/test_post_dairy_request_vegetation_inner.py -test/test_post_deer200_response.py -test/test_post_deer200_response_intensities.py -test/test_post_deer200_response_intermediate_inner.py -test/test_post_deer200_response_net.py -test/test_post_deer_request.py -test/test_post_deer_request_deers_inner.py -test/test_post_deer_request_deers_inner_classes.py -test/test_post_deer_request_deers_inner_classes_breeding_does.py -test/test_post_deer_request_deers_inner_classes_bucks.py -test/test_post_deer_request_deers_inner_classes_fawn.py -test/test_post_deer_request_deers_inner_classes_other_does.py -test/test_post_deer_request_deers_inner_classes_trade_bucks.py -test/test_post_deer_request_deers_inner_classes_trade_does.py -test/test_post_deer_request_deers_inner_classes_trade_fawn.py -test/test_post_deer_request_deers_inner_classes_trade_other_does.py -test/test_post_deer_request_deers_inner_does_fawning.py -test/test_post_deer_request_deers_inner_seasonal_fawning.py -test/test_post_deer_request_vegetation_inner.py -test/test_post_feedlot200_response.py -test/test_post_feedlot200_response_intermediate_inner.py -test/test_post_feedlot200_response_intermediate_inner_intensities.py -test/test_post_feedlot200_response_intermediate_inner_net.py -test/test_post_feedlot200_response_scope1.py -test/test_post_feedlot200_response_scope3.py -test/test_post_feedlot_request.py -test/test_post_feedlot_request_feedlots_inner.py -test/test_post_feedlot_request_feedlots_inner_groups_inner.py -test/test_post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py -test/test_post_feedlot_request_feedlots_inner_purchases.py -test/test_post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py -test/test_post_feedlot_request_feedlots_inner_sales.py -test/test_post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py -test/test_post_feedlot_request_vegetation_inner.py -test/test_post_goat200_response.py -test/test_post_goat200_response_intensities.py -test/test_post_goat200_response_intermediate_inner.py -test/test_post_goat200_response_net.py -test/test_post_goat_request.py -test/test_post_goat_request_goats_inner.py -test/test_post_goat_request_goats_inner_classes.py -test/test_post_goat_request_goats_inner_classes_breeding_does_nannies.py -test/test_post_goat_request_goats_inner_classes_bucks_billy.py -test/test_post_goat_request_goats_inner_classes_kids.py -test/test_post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py -test/test_post_goat_request_goats_inner_classes_other_does_culled_females.py -test/test_post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py -test/test_post_goat_request_goats_inner_classes_trade_bucks.py -test/test_post_goat_request_goats_inner_classes_trade_does.py -test/test_post_goat_request_goats_inner_classes_trade_kids.py -test/test_post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py -test/test_post_goat_request_goats_inner_classes_trade_other_does_culled_females.py -test/test_post_goat_request_goats_inner_classes_trade_wethers.py -test/test_post_goat_request_goats_inner_classes_wethers.py -test/test_post_goat_request_vegetation_inner.py -test/test_post_grains200_response.py -test/test_post_grains200_response_intermediate_inner.py -test/test_post_grains200_response_intermediate_inner_intensities_with_sequestration.py -test/test_post_grains_request.py -test/test_post_grains_request_crops_inner.py -test/test_post_horticulture200_response.py -test/test_post_horticulture200_response_intermediate_inner.py -test/test_post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py -test/test_post_horticulture200_response_scope1.py -test/test_post_horticulture_request.py -test/test_post_horticulture_request_crops_inner.py -test/test_post_horticulture_request_crops_inner_refrigerants_inner.py -test/test_post_pork200_response.py -test/test_post_pork200_response_intensities.py -test/test_post_pork200_response_intermediate_inner.py -test/test_post_pork200_response_net.py -test/test_post_pork200_response_scope1.py -test/test_post_pork200_response_scope3.py -test/test_post_pork_request.py -test/test_post_pork_request_pork_inner.py -test/test_post_pork_request_pork_inner_classes.py -test/test_post_pork_request_pork_inner_classes_boars.py -test/test_post_pork_request_pork_inner_classes_gilts.py -test/test_post_pork_request_pork_inner_classes_growers.py -test/test_post_pork_request_pork_inner_classes_slaughter_pigs.py -test/test_post_pork_request_pork_inner_classes_sows.py -test/test_post_pork_request_pork_inner_classes_sows_manure.py -test/test_post_pork_request_pork_inner_classes_sows_manure_spring.py -test/test_post_pork_request_pork_inner_classes_suckers.py -test/test_post_pork_request_pork_inner_classes_weaners.py -test/test_post_pork_request_pork_inner_feed_products_inner.py -test/test_post_pork_request_pork_inner_feed_products_inner_ingredients.py -test/test_post_pork_request_vegetation_inner.py -test/test_post_poultry200_response.py -test/test_post_poultry200_response_intensities.py -test/test_post_poultry200_response_intermediate_broilers_inner.py -test/test_post_poultry200_response_intermediate_broilers_inner_intensities.py -test/test_post_poultry200_response_intermediate_layers_inner.py -test/test_post_poultry200_response_intermediate_layers_inner_intensities.py -test/test_post_poultry200_response_net.py -test/test_post_poultry200_response_scope1.py -test/test_post_poultry200_response_scope3.py -test/test_post_poultry_request.py -test/test_post_poultry_request_broilers_inner.py -test/test_post_poultry_request_broilers_inner_groups_inner.py -test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner.py -test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py -test/test_post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py -test/test_post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py -test/test_post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py -test/test_post_poultry_request_broilers_inner_meat_other_purchases.py -test/test_post_poultry_request_broilers_inner_sales_inner.py -test/test_post_poultry_request_layers_inner.py -test/test_post_poultry_request_layers_inner_layers.py -test/test_post_poultry_request_layers_inner_layers_egg_sale.py -test/test_post_poultry_request_layers_inner_layers_purchases.py -test/test_post_poultry_request_layers_inner_meat_chicken_layers.py -test/test_post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py -test/test_post_poultry_request_vegetation_inner.py -test/test_post_processing200_response.py -test/test_post_processing200_response_intensities_inner.py -test/test_post_processing200_response_intermediate_inner.py -test/test_post_processing200_response_net.py -test/test_post_processing200_response_scope1.py -test/test_post_processing200_response_scope3.py -test/test_post_processing_request.py -test/test_post_processing_request_products_inner.py -test/test_post_processing_request_products_inner_product.py -test/test_post_rice200_response.py -test/test_post_rice200_response_intensities.py -test/test_post_rice200_response_intermediate_inner.py -test/test_post_rice200_response_intermediate_inner_intensities.py -test/test_post_rice200_response_scope1.py -test/test_post_rice_request.py -test/test_post_rice_request_crops_inner.py -test/test_post_sheep200_response.py -test/test_post_sheep200_response_intermediate_inner.py -test/test_post_sheep200_response_intermediate_inner_intensities.py -test/test_post_sheep200_response_net.py -test/test_post_sheep_request.py -test/test_post_sheep_request_sheep_inner.py -test/test_post_sheep_request_sheep_inner_classes.py -test/test_post_sheep_request_sheep_inner_classes_rams.py -test/test_post_sheep_request_sheep_inner_classes_rams_autumn.py -test/test_post_sheep_request_sheep_inner_classes_trade_ewes.py -test/test_post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py -test/test_post_sheep_request_sheep_inner_ewes_lambing.py -test/test_post_sheep_request_sheep_inner_seasonal_lambing.py -test/test_post_sheep_request_vegetation_inner.py -test/test_post_sheepbeef200_response.py -test/test_post_sheepbeef200_response_intensities.py -test/test_post_sheepbeef200_response_intermediate.py -test/test_post_sheepbeef200_response_intermediate_beef.py -test/test_post_sheepbeef200_response_intermediate_sheep.py -test/test_post_sheepbeef200_response_net.py -test/test_post_sheepbeef_request.py -test/test_post_sheepbeef_request_vegetation_inner.py -test/test_post_sugar200_response.py -test/test_post_sugar200_response_intermediate_inner.py -test/test_post_sugar200_response_intermediate_inner_intensities.py -test/test_post_sugar_request.py -test/test_post_sugar_request_crops_inner.py -test/test_post_vineyard200_response.py -test/test_post_vineyard200_response_intermediate_inner.py -test/test_post_vineyard200_response_intermediate_inner_intensities.py -test/test_post_vineyard200_response_net.py -test/test_post_vineyard200_response_scope1.py -test/test_post_vineyard200_response_scope3.py -test/test_post_vineyard_request.py -test/test_post_vineyard_request_vegetation_inner.py -test/test_post_vineyard_request_vineyards_inner.py -test/test_post_wildcatchfishery200_response.py -test/test_post_wildcatchfishery200_response_intensities.py -test/test_post_wildcatchfishery200_response_intermediate_inner.py -test/test_post_wildcatchfishery200_response_scope1.py -test/test_post_wildcatchfishery_request.py -test/test_post_wildcatchfishery_request_enterprises_inner.py -test/test_post_wildcatchfishery_request_enterprises_inner_bait_inner.py -test/test_post_wildseafisheries200_response.py -test/test_post_wildseafisheries200_response_intermediate_inner.py -test/test_post_wildseafisheries200_response_intermediate_inner_intensities.py -test/test_post_wildseafisheries200_response_scope1.py -test/test_post_wildseafisheries200_response_scope3.py -test/test_post_wildseafisheries_request.py -test/test_post_wildseafisheries_request_enterprises_inner.py -test/test_post_wildseafisheries_request_enterprises_inner_bait_inner.py -test/test_post_wildseafisheries_request_enterprises_inner_custombait_inner.py -test/test_post_wildseafisheries_request_enterprises_inner_flights_inner.py -test/test_post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py -test/test_post_wildseafisheries_request_enterprises_inner_transports_inner.py tox.ini diff --git a/examples/python-api-client/api-client/docs/GAFApi.md b/examples/python-api-client/api-client/docs/GAFApi.md deleted file mode 100644 index 3c175316..00000000 --- a/examples/python-api-client/api-client/docs/GAFApi.md +++ /dev/null @@ -1,1428 +0,0 @@ -# openapi_client.GAFApi - -All URIs are relative to *https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_aquaculture**](GAFApi.md#post_aquaculture) | **POST** /aquaculture | Perform aquaculture calculation -[**post_beef**](GAFApi.md#post_beef) | **POST** /beef | Perform beef calculation -[**post_buffalo**](GAFApi.md#post_buffalo) | **POST** /buffalo | Perform buffalo calculation -[**post_cotton**](GAFApi.md#post_cotton) | **POST** /cotton | Perform cotton calculation -[**post_dairy**](GAFApi.md#post_dairy) | **POST** /dairy | Perform dairy calculation -[**post_deer**](GAFApi.md#post_deer) | **POST** /deer | Perform deer calculation -[**post_feedlot**](GAFApi.md#post_feedlot) | **POST** /feedlot | Perform feedlot calculation -[**post_goat**](GAFApi.md#post_goat) | **POST** /goat | Perform goat calculation -[**post_grains**](GAFApi.md#post_grains) | **POST** /grains | Perform grains calculation -[**post_horticulture**](GAFApi.md#post_horticulture) | **POST** /horticulture | Perform horticulture calculation -[**post_pork**](GAFApi.md#post_pork) | **POST** /pork | Perform pork calculation -[**post_poultry**](GAFApi.md#post_poultry) | **POST** /poultry | Perform poultry calculation -[**post_processing**](GAFApi.md#post_processing) | **POST** /processing | Perform processing calculation -[**post_rice**](GAFApi.md#post_rice) | **POST** /rice | Perform rice calculation -[**post_sheep**](GAFApi.md#post_sheep) | **POST** /sheep | Perform sheep calculation -[**post_sheepbeef**](GAFApi.md#post_sheepbeef) | **POST** /sheepbeef | Perform sheepbeef calculation -[**post_sugar**](GAFApi.md#post_sugar) | **POST** /sugar | Perform sugar calculation -[**post_vineyard**](GAFApi.md#post_vineyard) | **POST** /vineyard | Perform vineyard calculation -[**post_wildcatchfishery**](GAFApi.md#post_wildcatchfishery) | **POST** /wildcatchfishery | Perform wildcatchfishery calculation -[**post_wildseafisheries**](GAFApi.md#post_wildseafisheries) | **POST** /wildseafisheries | Perform wildseafisheries calculation - - -# **post_aquaculture** -> PostAquaculture200Response post_aquaculture(post_aquaculture_request) - -Perform aquaculture calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_aquaculture200_response import PostAquaculture200Response -from openapi_client.models.post_aquaculture_request import PostAquacultureRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_aquaculture_request = openapi_client.PostAquacultureRequest() # PostAquacultureRequest | - - try: - # Perform aquaculture calculation - api_response = api_instance.post_aquaculture(post_aquaculture_request) - print("The response of GAFApi->post_aquaculture:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_aquaculture: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_aquaculture_request** | [**PostAquacultureRequest**](PostAquacultureRequest.md)| | - -### Return type - -[**PostAquaculture200Response**](PostAquaculture200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_beef** -> PostBeef200Response post_beef(post_beef_request) - -Perform beef calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_beef200_response import PostBeef200Response -from openapi_client.models.post_beef_request import PostBeefRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_beef_request = openapi_client.PostBeefRequest() # PostBeefRequest | - - try: - # Perform beef calculation - api_response = api_instance.post_beef(post_beef_request) - print("The response of GAFApi->post_beef:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_beef: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_beef_request** | [**PostBeefRequest**](PostBeefRequest.md)| | - -### Return type - -[**PostBeef200Response**](PostBeef200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_buffalo** -> PostBuffalo200Response post_buffalo(post_buffalo_request) - -Perform buffalo calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_buffalo200_response import PostBuffalo200Response -from openapi_client.models.post_buffalo_request import PostBuffaloRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_buffalo_request = openapi_client.PostBuffaloRequest() # PostBuffaloRequest | - - try: - # Perform buffalo calculation - api_response = api_instance.post_buffalo(post_buffalo_request) - print("The response of GAFApi->post_buffalo:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_buffalo: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_buffalo_request** | [**PostBuffaloRequest**](PostBuffaloRequest.md)| | - -### Return type - -[**PostBuffalo200Response**](PostBuffalo200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_cotton** -> PostCotton200Response post_cotton(post_cotton_request) - -Perform cotton calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_cotton200_response import PostCotton200Response -from openapi_client.models.post_cotton_request import PostCottonRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_cotton_request = openapi_client.PostCottonRequest() # PostCottonRequest | - - try: - # Perform cotton calculation - api_response = api_instance.post_cotton(post_cotton_request) - print("The response of GAFApi->post_cotton:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_cotton: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_cotton_request** | [**PostCottonRequest**](PostCottonRequest.md)| | - -### Return type - -[**PostCotton200Response**](PostCotton200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_dairy** -> PostDairy200Response post_dairy(post_dairy_request) - -Perform dairy calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_dairy200_response import PostDairy200Response -from openapi_client.models.post_dairy_request import PostDairyRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_dairy_request = openapi_client.PostDairyRequest() # PostDairyRequest | - - try: - # Perform dairy calculation - api_response = api_instance.post_dairy(post_dairy_request) - print("The response of GAFApi->post_dairy:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_dairy: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_dairy_request** | [**PostDairyRequest**](PostDairyRequest.md)| | - -### Return type - -[**PostDairy200Response**](PostDairy200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_deer** -> PostDeer200Response post_deer(post_deer_request) - -Perform deer calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_deer200_response import PostDeer200Response -from openapi_client.models.post_deer_request import PostDeerRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_deer_request = openapi_client.PostDeerRequest() # PostDeerRequest | - - try: - # Perform deer calculation - api_response = api_instance.post_deer(post_deer_request) - print("The response of GAFApi->post_deer:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_deer: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_deer_request** | [**PostDeerRequest**](PostDeerRequest.md)| | - -### Return type - -[**PostDeer200Response**](PostDeer200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_feedlot** -> PostFeedlot200Response post_feedlot(post_feedlot_request) - -Perform feedlot calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_feedlot200_response import PostFeedlot200Response -from openapi_client.models.post_feedlot_request import PostFeedlotRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_feedlot_request = openapi_client.PostFeedlotRequest() # PostFeedlotRequest | - - try: - # Perform feedlot calculation - api_response = api_instance.post_feedlot(post_feedlot_request) - print("The response of GAFApi->post_feedlot:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_feedlot: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_feedlot_request** | [**PostFeedlotRequest**](PostFeedlotRequest.md)| | - -### Return type - -[**PostFeedlot200Response**](PostFeedlot200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_goat** -> PostGoat200Response post_goat(post_goat_request) - -Perform goat calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_goat200_response import PostGoat200Response -from openapi_client.models.post_goat_request import PostGoatRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_goat_request = openapi_client.PostGoatRequest() # PostGoatRequest | - - try: - # Perform goat calculation - api_response = api_instance.post_goat(post_goat_request) - print("The response of GAFApi->post_goat:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_goat: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_goat_request** | [**PostGoatRequest**](PostGoatRequest.md)| | - -### Return type - -[**PostGoat200Response**](PostGoat200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_grains** -> PostGrains200Response post_grains(post_grains_request) - -Perform grains calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_grains200_response import PostGrains200Response -from openapi_client.models.post_grains_request import PostGrainsRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_grains_request = openapi_client.PostGrainsRequest() # PostGrainsRequest | - - try: - # Perform grains calculation - api_response = api_instance.post_grains(post_grains_request) - print("The response of GAFApi->post_grains:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_grains: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_grains_request** | [**PostGrainsRequest**](PostGrainsRequest.md)| | - -### Return type - -[**PostGrains200Response**](PostGrains200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_horticulture** -> PostHorticulture200Response post_horticulture(post_horticulture_request) - -Perform horticulture calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_horticulture200_response import PostHorticulture200Response -from openapi_client.models.post_horticulture_request import PostHorticultureRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_horticulture_request = openapi_client.PostHorticultureRequest() # PostHorticultureRequest | - - try: - # Perform horticulture calculation - api_response = api_instance.post_horticulture(post_horticulture_request) - print("The response of GAFApi->post_horticulture:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_horticulture: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_horticulture_request** | [**PostHorticultureRequest**](PostHorticultureRequest.md)| | - -### Return type - -[**PostHorticulture200Response**](PostHorticulture200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_pork** -> PostPork200Response post_pork(post_pork_request) - -Perform pork calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_pork200_response import PostPork200Response -from openapi_client.models.post_pork_request import PostPorkRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_pork_request = openapi_client.PostPorkRequest() # PostPorkRequest | - - try: - # Perform pork calculation - api_response = api_instance.post_pork(post_pork_request) - print("The response of GAFApi->post_pork:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_pork: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_pork_request** | [**PostPorkRequest**](PostPorkRequest.md)| | - -### Return type - -[**PostPork200Response**](PostPork200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_poultry** -> PostPoultry200Response post_poultry(post_poultry_request) - -Perform poultry calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_poultry200_response import PostPoultry200Response -from openapi_client.models.post_poultry_request import PostPoultryRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_poultry_request = openapi_client.PostPoultryRequest() # PostPoultryRequest | - - try: - # Perform poultry calculation - api_response = api_instance.post_poultry(post_poultry_request) - print("The response of GAFApi->post_poultry:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_poultry: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_poultry_request** | [**PostPoultryRequest**](PostPoultryRequest.md)| | - -### Return type - -[**PostPoultry200Response**](PostPoultry200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_processing** -> PostProcessing200Response post_processing(post_processing_request) - -Perform processing calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_processing200_response import PostProcessing200Response -from openapi_client.models.post_processing_request import PostProcessingRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_processing_request = openapi_client.PostProcessingRequest() # PostProcessingRequest | - - try: - # Perform processing calculation - api_response = api_instance.post_processing(post_processing_request) - print("The response of GAFApi->post_processing:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_processing: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_processing_request** | [**PostProcessingRequest**](PostProcessingRequest.md)| | - -### Return type - -[**PostProcessing200Response**](PostProcessing200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_rice** -> PostRice200Response post_rice(post_rice_request) - -Perform rice calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_rice200_response import PostRice200Response -from openapi_client.models.post_rice_request import PostRiceRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_rice_request = openapi_client.PostRiceRequest() # PostRiceRequest | - - try: - # Perform rice calculation - api_response = api_instance.post_rice(post_rice_request) - print("The response of GAFApi->post_rice:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_rice: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_rice_request** | [**PostRiceRequest**](PostRiceRequest.md)| | - -### Return type - -[**PostRice200Response**](PostRice200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_sheep** -> PostSheep200Response post_sheep(post_sheep_request) - -Perform sheep calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_sheep200_response import PostSheep200Response -from openapi_client.models.post_sheep_request import PostSheepRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_sheep_request = openapi_client.PostSheepRequest() # PostSheepRequest | - - try: - # Perform sheep calculation - api_response = api_instance.post_sheep(post_sheep_request) - print("The response of GAFApi->post_sheep:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_sheep: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_sheep_request** | [**PostSheepRequest**](PostSheepRequest.md)| | - -### Return type - -[**PostSheep200Response**](PostSheep200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_sheepbeef** -> PostSheepbeef200Response post_sheepbeef(post_sheepbeef_request) - -Perform sheepbeef calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_sheepbeef200_response import PostSheepbeef200Response -from openapi_client.models.post_sheepbeef_request import PostSheepbeefRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_sheepbeef_request = openapi_client.PostSheepbeefRequest() # PostSheepbeefRequest | - - try: - # Perform sheepbeef calculation - api_response = api_instance.post_sheepbeef(post_sheepbeef_request) - print("The response of GAFApi->post_sheepbeef:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_sheepbeef: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_sheepbeef_request** | [**PostSheepbeefRequest**](PostSheepbeefRequest.md)| | - -### Return type - -[**PostSheepbeef200Response**](PostSheepbeef200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_sugar** -> PostSugar200Response post_sugar(post_sugar_request) - -Perform sugar calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_sugar200_response import PostSugar200Response -from openapi_client.models.post_sugar_request import PostSugarRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_sugar_request = openapi_client.PostSugarRequest() # PostSugarRequest | - - try: - # Perform sugar calculation - api_response = api_instance.post_sugar(post_sugar_request) - print("The response of GAFApi->post_sugar:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_sugar: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_sugar_request** | [**PostSugarRequest**](PostSugarRequest.md)| | - -### Return type - -[**PostSugar200Response**](PostSugar200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_vineyard** -> PostVineyard200Response post_vineyard(post_vineyard_request) - -Perform vineyard calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_vineyard200_response import PostVineyard200Response -from openapi_client.models.post_vineyard_request import PostVineyardRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_vineyard_request = openapi_client.PostVineyardRequest() # PostVineyardRequest | - - try: - # Perform vineyard calculation - api_response = api_instance.post_vineyard(post_vineyard_request) - print("The response of GAFApi->post_vineyard:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_vineyard: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_vineyard_request** | [**PostVineyardRequest**](PostVineyardRequest.md)| | - -### Return type - -[**PostVineyard200Response**](PostVineyard200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_wildcatchfishery** -> PostWildcatchfishery200Response post_wildcatchfishery(post_wildcatchfishery_request) - -Perform wildcatchfishery calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_wildcatchfishery200_response import PostWildcatchfishery200Response -from openapi_client.models.post_wildcatchfishery_request import PostWildcatchfisheryRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_wildcatchfishery_request = openapi_client.PostWildcatchfisheryRequest() # PostWildcatchfisheryRequest | - - try: - # Perform wildcatchfishery calculation - api_response = api_instance.post_wildcatchfishery(post_wildcatchfishery_request) - print("The response of GAFApi->post_wildcatchfishery:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_wildcatchfishery: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_wildcatchfishery_request** | [**PostWildcatchfisheryRequest**](PostWildcatchfisheryRequest.md)| | - -### Return type - -[**PostWildcatchfishery200Response**](PostWildcatchfishery200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **post_wildseafisheries** -> PostWildseafisheries200Response post_wildseafisheries(post_wildseafisheries_request) - -Perform wildseafisheries calculation - -Retrieve a simple JSON response - -### Example - - -```python -import openapi_client -from openapi_client.models.post_wildseafisheries200_response import PostWildseafisheries200Response -from openapi_client.models.post_wildseafisheries_request import PostWildseafisheriesRequest -from openapi_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://emissionscalculator-mtls.development.aiaapi.com/calculator/3.0.0" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.GAFApi(api_client) - post_wildseafisheries_request = openapi_client.PostWildseafisheriesRequest() # PostWildseafisheriesRequest | - - try: - # Perform wildseafisheries calculation - api_response = api_instance.post_wildseafisheries(post_wildseafisheries_request) - print("The response of GAFApi->post_wildseafisheries:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GAFApi->post_wildseafisheries: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_wildseafisheries_request** | [**PostWildseafisheriesRequest**](PostWildseafisheriesRequest.md)| | - -### Return type - -[**PostWildseafisheries200Response**](PostWildseafisheries200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Executes a calculation | - | -**401** | Unauthorized | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200Response.md b/examples/python-api-client/api-client/docs/PostAquaculture200Response.md deleted file mode 100644 index d8d307c1..00000000 --- a/examples/python-api-client/api-client/docs/PostAquaculture200Response.md +++ /dev/null @@ -1,37 +0,0 @@ -# PostAquaculture200Response - -Emissions calculation output for the `aquaculture` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostAquaculture200ResponseScope1**](PostAquaculture200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | -**purchased_offsets** | [**PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**intensities** | [**PostAquaculture200ResponseIntensities**](PostAquaculture200ResponseIntensities.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**List[PostAquaculture200ResponseIntermediateInner]**](PostAquaculture200ResponseIntermediateInner.md) | | - -## Example - -```python -from openapi_client.models.post_aquaculture200_response import PostAquaculture200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquaculture200Response from a JSON string -post_aquaculture200_response_instance = PostAquaculture200Response.from_json(json) -# print the JSON string representation of the object -print(PostAquaculture200Response.to_json()) - -# convert the object into a dict -post_aquaculture200_response_dict = post_aquaculture200_response_instance.to_dict() -# create an instance of PostAquaculture200Response from a dict -post_aquaculture200_response_from_dict = PostAquaculture200Response.from_dict(post_aquaculture200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseCarbonSequestration.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseCarbonSequestration.md deleted file mode 100644 index e164b6bd..00000000 --- a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseCarbonSequestration.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostAquaculture200ResponseCarbonSequestration - -Carbon sequestration, in tonnes-CO2e - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Annual amount of carbon sequestered, in tonnes-CO2e | -**intermediate** | **List[float]** | | - -## Example - -```python -from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquaculture200ResponseCarbonSequestration from a JSON string -post_aquaculture200_response_carbon_sequestration_instance = PostAquaculture200ResponseCarbonSequestration.from_json(json) -# print the JSON string representation of the object -print(PostAquaculture200ResponseCarbonSequestration.to_json()) - -# convert the object into a dict -post_aquaculture200_response_carbon_sequestration_dict = post_aquaculture200_response_carbon_sequestration_instance.to_dict() -# create an instance of PostAquaculture200ResponseCarbonSequestration from a dict -post_aquaculture200_response_carbon_sequestration_from_dict = PostAquaculture200ResponseCarbonSequestration.from_dict(post_aquaculture200_response_carbon_sequestration_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntensities.md deleted file mode 100644 index 8fca77b0..00000000 --- a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntensities.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostAquaculture200ResponseIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total_harvest_weight_kg** | **float** | Total harvest weight in kg | -**aquaculture_excluding_carbon_offsets** | **float** | Aquaculture emissions intensity excluding sequestration, in kg-CO2e/kg | -**aquaculture_including_carbon_offsets** | **float** | Aquaculture emissions intensity including sequestration, in kg-CO2e/kg | - -## Example - -```python -from openapi_client.models.post_aquaculture200_response_intensities import PostAquaculture200ResponseIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquaculture200ResponseIntensities from a JSON string -post_aquaculture200_response_intensities_instance = PostAquaculture200ResponseIntensities.from_json(json) -# print the JSON string representation of the object -print(PostAquaculture200ResponseIntensities.to_json()) - -# convert the object into a dict -post_aquaculture200_response_intensities_dict = post_aquaculture200_response_intensities_instance.to_dict() -# create an instance of PostAquaculture200ResponseIntensities from a dict -post_aquaculture200_response_intensities_from_dict = PostAquaculture200ResponseIntensities.from_dict(post_aquaculture200_response_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInner.md deleted file mode 100644 index 4ca23301..00000000 --- a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInner.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostAquaculture200ResponseIntermediateInner - -Intermediate emissions calculation output for the Aquaculture calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostAquaculture200ResponseScope1**](PostAquaculture200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | -**intensities** | [**PostAquaculture200ResponseIntensities**](PostAquaculture200ResponseIntensities.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -## Example - -```python -from openapi_client.models.post_aquaculture200_response_intermediate_inner import PostAquaculture200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquaculture200ResponseIntermediateInner from a JSON string -post_aquaculture200_response_intermediate_inner_instance = PostAquaculture200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostAquaculture200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_aquaculture200_response_intermediate_inner_dict = post_aquaculture200_response_intermediate_inner_instance.to_dict() -# create an instance of PostAquaculture200ResponseIntermediateInner from a dict -post_aquaculture200_response_intermediate_inner_from_dict = PostAquaculture200ResponseIntermediateInner.from_dict(post_aquaculture200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md deleted file mode 100644 index 954d92c3..00000000 --- a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostAquaculture200ResponseIntermediateInnerCarbonSequestration - -Carbon sequestration, in tonnes-CO2e - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Annual amount of carbon sequestered, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquaculture200ResponseIntermediateInnerCarbonSequestration from a JSON string -post_aquaculture200_response_intermediate_inner_carbon_sequestration_instance = PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_json(json) -# print the JSON string representation of the object -print(PostAquaculture200ResponseIntermediateInnerCarbonSequestration.to_json()) - -# convert the object into a dict -post_aquaculture200_response_intermediate_inner_carbon_sequestration_dict = post_aquaculture200_response_intermediate_inner_carbon_sequestration_instance.to_dict() -# create an instance of PostAquaculture200ResponseIntermediateInnerCarbonSequestration from a dict -post_aquaculture200_response_intermediate_inner_carbon_sequestration_from_dict = PostAquaculture200ResponseIntermediateInnerCarbonSequestration.from_dict(post_aquaculture200_response_intermediate_inner_carbon_sequestration_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseNet.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseNet.md deleted file mode 100644 index ffc612ae..00000000 --- a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseNet.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostAquaculture200ResponseNet - -Net emissions for the activity - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | - -## Example - -```python -from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquaculture200ResponseNet from a JSON string -post_aquaculture200_response_net_instance = PostAquaculture200ResponseNet.from_json(json) -# print the JSON string representation of the object -print(PostAquaculture200ResponseNet.to_json()) - -# convert the object into a dict -post_aquaculture200_response_net_dict = post_aquaculture200_response_net_instance.to_dict() -# create an instance of PostAquaculture200ResponseNet from a dict -post_aquaculture200_response_net_from_dict = PostAquaculture200ResponseNet.from_dict(post_aquaculture200_response_net_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponsePurchasedOffsets.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponsePurchasedOffsets.md deleted file mode 100644 index c8d9e27a..00000000 --- a/examples/python-api-client/api-client/docs/PostAquaculture200ResponsePurchasedOffsets.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostAquaculture200ResponsePurchasedOffsets - -Purchased offsets, in tonnes-CO2e - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Annual amount of carbon sequestered, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_aquaculture200_response_purchased_offsets import PostAquaculture200ResponsePurchasedOffsets - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquaculture200ResponsePurchasedOffsets from a JSON string -post_aquaculture200_response_purchased_offsets_instance = PostAquaculture200ResponsePurchasedOffsets.from_json(json) -# print the JSON string representation of the object -print(PostAquaculture200ResponsePurchasedOffsets.to_json()) - -# convert the object into a dict -post_aquaculture200_response_purchased_offsets_dict = post_aquaculture200_response_purchased_offsets_instance.to_dict() -# create an instance of PostAquaculture200ResponsePurchasedOffsets from a dict -post_aquaculture200_response_purchased_offsets_from_dict = PostAquaculture200ResponsePurchasedOffsets.from_dict(post_aquaculture200_response_purchased_offsets_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope1.md deleted file mode 100644 index 070d62ef..00000000 --- a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope1.md +++ /dev/null @@ -1,40 +0,0 @@ -# PostAquaculture200ResponseScope1 - -Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | -**waste_water_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | -**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_aquaculture200_response_scope1 import PostAquaculture200ResponseScope1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquaculture200ResponseScope1 from a JSON string -post_aquaculture200_response_scope1_instance = PostAquaculture200ResponseScope1.from_json(json) -# print the JSON string representation of the object -print(PostAquaculture200ResponseScope1.to_json()) - -# convert the object into a dict -post_aquaculture200_response_scope1_dict = post_aquaculture200_response_scope1_instance.to_dict() -# create an instance of PostAquaculture200ResponseScope1 from a dict -post_aquaculture200_response_scope1_from_dict = PostAquaculture200ResponseScope1.from_dict(post_aquaculture200_response_scope1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope2.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope2.md deleted file mode 100644 index a928790a..00000000 --- a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope2.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostAquaculture200ResponseScope2 - -Scope 2 greenhouse gas emissions are the emissions released to the atmosphere from the indirect consumption of an energy commodity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**total** | **float** | Total scope 2 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquaculture200ResponseScope2 from a JSON string -post_aquaculture200_response_scope2_instance = PostAquaculture200ResponseScope2.from_json(json) -# print the JSON string representation of the object -print(PostAquaculture200ResponseScope2.to_json()) - -# convert the object into a dict -post_aquaculture200_response_scope2_dict = post_aquaculture200_response_scope2_instance.to_dict() -# create an instance of PostAquaculture200ResponseScope2 from a dict -post_aquaculture200_response_scope2_from_dict = PostAquaculture200ResponseScope2.from_dict(post_aquaculture200_response_scope2_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope3.md deleted file mode 100644 index e49c5b04..00000000 --- a/examples/python-api-client/api-client/docs/PostAquaculture200ResponseScope3.md +++ /dev/null @@ -1,37 +0,0 @@ -# PostAquaculture200ResponseScope3 - -Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**purchased_bait** | **float** | Emissions from purchased bait, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**commercial_flights** | **float** | Emissions from commercial flights, in tonnes-CO2e | -**inbound_freight** | **float** | Emissions from inbound freight, in tonnes-CO2e | -**outbound_freight** | **float** | Emissions from outbound freight, in tonnes-CO2e | -**solid_waste_sent_offsite** | **float** | Emissions from solid waste sent offsite, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_aquaculture200_response_scope3 import PostAquaculture200ResponseScope3 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquaculture200ResponseScope3 from a JSON string -post_aquaculture200_response_scope3_instance = PostAquaculture200ResponseScope3.from_json(json) -# print the JSON string representation of the object -print(PostAquaculture200ResponseScope3.to_json()) - -# convert the object into a dict -post_aquaculture200_response_scope3_dict = post_aquaculture200_response_scope3_instance.to_dict() -# create an instance of PostAquaculture200ResponseScope3 from a dict -post_aquaculture200_response_scope3_from_dict = PostAquaculture200ResponseScope3.from_dict(post_aquaculture200_response_scope3_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequest.md b/examples/python-api-client/api-client/docs/PostAquacultureRequest.md deleted file mode 100644 index 51a83f6c..00000000 --- a/examples/python-api-client/api-client/docs/PostAquacultureRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostAquacultureRequest - -Input data required for the `aquaculture` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enterprises** | [**List[PostAquacultureRequestEnterprisesInner]**](PostAquacultureRequestEnterprisesInner.md) | | - -## Example - -```python -from openapi_client.models.post_aquaculture_request import PostAquacultureRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquacultureRequest from a JSON string -post_aquaculture_request_instance = PostAquacultureRequest.from_json(json) -# print the JSON string representation of the object -print(PostAquacultureRequest.to_json()) - -# convert the object into a dict -post_aquaculture_request_dict = post_aquaculture_request_instance.to_dict() -# create an instance of PostAquacultureRequest from a dict -post_aquaculture_request_from_dict = PostAquacultureRequest.from_dict(post_aquaculture_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInner.md deleted file mode 100644 index 0b8136c2..00000000 --- a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInner.md +++ /dev/null @@ -1,46 +0,0 @@ -# PostAquacultureRequestEnterprisesInner - -Input data required for a single aquaculture enterprise - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**production_system** | **str** | Production system of the aquaculture enterprise | -**total_harvest_kg** | **float** | Total harvest in kg | -**refrigerants** | [**List[PostAquacultureRequestEnterprisesInnerRefrigerantsInner]**](PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md) | Refrigerant type | -**bait** | [**List[PostAquacultureRequestEnterprisesInnerBaitInner]**](PostAquacultureRequestEnterprisesInnerBaitInner.md) | Bait purchases | -**custom_bait** | [**List[PostAquacultureRequestEnterprisesInnerCustomBaitInner]**](PostAquacultureRequestEnterprisesInnerCustomBaitInner.md) | Custom bait purchases | -**inbound_freight** | [**List[PostAquacultureRequestEnterprisesInnerInboundFreightInner]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods to the enterprise | -**outbound_freight** | [**List[PostAquacultureRequestEnterprisesInnerInboundFreightInner]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods from the enterprise | -**total_commercial_flights_km** | **float** | Total distance of commercial flights, in km (kilometers) | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**electricity_source** | **str** | Source of electricity | -**fuel** | [**PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | -**fluid_waste** | [**List[PostAquacultureRequestEnterprisesInnerFluidWasteInner]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | -**solid_waste** | [**PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | -**carbon_offsets** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | [optional] - -## Example - -```python -from openapi_client.models.post_aquaculture_request_enterprises_inner import PostAquacultureRequestEnterprisesInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquacultureRequestEnterprisesInner from a JSON string -post_aquaculture_request_enterprises_inner_instance = PostAquacultureRequestEnterprisesInner.from_json(json) -# print the JSON string representation of the object -print(PostAquacultureRequestEnterprisesInner.to_json()) - -# convert the object into a dict -post_aquaculture_request_enterprises_inner_dict = post_aquaculture_request_enterprises_inner_instance.to_dict() -# create an instance of PostAquacultureRequestEnterprisesInner from a dict -post_aquaculture_request_enterprises_inner_from_dict = PostAquacultureRequestEnterprisesInner.from_dict(post_aquaculture_request_enterprises_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerBaitInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerBaitInner.md deleted file mode 100644 index 47dfad2d..00000000 --- a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerBaitInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostAquacultureRequestEnterprisesInnerBaitInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | Bait product type | -**purchased_tonnes** | **float** | Purchased product in tonnes | -**additional_ingredients** | **float** | Additional ingredient fraction, from 0 to 1 | -**emissions_intensity** | **float** | Emissions intensity of additional ingredients, in kg CO2e/kg bait (default 0) | [default to 0] - -## Example - -```python -from openapi_client.models.post_aquaculture_request_enterprises_inner_bait_inner import PostAquacultureRequestEnterprisesInnerBaitInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquacultureRequestEnterprisesInnerBaitInner from a JSON string -post_aquaculture_request_enterprises_inner_bait_inner_instance = PostAquacultureRequestEnterprisesInnerBaitInner.from_json(json) -# print the JSON string representation of the object -print(PostAquacultureRequestEnterprisesInnerBaitInner.to_json()) - -# convert the object into a dict -post_aquaculture_request_enterprises_inner_bait_inner_dict = post_aquaculture_request_enterprises_inner_bait_inner_instance.to_dict() -# create an instance of PostAquacultureRequestEnterprisesInnerBaitInner from a dict -post_aquaculture_request_enterprises_inner_bait_inner_from_dict = PostAquacultureRequestEnterprisesInnerBaitInner.from_dict(post_aquaculture_request_enterprises_inner_bait_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md deleted file mode 100644 index 377ce290..00000000 --- a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerCustomBaitInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostAquacultureRequestEnterprisesInnerCustomBaitInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**purchased_tonnes** | **float** | Purchased product in tonnes | -**emissions_intensity** | **float** | Emissions intensity of product, in kg CO2e/kg bait | - -## Example - -```python -from openapi_client.models.post_aquaculture_request_enterprises_inner_custom_bait_inner import PostAquacultureRequestEnterprisesInnerCustomBaitInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquacultureRequestEnterprisesInnerCustomBaitInner from a JSON string -post_aquaculture_request_enterprises_inner_custom_bait_inner_instance = PostAquacultureRequestEnterprisesInnerCustomBaitInner.from_json(json) -# print the JSON string representation of the object -print(PostAquacultureRequestEnterprisesInnerCustomBaitInner.to_json()) - -# convert the object into a dict -post_aquaculture_request_enterprises_inner_custom_bait_inner_dict = post_aquaculture_request_enterprises_inner_custom_bait_inner_instance.to_dict() -# create an instance of PostAquacultureRequestEnterprisesInnerCustomBaitInner from a dict -post_aquaculture_request_enterprises_inner_custom_bait_inner_from_dict = PostAquacultureRequestEnterprisesInnerCustomBaitInner.from_dict(post_aquaculture_request_enterprises_inner_custom_bait_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md deleted file mode 100644 index 091b9bca..00000000 --- a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFluidWasteInner.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostAquacultureRequestEnterprisesInnerFluidWasteInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fluid_waste_kl** | **float** | Amount of fluid waste, in kL (kilolitres) | -**fluid_waste_treatment_type** | **str** | Type of fluid waste treatment | -**average_inlet_cod** | **float** | Average inlet COD (mg per litre) | -**average_outlet_cod** | **float** | Average outlet COD (mg per litre) | -**flared_combusted_fraction** | **float** | Fraction of waste flared or combusted, between 0 and 1 | - -## Example - -```python -from openapi_client.models.post_aquaculture_request_enterprises_inner_fluid_waste_inner import PostAquacultureRequestEnterprisesInnerFluidWasteInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquacultureRequestEnterprisesInnerFluidWasteInner from a JSON string -post_aquaculture_request_enterprises_inner_fluid_waste_inner_instance = PostAquacultureRequestEnterprisesInnerFluidWasteInner.from_json(json) -# print the JSON string representation of the object -print(PostAquacultureRequestEnterprisesInnerFluidWasteInner.to_json()) - -# convert the object into a dict -post_aquaculture_request_enterprises_inner_fluid_waste_inner_dict = post_aquaculture_request_enterprises_inner_fluid_waste_inner_instance.to_dict() -# create an instance of PostAquacultureRequestEnterprisesInnerFluidWasteInner from a dict -post_aquaculture_request_enterprises_inner_fluid_waste_inner_from_dict = PostAquacultureRequestEnterprisesInnerFluidWasteInner.from_dict(post_aquaculture_request_enterprises_inner_fluid_waste_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuel.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuel.md deleted file mode 100644 index bbd9d6f5..00000000 --- a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuel.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostAquacultureRequestEnterprisesInnerFuel - -Fuels used in this enterprise - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transport_fuel** | [**List[PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner]**](PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md) | A list of fuels used in transportation and vehicles | -**stationary_fuel** | [**List[PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner]**](PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md) | A list of fuels used in stationary applications | -**natural_gas** | **float** | Amount of natural gas consumed in Mj (megajoules) | - -## Example - -```python -from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel import PostAquacultureRequestEnterprisesInnerFuel - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquacultureRequestEnterprisesInnerFuel from a JSON string -post_aquaculture_request_enterprises_inner_fuel_instance = PostAquacultureRequestEnterprisesInnerFuel.from_json(json) -# print the JSON string representation of the object -print(PostAquacultureRequestEnterprisesInnerFuel.to_json()) - -# convert the object into a dict -post_aquaculture_request_enterprises_inner_fuel_dict = post_aquaculture_request_enterprises_inner_fuel_instance.to_dict() -# create an instance of PostAquacultureRequestEnterprisesInnerFuel from a dict -post_aquaculture_request_enterprises_inner_fuel_from_dict = PostAquacultureRequestEnterprisesInnerFuel.from_dict(post_aquaculture_request_enterprises_inner_fuel_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md deleted file mode 100644 index 75aa9973..00000000 --- a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | Type of fuel | -**amount_litres** | **float** | Amount of fuel consumed (litres) | - -## Example - -```python -from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner import PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner from a JSON string -post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner_instance = PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.from_json(json) -# print the JSON string representation of the object -print(PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.to_json()) - -# convert the object into a dict -post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner_dict = post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner_instance.to_dict() -# create an instance of PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner from a dict -post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner_from_dict = PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner.from_dict(post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md deleted file mode 100644 index 2ec794f9..00000000 --- a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | Type of fuel | -**amount_litres** | **float** | Amount of fuel consumed (litres) | - -## Example - -```python -from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner import PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner from a JSON string -post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner_instance = PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.from_json(json) -# print the JSON string representation of the object -print(PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.to_json()) - -# convert the object into a dict -post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner_dict = post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner_instance.to_dict() -# create an instance of PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner from a dict -post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner_from_dict = PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner.from_dict(post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md deleted file mode 100644 index 0c3ee098..00000000 --- a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerInboundFreightInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostAquacultureRequestEnterprisesInnerInboundFreightInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | Type of freight used | -**total_km_tonnes** | **float** | Total distance of freight, in kilometre tonnes | - -## Example - -```python -from openapi_client.models.post_aquaculture_request_enterprises_inner_inbound_freight_inner import PostAquacultureRequestEnterprisesInnerInboundFreightInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquacultureRequestEnterprisesInnerInboundFreightInner from a JSON string -post_aquaculture_request_enterprises_inner_inbound_freight_inner_instance = PostAquacultureRequestEnterprisesInnerInboundFreightInner.from_json(json) -# print the JSON string representation of the object -print(PostAquacultureRequestEnterprisesInnerInboundFreightInner.to_json()) - -# convert the object into a dict -post_aquaculture_request_enterprises_inner_inbound_freight_inner_dict = post_aquaculture_request_enterprises_inner_inbound_freight_inner_instance.to_dict() -# create an instance of PostAquacultureRequestEnterprisesInnerInboundFreightInner from a dict -post_aquaculture_request_enterprises_inner_inbound_freight_inner_from_dict = PostAquacultureRequestEnterprisesInnerInboundFreightInner.from_dict(post_aquaculture_request_enterprises_inner_inbound_freight_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md deleted file mode 100644 index ce9bc260..00000000 --- a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerRefrigerantsInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostAquacultureRequestEnterprisesInnerRefrigerantsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**refrigerant** | **str** | Refrigerant type | -**charge_size** | **float** | Amount of refrigerant contained in the appliance, in kg | - -## Example - -```python -from openapi_client.models.post_aquaculture_request_enterprises_inner_refrigerants_inner import PostAquacultureRequestEnterprisesInnerRefrigerantsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquacultureRequestEnterprisesInnerRefrigerantsInner from a JSON string -post_aquaculture_request_enterprises_inner_refrigerants_inner_instance = PostAquacultureRequestEnterprisesInnerRefrigerantsInner.from_json(json) -# print the JSON string representation of the object -print(PostAquacultureRequestEnterprisesInnerRefrigerantsInner.to_json()) - -# convert the object into a dict -post_aquaculture_request_enterprises_inner_refrigerants_inner_dict = post_aquaculture_request_enterprises_inner_refrigerants_inner_instance.to_dict() -# create an instance of PostAquacultureRequestEnterprisesInnerRefrigerantsInner from a dict -post_aquaculture_request_enterprises_inner_refrigerants_inner_from_dict = PostAquacultureRequestEnterprisesInnerRefrigerantsInner.from_dict(post_aquaculture_request_enterprises_inner_refrigerants_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerSolidWaste.md b/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerSolidWaste.md deleted file mode 100644 index 4e8cdef2..00000000 --- a/examples/python-api-client/api-client/docs/PostAquacultureRequestEnterprisesInnerSolidWaste.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostAquacultureRequestEnterprisesInnerSolidWaste - -Solid waste management - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sent_offsite_tonnes** | **float** | Amount of solid waste sent offsite to landfill, in tonnes | -**onsite_composting_tonnes** | **float** | Amount of solid waste composted on site, in tonnes | - -## Example - -```python -from openapi_client.models.post_aquaculture_request_enterprises_inner_solid_waste import PostAquacultureRequestEnterprisesInnerSolidWaste - -# TODO update the JSON string below -json = "{}" -# create an instance of PostAquacultureRequestEnterprisesInnerSolidWaste from a JSON string -post_aquaculture_request_enterprises_inner_solid_waste_instance = PostAquacultureRequestEnterprisesInnerSolidWaste.from_json(json) -# print the JSON string representation of the object -print(PostAquacultureRequestEnterprisesInnerSolidWaste.to_json()) - -# convert the object into a dict -post_aquaculture_request_enterprises_inner_solid_waste_dict = post_aquaculture_request_enterprises_inner_solid_waste_instance.to_dict() -# create an instance of PostAquacultureRequestEnterprisesInnerSolidWaste from a dict -post_aquaculture_request_enterprises_inner_solid_waste_from_dict = PostAquacultureRequestEnterprisesInnerSolidWaste.from_dict(post_aquaculture_request_enterprises_inner_solid_waste_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeef200Response.md b/examples/python-api-client/api-client/docs/PostBeef200Response.md deleted file mode 100644 index 0d7211a7..00000000 --- a/examples/python-api-client/api-client/docs/PostBeef200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostBeef200Response - -Emissions calculation output for the `beef` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**List[PostBeef200ResponseIntermediateInner]**](PostBeef200ResponseIntermediateInner.md) | | -**net** | [**PostBeef200ResponseNet**](PostBeef200ResponseNet.md) | | -**intensities** | [**PostBeef200ResponseIntermediateInnerIntensities**](PostBeef200ResponseIntermediateInnerIntensities.md) | | - -## Example - -```python -from openapi_client.models.post_beef200_response import PostBeef200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeef200Response from a JSON string -post_beef200_response_instance = PostBeef200Response.from_json(json) -# print the JSON string representation of the object -print(PostBeef200Response.to_json()) - -# convert the object into a dict -post_beef200_response_dict = post_beef200_response_instance.to_dict() -# create an instance of PostBeef200Response from a dict -post_beef200_response_from_dict = PostBeef200Response.from_dict(post_beef200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInner.md deleted file mode 100644 index 708f6998..00000000 --- a/examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInner.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostBeef200ResponseIntermediateInner - -Intermediate emissions calculation output for the Beef calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**intensities** | [**PostBeef200ResponseIntermediateInnerIntensities**](PostBeef200ResponseIntermediateInnerIntensities.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -## Example - -```python -from openapi_client.models.post_beef200_response_intermediate_inner import PostBeef200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeef200ResponseIntermediateInner from a JSON string -post_beef200_response_intermediate_inner_instance = PostBeef200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostBeef200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_beef200_response_intermediate_inner_dict = post_beef200_response_intermediate_inner_instance.to_dict() -# create an instance of PostBeef200ResponseIntermediateInner from a dict -post_beef200_response_intermediate_inner_from_dict = PostBeef200ResponseIntermediateInner.from_dict(post_beef200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index 0f356a3a..00000000 --- a/examples/python-api-client/api-client/docs/PostBeef200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostBeef200ResponseIntermediateInnerIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**liveweight_beef_produced_kg** | **float** | Amount of beef produced in kg liveweight | -**beef_excluding_sequestration** | **float** | Beef excluding sequestration, in kg-CO2e/kg liveweight | -**beef_including_sequestration** | **float** | Beef including sequestration, in kg-CO2e/kg liveweight | - -## Example - -```python -from openapi_client.models.post_beef200_response_intermediate_inner_intensities import PostBeef200ResponseIntermediateInnerIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeef200ResponseIntermediateInnerIntensities from a JSON string -post_beef200_response_intermediate_inner_intensities_instance = PostBeef200ResponseIntermediateInnerIntensities.from_json(json) -# print the JSON string representation of the object -print(PostBeef200ResponseIntermediateInnerIntensities.to_json()) - -# convert the object into a dict -post_beef200_response_intermediate_inner_intensities_dict = post_beef200_response_intermediate_inner_intensities_instance.to_dict() -# create an instance of PostBeef200ResponseIntermediateInnerIntensities from a dict -post_beef200_response_intermediate_inner_intensities_from_dict = PostBeef200ResponseIntermediateInnerIntensities.from_dict(post_beef200_response_intermediate_inner_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeef200ResponseNet.md b/examples/python-api-client/api-client/docs/PostBeef200ResponseNet.md deleted file mode 100644 index 9e31730e..00000000 --- a/examples/python-api-client/api-client/docs/PostBeef200ResponseNet.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostBeef200ResponseNet - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | -**beef** | **float** | Net emissions of beef, in tonnes-CO2e/year | - -## Example - -```python -from openapi_client.models.post_beef200_response_net import PostBeef200ResponseNet - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeef200ResponseNet from a JSON string -post_beef200_response_net_instance = PostBeef200ResponseNet.from_json(json) -# print the JSON string representation of the object -print(PostBeef200ResponseNet.to_json()) - -# convert the object into a dict -post_beef200_response_net_dict = post_beef200_response_net_instance.to_dict() -# create an instance of PostBeef200ResponseNet from a dict -post_beef200_response_net_from_dict = PostBeef200ResponseNet.from_dict(post_beef200_response_net_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeef200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostBeef200ResponseScope1.md deleted file mode 100644 index ad29e01b..00000000 --- a/examples/python-api-client/api-client/docs/PostBeef200ResponseScope1.md +++ /dev/null @@ -1,46 +0,0 @@ -# PostBeef200ResponseScope1 - -Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | -**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | -**urine_and_dung_n2_o** | **float** | N2O emissions from urine and dung, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**savannah_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | -**savannah_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_beef200_response_scope1 import PostBeef200ResponseScope1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeef200ResponseScope1 from a JSON string -post_beef200_response_scope1_instance = PostBeef200ResponseScope1.from_json(json) -# print the JSON string representation of the object -print(PostBeef200ResponseScope1.to_json()) - -# convert the object into a dict -post_beef200_response_scope1_dict = post_beef200_response_scope1_instance.to_dict() -# create an instance of PostBeef200ResponseScope1 from a dict -post_beef200_response_scope1_from_dict = PostBeef200ResponseScope1.from_dict(post_beef200_response_scope1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeef200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostBeef200ResponseScope3.md deleted file mode 100644 index fa431e77..00000000 --- a/examples/python-api-client/api-client/docs/PostBeef200ResponseScope3.md +++ /dev/null @@ -1,38 +0,0 @@ -# PostBeef200ResponseScope3 - -Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | -**purchased_mineral_supplementation** | **float** | Emissions from purchased mineral supplementation, in tonnes-CO2e | -**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**lime** | **float** | Emissions from lime, in tonnes-CO2e | -**purchased_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeef200ResponseScope3 from a JSON string -post_beef200_response_scope3_instance = PostBeef200ResponseScope3.from_json(json) -# print the JSON string representation of the object -print(PostBeef200ResponseScope3.to_json()) - -# convert the object into a dict -post_beef200_response_scope3_dict = post_beef200_response_scope3_instance.to_dict() -# create an instance of PostBeef200ResponseScope3 from a dict -post_beef200_response_scope3_from_dict = PostBeef200ResponseScope3.from_dict(post_beef200_response_scope3_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequest.md b/examples/python-api-client/api-client/docs/PostBeefRequest.md deleted file mode 100644 index e4c99179..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequest.md +++ /dev/null @@ -1,35 +0,0 @@ -# PostBeefRequest - -Input data required for the `beef` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**beef** | [**List[PostBeefRequestBeefInner]**](PostBeefRequestBeefInner.md) | | -**burning** | [**List[PostBeefRequestBurningInner]**](PostBeefRequestBurningInner.md) | | -**vegetation** | [**List[PostBeefRequestVegetationInner]**](PostBeefRequestVegetationInner.md) | | [default to []] - -## Example - -```python -from openapi_client.models.post_beef_request import PostBeefRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequest from a JSON string -post_beef_request_instance = PostBeefRequest.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequest.to_json()) - -# convert the object into a dict -post_beef_request_dict = post_beef_request_instance.to_dict() -# create an instance of PostBeefRequest from a dict -post_beef_request_from_dict = PostBeefRequest.from_dict(post_beef_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInner.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInner.md deleted file mode 100644 index 3941fe3c..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInner.md +++ /dev/null @@ -1,46 +0,0 @@ -# PostBeefRequestBeefInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**classes** | [**PostBeefRequestBeefInnerClasses**](PostBeefRequestBeefInnerClasses.md) | | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**mineral_supplementation** | [**PostBeefRequestBeefInnerMineralSupplementation**](PostBeefRequestBeefInnerMineralSupplementation.md) | | -**electricity_source** | **str** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | -**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | -**cottonseed_feed** | **float** | Cotton seed purchased for cattle feed in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**cows_calving** | [**PostBeefRequestBeefInnerCowsCalving**](PostBeefRequestBeefInnerCowsCalving.md) | | - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner import PostBeefRequestBeefInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInner from a JSON string -post_beef_request_beef_inner_instance = PostBeefRequestBeefInner.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInner.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_dict = post_beef_request_beef_inner_instance.to_dict() -# create an instance of PostBeefRequestBeefInner from a dict -post_beef_request_beef_inner_from_dict = PostBeefRequestBeefInner.from_dict(post_beef_request_beef_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClasses.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClasses.md deleted file mode 100644 index c1a742ae..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClasses.md +++ /dev/null @@ -1,45 +0,0 @@ -# PostBeefRequestBeefInnerClasses - -Beef classes of different types and age ranges - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bulls_gt1** | [**PostBeefRequestBeefInnerClassesBullsGt1**](PostBeefRequestBeefInnerClassesBullsGt1.md) | | [optional] -**bulls_gt1_traded** | [**PostBeefRequestBeefInnerClassesBullsGt1Traded**](PostBeefRequestBeefInnerClassesBullsGt1Traded.md) | | [optional] -**steers_lt1** | [**PostBeefRequestBeefInnerClassesSteersLt1**](PostBeefRequestBeefInnerClassesSteersLt1.md) | | [optional] -**steers_lt1_traded** | [**PostBeefRequestBeefInnerClassesSteersLt1Traded**](PostBeefRequestBeefInnerClassesSteersLt1Traded.md) | | [optional] -**steers1_to2** | [**PostBeefRequestBeefInnerClassesSteers1To2**](PostBeefRequestBeefInnerClassesSteers1To2.md) | | [optional] -**steers1_to2_traded** | [**PostBeefRequestBeefInnerClassesSteers1To2Traded**](PostBeefRequestBeefInnerClassesSteers1To2Traded.md) | | [optional] -**steers_gt2** | [**PostBeefRequestBeefInnerClassesSteersGt2**](PostBeefRequestBeefInnerClassesSteersGt2.md) | | [optional] -**steers_gt2_traded** | [**PostBeefRequestBeefInnerClassesSteersGt2Traded**](PostBeefRequestBeefInnerClassesSteersGt2Traded.md) | | [optional] -**cows_gt2** | [**PostBeefRequestBeefInnerClassesCowsGt2**](PostBeefRequestBeefInnerClassesCowsGt2.md) | | [optional] -**cows_gt2_traded** | [**PostBeefRequestBeefInnerClassesCowsGt2Traded**](PostBeefRequestBeefInnerClassesCowsGt2Traded.md) | | [optional] -**heifers_lt1** | [**PostBeefRequestBeefInnerClassesHeifersLt1**](PostBeefRequestBeefInnerClassesHeifersLt1.md) | | [optional] -**heifers_lt1_traded** | [**PostBeefRequestBeefInnerClassesHeifersLt1Traded**](PostBeefRequestBeefInnerClassesHeifersLt1Traded.md) | | [optional] -**heifers1_to2** | [**PostBeefRequestBeefInnerClassesHeifers1To2**](PostBeefRequestBeefInnerClassesHeifers1To2.md) | | [optional] -**heifers1_to2_traded** | [**PostBeefRequestBeefInnerClassesHeifers1To2Traded**](PostBeefRequestBeefInnerClassesHeifers1To2Traded.md) | | [optional] -**heifers_gt2** | [**PostBeefRequestBeefInnerClassesHeifersGt2**](PostBeefRequestBeefInnerClassesHeifersGt2.md) | | [optional] -**heifers_gt2_traded** | [**PostBeefRequestBeefInnerClassesHeifersGt2Traded**](PostBeefRequestBeefInnerClassesHeifersGt2Traded.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes import PostBeefRequestBeefInnerClasses - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClasses from a JSON string -post_beef_request_beef_inner_classes_instance = PostBeefRequestBeefInnerClasses.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClasses.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_dict = post_beef_request_beef_inner_classes_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClasses from a dict -post_beef_request_beef_inner_classes_from_dict = PostBeefRequestBeefInnerClasses.from_dict(post_beef_request_beef_inner_classes_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1.md deleted file mode 100644 index b62baee6..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesBullsGt1 - -Bulls whose age is greater than 1 year old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1 import PostBeefRequestBeefInnerClassesBullsGt1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesBullsGt1 from a JSON string -post_beef_request_beef_inner_classes_bulls_gt1_instance = PostBeefRequestBeefInnerClassesBullsGt1.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesBullsGt1.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_bulls_gt1_dict = post_beef_request_beef_inner_classes_bulls_gt1_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesBullsGt1 from a dict -post_beef_request_beef_inner_classes_bulls_gt1_from_dict = PostBeefRequestBeefInnerClassesBullsGt1.from_dict(post_beef_request_beef_inner_classes_bulls_gt1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md deleted file mode 100644 index ce7fc62c..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Autumn.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostBeefRequestBeefInnerClassesBullsGt1Autumn - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals (head) | -**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | -**liveweight_gain** | **float** | Average liveweight gain in kg/day (kilogram per day) | -**crude_protein** | **float** | Crude protein percent, between 0 and 100 | [optional] -**dry_matter_digestibility** | **float** | Dry matter digestibility percent, between 0 and 100 | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesBullsGt1Autumn from a JSON string -post_beef_request_beef_inner_classes_bulls_gt1_autumn_instance = PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesBullsGt1Autumn.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_bulls_gt1_autumn_dict = post_beef_request_beef_inner_classes_bulls_gt1_autumn_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesBullsGt1Autumn from a dict -post_beef_request_beef_inner_classes_bulls_gt1_autumn_from_dict = PostBeefRequestBeefInnerClassesBullsGt1Autumn.from_dict(post_beef_request_beef_inner_classes_bulls_gt1_autumn_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md deleted file mode 100644 index ea1003c9..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner - -Beef purchase - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals purchased (head) | -**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | -**purchase_source** | **str** | Source location of livestock purchase | - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner from a JSON string -post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner_instance = PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner_dict = post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner from a dict -post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner_from_dict = PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.from_dict(post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Traded.md deleted file mode 100644 index 953ddd5b..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesBullsGt1Traded.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesBullsGt1Traded - -Traded bulls whose age is greater than 1 year old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_traded import PostBeefRequestBeefInnerClassesBullsGt1Traded - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesBullsGt1Traded from a JSON string -post_beef_request_beef_inner_classes_bulls_gt1_traded_instance = PostBeefRequestBeefInnerClassesBullsGt1Traded.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesBullsGt1Traded.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_bulls_gt1_traded_dict = post_beef_request_beef_inner_classes_bulls_gt1_traded_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesBullsGt1Traded from a dict -post_beef_request_beef_inner_classes_bulls_gt1_traded_from_dict = PostBeefRequestBeefInnerClassesBullsGt1Traded.from_dict(post_beef_request_beef_inner_classes_bulls_gt1_traded_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2.md deleted file mode 100644 index bfd26d71..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesCowsGt2 - -Cows whose age is greater than 2 years old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_cows_gt2 import PostBeefRequestBeefInnerClassesCowsGt2 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesCowsGt2 from a JSON string -post_beef_request_beef_inner_classes_cows_gt2_instance = PostBeefRequestBeefInnerClassesCowsGt2.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesCowsGt2.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_cows_gt2_dict = post_beef_request_beef_inner_classes_cows_gt2_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesCowsGt2 from a dict -post_beef_request_beef_inner_classes_cows_gt2_from_dict = PostBeefRequestBeefInnerClassesCowsGt2.from_dict(post_beef_request_beef_inner_classes_cows_gt2_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2Traded.md deleted file mode 100644 index 7b70196f..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesCowsGt2Traded.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesCowsGt2Traded - -Traded cows whose age is greater than 2 years old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_cows_gt2_traded import PostBeefRequestBeefInnerClassesCowsGt2Traded - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesCowsGt2Traded from a JSON string -post_beef_request_beef_inner_classes_cows_gt2_traded_instance = PostBeefRequestBeefInnerClassesCowsGt2Traded.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesCowsGt2Traded.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_cows_gt2_traded_dict = post_beef_request_beef_inner_classes_cows_gt2_traded_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesCowsGt2Traded from a dict -post_beef_request_beef_inner_classes_cows_gt2_traded_from_dict = PostBeefRequestBeefInnerClassesCowsGt2Traded.from_dict(post_beef_request_beef_inner_classes_cows_gt2_traded_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2.md deleted file mode 100644 index 62176b00..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesHeifers1To2 - -Heifers whose age is between 1 and 2 years old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_heifers1_to2 import PostBeefRequestBeefInnerClassesHeifers1To2 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesHeifers1To2 from a JSON string -post_beef_request_beef_inner_classes_heifers1_to2_instance = PostBeefRequestBeefInnerClassesHeifers1To2.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesHeifers1To2.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_heifers1_to2_dict = post_beef_request_beef_inner_classes_heifers1_to2_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesHeifers1To2 from a dict -post_beef_request_beef_inner_classes_heifers1_to2_from_dict = PostBeefRequestBeefInnerClassesHeifers1To2.from_dict(post_beef_request_beef_inner_classes_heifers1_to2_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md deleted file mode 100644 index 522d1aa5..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifers1To2Traded.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesHeifers1To2Traded - -Traded heifers whose age is between 1 and 2 years old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_heifers1_to2_traded import PostBeefRequestBeefInnerClassesHeifers1To2Traded - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesHeifers1To2Traded from a JSON string -post_beef_request_beef_inner_classes_heifers1_to2_traded_instance = PostBeefRequestBeefInnerClassesHeifers1To2Traded.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesHeifers1To2Traded.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_heifers1_to2_traded_dict = post_beef_request_beef_inner_classes_heifers1_to2_traded_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesHeifers1To2Traded from a dict -post_beef_request_beef_inner_classes_heifers1_to2_traded_from_dict = PostBeefRequestBeefInnerClassesHeifers1To2Traded.from_dict(post_beef_request_beef_inner_classes_heifers1_to2_traded_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2.md deleted file mode 100644 index be03022c..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesHeifersGt2 - -Heifers whose age is greater than 2 years old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_heifers_gt2 import PostBeefRequestBeefInnerClassesHeifersGt2 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesHeifersGt2 from a JSON string -post_beef_request_beef_inner_classes_heifers_gt2_instance = PostBeefRequestBeefInnerClassesHeifersGt2.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesHeifersGt2.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_heifers_gt2_dict = post_beef_request_beef_inner_classes_heifers_gt2_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesHeifersGt2 from a dict -post_beef_request_beef_inner_classes_heifers_gt2_from_dict = PostBeefRequestBeefInnerClassesHeifersGt2.from_dict(post_beef_request_beef_inner_classes_heifers_gt2_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md deleted file mode 100644 index 0598e8be..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersGt2Traded.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesHeifersGt2Traded - -Traded heifers whose age is greater than 2 years old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_heifers_gt2_traded import PostBeefRequestBeefInnerClassesHeifersGt2Traded - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesHeifersGt2Traded from a JSON string -post_beef_request_beef_inner_classes_heifers_gt2_traded_instance = PostBeefRequestBeefInnerClassesHeifersGt2Traded.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesHeifersGt2Traded.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_heifers_gt2_traded_dict = post_beef_request_beef_inner_classes_heifers_gt2_traded_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesHeifersGt2Traded from a dict -post_beef_request_beef_inner_classes_heifers_gt2_traded_from_dict = PostBeefRequestBeefInnerClassesHeifersGt2Traded.from_dict(post_beef_request_beef_inner_classes_heifers_gt2_traded_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1.md deleted file mode 100644 index 63e922ef..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesHeifersLt1 - -Heifers whose age is less than 1 year old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_heifers_lt1 import PostBeefRequestBeefInnerClassesHeifersLt1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesHeifersLt1 from a JSON string -post_beef_request_beef_inner_classes_heifers_lt1_instance = PostBeefRequestBeefInnerClassesHeifersLt1.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesHeifersLt1.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_heifers_lt1_dict = post_beef_request_beef_inner_classes_heifers_lt1_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesHeifersLt1 from a dict -post_beef_request_beef_inner_classes_heifers_lt1_from_dict = PostBeefRequestBeefInnerClassesHeifersLt1.from_dict(post_beef_request_beef_inner_classes_heifers_lt1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md deleted file mode 100644 index 40fe2c47..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesHeifersLt1Traded.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesHeifersLt1Traded - -Traded heifers whose age is less than 1 year old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_heifers_lt1_traded import PostBeefRequestBeefInnerClassesHeifersLt1Traded - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesHeifersLt1Traded from a JSON string -post_beef_request_beef_inner_classes_heifers_lt1_traded_instance = PostBeefRequestBeefInnerClassesHeifersLt1Traded.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesHeifersLt1Traded.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_heifers_lt1_traded_dict = post_beef_request_beef_inner_classes_heifers_lt1_traded_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesHeifersLt1Traded from a dict -post_beef_request_beef_inner_classes_heifers_lt1_traded_from_dict = PostBeefRequestBeefInnerClassesHeifersLt1Traded.from_dict(post_beef_request_beef_inner_classes_heifers_lt1_traded_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2.md deleted file mode 100644 index 21670024..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesSteers1To2 - -Steers whose age is between 1 and 2 years old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_steers1_to2 import PostBeefRequestBeefInnerClassesSteers1To2 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesSteers1To2 from a JSON string -post_beef_request_beef_inner_classes_steers1_to2_instance = PostBeefRequestBeefInnerClassesSteers1To2.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesSteers1To2.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_steers1_to2_dict = post_beef_request_beef_inner_classes_steers1_to2_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesSteers1To2 from a dict -post_beef_request_beef_inner_classes_steers1_to2_from_dict = PostBeefRequestBeefInnerClassesSteers1To2.from_dict(post_beef_request_beef_inner_classes_steers1_to2_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2Traded.md deleted file mode 100644 index 046559ae..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteers1To2Traded.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesSteers1To2Traded - -Traded steers whose age is between 1 and 2 years old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_steers1_to2_traded import PostBeefRequestBeefInnerClassesSteers1To2Traded - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesSteers1To2Traded from a JSON string -post_beef_request_beef_inner_classes_steers1_to2_traded_instance = PostBeefRequestBeefInnerClassesSteers1To2Traded.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesSteers1To2Traded.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_steers1_to2_traded_dict = post_beef_request_beef_inner_classes_steers1_to2_traded_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesSteers1To2Traded from a dict -post_beef_request_beef_inner_classes_steers1_to2_traded_from_dict = PostBeefRequestBeefInnerClassesSteers1To2Traded.from_dict(post_beef_request_beef_inner_classes_steers1_to2_traded_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2.md deleted file mode 100644 index c8eeaff1..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesSteersGt2 - -Steers whose age is greater than 2 years old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_steers_gt2 import PostBeefRequestBeefInnerClassesSteersGt2 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesSteersGt2 from a JSON string -post_beef_request_beef_inner_classes_steers_gt2_instance = PostBeefRequestBeefInnerClassesSteersGt2.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesSteersGt2.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_steers_gt2_dict = post_beef_request_beef_inner_classes_steers_gt2_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesSteersGt2 from a dict -post_beef_request_beef_inner_classes_steers_gt2_from_dict = PostBeefRequestBeefInnerClassesSteersGt2.from_dict(post_beef_request_beef_inner_classes_steers_gt2_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2Traded.md deleted file mode 100644 index 27cc9897..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersGt2Traded.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesSteersGt2Traded - -Traded steers whose age is greater than 2 years old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_steers_gt2_traded import PostBeefRequestBeefInnerClassesSteersGt2Traded - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesSteersGt2Traded from a JSON string -post_beef_request_beef_inner_classes_steers_gt2_traded_instance = PostBeefRequestBeefInnerClassesSteersGt2Traded.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesSteersGt2Traded.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_steers_gt2_traded_dict = post_beef_request_beef_inner_classes_steers_gt2_traded_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesSteersGt2Traded from a dict -post_beef_request_beef_inner_classes_steers_gt2_traded_from_dict = PostBeefRequestBeefInnerClassesSteersGt2Traded.from_dict(post_beef_request_beef_inner_classes_steers_gt2_traded_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1.md deleted file mode 100644 index f984ed29..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesSteersLt1 - -Steers whose age is less than 1 year old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_steers_lt1 import PostBeefRequestBeefInnerClassesSteersLt1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesSteersLt1 from a JSON string -post_beef_request_beef_inner_classes_steers_lt1_instance = PostBeefRequestBeefInnerClassesSteersLt1.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesSteersLt1.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_steers_lt1_dict = post_beef_request_beef_inner_classes_steers_lt1_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesSteersLt1 from a dict -post_beef_request_beef_inner_classes_steers_lt1_from_dict = PostBeefRequestBeefInnerClassesSteersLt1.from_dict(post_beef_request_beef_inner_classes_steers_lt1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1Traded.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1Traded.md deleted file mode 100644 index 7d503b4d..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerClassesSteersLt1Traded.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostBeefRequestBeefInnerClassesSteersLt1Traded - -Traded steers whose age is less than 1 year old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**winter** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**spring** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**summer** | [**PostBeefRequestBeefInnerClassesBullsGt1Autumn**](PostBeefRequestBeefInnerClassesBullsGt1Autumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Use `purchases` instead | [optional] -**source** | **str** | Source location of livestock purchase. Deprecation note: Use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner]**](PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_classes_steers_lt1_traded import PostBeefRequestBeefInnerClassesSteersLt1Traded - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerClassesSteersLt1Traded from a JSON string -post_beef_request_beef_inner_classes_steers_lt1_traded_instance = PostBeefRequestBeefInnerClassesSteersLt1Traded.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerClassesSteersLt1Traded.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_classes_steers_lt1_traded_dict = post_beef_request_beef_inner_classes_steers_lt1_traded_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerClassesSteersLt1Traded from a dict -post_beef_request_beef_inner_classes_steers_lt1_traded_from_dict = PostBeefRequestBeefInnerClassesSteersLt1Traded.from_dict(post_beef_request_beef_inner_classes_steers_lt1_traded_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerCowsCalving.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerCowsCalving.md deleted file mode 100644 index 6cccdf4a..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerCowsCalving.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostBeefRequestBeefInnerCowsCalving - -Fraction of cows calving in each season, between 0 and 1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**spring** | **float** | | -**summer** | **float** | | -**autumn** | **float** | | -**winter** | **float** | | - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_cows_calving import PostBeefRequestBeefInnerCowsCalving - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerCowsCalving from a JSON string -post_beef_request_beef_inner_cows_calving_instance = PostBeefRequestBeefInnerCowsCalving.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerCowsCalving.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_cows_calving_dict = post_beef_request_beef_inner_cows_calving_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerCowsCalving from a dict -post_beef_request_beef_inner_cows_calving_from_dict = PostBeefRequestBeefInnerCowsCalving.from_dict(post_beef_request_beef_inner_cows_calving_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliser.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliser.md deleted file mode 100644 index 5f48af4a..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliser.md +++ /dev/null @@ -1,38 +0,0 @@ -# PostBeefRequestBeefInnerFertiliser - -Fertiliser used for different applications (such as dryland pasture) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**single_superphosphate** | **float** | Single superphosphate usage in tonnes | -**other_type** | **str** | Other N fertiliser type. Deprecation note: Use `otherFertilisers` instead | [optional] -**pasture_dryland** | **float** | Urea fertiliser used for dryland pasture, in tonnes Urea | -**pasture_irrigated** | **float** | Urea fertiliser used for irrigated pasture, in tonnes Urea | -**crops_dryland** | **float** | Urea fertiliser used for dryland crops, in tonnes Urea | -**crops_irrigated** | **float** | Urea fertiliser used for irrigated crops, in tonnes Urea | -**other_dryland** | **float** | Other N fertiliser used for dryland. Deprecation note: Use `otherFertilisers` instead | [optional] -**other_irrigated** | **float** | Other N fertiliser used for irrigated. Deprecation note: Use `otherFertilisers` instead | [optional] -**other_fertilisers** | [**List[PostBeefRequestBeefInnerFertiliserOtherFertilisersInner]**](PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md) | Array of Other N fertiliser. Version note: If this field is set and has a length > 0, the `other` fields within this object are ignored, and this array is used instead | [optional] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_fertiliser import PostBeefRequestBeefInnerFertiliser - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerFertiliser from a JSON string -post_beef_request_beef_inner_fertiliser_instance = PostBeefRequestBeefInnerFertiliser.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerFertiliser.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_fertiliser_dict = post_beef_request_beef_inner_fertiliser_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerFertiliser from a dict -post_beef_request_beef_inner_fertiliser_from_dict = PostBeefRequestBeefInnerFertiliser.from_dict(post_beef_request_beef_inner_fertiliser_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md deleted file mode 100644 index a54c1b57..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostBeefRequestBeefInnerFertiliserOtherFertilisersInner - -Other fertiliser, of a specific type, used for different applications (such as dryland pasture) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**other_type** | **str** | Other N fertiliser type | -**other_dryland** | **float** | Other N fertiliser used for dryland. From v1.1.0, supply tonnes of product. For earlier versions, supply tonnes of N | -**other_irrigated** | **float** | Other N fertiliser used for irrigated. From v1.1.0, supply tonnes of product. For earlier versions, supply tonnes of N | - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_fertiliser_other_fertilisers_inner import PostBeefRequestBeefInnerFertiliserOtherFertilisersInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerFertiliserOtherFertilisersInner from a JSON string -post_beef_request_beef_inner_fertiliser_other_fertilisers_inner_instance = PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_fertiliser_other_fertilisers_inner_dict = post_beef_request_beef_inner_fertiliser_other_fertilisers_inner_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerFertiliserOtherFertilisersInner from a dict -post_beef_request_beef_inner_fertiliser_other_fertilisers_inner_from_dict = PostBeefRequestBeefInnerFertiliserOtherFertilisersInner.from_dict(post_beef_request_beef_inner_fertiliser_other_fertilisers_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerMineralSupplementation.md b/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerMineralSupplementation.md deleted file mode 100644 index 62d4d7f3..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBeefInnerMineralSupplementation.md +++ /dev/null @@ -1,35 +0,0 @@ -# PostBeefRequestBeefInnerMineralSupplementation - -Supplementation for livestock - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mineral_block** | **float** | Mineral block product used, in tonnes | [default to 0] -**mineral_block_urea** | **float** | Fraction of urea content, between 0 and 1 | [default to 0] -**weaner_block** | **float** | Weaner block product used, in tonnes | [default to 0] -**weaner_block_urea** | **float** | Fraction of urea content, between 0 and 1 | [default to 0] -**dry_season_mix** | **float** | Dry season mix product used, in tonnes | [default to 0] -**dry_season_mix_urea** | **float** | Fraction of urea content, between 0 and 1 | [default to 0] - -## Example - -```python -from openapi_client.models.post_beef_request_beef_inner_mineral_supplementation import PostBeefRequestBeefInnerMineralSupplementation - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBeefInnerMineralSupplementation from a JSON string -post_beef_request_beef_inner_mineral_supplementation_instance = PostBeefRequestBeefInnerMineralSupplementation.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBeefInnerMineralSupplementation.to_json()) - -# convert the object into a dict -post_beef_request_beef_inner_mineral_supplementation_dict = post_beef_request_beef_inner_mineral_supplementation_instance.to_dict() -# create an instance of PostBeefRequestBeefInnerMineralSupplementation from a dict -post_beef_request_beef_inner_mineral_supplementation_from_dict = PostBeefRequestBeefInnerMineralSupplementation.from_dict(post_beef_request_beef_inner_mineral_supplementation_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBurningInner.md b/examples/python-api-client/api-client/docs/PostBeefRequestBurningInner.md deleted file mode 100644 index 91bb8084..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBurningInner.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostBeefRequestBurningInner - -Savannah burning along with allocations to beef - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**burning** | [**PostBeefRequestBurningInnerBurning**](PostBeefRequestBurningInnerBurning.md) | | -**allocation_to_beef** | **List[float]** | The proportion of the burning that is allocated to each beef | - -## Example - -```python -from openapi_client.models.post_beef_request_burning_inner import PostBeefRequestBurningInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBurningInner from a JSON string -post_beef_request_burning_inner_instance = PostBeefRequestBurningInner.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBurningInner.to_json()) - -# convert the object into a dict -post_beef_request_burning_inner_dict = post_beef_request_burning_inner_instance.to_dict() -# create an instance of PostBeefRequestBurningInner from a dict -post_beef_request_burning_inner_from_dict = PostBeefRequestBurningInner.from_dict(post_beef_request_burning_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestBurningInnerBurning.md b/examples/python-api-client/api-client/docs/PostBeefRequestBurningInnerBurning.md deleted file mode 100644 index 9e028ed8..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestBurningInnerBurning.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostBeefRequestBurningInnerBurning - -Inputs required for any savannah burning activities that took place - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel** | **str** | The fuel class size that was burnt | [default to 'coarse'] -**season** | **str** | The time relative to the fire season in which the burning took place | [default to 'early dry season'] -**patchiness** | **str** | The patchiness of the savannah/vegetation that was burnt | [default to 'high'] -**rainfall_zone** | **str** | The rainfall zone in which the burning took place | [default to 'low'] -**years_since_last_fire** | **float** | Time since the last fire, in years | [default to 0] -**fire_scar_area** | **float** | The total area of the fire scar, in ha (hectares) | [default to 0] -**vegetation** | **str** | The vegetation class that was burnt | [default to 'Melaleuca woodland'] - -## Example - -```python -from openapi_client.models.post_beef_request_burning_inner_burning import PostBeefRequestBurningInnerBurning - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestBurningInnerBurning from a JSON string -post_beef_request_burning_inner_burning_instance = PostBeefRequestBurningInnerBurning.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestBurningInnerBurning.to_json()) - -# convert the object into a dict -post_beef_request_burning_inner_burning_dict = post_beef_request_burning_inner_burning_instance.to_dict() -# create an instance of PostBeefRequestBurningInnerBurning from a dict -post_beef_request_burning_inner_burning_from_dict = PostBeefRequestBurningInnerBurning.from_dict(post_beef_request_burning_inner_burning_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostBeefRequestVegetationInner.md deleted file mode 100644 index 3df720a3..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestVegetationInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostBeefRequestVegetationInner - -Non-productive vegetation inputs along with allocations to beef - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**beef_proportion** | **float** | The proportion of the sequestration that is allocated to beef. Deprecation note: Please use `allocationToBeef` instead | [optional] -**allocation_to_beef** | **List[float]** | The proportion of the sequestration that is allocated to each beef | - -## Example - -```python -from openapi_client.models.post_beef_request_vegetation_inner import PostBeefRequestVegetationInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestVegetationInner from a JSON string -post_beef_request_vegetation_inner_instance = PostBeefRequestVegetationInner.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestVegetationInner.to_json()) - -# convert the object into a dict -post_beef_request_vegetation_inner_dict = post_beef_request_vegetation_inner_instance.to_dict() -# create an instance of PostBeefRequestVegetationInner from a dict -post_beef_request_vegetation_inner_from_dict = PostBeefRequestVegetationInner.from_dict(post_beef_request_vegetation_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBeefRequestVegetationInnerVegetation.md b/examples/python-api-client/api-client/docs/PostBeefRequestVegetationInnerVegetation.md deleted file mode 100644 index 56561ea4..00000000 --- a/examples/python-api-client/api-client/docs/PostBeefRequestVegetationInnerVegetation.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostBeefRequestVegetationInnerVegetation - -Inputs required for non-productive vegetation in order to calculate carbon sequestration - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**region** | **str** | The rainfall region that the vegetation is in | -**tree_species** | **str** | The species of tree | -**soil** | **str** | The soil type the tree is in | -**area** | **float** | The area of trees, in ha (hectares) | -**age** | **float** | The age of the trees, in years | - -## Example - -```python -from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBeefRequestVegetationInnerVegetation from a JSON string -post_beef_request_vegetation_inner_vegetation_instance = PostBeefRequestVegetationInnerVegetation.from_json(json) -# print the JSON string representation of the object -print(PostBeefRequestVegetationInnerVegetation.to_json()) - -# convert the object into a dict -post_beef_request_vegetation_inner_vegetation_dict = post_beef_request_vegetation_inner_vegetation_instance.to_dict() -# create an instance of PostBeefRequestVegetationInnerVegetation from a dict -post_beef_request_vegetation_inner_vegetation_from_dict = PostBeefRequestVegetationInnerVegetation.from_dict(post_beef_request_vegetation_inner_vegetation_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffalo200Response.md b/examples/python-api-client/api-client/docs/PostBuffalo200Response.md deleted file mode 100644 index 576d5c0e..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffalo200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostBuffalo200Response - -Emissions calculation output for the `Buffalo` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**net** | [**PostBuffalo200ResponseNet**](PostBuffalo200ResponseNet.md) | | -**intensities** | [**PostBuffalo200ResponseIntensities**](PostBuffalo200ResponseIntensities.md) | | -**intermediate** | [**List[PostBuffalo200ResponseIntermediateInner]**](PostBuffalo200ResponseIntermediateInner.md) | | - -## Example - -```python -from openapi_client.models.post_buffalo200_response import PostBuffalo200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffalo200Response from a JSON string -post_buffalo200_response_instance = PostBuffalo200Response.from_json(json) -# print the JSON string representation of the object -print(PostBuffalo200Response.to_json()) - -# convert the object into a dict -post_buffalo200_response_dict = post_buffalo200_response_instance.to_dict() -# create an instance of PostBuffalo200Response from a dict -post_buffalo200_response_from_dict = PostBuffalo200Response.from_dict(post_buffalo200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntensities.md deleted file mode 100644 index 1aa15457..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntensities.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostBuffalo200ResponseIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**liveweight_produced_kg** | **float** | Amount of buffalo meat produced in kg liveweight | -**buffalo_meat_excluding_sequestration** | **float** | Buffalo meat (breeding herd) excluding sequestration, in kg-CO2e/kg liveweight | -**buffalo_meat_including_sequestration** | **float** | Buffalo meat (breeding herd) including sequestration, in kg-CO2e/kg liveweight | - -## Example - -```python -from openapi_client.models.post_buffalo200_response_intensities import PostBuffalo200ResponseIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffalo200ResponseIntensities from a JSON string -post_buffalo200_response_intensities_instance = PostBuffalo200ResponseIntensities.from_json(json) -# print the JSON string representation of the object -print(PostBuffalo200ResponseIntensities.to_json()) - -# convert the object into a dict -post_buffalo200_response_intensities_dict = post_buffalo200_response_intensities_instance.to_dict() -# create an instance of PostBuffalo200ResponseIntensities from a dict -post_buffalo200_response_intensities_from_dict = PostBuffalo200ResponseIntensities.from_dict(post_buffalo200_response_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntermediateInner.md deleted file mode 100644 index b462531b..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseIntermediateInner.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostBuffalo200ResponseIntermediateInner - -Intermediate emissions calculation output for the Buffalo calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | -**net** | [**PostBuffalo200ResponseNet**](PostBuffalo200ResponseNet.md) | | -**intensities** | [**PostBuffalo200ResponseIntensities**](PostBuffalo200ResponseIntensities.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -## Example - -```python -from openapi_client.models.post_buffalo200_response_intermediate_inner import PostBuffalo200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffalo200ResponseIntermediateInner from a JSON string -post_buffalo200_response_intermediate_inner_instance = PostBuffalo200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostBuffalo200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_buffalo200_response_intermediate_inner_dict = post_buffalo200_response_intermediate_inner_instance.to_dict() -# create an instance of PostBuffalo200ResponseIntermediateInner from a dict -post_buffalo200_response_intermediate_inner_from_dict = PostBuffalo200ResponseIntermediateInner.from_dict(post_buffalo200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseNet.md b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseNet.md deleted file mode 100644 index 17730dd7..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseNet.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostBuffalo200ResponseNet - -Net emissions for Buffalo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | - -## Example - -```python -from openapi_client.models.post_buffalo200_response_net import PostBuffalo200ResponseNet - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffalo200ResponseNet from a JSON string -post_buffalo200_response_net_instance = PostBuffalo200ResponseNet.from_json(json) -# print the JSON string representation of the object -print(PostBuffalo200ResponseNet.to_json()) - -# convert the object into a dict -post_buffalo200_response_net_dict = post_buffalo200_response_net_instance.to_dict() -# create an instance of PostBuffalo200ResponseNet from a dict -post_buffalo200_response_net_from_dict = PostBuffalo200ResponseNet.from_dict(post_buffalo200_response_net_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope1.md deleted file mode 100644 index 61b8d2e1..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope1.md +++ /dev/null @@ -1,44 +0,0 @@ -# PostBuffalo200ResponseScope1 - -Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | -**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | -**urine_and_dung_n2_o** | **float** | N2O emissions from urine and dung, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_buffalo200_response_scope1 import PostBuffalo200ResponseScope1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffalo200ResponseScope1 from a JSON string -post_buffalo200_response_scope1_instance = PostBuffalo200ResponseScope1.from_json(json) -# print the JSON string representation of the object -print(PostBuffalo200ResponseScope1.to_json()) - -# convert the object into a dict -post_buffalo200_response_scope1_dict = post_buffalo200_response_scope1_instance.to_dict() -# create an instance of PostBuffalo200ResponseScope1 from a dict -post_buffalo200_response_scope1_from_dict = PostBuffalo200ResponseScope1.from_dict(post_buffalo200_response_scope1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope3.md deleted file mode 100644 index f9b62560..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffalo200ResponseScope3.md +++ /dev/null @@ -1,37 +0,0 @@ -# PostBuffalo200ResponseScope3 - -Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | -**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**lime** | **float** | Emissions from lime, in tonnes-CO2e | -**purchased_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_buffalo200_response_scope3 import PostBuffalo200ResponseScope3 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffalo200ResponseScope3 from a JSON string -post_buffalo200_response_scope3_instance = PostBuffalo200ResponseScope3.from_json(json) -# print the JSON string representation of the object -print(PostBuffalo200ResponseScope3.to_json()) - -# convert the object into a dict -post_buffalo200_response_scope3_dict = post_buffalo200_response_scope3_instance.to_dict() -# create an instance of PostBuffalo200ResponseScope3 from a dict -post_buffalo200_response_scope3_from_dict = PostBuffalo200ResponseScope3.from_dict(post_buffalo200_response_scope3_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequest.md b/examples/python-api-client/api-client/docs/PostBuffaloRequest.md deleted file mode 100644 index 8673571e..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequest.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostBuffaloRequest - -Input data required for the `Buffalo` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**buffalos** | [**List[PostBuffaloRequestBuffalosInner]**](PostBuffaloRequestBuffalosInner.md) | | -**vegetation** | [**List[PostBuffaloRequestVegetationInner]**](PostBuffaloRequestVegetationInner.md) | | [default to []] - -## Example - -```python -from openapi_client.models.post_buffalo_request import PostBuffaloRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequest from a JSON string -post_buffalo_request_instance = PostBuffaloRequest.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequest.to_json()) - -# convert the object into a dict -post_buffalo_request_dict = post_buffalo_request_instance.to_dict() -# create an instance of PostBuffaloRequest from a dict -post_buffalo_request_from_dict = PostBuffaloRequest.from_dict(post_buffalo_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInner.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInner.md deleted file mode 100644 index f7a9fa87..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInner.md +++ /dev/null @@ -1,45 +0,0 @@ -# PostBuffaloRequestBuffalosInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**classes** | [**PostBuffaloRequestBuffalosInnerClasses**](PostBuffaloRequestBuffalosInnerClasses.md) | | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**electricity_source** | **str** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | -**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**cows_calving** | [**PostBuffaloRequestBuffalosInnerCowsCalving**](PostBuffaloRequestBuffalosInnerCowsCalving.md) | | -**seasonal_calving** | [**PostBuffaloRequestBuffalosInnerSeasonalCalving**](PostBuffaloRequestBuffalosInnerSeasonalCalving.md) | | - -## Example - -```python -from openapi_client.models.post_buffalo_request_buffalos_inner import PostBuffaloRequestBuffalosInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestBuffalosInner from a JSON string -post_buffalo_request_buffalos_inner_instance = PostBuffaloRequestBuffalosInner.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestBuffalosInner.to_json()) - -# convert the object into a dict -post_buffalo_request_buffalos_inner_dict = post_buffalo_request_buffalos_inner_instance.to_dict() -# create an instance of PostBuffaloRequestBuffalosInner from a dict -post_buffalo_request_buffalos_inner_from_dict = PostBuffaloRequestBuffalosInner.from_dict(post_buffalo_request_buffalos_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClasses.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClasses.md deleted file mode 100644 index 713c432e..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClasses.md +++ /dev/null @@ -1,37 +0,0 @@ -# PostBuffaloRequestBuffalosInnerClasses - -Buffalo classes of different types - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bulls** | [**PostBuffaloRequestBuffalosInnerClassesBulls**](PostBuffaloRequestBuffalosInnerClassesBulls.md) | | [optional] -**trade_bulls** | [**PostBuffaloRequestBuffalosInnerClassesTradeBulls**](PostBuffaloRequestBuffalosInnerClassesTradeBulls.md) | | [optional] -**cows** | [**PostBuffaloRequestBuffalosInnerClassesCows**](PostBuffaloRequestBuffalosInnerClassesCows.md) | | [optional] -**trade_cows** | [**PostBuffaloRequestBuffalosInnerClassesTradeCows**](PostBuffaloRequestBuffalosInnerClassesTradeCows.md) | | [optional] -**steers** | [**PostBuffaloRequestBuffalosInnerClassesSteers**](PostBuffaloRequestBuffalosInnerClassesSteers.md) | | [optional] -**trade_steers** | [**PostBuffaloRequestBuffalosInnerClassesTradeSteers**](PostBuffaloRequestBuffalosInnerClassesTradeSteers.md) | | [optional] -**calfs** | [**PostBuffaloRequestBuffalosInnerClassesCalfs**](PostBuffaloRequestBuffalosInnerClassesCalfs.md) | | [optional] -**trade_calfs** | [**PostBuffaloRequestBuffalosInnerClassesTradeCalfs**](PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_buffalo_request_buffalos_inner_classes import PostBuffaloRequestBuffalosInnerClasses - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestBuffalosInnerClasses from a JSON string -post_buffalo_request_buffalos_inner_classes_instance = PostBuffaloRequestBuffalosInnerClasses.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestBuffalosInnerClasses.to_json()) - -# convert the object into a dict -post_buffalo_request_buffalos_inner_classes_dict = post_buffalo_request_buffalos_inner_classes_instance.to_dict() -# create an instance of PostBuffaloRequestBuffalosInnerClasses from a dict -post_buffalo_request_buffalos_inner_classes_from_dict = PostBuffaloRequestBuffalosInnerClasses.from_dict(post_buffalo_request_buffalos_inner_classes_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBulls.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBulls.md deleted file mode 100644 index 4a7ffab7..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBulls.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostBuffaloRequestBuffalosInnerClassesBulls - -Bulls - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls import PostBuffaloRequestBuffalosInnerClassesBulls - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestBuffalosInnerClassesBulls from a JSON string -post_buffalo_request_buffalos_inner_classes_bulls_instance = PostBuffaloRequestBuffalosInnerClassesBulls.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestBuffalosInnerClassesBulls.to_json()) - -# convert the object into a dict -post_buffalo_request_buffalos_inner_classes_bulls_dict = post_buffalo_request_buffalos_inner_classes_bulls_instance.to_dict() -# create an instance of PostBuffaloRequestBuffalosInnerClassesBulls from a dict -post_buffalo_request_buffalos_inner_classes_bulls_from_dict = PostBuffaloRequestBuffalosInnerClassesBulls.from_dict(post_buffalo_request_buffalos_inner_classes_bulls_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md deleted file mode 100644 index 943ec734..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md +++ /dev/null @@ -1,29 +0,0 @@ -# PostBuffaloRequestBuffalosInnerClassesBullsAutumn - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals (head) | - -## Example - -```python -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestBuffalosInnerClassesBullsAutumn from a JSON string -post_buffalo_request_buffalos_inner_classes_bulls_autumn_instance = PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestBuffalosInnerClassesBullsAutumn.to_json()) - -# convert the object into a dict -post_buffalo_request_buffalos_inner_classes_bulls_autumn_dict = post_buffalo_request_buffalos_inner_classes_bulls_autumn_instance.to_dict() -# create an instance of PostBuffaloRequestBuffalosInnerClassesBullsAutumn from a dict -post_buffalo_request_buffalos_inner_classes_bulls_autumn_from_dict = PostBuffaloRequestBuffalosInnerClassesBullsAutumn.from_dict(post_buffalo_request_buffalos_inner_classes_bulls_autumn_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md deleted file mode 100644 index c33a400b..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals purchased (head) | -**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | - -## Example - -```python -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner from a JSON string -post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner_instance = PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.to_json()) - -# convert the object into a dict -post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner_dict = post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner_instance.to_dict() -# create an instance of PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner from a dict -post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner_from_dict = PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.from_dict(post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCalfs.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCalfs.md deleted file mode 100644 index 8966ad83..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCalfs.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostBuffaloRequestBuffalosInnerClassesCalfs - -Calfs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_calfs import PostBuffaloRequestBuffalosInnerClassesCalfs - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestBuffalosInnerClassesCalfs from a JSON string -post_buffalo_request_buffalos_inner_classes_calfs_instance = PostBuffaloRequestBuffalosInnerClassesCalfs.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestBuffalosInnerClassesCalfs.to_json()) - -# convert the object into a dict -post_buffalo_request_buffalos_inner_classes_calfs_dict = post_buffalo_request_buffalos_inner_classes_calfs_instance.to_dict() -# create an instance of PostBuffaloRequestBuffalosInnerClassesCalfs from a dict -post_buffalo_request_buffalos_inner_classes_calfs_from_dict = PostBuffaloRequestBuffalosInnerClassesCalfs.from_dict(post_buffalo_request_buffalos_inner_classes_calfs_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCows.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCows.md deleted file mode 100644 index 2f75ca09..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesCows.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostBuffaloRequestBuffalosInnerClassesCows - -Cows - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_cows import PostBuffaloRequestBuffalosInnerClassesCows - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestBuffalosInnerClassesCows from a JSON string -post_buffalo_request_buffalos_inner_classes_cows_instance = PostBuffaloRequestBuffalosInnerClassesCows.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestBuffalosInnerClassesCows.to_json()) - -# convert the object into a dict -post_buffalo_request_buffalos_inner_classes_cows_dict = post_buffalo_request_buffalos_inner_classes_cows_instance.to_dict() -# create an instance of PostBuffaloRequestBuffalosInnerClassesCows from a dict -post_buffalo_request_buffalos_inner_classes_cows_from_dict = PostBuffaloRequestBuffalosInnerClassesCows.from_dict(post_buffalo_request_buffalos_inner_classes_cows_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesSteers.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesSteers.md deleted file mode 100644 index a6fc06a9..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesSteers.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostBuffaloRequestBuffalosInnerClassesSteers - -Steers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_steers import PostBuffaloRequestBuffalosInnerClassesSteers - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestBuffalosInnerClassesSteers from a JSON string -post_buffalo_request_buffalos_inner_classes_steers_instance = PostBuffaloRequestBuffalosInnerClassesSteers.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestBuffalosInnerClassesSteers.to_json()) - -# convert the object into a dict -post_buffalo_request_buffalos_inner_classes_steers_dict = post_buffalo_request_buffalos_inner_classes_steers_instance.to_dict() -# create an instance of PostBuffaloRequestBuffalosInnerClassesSteers from a dict -post_buffalo_request_buffalos_inner_classes_steers_from_dict = PostBuffaloRequestBuffalosInnerClassesSteers.from_dict(post_buffalo_request_buffalos_inner_classes_steers_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md deleted file mode 100644 index 8039f52e..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeBulls.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostBuffaloRequestBuffalosInnerClassesTradeBulls - -Trade bulls - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_bulls import PostBuffaloRequestBuffalosInnerClassesTradeBulls - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeBulls from a JSON string -post_buffalo_request_buffalos_inner_classes_trade_bulls_instance = PostBuffaloRequestBuffalosInnerClassesTradeBulls.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestBuffalosInnerClassesTradeBulls.to_json()) - -# convert the object into a dict -post_buffalo_request_buffalos_inner_classes_trade_bulls_dict = post_buffalo_request_buffalos_inner_classes_trade_bulls_instance.to_dict() -# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeBulls from a dict -post_buffalo_request_buffalos_inner_classes_trade_bulls_from_dict = PostBuffaloRequestBuffalosInnerClassesTradeBulls.from_dict(post_buffalo_request_buffalos_inner_classes_trade_bulls_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md deleted file mode 100644 index 8553646f..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCalfs.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostBuffaloRequestBuffalosInnerClassesTradeCalfs - -Trade calfs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_calfs import PostBuffaloRequestBuffalosInnerClassesTradeCalfs - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeCalfs from a JSON string -post_buffalo_request_buffalos_inner_classes_trade_calfs_instance = PostBuffaloRequestBuffalosInnerClassesTradeCalfs.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestBuffalosInnerClassesTradeCalfs.to_json()) - -# convert the object into a dict -post_buffalo_request_buffalos_inner_classes_trade_calfs_dict = post_buffalo_request_buffalos_inner_classes_trade_calfs_instance.to_dict() -# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeCalfs from a dict -post_buffalo_request_buffalos_inner_classes_trade_calfs_from_dict = PostBuffaloRequestBuffalosInnerClassesTradeCalfs.from_dict(post_buffalo_request_buffalos_inner_classes_trade_calfs_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCows.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCows.md deleted file mode 100644 index a7f04ced..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeCows.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostBuffaloRequestBuffalosInnerClassesTradeCows - -Trade cows - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_cows import PostBuffaloRequestBuffalosInnerClassesTradeCows - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeCows from a JSON string -post_buffalo_request_buffalos_inner_classes_trade_cows_instance = PostBuffaloRequestBuffalosInnerClassesTradeCows.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestBuffalosInnerClassesTradeCows.to_json()) - -# convert the object into a dict -post_buffalo_request_buffalos_inner_classes_trade_cows_dict = post_buffalo_request_buffalos_inner_classes_trade_cows_instance.to_dict() -# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeCows from a dict -post_buffalo_request_buffalos_inner_classes_trade_cows_from_dict = PostBuffaloRequestBuffalosInnerClassesTradeCows.from_dict(post_buffalo_request_buffalos_inner_classes_trade_cows_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md deleted file mode 100644 index 9d312e7e..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerClassesTradeSteers.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostBuffaloRequestBuffalosInnerClassesTradeSteers - -Trade steers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_steers import PostBuffaloRequestBuffalosInnerClassesTradeSteers - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeSteers from a JSON string -post_buffalo_request_buffalos_inner_classes_trade_steers_instance = PostBuffaloRequestBuffalosInnerClassesTradeSteers.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestBuffalosInnerClassesTradeSteers.to_json()) - -# convert the object into a dict -post_buffalo_request_buffalos_inner_classes_trade_steers_dict = post_buffalo_request_buffalos_inner_classes_trade_steers_instance.to_dict() -# create an instance of PostBuffaloRequestBuffalosInnerClassesTradeSteers from a dict -post_buffalo_request_buffalos_inner_classes_trade_steers_from_dict = PostBuffaloRequestBuffalosInnerClassesTradeSteers.from_dict(post_buffalo_request_buffalos_inner_classes_trade_steers_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerCowsCalving.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerCowsCalving.md deleted file mode 100644 index bdc2593d..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerCowsCalving.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostBuffaloRequestBuffalosInnerCowsCalving - -Proportion of cows calving in each season, from 0 to 1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**spring** | **float** | | -**summer** | **float** | | -**autumn** | **float** | | -**winter** | **float** | | - -## Example - -```python -from openapi_client.models.post_buffalo_request_buffalos_inner_cows_calving import PostBuffaloRequestBuffalosInnerCowsCalving - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestBuffalosInnerCowsCalving from a JSON string -post_buffalo_request_buffalos_inner_cows_calving_instance = PostBuffaloRequestBuffalosInnerCowsCalving.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestBuffalosInnerCowsCalving.to_json()) - -# convert the object into a dict -post_buffalo_request_buffalos_inner_cows_calving_dict = post_buffalo_request_buffalos_inner_cows_calving_instance.to_dict() -# create an instance of PostBuffaloRequestBuffalosInnerCowsCalving from a dict -post_buffalo_request_buffalos_inner_cows_calving_from_dict = PostBuffaloRequestBuffalosInnerCowsCalving.from_dict(post_buffalo_request_buffalos_inner_cows_calving_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerSeasonalCalving.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerSeasonalCalving.md deleted file mode 100644 index 851e3a66..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestBuffalosInnerSeasonalCalving.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostBuffaloRequestBuffalosInnerSeasonalCalving - -Seasonal calving rates, from 0 to 1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**spring** | **float** | | -**summer** | **float** | | -**autumn** | **float** | | -**winter** | **float** | | - -## Example - -```python -from openapi_client.models.post_buffalo_request_buffalos_inner_seasonal_calving import PostBuffaloRequestBuffalosInnerSeasonalCalving - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestBuffalosInnerSeasonalCalving from a JSON string -post_buffalo_request_buffalos_inner_seasonal_calving_instance = PostBuffaloRequestBuffalosInnerSeasonalCalving.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestBuffalosInnerSeasonalCalving.to_json()) - -# convert the object into a dict -post_buffalo_request_buffalos_inner_seasonal_calving_dict = post_buffalo_request_buffalos_inner_seasonal_calving_instance.to_dict() -# create an instance of PostBuffaloRequestBuffalosInnerSeasonalCalving from a dict -post_buffalo_request_buffalos_inner_seasonal_calving_from_dict = PostBuffaloRequestBuffalosInnerSeasonalCalving.from_dict(post_buffalo_request_buffalos_inner_seasonal_calving_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostBuffaloRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostBuffaloRequestVegetationInner.md deleted file mode 100644 index 8a3173f2..00000000 --- a/examples/python-api-client/api-client/docs/PostBuffaloRequestVegetationInner.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostBuffaloRequestVegetationInner - -Non-productive vegetation inputs along with allocations to Buffalo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**buffalo_proportion** | **List[float]** | The proportion of the sequestration that is allocated to Buffalo | - -## Example - -```python -from openapi_client.models.post_buffalo_request_vegetation_inner import PostBuffaloRequestVegetationInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostBuffaloRequestVegetationInner from a JSON string -post_buffalo_request_vegetation_inner_instance = PostBuffaloRequestVegetationInner.from_json(json) -# print the JSON string representation of the object -print(PostBuffaloRequestVegetationInner.to_json()) - -# convert the object into a dict -post_buffalo_request_vegetation_inner_dict = post_buffalo_request_vegetation_inner_instance.to_dict() -# create an instance of PostBuffaloRequestVegetationInner from a dict -post_buffalo_request_vegetation_inner_from_dict = PostBuffaloRequestVegetationInner.from_dict(post_buffalo_request_vegetation_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostCotton200Response.md b/examples/python-api-client/api-client/docs/PostCotton200Response.md deleted file mode 100644 index fdd6a6eb..00000000 --- a/examples/python-api-client/api-client/docs/PostCotton200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostCotton200Response - -Emissions calculation output for the `cotton` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**List[PostCotton200ResponseIntermediateInner]**](PostCotton200ResponseIntermediateInner.md) | | -**net** | [**PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | -**intensities** | [**List[PostCotton200ResponseIntermediateInnerIntensities]**](PostCotton200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each crop (in order) | - -## Example - -```python -from openapi_client.models.post_cotton200_response import PostCotton200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostCotton200Response from a JSON string -post_cotton200_response_instance = PostCotton200Response.from_json(json) -# print the JSON string representation of the object -print(PostCotton200Response.to_json()) - -# convert the object into a dict -post_cotton200_response_dict = post_cotton200_response_instance.to_dict() -# create an instance of PostCotton200Response from a dict -post_cotton200_response_from_dict = PostCotton200Response.from_dict(post_cotton200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInner.md deleted file mode 100644 index 3b439407..00000000 --- a/examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInner.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostCotton200ResponseIntermediateInner - -Intermediate emissions calculation output for the Cotton calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**intensities** | [**PostCotton200ResponseIntermediateInnerIntensities**](PostCotton200ResponseIntermediateInnerIntensities.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -## Example - -```python -from openapi_client.models.post_cotton200_response_intermediate_inner import PostCotton200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostCotton200ResponseIntermediateInner from a JSON string -post_cotton200_response_intermediate_inner_instance = PostCotton200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostCotton200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_cotton200_response_intermediate_inner_dict = post_cotton200_response_intermediate_inner_instance.to_dict() -# create an instance of PostCotton200ResponseIntermediateInner from a dict -post_cotton200_response_intermediate_inner_from_dict = PostCotton200ResponseIntermediateInner.from_dict(post_cotton200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index b7370b30..00000000 --- a/examples/python-api-client/api-client/docs/PostCotton200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,43 +0,0 @@ -# PostCotton200ResponseIntermediateInnerIntensities - -Cotton intensities output - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cotton_yield_produced_tonnes** | **float** | Cotton yield produced in tonnes | -**bales_produced** | **float** | Number of bales produced | -**lint_produced_tonnes** | **float** | Cotton lint produced in tonnes | -**seed_produced_tonnes** | **float** | Cotton seed produced in tonnes | -**tonnes_crop_excluding_sequestration** | **float** | Emissions intensity excluding sequestration, in t-CO2e/t crop | -**tonnes_crop_including_sequestration** | **float** | Emissions intensity including sequestration, in t-CO2e/t crop | -**bales_excluding_sequestration** | **float** | Emissions intensity excluding sequestration, in t-CO2e/bale | -**bales_including_sequestration** | **float** | Emissions intensity including sequestration, in t-CO2e/bale | -**lint_including_sequestration** | **float** | Emissions intensity of lint including sequestration, in t-CO2e/kg | -**lint_excluding_sequestration** | **float** | Emissions intensity of lint excluding sequestration, in t-CO2e/kg | -**seed_including_sequestration** | **float** | Emissions intensity of seed including sequestration, in t-CO2e/kg | -**seed_excluding_sequestration** | **float** | Emissions intensity of seed excluding sequestration, in t-CO2e/kg | -**lint_economic_allocation** | **float** | Emissions intensity of lint using economic allocation, in t-CO2e/kg | -**seed_economic_allocation** | **float** | Emissions intensity of seed using economic allocation, in t-CO2e/kg | - -## Example - -```python -from openapi_client.models.post_cotton200_response_intermediate_inner_intensities import PostCotton200ResponseIntermediateInnerIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostCotton200ResponseIntermediateInnerIntensities from a JSON string -post_cotton200_response_intermediate_inner_intensities_instance = PostCotton200ResponseIntermediateInnerIntensities.from_json(json) -# print the JSON string representation of the object -print(PostCotton200ResponseIntermediateInnerIntensities.to_json()) - -# convert the object into a dict -post_cotton200_response_intermediate_inner_intensities_dict = post_cotton200_response_intermediate_inner_intensities_instance.to_dict() -# create an instance of PostCotton200ResponseIntermediateInnerIntensities from a dict -post_cotton200_response_intermediate_inner_intensities_from_dict = PostCotton200ResponseIntermediateInnerIntensities.from_dict(post_cotton200_response_intermediate_inner_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostCotton200ResponseNet.md b/examples/python-api-client/api-client/docs/PostCotton200ResponseNet.md deleted file mode 100644 index e974a1d7..00000000 --- a/examples/python-api-client/api-client/docs/PostCotton200ResponseNet.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostCotton200ResponseNet - -Net emissions for each crop (in order) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | -**crops** | **List[float]** | | - -## Example - -```python -from openapi_client.models.post_cotton200_response_net import PostCotton200ResponseNet - -# TODO update the JSON string below -json = "{}" -# create an instance of PostCotton200ResponseNet from a JSON string -post_cotton200_response_net_instance = PostCotton200ResponseNet.from_json(json) -# print the JSON string representation of the object -print(PostCotton200ResponseNet.to_json()) - -# convert the object into a dict -post_cotton200_response_net_dict = post_cotton200_response_net_instance.to_dict() -# create an instance of PostCotton200ResponseNet from a dict -post_cotton200_response_net_from_dict = PostCotton200ResponseNet.from_dict(post_cotton200_response_net_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostCotton200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostCotton200ResponseScope1.md deleted file mode 100644 index 62cfb825..00000000 --- a/examples/python-api-client/api-client/docs/PostCotton200ResponseScope1.md +++ /dev/null @@ -1,44 +0,0 @@ -# PostCotton200ResponseScope1 - -Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | -**field_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | -**field_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_cotton200_response_scope1 import PostCotton200ResponseScope1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostCotton200ResponseScope1 from a JSON string -post_cotton200_response_scope1_instance = PostCotton200ResponseScope1.from_json(json) -# print the JSON string representation of the object -print(PostCotton200ResponseScope1.to_json()) - -# convert the object into a dict -post_cotton200_response_scope1_dict = post_cotton200_response_scope1_instance.to_dict() -# create an instance of PostCotton200ResponseScope1 from a dict -post_cotton200_response_scope1_from_dict = PostCotton200ResponseScope1.from_dict(post_cotton200_response_scope1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostCotton200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostCotton200ResponseScope3.md deleted file mode 100644 index 257cd385..00000000 --- a/examples/python-api-client/api-client/docs/PostCotton200ResponseScope3.md +++ /dev/null @@ -1,35 +0,0 @@ -# PostCotton200ResponseScope3 - -Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**lime** | **float** | Emissions from lime, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostCotton200ResponseScope3 from a JSON string -post_cotton200_response_scope3_instance = PostCotton200ResponseScope3.from_json(json) -# print the JSON string representation of the object -print(PostCotton200ResponseScope3.to_json()) - -# convert the object into a dict -post_cotton200_response_scope3_dict = post_cotton200_response_scope3_instance.to_dict() -# create an instance of PostCotton200ResponseScope3 from a dict -post_cotton200_response_scope3_from_dict = PostCotton200ResponseScope3.from_dict(post_cotton200_response_scope3_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostCottonRequest.md b/examples/python-api-client/api-client/docs/PostCottonRequest.md deleted file mode 100644 index 5b5d4cb5..00000000 --- a/examples/python-api-client/api-client/docs/PostCottonRequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostCottonRequest - -Input data required for the `cotton` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**crops** | [**List[PostCottonRequestCropsInner]**](PostCottonRequestCropsInner.md) | | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**vegetation** | [**List[PostCottonRequestVegetationInner]**](PostCottonRequestVegetationInner.md) | | - -## Example - -```python -from openapi_client.models.post_cotton_request import PostCottonRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostCottonRequest from a JSON string -post_cotton_request_instance = PostCottonRequest.from_json(json) -# print the JSON string representation of the object -print(PostCottonRequest.to_json()) - -# convert the object into a dict -post_cotton_request_dict = post_cotton_request_instance.to_dict() -# create an instance of PostCottonRequest from a dict -post_cotton_request_from_dict = PostCottonRequest.from_dict(post_cotton_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostCottonRequestCropsInner.md b/examples/python-api-client/api-client/docs/PostCottonRequestCropsInner.md deleted file mode 100644 index d901daa1..00000000 --- a/examples/python-api-client/api-client/docs/PostCottonRequestCropsInner.md +++ /dev/null @@ -1,55 +0,0 @@ -# PostCottonRequestCropsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**average_cotton_yield** | **float** | Average cotton yield, in t/ha (tonnes per hectare) | -**area_sown** | **float** | Area sown, in ha (hectares) | -**average_weight_per_bale_kg** | **float** | Average weight of unprocessed cotton per bale, in kg | -**cotton_lint_per_bale_kg** | **float** | Average weight of cotton lint per bale, in kg | -**cotton_seed_per_bale_kg** | **float** | Average weight of cotton seed produced per bale, in kg | -**waste_per_bale_kg** | **float** | Average weight of cotton waste produced per bale, in kg | -**urea_application** | **float** | Urea application, in kg Urea/ha (kilograms of urea per hectare) | -**other_fertiliser_type** | **str** | Other N fertiliser type | [optional] -**other_fertiliser_application** | **float** | Other N fertiliser application, in kg/ha (kilograms per hectare) | -**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | [default to 0] -**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | [default to 0] -**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | [default to 0] -**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | [default to 0] -**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | [default to 0] -**single_super_phosphate** | **float** | Single superphosphate use, in kg/ha (kilograms per hectare) | -**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | -**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt. If included, this should only ever be 0 for cotton | [default to 0] -**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | -**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | -**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**diesel_use** | **float** | Diesel usage in L (litres) | -**petrol_use** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | - -## Example - -```python -from openapi_client.models.post_cotton_request_crops_inner import PostCottonRequestCropsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostCottonRequestCropsInner from a JSON string -post_cotton_request_crops_inner_instance = PostCottonRequestCropsInner.from_json(json) -# print the JSON string representation of the object -print(PostCottonRequestCropsInner.to_json()) - -# convert the object into a dict -post_cotton_request_crops_inner_dict = post_cotton_request_crops_inner_instance.to_dict() -# create an instance of PostCottonRequestCropsInner from a dict -post_cotton_request_crops_inner_from_dict = PostCottonRequestCropsInner.from_dict(post_cotton_request_crops_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostCottonRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostCottonRequestVegetationInner.md deleted file mode 100644 index aee41e88..00000000 --- a/examples/python-api-client/api-client/docs/PostCottonRequestVegetationInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostCottonRequestVegetationInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**allocation_to_crops** | **List[float]** | | - -## Example - -```python -from openapi_client.models.post_cotton_request_vegetation_inner import PostCottonRequestVegetationInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostCottonRequestVegetationInner from a JSON string -post_cotton_request_vegetation_inner_instance = PostCottonRequestVegetationInner.from_json(json) -# print the JSON string representation of the object -print(PostCottonRequestVegetationInner.to_json()) - -# convert the object into a dict -post_cotton_request_vegetation_inner_dict = post_cotton_request_vegetation_inner_instance.to_dict() -# create an instance of PostCottonRequestVegetationInner from a dict -post_cotton_request_vegetation_inner_from_dict = PostCottonRequestVegetationInner.from_dict(post_cotton_request_vegetation_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairy200Response.md b/examples/python-api-client/api-client/docs/PostDairy200Response.md deleted file mode 100644 index 5804d1f2..00000000 --- a/examples/python-api-client/api-client/docs/PostDairy200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostDairy200Response - -Emissions calculation output for the `dairy` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostDairy200ResponseScope1**](PostDairy200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostDairy200ResponseScope3**](PostDairy200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**net** | [**PostDairy200ResponseNet**](PostDairy200ResponseNet.md) | | -**intensities** | [**PostDairy200ResponseIntensities**](PostDairy200ResponseIntensities.md) | | -**intermediate** | [**List[PostDairy200ResponseIntermediateInner]**](PostDairy200ResponseIntermediateInner.md) | | - -## Example - -```python -from openapi_client.models.post_dairy200_response import PostDairy200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairy200Response from a JSON string -post_dairy200_response_instance = PostDairy200Response.from_json(json) -# print the JSON string representation of the object -print(PostDairy200Response.to_json()) - -# convert the object into a dict -post_dairy200_response_dict = post_dairy200_response_instance.to_dict() -# create an instance of PostDairy200Response from a dict -post_dairy200_response_from_dict = PostDairy200Response.from_dict(post_dairy200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairy200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostDairy200ResponseIntensities.md deleted file mode 100644 index 32fd12c4..00000000 --- a/examples/python-api-client/api-client/docs/PostDairy200ResponseIntensities.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostDairy200ResponseIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**milk_solids_produced_tonnes** | **float** | Milk solids produced in tonnes | -**intensity** | **float** | Dairy intensities including carbon sequestration, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_dairy200_response_intensities import PostDairy200ResponseIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairy200ResponseIntensities from a JSON string -post_dairy200_response_intensities_instance = PostDairy200ResponseIntensities.from_json(json) -# print the JSON string representation of the object -print(PostDairy200ResponseIntensities.to_json()) - -# convert the object into a dict -post_dairy200_response_intensities_dict = post_dairy200_response_intensities_instance.to_dict() -# create an instance of PostDairy200ResponseIntensities from a dict -post_dairy200_response_intensities_from_dict = PostDairy200ResponseIntensities.from_dict(post_dairy200_response_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairy200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostDairy200ResponseIntermediateInner.md deleted file mode 100644 index 70a2d371..00000000 --- a/examples/python-api-client/api-client/docs/PostDairy200ResponseIntermediateInner.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostDairy200ResponseIntermediateInner - -Intermediate emissions calculation output for the Dairy calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostDairy200ResponseScope1**](PostDairy200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostDairy200ResponseScope3**](PostDairy200ResponseScope3.md) | | -**net** | [**PostDairy200ResponseNet**](PostDairy200ResponseNet.md) | | -**intensities** | [**PostDairy200ResponseIntensities**](PostDairy200ResponseIntensities.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -## Example - -```python -from openapi_client.models.post_dairy200_response_intermediate_inner import PostDairy200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairy200ResponseIntermediateInner from a JSON string -post_dairy200_response_intermediate_inner_instance = PostDairy200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostDairy200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_dairy200_response_intermediate_inner_dict = post_dairy200_response_intermediate_inner_instance.to_dict() -# create an instance of PostDairy200ResponseIntermediateInner from a dict -post_dairy200_response_intermediate_inner_from_dict = PostDairy200ResponseIntermediateInner.from_dict(post_dairy200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairy200ResponseNet.md b/examples/python-api-client/api-client/docs/PostDairy200ResponseNet.md deleted file mode 100644 index f4ec392f..00000000 --- a/examples/python-api-client/api-client/docs/PostDairy200ResponseNet.md +++ /dev/null @@ -1,29 +0,0 @@ -# PostDairy200ResponseNet - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | - -## Example - -```python -from openapi_client.models.post_dairy200_response_net import PostDairy200ResponseNet - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairy200ResponseNet from a JSON string -post_dairy200_response_net_instance = PostDairy200ResponseNet.from_json(json) -# print the JSON string representation of the object -print(PostDairy200ResponseNet.to_json()) - -# convert the object into a dict -post_dairy200_response_net_dict = post_dairy200_response_net_instance.to_dict() -# create an instance of PostDairy200ResponseNet from a dict -post_dairy200_response_net_from_dict = PostDairy200ResponseNet.from_dict(post_dairy200_response_net_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairy200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostDairy200ResponseScope1.md deleted file mode 100644 index c2dd2518..00000000 --- a/examples/python-api-client/api-client/docs/PostDairy200ResponseScope1.md +++ /dev/null @@ -1,49 +0,0 @@ -# PostDairy200ResponseScope1 - -Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | -**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | -**manure_management_n2_o** | **float** | N2O emissions from manure management, in tonnes-CO2e | -**animal_waste_n2_o** | **float** | N2O emissions from animal waste, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**urine_and_dung_n2_o** | **float** | N2O emissions from urine and dung, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**transport_n2_o** | **float** | N2O emissions from transport, in tonnes-CO2e | -**transport_ch4** | **float** | CH4 emissions from transport, in tonnes-CO2e | -**transport_co2** | **float** | CO2 emissions from transport, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_dairy200_response_scope1 import PostDairy200ResponseScope1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairy200ResponseScope1 from a JSON string -post_dairy200_response_scope1_instance = PostDairy200ResponseScope1.from_json(json) -# print the JSON string representation of the object -print(PostDairy200ResponseScope1.to_json()) - -# convert the object into a dict -post_dairy200_response_scope1_dict = post_dairy200_response_scope1_instance.to_dict() -# create an instance of PostDairy200ResponseScope1 from a dict -post_dairy200_response_scope1_from_dict = PostDairy200ResponseScope1.from_dict(post_dairy200_response_scope1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairy200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostDairy200ResponseScope3.md deleted file mode 100644 index 48adf2c8..00000000 --- a/examples/python-api-client/api-client/docs/PostDairy200ResponseScope3.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostDairy200ResponseScope3 - -Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | -**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**lime** | **float** | Emissions from lime, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_dairy200_response_scope3 import PostDairy200ResponseScope3 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairy200ResponseScope3 from a JSON string -post_dairy200_response_scope3_instance = PostDairy200ResponseScope3.from_json(json) -# print the JSON string representation of the object -print(PostDairy200ResponseScope3.to_json()) - -# convert the object into a dict -post_dairy200_response_scope3_dict = post_dairy200_response_scope3_instance.to_dict() -# create an instance of PostDairy200ResponseScope3 from a dict -post_dairy200_response_scope3_from_dict = PostDairy200ResponseScope3.from_dict(post_dairy200_response_scope3_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairyRequest.md b/examples/python-api-client/api-client/docs/PostDairyRequest.md deleted file mode 100644 index a8ae1309..00000000 --- a/examples/python-api-client/api-client/docs/PostDairyRequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostDairyRequest - -Input data required for the `dairy` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**production_system** | **str** | Production system | -**dairy** | [**List[PostDairyRequestDairyInner]**](PostDairyRequestDairyInner.md) | | -**vegetation** | [**List[PostDairyRequestVegetationInner]**](PostDairyRequestVegetationInner.md) | | - -## Example - -```python -from openapi_client.models.post_dairy_request import PostDairyRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairyRequest from a JSON string -post_dairy_request_instance = PostDairyRequest.from_json(json) -# print the JSON string representation of the object -print(PostDairyRequest.to_json()) - -# convert the object into a dict -post_dairy_request_dict = post_dairy_request_instance.to_dict() -# create an instance of PostDairyRequest from a dict -post_dairy_request_from_dict = PostDairyRequest.from_dict(post_dairy_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInner.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInner.md deleted file mode 100644 index 84b52555..00000000 --- a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInner.md +++ /dev/null @@ -1,50 +0,0 @@ -# PostDairyRequestDairyInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**classes** | [**PostDairyRequestDairyInnerClasses**](PostDairyRequestDairyInnerClasses.md) | | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**seasonal_fertiliser** | [**PostDairyRequestDairyInnerSeasonalFertiliser**](PostDairyRequestDairyInnerSeasonalFertiliser.md) | | -**areas** | [**PostDairyRequestDairyInnerAreas**](PostDairyRequestDairyInnerAreas.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | -**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | -**cottonseed_feed** | **float** | Cotton seed purchased for cattle feed in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**manure_management_milking_cows** | [**PostDairyRequestDairyInnerManureManagementMilkingCows**](PostDairyRequestDairyInnerManureManagementMilkingCows.md) | | -**manure_management_other_dairy_cows** | [**PostDairyRequestDairyInnerManureManagementMilkingCows**](PostDairyRequestDairyInnerManureManagementMilkingCows.md) | | -**emissions_allocation_to_red_meat_production** | **float** | Allocation as a fraction, from 0 to 1 | -**truck_type** | **str** | Type of truck used for cattle transport | -**distance_cattle_transported** | **float** | Distance cattle are transported between farms, in km (kilometres) | - -## Example - -```python -from openapi_client.models.post_dairy_request_dairy_inner import PostDairyRequestDairyInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairyRequestDairyInner from a JSON string -post_dairy_request_dairy_inner_instance = PostDairyRequestDairyInner.from_json(json) -# print the JSON string representation of the object -print(PostDairyRequestDairyInner.to_json()) - -# convert the object into a dict -post_dairy_request_dairy_inner_dict = post_dairy_request_dairy_inner_instance.to_dict() -# create an instance of PostDairyRequestDairyInner from a dict -post_dairy_request_dairy_inner_from_dict = PostDairyRequestDairyInner.from_dict(post_dairy_request_dairy_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerAreas.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerAreas.md deleted file mode 100644 index 813b878b..00000000 --- a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerAreas.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostDairyRequestDairyInnerAreas - -Areas in hectares (ha) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cropped_dryland** | **float** | | [default to 0] -**cropped_irrigated** | **float** | | [default to 0] -**improved_pasture_dryland** | **float** | | [default to 0] -**improved_pasture_irrigated** | **float** | | [default to 0] - -## Example - -```python -from openapi_client.models.post_dairy_request_dairy_inner_areas import PostDairyRequestDairyInnerAreas - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairyRequestDairyInnerAreas from a JSON string -post_dairy_request_dairy_inner_areas_instance = PostDairyRequestDairyInnerAreas.from_json(json) -# print the JSON string representation of the object -print(PostDairyRequestDairyInnerAreas.to_json()) - -# convert the object into a dict -post_dairy_request_dairy_inner_areas_dict = post_dairy_request_dairy_inner_areas_instance.to_dict() -# create an instance of PostDairyRequestDairyInnerAreas from a dict -post_dairy_request_dairy_inner_areas_from_dict = PostDairyRequestDairyInnerAreas.from_dict(post_dairy_request_dairy_inner_areas_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClasses.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClasses.md deleted file mode 100644 index 62ea0bbc..00000000 --- a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClasses.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostDairyRequestDairyInnerClasses - -Dairy classes of different types and age ranges - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**milking_cows** | [**PostDairyRequestDairyInnerClassesMilkingCows**](PostDairyRequestDairyInnerClassesMilkingCows.md) | | -**heifers_lt1** | [**PostDairyRequestDairyInnerClassesHeifersLt1**](PostDairyRequestDairyInnerClassesHeifersLt1.md) | | -**heifers_gt1** | [**PostDairyRequestDairyInnerClassesHeifersGt1**](PostDairyRequestDairyInnerClassesHeifersGt1.md) | | -**dairy_bulls_lt1** | [**PostDairyRequestDairyInnerClassesDairyBullsLt1**](PostDairyRequestDairyInnerClassesDairyBullsLt1.md) | | -**dairy_bulls_gt1** | [**PostDairyRequestDairyInnerClassesDairyBullsGt1**](PostDairyRequestDairyInnerClassesDairyBullsGt1.md) | | - -## Example - -```python -from openapi_client.models.post_dairy_request_dairy_inner_classes import PostDairyRequestDairyInnerClasses - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairyRequestDairyInnerClasses from a JSON string -post_dairy_request_dairy_inner_classes_instance = PostDairyRequestDairyInnerClasses.from_json(json) -# print the JSON string representation of the object -print(PostDairyRequestDairyInnerClasses.to_json()) - -# convert the object into a dict -post_dairy_request_dairy_inner_classes_dict = post_dairy_request_dairy_inner_classes_instance.to_dict() -# create an instance of PostDairyRequestDairyInnerClasses from a dict -post_dairy_request_dairy_inner_classes_from_dict = PostDairyRequestDairyInnerClasses.from_dict(post_dairy_request_dairy_inner_classes_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsGt1.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsGt1.md deleted file mode 100644 index ace5bd00..00000000 --- a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsGt1.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostDairyRequestDairyInnerClassesDairyBullsGt1 - -Dairy bulls whose age is greater than 1 year old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**winter** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**spring** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**summer** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | - -## Example - -```python -from openapi_client.models.post_dairy_request_dairy_inner_classes_dairy_bulls_gt1 import PostDairyRequestDairyInnerClassesDairyBullsGt1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairyRequestDairyInnerClassesDairyBullsGt1 from a JSON string -post_dairy_request_dairy_inner_classes_dairy_bulls_gt1_instance = PostDairyRequestDairyInnerClassesDairyBullsGt1.from_json(json) -# print the JSON string representation of the object -print(PostDairyRequestDairyInnerClassesDairyBullsGt1.to_json()) - -# convert the object into a dict -post_dairy_request_dairy_inner_classes_dairy_bulls_gt1_dict = post_dairy_request_dairy_inner_classes_dairy_bulls_gt1_instance.to_dict() -# create an instance of PostDairyRequestDairyInnerClassesDairyBullsGt1 from a dict -post_dairy_request_dairy_inner_classes_dairy_bulls_gt1_from_dict = PostDairyRequestDairyInnerClassesDairyBullsGt1.from_dict(post_dairy_request_dairy_inner_classes_dairy_bulls_gt1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsLt1.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsLt1.md deleted file mode 100644 index 6eb14328..00000000 --- a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesDairyBullsLt1.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostDairyRequestDairyInnerClassesDairyBullsLt1 - -Dairy bulls whose age is less than 1 year old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**winter** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**spring** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**summer** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | - -## Example - -```python -from openapi_client.models.post_dairy_request_dairy_inner_classes_dairy_bulls_lt1 import PostDairyRequestDairyInnerClassesDairyBullsLt1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairyRequestDairyInnerClassesDairyBullsLt1 from a JSON string -post_dairy_request_dairy_inner_classes_dairy_bulls_lt1_instance = PostDairyRequestDairyInnerClassesDairyBullsLt1.from_json(json) -# print the JSON string representation of the object -print(PostDairyRequestDairyInnerClassesDairyBullsLt1.to_json()) - -# convert the object into a dict -post_dairy_request_dairy_inner_classes_dairy_bulls_lt1_dict = post_dairy_request_dairy_inner_classes_dairy_bulls_lt1_instance.to_dict() -# create an instance of PostDairyRequestDairyInnerClassesDairyBullsLt1 from a dict -post_dairy_request_dairy_inner_classes_dairy_bulls_lt1_from_dict = PostDairyRequestDairyInnerClassesDairyBullsLt1.from_dict(post_dairy_request_dairy_inner_classes_dairy_bulls_lt1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersGt1.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersGt1.md deleted file mode 100644 index db658b77..00000000 --- a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersGt1.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostDairyRequestDairyInnerClassesHeifersGt1 - -Heifers whose age is greater than 1 year old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**winter** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**spring** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**summer** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | - -## Example - -```python -from openapi_client.models.post_dairy_request_dairy_inner_classes_heifers_gt1 import PostDairyRequestDairyInnerClassesHeifersGt1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairyRequestDairyInnerClassesHeifersGt1 from a JSON string -post_dairy_request_dairy_inner_classes_heifers_gt1_instance = PostDairyRequestDairyInnerClassesHeifersGt1.from_json(json) -# print the JSON string representation of the object -print(PostDairyRequestDairyInnerClassesHeifersGt1.to_json()) - -# convert the object into a dict -post_dairy_request_dairy_inner_classes_heifers_gt1_dict = post_dairy_request_dairy_inner_classes_heifers_gt1_instance.to_dict() -# create an instance of PostDairyRequestDairyInnerClassesHeifersGt1 from a dict -post_dairy_request_dairy_inner_classes_heifers_gt1_from_dict = PostDairyRequestDairyInnerClassesHeifersGt1.from_dict(post_dairy_request_dairy_inner_classes_heifers_gt1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersLt1.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersLt1.md deleted file mode 100644 index ed254550..00000000 --- a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesHeifersLt1.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostDairyRequestDairyInnerClassesHeifersLt1 - -Heifers whose age is less than 1 year old - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**winter** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**spring** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**summer** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | - -## Example - -```python -from openapi_client.models.post_dairy_request_dairy_inner_classes_heifers_lt1 import PostDairyRequestDairyInnerClassesHeifersLt1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairyRequestDairyInnerClassesHeifersLt1 from a JSON string -post_dairy_request_dairy_inner_classes_heifers_lt1_instance = PostDairyRequestDairyInnerClassesHeifersLt1.from_json(json) -# print the JSON string representation of the object -print(PostDairyRequestDairyInnerClassesHeifersLt1.to_json()) - -# convert the object into a dict -post_dairy_request_dairy_inner_classes_heifers_lt1_dict = post_dairy_request_dairy_inner_classes_heifers_lt1_instance.to_dict() -# create an instance of PostDairyRequestDairyInnerClassesHeifersLt1 from a dict -post_dairy_request_dairy_inner_classes_heifers_lt1_from_dict = PostDairyRequestDairyInnerClassesHeifersLt1.from_dict(post_dairy_request_dairy_inner_classes_heifers_lt1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCows.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCows.md deleted file mode 100644 index 6590ee5d..00000000 --- a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCows.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostDairyRequestDairyInnerClassesMilkingCows - -Milking cows - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**winter** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**spring** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | -**summer** | [**PostDairyRequestDairyInnerClassesMilkingCowsAutumn**](PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md) | | - -## Example - -```python -from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows import PostDairyRequestDairyInnerClassesMilkingCows - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairyRequestDairyInnerClassesMilkingCows from a JSON string -post_dairy_request_dairy_inner_classes_milking_cows_instance = PostDairyRequestDairyInnerClassesMilkingCows.from_json(json) -# print the JSON string representation of the object -print(PostDairyRequestDairyInnerClassesMilkingCows.to_json()) - -# convert the object into a dict -post_dairy_request_dairy_inner_classes_milking_cows_dict = post_dairy_request_dairy_inner_classes_milking_cows_instance.to_dict() -# create an instance of PostDairyRequestDairyInnerClassesMilkingCows from a dict -post_dairy_request_dairy_inner_classes_milking_cows_from_dict = PostDairyRequestDairyInnerClassesMilkingCows.from_dict(post_dairy_request_dairy_inner_classes_milking_cows_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md deleted file mode 100644 index c790389b..00000000 --- a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerClassesMilkingCowsAutumn.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostDairyRequestDairyInnerClassesMilkingCowsAutumn - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals (head) | -**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | -**liveweight_gain** | **float** | Average liveweight gain in kg/day (kilogram per day) | -**crude_protein** | **float** | Crude protein percent, between 0 and 100. Note: If no value is provided, zero will be assumed. This will result in large, negative output values. This input will become mandatory in a future version. | [optional] -**dry_matter_digestibility** | **float** | Dry matter digestibility percent, between 0 and 100. Note: If no value is provided, zero will be assumed. This will result in large, negative output values. This input will become mandatory in a future version. | [optional] -**milk_production** | **float** | Milk produced in L/day/head (litres per day per head) | [optional] - -## Example - -```python -from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows_autumn import PostDairyRequestDairyInnerClassesMilkingCowsAutumn - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairyRequestDairyInnerClassesMilkingCowsAutumn from a JSON string -post_dairy_request_dairy_inner_classes_milking_cows_autumn_instance = PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_json(json) -# print the JSON string representation of the object -print(PostDairyRequestDairyInnerClassesMilkingCowsAutumn.to_json()) - -# convert the object into a dict -post_dairy_request_dairy_inner_classes_milking_cows_autumn_dict = post_dairy_request_dairy_inner_classes_milking_cows_autumn_instance.to_dict() -# create an instance of PostDairyRequestDairyInnerClassesMilkingCowsAutumn from a dict -post_dairy_request_dairy_inner_classes_milking_cows_autumn_from_dict = PostDairyRequestDairyInnerClassesMilkingCowsAutumn.from_dict(post_dairy_request_dairy_inner_classes_milking_cows_autumn_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerManureManagementMilkingCows.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerManureManagementMilkingCows.md deleted file mode 100644 index 419ac485..00000000 --- a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerManureManagementMilkingCows.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostDairyRequestDairyInnerManureManagementMilkingCows - -Manure management for each type, each value is a percentage of all excreta, from 0 to 100 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pasture** | **float** | | -**anaerobic_lagoon** | **float** | | -**sump_and_dispersal** | **float** | | -**drain_to_paddocks** | **float** | | -**soild_storage** | **float** | | - -## Example - -```python -from openapi_client.models.post_dairy_request_dairy_inner_manure_management_milking_cows import PostDairyRequestDairyInnerManureManagementMilkingCows - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairyRequestDairyInnerManureManagementMilkingCows from a JSON string -post_dairy_request_dairy_inner_manure_management_milking_cows_instance = PostDairyRequestDairyInnerManureManagementMilkingCows.from_json(json) -# print the JSON string representation of the object -print(PostDairyRequestDairyInnerManureManagementMilkingCows.to_json()) - -# convert the object into a dict -post_dairy_request_dairy_inner_manure_management_milking_cows_dict = post_dairy_request_dairy_inner_manure_management_milking_cows_instance.to_dict() -# create an instance of PostDairyRequestDairyInnerManureManagementMilkingCows from a dict -post_dairy_request_dairy_inner_manure_management_milking_cows_from_dict = PostDairyRequestDairyInnerManureManagementMilkingCows.from_dict(post_dairy_request_dairy_inner_manure_management_milking_cows_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliser.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliser.md deleted file mode 100644 index df24bb71..00000000 --- a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliser.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostDairyRequestDairyInnerSeasonalFertiliser - -Seasonal nitrogen fertiliser use - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | -**winter** | [**PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | -**spring** | [**PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | -**summer** | [**PostDairyRequestDairyInnerSeasonalFertiliserAutumn**](PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md) | | - -## Example - -```python -from openapi_client.models.post_dairy_request_dairy_inner_seasonal_fertiliser import PostDairyRequestDairyInnerSeasonalFertiliser - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairyRequestDairyInnerSeasonalFertiliser from a JSON string -post_dairy_request_dairy_inner_seasonal_fertiliser_instance = PostDairyRequestDairyInnerSeasonalFertiliser.from_json(json) -# print the JSON string representation of the object -print(PostDairyRequestDairyInnerSeasonalFertiliser.to_json()) - -# convert the object into a dict -post_dairy_request_dairy_inner_seasonal_fertiliser_dict = post_dairy_request_dairy_inner_seasonal_fertiliser_instance.to_dict() -# create an instance of PostDairyRequestDairyInnerSeasonalFertiliser from a dict -post_dairy_request_dairy_inner_seasonal_fertiliser_from_dict = PostDairyRequestDairyInnerSeasonalFertiliser.from_dict(post_dairy_request_dairy_inner_seasonal_fertiliser_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md b/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md deleted file mode 100644 index f7c0f813..00000000 --- a/examples/python-api-client/api-client/docs/PostDairyRequestDairyInnerSeasonalFertiliserAutumn.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostDairyRequestDairyInnerSeasonalFertiliserAutumn - -Nitrogen fertiliser application, each value is in kg N/ha - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**crops_irrigated** | **float** | | -**crops_dryland** | **float** | | -**pasture_irrigated** | **float** | | -**pasture_dryland** | **float** | | - -## Example - -```python -from openapi_client.models.post_dairy_request_dairy_inner_seasonal_fertiliser_autumn import PostDairyRequestDairyInnerSeasonalFertiliserAutumn - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairyRequestDairyInnerSeasonalFertiliserAutumn from a JSON string -post_dairy_request_dairy_inner_seasonal_fertiliser_autumn_instance = PostDairyRequestDairyInnerSeasonalFertiliserAutumn.from_json(json) -# print the JSON string representation of the object -print(PostDairyRequestDairyInnerSeasonalFertiliserAutumn.to_json()) - -# convert the object into a dict -post_dairy_request_dairy_inner_seasonal_fertiliser_autumn_dict = post_dairy_request_dairy_inner_seasonal_fertiliser_autumn_instance.to_dict() -# create an instance of PostDairyRequestDairyInnerSeasonalFertiliserAutumn from a dict -post_dairy_request_dairy_inner_seasonal_fertiliser_autumn_from_dict = PostDairyRequestDairyInnerSeasonalFertiliserAutumn.from_dict(post_dairy_request_dairy_inner_seasonal_fertiliser_autumn_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDairyRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostDairyRequestVegetationInner.md deleted file mode 100644 index 87759856..00000000 --- a/examples/python-api-client/api-client/docs/PostDairyRequestVegetationInner.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostDairyRequestVegetationInner - -Non-productive vegetation inputs along with allocations to dairy - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**dairy_proportion** | **List[float]** | The proportion of the sequestration that is allocated to dairy | - -## Example - -```python -from openapi_client.models.post_dairy_request_vegetation_inner import PostDairyRequestVegetationInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDairyRequestVegetationInner from a JSON string -post_dairy_request_vegetation_inner_instance = PostDairyRequestVegetationInner.from_json(json) -# print the JSON string representation of the object -print(PostDairyRequestVegetationInner.to_json()) - -# convert the object into a dict -post_dairy_request_vegetation_inner_dict = post_dairy_request_vegetation_inner_instance.to_dict() -# create an instance of PostDairyRequestVegetationInner from a dict -post_dairy_request_vegetation_inner_from_dict = PostDairyRequestVegetationInner.from_dict(post_dairy_request_vegetation_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeer200Response.md b/examples/python-api-client/api-client/docs/PostDeer200Response.md deleted file mode 100644 index b5d3f4f9..00000000 --- a/examples/python-api-client/api-client/docs/PostDeer200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostDeer200Response - -Emissions calculation output for the `deer` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**net** | [**PostDeer200ResponseNet**](PostDeer200ResponseNet.md) | | -**intensities** | [**PostDeer200ResponseIntensities**](PostDeer200ResponseIntensities.md) | | -**intermediate** | [**List[PostDeer200ResponseIntermediateInner]**](PostDeer200ResponseIntermediateInner.md) | | - -## Example - -```python -from openapi_client.models.post_deer200_response import PostDeer200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeer200Response from a JSON string -post_deer200_response_instance = PostDeer200Response.from_json(json) -# print the JSON string representation of the object -print(PostDeer200Response.to_json()) - -# convert the object into a dict -post_deer200_response_dict = post_deer200_response_instance.to_dict() -# create an instance of PostDeer200Response from a dict -post_deer200_response_from_dict = PostDeer200Response.from_dict(post_deer200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeer200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostDeer200ResponseIntensities.md deleted file mode 100644 index bee2717b..00000000 --- a/examples/python-api-client/api-client/docs/PostDeer200ResponseIntensities.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostDeer200ResponseIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**liveweight_produced_kg** | **float** | Deer meat produced in kg liveweight | -**deer_meat_excluding_sequestration** | **float** | Deer meat (breeding herd) excluding sequestration, in kg-CO2e/kg liveweight | -**deer_meat_including_sequestration** | **float** | Deer meat (breeding herd) including sequestration, in kg-CO2e/kg liveweight | - -## Example - -```python -from openapi_client.models.post_deer200_response_intensities import PostDeer200ResponseIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeer200ResponseIntensities from a JSON string -post_deer200_response_intensities_instance = PostDeer200ResponseIntensities.from_json(json) -# print the JSON string representation of the object -print(PostDeer200ResponseIntensities.to_json()) - -# convert the object into a dict -post_deer200_response_intensities_dict = post_deer200_response_intensities_instance.to_dict() -# create an instance of PostDeer200ResponseIntensities from a dict -post_deer200_response_intensities_from_dict = PostDeer200ResponseIntensities.from_dict(post_deer200_response_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeer200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostDeer200ResponseIntermediateInner.md deleted file mode 100644 index 58070a7f..00000000 --- a/examples/python-api-client/api-client/docs/PostDeer200ResponseIntermediateInner.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostDeer200ResponseIntermediateInner - -Intermediate emissions calculation output for the Deer calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostBuffalo200ResponseScope3**](PostBuffalo200ResponseScope3.md) | | -**net** | [**PostDeer200ResponseNet**](PostDeer200ResponseNet.md) | | -**intensities** | [**PostDeer200ResponseIntensities**](PostDeer200ResponseIntensities.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -## Example - -```python -from openapi_client.models.post_deer200_response_intermediate_inner import PostDeer200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeer200ResponseIntermediateInner from a JSON string -post_deer200_response_intermediate_inner_instance = PostDeer200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostDeer200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_deer200_response_intermediate_inner_dict = post_deer200_response_intermediate_inner_instance.to_dict() -# create an instance of PostDeer200ResponseIntermediateInner from a dict -post_deer200_response_intermediate_inner_from_dict = PostDeer200ResponseIntermediateInner.from_dict(post_deer200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeer200ResponseNet.md b/examples/python-api-client/api-client/docs/PostDeer200ResponseNet.md deleted file mode 100644 index 19b4ca65..00000000 --- a/examples/python-api-client/api-client/docs/PostDeer200ResponseNet.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostDeer200ResponseNet - -Net emissions for deer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | - -## Example - -```python -from openapi_client.models.post_deer200_response_net import PostDeer200ResponseNet - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeer200ResponseNet from a JSON string -post_deer200_response_net_instance = PostDeer200ResponseNet.from_json(json) -# print the JSON string representation of the object -print(PostDeer200ResponseNet.to_json()) - -# convert the object into a dict -post_deer200_response_net_dict = post_deer200_response_net_instance.to_dict() -# create an instance of PostDeer200ResponseNet from a dict -post_deer200_response_net_from_dict = PostDeer200ResponseNet.from_dict(post_deer200_response_net_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeerRequest.md b/examples/python-api-client/api-client/docs/PostDeerRequest.md deleted file mode 100644 index c36a5ff4..00000000 --- a/examples/python-api-client/api-client/docs/PostDeerRequest.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostDeerRequest - -Input data required for the `deer` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**deers** | [**List[PostDeerRequestDeersInner]**](PostDeerRequestDeersInner.md) | | -**vegetation** | [**List[PostDeerRequestVegetationInner]**](PostDeerRequestVegetationInner.md) | | [default to []] - -## Example - -```python -from openapi_client.models.post_deer_request import PostDeerRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeerRequest from a JSON string -post_deer_request_instance = PostDeerRequest.from_json(json) -# print the JSON string representation of the object -print(PostDeerRequest.to_json()) - -# convert the object into a dict -post_deer_request_dict = post_deer_request_instance.to_dict() -# create an instance of PostDeerRequest from a dict -post_deer_request_from_dict = PostDeerRequest.from_dict(post_deer_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInner.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInner.md deleted file mode 100644 index 367c7bae..00000000 --- a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInner.md +++ /dev/null @@ -1,45 +0,0 @@ -# PostDeerRequestDeersInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**classes** | [**PostDeerRequestDeersInnerClasses**](PostDeerRequestDeersInnerClasses.md) | | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**electricity_source** | **str** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | -**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**does_fawning** | [**PostDeerRequestDeersInnerDoesFawning**](PostDeerRequestDeersInnerDoesFawning.md) | | -**seasonal_fawning** | [**PostDeerRequestDeersInnerSeasonalFawning**](PostDeerRequestDeersInnerSeasonalFawning.md) | | - -## Example - -```python -from openapi_client.models.post_deer_request_deers_inner import PostDeerRequestDeersInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeerRequestDeersInner from a JSON string -post_deer_request_deers_inner_instance = PostDeerRequestDeersInner.from_json(json) -# print the JSON string representation of the object -print(PostDeerRequestDeersInner.to_json()) - -# convert the object into a dict -post_deer_request_deers_inner_dict = post_deer_request_deers_inner_instance.to_dict() -# create an instance of PostDeerRequestDeersInner from a dict -post_deer_request_deers_inner_from_dict = PostDeerRequestDeersInner.from_dict(post_deer_request_deers_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClasses.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClasses.md deleted file mode 100644 index d67accca..00000000 --- a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClasses.md +++ /dev/null @@ -1,37 +0,0 @@ -# PostDeerRequestDeersInnerClasses - -Deer classes of different types - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bucks** | [**PostDeerRequestDeersInnerClassesBucks**](PostDeerRequestDeersInnerClassesBucks.md) | | [optional] -**trade_bucks** | [**PostDeerRequestDeersInnerClassesTradeBucks**](PostDeerRequestDeersInnerClassesTradeBucks.md) | | [optional] -**breeding_does** | [**PostDeerRequestDeersInnerClassesBreedingDoes**](PostDeerRequestDeersInnerClassesBreedingDoes.md) | | [optional] -**trade_does** | [**PostDeerRequestDeersInnerClassesTradeDoes**](PostDeerRequestDeersInnerClassesTradeDoes.md) | | [optional] -**other_does** | [**PostDeerRequestDeersInnerClassesOtherDoes**](PostDeerRequestDeersInnerClassesOtherDoes.md) | | [optional] -**trade_other_does** | [**PostDeerRequestDeersInnerClassesTradeOtherDoes**](PostDeerRequestDeersInnerClassesTradeOtherDoes.md) | | [optional] -**fawn** | [**PostDeerRequestDeersInnerClassesFawn**](PostDeerRequestDeersInnerClassesFawn.md) | | [optional] -**trade_fawn** | [**PostDeerRequestDeersInnerClassesTradeFawn**](PostDeerRequestDeersInnerClassesTradeFawn.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_deer_request_deers_inner_classes import PostDeerRequestDeersInnerClasses - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeerRequestDeersInnerClasses from a JSON string -post_deer_request_deers_inner_classes_instance = PostDeerRequestDeersInnerClasses.from_json(json) -# print the JSON string representation of the object -print(PostDeerRequestDeersInnerClasses.to_json()) - -# convert the object into a dict -post_deer_request_deers_inner_classes_dict = post_deer_request_deers_inner_classes_instance.to_dict() -# create an instance of PostDeerRequestDeersInnerClasses from a dict -post_deer_request_deers_inner_classes_from_dict = PostDeerRequestDeersInnerClasses.from_dict(post_deer_request_deers_inner_classes_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBreedingDoes.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBreedingDoes.md deleted file mode 100644 index e3540fd4..00000000 --- a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBreedingDoes.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostDeerRequestDeersInnerClassesBreedingDoes - -Breeding does - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_deer_request_deers_inner_classes_breeding_does import PostDeerRequestDeersInnerClassesBreedingDoes - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeerRequestDeersInnerClassesBreedingDoes from a JSON string -post_deer_request_deers_inner_classes_breeding_does_instance = PostDeerRequestDeersInnerClassesBreedingDoes.from_json(json) -# print the JSON string representation of the object -print(PostDeerRequestDeersInnerClassesBreedingDoes.to_json()) - -# convert the object into a dict -post_deer_request_deers_inner_classes_breeding_does_dict = post_deer_request_deers_inner_classes_breeding_does_instance.to_dict() -# create an instance of PostDeerRequestDeersInnerClassesBreedingDoes from a dict -post_deer_request_deers_inner_classes_breeding_does_from_dict = PostDeerRequestDeersInnerClassesBreedingDoes.from_dict(post_deer_request_deers_inner_classes_breeding_does_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBucks.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBucks.md deleted file mode 100644 index 73b3f2fe..00000000 --- a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesBucks.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostDeerRequestDeersInnerClassesBucks - -Bucks - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_deer_request_deers_inner_classes_bucks import PostDeerRequestDeersInnerClassesBucks - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeerRequestDeersInnerClassesBucks from a JSON string -post_deer_request_deers_inner_classes_bucks_instance = PostDeerRequestDeersInnerClassesBucks.from_json(json) -# print the JSON string representation of the object -print(PostDeerRequestDeersInnerClassesBucks.to_json()) - -# convert the object into a dict -post_deer_request_deers_inner_classes_bucks_dict = post_deer_request_deers_inner_classes_bucks_instance.to_dict() -# create an instance of PostDeerRequestDeersInnerClassesBucks from a dict -post_deer_request_deers_inner_classes_bucks_from_dict = PostDeerRequestDeersInnerClassesBucks.from_dict(post_deer_request_deers_inner_classes_bucks_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesFawn.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesFawn.md deleted file mode 100644 index bbea9f6d..00000000 --- a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesFawn.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostDeerRequestDeersInnerClassesFawn - -Fawns - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_deer_request_deers_inner_classes_fawn import PostDeerRequestDeersInnerClassesFawn - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeerRequestDeersInnerClassesFawn from a JSON string -post_deer_request_deers_inner_classes_fawn_instance = PostDeerRequestDeersInnerClassesFawn.from_json(json) -# print the JSON string representation of the object -print(PostDeerRequestDeersInnerClassesFawn.to_json()) - -# convert the object into a dict -post_deer_request_deers_inner_classes_fawn_dict = post_deer_request_deers_inner_classes_fawn_instance.to_dict() -# create an instance of PostDeerRequestDeersInnerClassesFawn from a dict -post_deer_request_deers_inner_classes_fawn_from_dict = PostDeerRequestDeersInnerClassesFawn.from_dict(post_deer_request_deers_inner_classes_fawn_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesOtherDoes.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesOtherDoes.md deleted file mode 100644 index 7a8e0fac..00000000 --- a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesOtherDoes.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostDeerRequestDeersInnerClassesOtherDoes - -Other does - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_deer_request_deers_inner_classes_other_does import PostDeerRequestDeersInnerClassesOtherDoes - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeerRequestDeersInnerClassesOtherDoes from a JSON string -post_deer_request_deers_inner_classes_other_does_instance = PostDeerRequestDeersInnerClassesOtherDoes.from_json(json) -# print the JSON string representation of the object -print(PostDeerRequestDeersInnerClassesOtherDoes.to_json()) - -# convert the object into a dict -post_deer_request_deers_inner_classes_other_does_dict = post_deer_request_deers_inner_classes_other_does_instance.to_dict() -# create an instance of PostDeerRequestDeersInnerClassesOtherDoes from a dict -post_deer_request_deers_inner_classes_other_does_from_dict = PostDeerRequestDeersInnerClassesOtherDoes.from_dict(post_deer_request_deers_inner_classes_other_does_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeBucks.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeBucks.md deleted file mode 100644 index 70df18ae..00000000 --- a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeBucks.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostDeerRequestDeersInnerClassesTradeBucks - -Trade bucks - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_deer_request_deers_inner_classes_trade_bucks import PostDeerRequestDeersInnerClassesTradeBucks - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeerRequestDeersInnerClassesTradeBucks from a JSON string -post_deer_request_deers_inner_classes_trade_bucks_instance = PostDeerRequestDeersInnerClassesTradeBucks.from_json(json) -# print the JSON string representation of the object -print(PostDeerRequestDeersInnerClassesTradeBucks.to_json()) - -# convert the object into a dict -post_deer_request_deers_inner_classes_trade_bucks_dict = post_deer_request_deers_inner_classes_trade_bucks_instance.to_dict() -# create an instance of PostDeerRequestDeersInnerClassesTradeBucks from a dict -post_deer_request_deers_inner_classes_trade_bucks_from_dict = PostDeerRequestDeersInnerClassesTradeBucks.from_dict(post_deer_request_deers_inner_classes_trade_bucks_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeDoes.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeDoes.md deleted file mode 100644 index 806d96a0..00000000 --- a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeDoes.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostDeerRequestDeersInnerClassesTradeDoes - -Trade does - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_deer_request_deers_inner_classes_trade_does import PostDeerRequestDeersInnerClassesTradeDoes - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeerRequestDeersInnerClassesTradeDoes from a JSON string -post_deer_request_deers_inner_classes_trade_does_instance = PostDeerRequestDeersInnerClassesTradeDoes.from_json(json) -# print the JSON string representation of the object -print(PostDeerRequestDeersInnerClassesTradeDoes.to_json()) - -# convert the object into a dict -post_deer_request_deers_inner_classes_trade_does_dict = post_deer_request_deers_inner_classes_trade_does_instance.to_dict() -# create an instance of PostDeerRequestDeersInnerClassesTradeDoes from a dict -post_deer_request_deers_inner_classes_trade_does_from_dict = PostDeerRequestDeersInnerClassesTradeDoes.from_dict(post_deer_request_deers_inner_classes_trade_does_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeFawn.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeFawn.md deleted file mode 100644 index 3e1155d2..00000000 --- a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeFawn.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostDeerRequestDeersInnerClassesTradeFawn - -Trade fawns - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_deer_request_deers_inner_classes_trade_fawn import PostDeerRequestDeersInnerClassesTradeFawn - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeerRequestDeersInnerClassesTradeFawn from a JSON string -post_deer_request_deers_inner_classes_trade_fawn_instance = PostDeerRequestDeersInnerClassesTradeFawn.from_json(json) -# print the JSON string representation of the object -print(PostDeerRequestDeersInnerClassesTradeFawn.to_json()) - -# convert the object into a dict -post_deer_request_deers_inner_classes_trade_fawn_dict = post_deer_request_deers_inner_classes_trade_fawn_instance.to_dict() -# create an instance of PostDeerRequestDeersInnerClassesTradeFawn from a dict -post_deer_request_deers_inner_classes_trade_fawn_from_dict = PostDeerRequestDeersInnerClassesTradeFawn.from_dict(post_deer_request_deers_inner_classes_trade_fawn_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeOtherDoes.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeOtherDoes.md deleted file mode 100644 index 51c7da1d..00000000 --- a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerClassesTradeOtherDoes.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostDeerRequestDeersInnerClassesTradeOtherDoes - -Trade other does - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_deer_request_deers_inner_classes_trade_other_does import PostDeerRequestDeersInnerClassesTradeOtherDoes - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeerRequestDeersInnerClassesTradeOtherDoes from a JSON string -post_deer_request_deers_inner_classes_trade_other_does_instance = PostDeerRequestDeersInnerClassesTradeOtherDoes.from_json(json) -# print the JSON string representation of the object -print(PostDeerRequestDeersInnerClassesTradeOtherDoes.to_json()) - -# convert the object into a dict -post_deer_request_deers_inner_classes_trade_other_does_dict = post_deer_request_deers_inner_classes_trade_other_does_instance.to_dict() -# create an instance of PostDeerRequestDeersInnerClassesTradeOtherDoes from a dict -post_deer_request_deers_inner_classes_trade_other_does_from_dict = PostDeerRequestDeersInnerClassesTradeOtherDoes.from_dict(post_deer_request_deers_inner_classes_trade_other_does_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerDoesFawning.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerDoesFawning.md deleted file mode 100644 index be0f4612..00000000 --- a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerDoesFawning.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostDeerRequestDeersInnerDoesFawning - -Proportion of does fawning in each season, from 0 to 1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**spring** | **float** | | -**summer** | **float** | | -**autumn** | **float** | | -**winter** | **float** | | - -## Example - -```python -from openapi_client.models.post_deer_request_deers_inner_does_fawning import PostDeerRequestDeersInnerDoesFawning - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeerRequestDeersInnerDoesFawning from a JSON string -post_deer_request_deers_inner_does_fawning_instance = PostDeerRequestDeersInnerDoesFawning.from_json(json) -# print the JSON string representation of the object -print(PostDeerRequestDeersInnerDoesFawning.to_json()) - -# convert the object into a dict -post_deer_request_deers_inner_does_fawning_dict = post_deer_request_deers_inner_does_fawning_instance.to_dict() -# create an instance of PostDeerRequestDeersInnerDoesFawning from a dict -post_deer_request_deers_inner_does_fawning_from_dict = PostDeerRequestDeersInnerDoesFawning.from_dict(post_deer_request_deers_inner_does_fawning_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerSeasonalFawning.md b/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerSeasonalFawning.md deleted file mode 100644 index 88c987cd..00000000 --- a/examples/python-api-client/api-client/docs/PostDeerRequestDeersInnerSeasonalFawning.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostDeerRequestDeersInnerSeasonalFawning - -Seasonal fawning rates, from 0 to 1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**spring** | **float** | | -**summer** | **float** | | -**autumn** | **float** | | -**winter** | **float** | | - -## Example - -```python -from openapi_client.models.post_deer_request_deers_inner_seasonal_fawning import PostDeerRequestDeersInnerSeasonalFawning - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeerRequestDeersInnerSeasonalFawning from a JSON string -post_deer_request_deers_inner_seasonal_fawning_instance = PostDeerRequestDeersInnerSeasonalFawning.from_json(json) -# print the JSON string representation of the object -print(PostDeerRequestDeersInnerSeasonalFawning.to_json()) - -# convert the object into a dict -post_deer_request_deers_inner_seasonal_fawning_dict = post_deer_request_deers_inner_seasonal_fawning_instance.to_dict() -# create an instance of PostDeerRequestDeersInnerSeasonalFawning from a dict -post_deer_request_deers_inner_seasonal_fawning_from_dict = PostDeerRequestDeersInnerSeasonalFawning.from_dict(post_deer_request_deers_inner_seasonal_fawning_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostDeerRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostDeerRequestVegetationInner.md deleted file mode 100644 index aa8e2c47..00000000 --- a/examples/python-api-client/api-client/docs/PostDeerRequestVegetationInner.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostDeerRequestVegetationInner - -Non-productive vegetation inputs along with allocations to deer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**deer_proportion** | **List[float]** | The proportion of the sequestration that is allocated to deer | - -## Example - -```python -from openapi_client.models.post_deer_request_vegetation_inner import PostDeerRequestVegetationInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeerRequestVegetationInner from a JSON string -post_deer_request_vegetation_inner_instance = PostDeerRequestVegetationInner.from_json(json) -# print the JSON string representation of the object -print(PostDeerRequestVegetationInner.to_json()) - -# convert the object into a dict -post_deer_request_vegetation_inner_dict = post_deer_request_vegetation_inner_instance.to_dict() -# create an instance of PostDeerRequestVegetationInner from a dict -post_deer_request_vegetation_inner_from_dict = PostDeerRequestVegetationInner.from_dict(post_deer_request_vegetation_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlot200Response.md b/examples/python-api-client/api-client/docs/PostFeedlot200Response.md deleted file mode 100644 index 1d25e9c6..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlot200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostFeedlot200Response - -Emissions calculation output for the `feedlot` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostFeedlot200ResponseScope1**](PostFeedlot200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostFeedlot200ResponseScope3**](PostFeedlot200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**List[PostFeedlot200ResponseIntermediateInner]**](PostFeedlot200ResponseIntermediateInner.md) | | -**net** | [**PostFeedlot200ResponseIntermediateInnerNet**](PostFeedlot200ResponseIntermediateInnerNet.md) | | -**intensities** | [**PostFeedlot200ResponseIntermediateInnerIntensities**](PostFeedlot200ResponseIntermediateInnerIntensities.md) | | - -## Example - -```python -from openapi_client.models.post_feedlot200_response import PostFeedlot200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlot200Response from a JSON string -post_feedlot200_response_instance = PostFeedlot200Response.from_json(json) -# print the JSON string representation of the object -print(PostFeedlot200Response.to_json()) - -# convert the object into a dict -post_feedlot200_response_dict = post_feedlot200_response_instance.to_dict() -# create an instance of PostFeedlot200Response from a dict -post_feedlot200_response_from_dict = PostFeedlot200Response.from_dict(post_feedlot200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInner.md deleted file mode 100644 index 090b9990..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInner.md +++ /dev/null @@ -1,35 +0,0 @@ -# PostFeedlot200ResponseIntermediateInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostFeedlot200ResponseScope1**](PostFeedlot200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostFeedlot200ResponseScope3**](PostFeedlot200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | -**net** | [**PostFeedlot200ResponseIntermediateInnerNet**](PostFeedlot200ResponseIntermediateInnerNet.md) | | -**intensities** | [**PostFeedlot200ResponseIntermediateInnerIntensities**](PostFeedlot200ResponseIntermediateInnerIntensities.md) | | - -## Example - -```python -from openapi_client.models.post_feedlot200_response_intermediate_inner import PostFeedlot200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlot200ResponseIntermediateInner from a JSON string -post_feedlot200_response_intermediate_inner_instance = PostFeedlot200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostFeedlot200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_feedlot200_response_intermediate_inner_dict = post_feedlot200_response_intermediate_inner_instance.to_dict() -# create an instance of PostFeedlot200ResponseIntermediateInner from a dict -post_feedlot200_response_intermediate_inner_from_dict = PostFeedlot200ResponseIntermediateInner.from_dict(post_feedlot200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index e7607e8a..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostFeedlot200ResponseIntermediateInnerIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**liveweight_produced_kg** | **float** | Amount of meat produced in kg liveweight | -**beef_including_sequestration** | **float** | Beef including carbon sequestration, in kg-CO2e/kg liveweight | -**beef_excluding_sequestration** | **float** | Beef excluding carbon sequestration, in kg-CO2e/kg liveweight | - -## Example - -```python -from openapi_client.models.post_feedlot200_response_intermediate_inner_intensities import PostFeedlot200ResponseIntermediateInnerIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlot200ResponseIntermediateInnerIntensities from a JSON string -post_feedlot200_response_intermediate_inner_intensities_instance = PostFeedlot200ResponseIntermediateInnerIntensities.from_json(json) -# print the JSON string representation of the object -print(PostFeedlot200ResponseIntermediateInnerIntensities.to_json()) - -# convert the object into a dict -post_feedlot200_response_intermediate_inner_intensities_dict = post_feedlot200_response_intermediate_inner_intensities_instance.to_dict() -# create an instance of PostFeedlot200ResponseIntermediateInnerIntensities from a dict -post_feedlot200_response_intermediate_inner_intensities_from_dict = PostFeedlot200ResponseIntermediateInnerIntensities.from_dict(post_feedlot200_response_intermediate_inner_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerNet.md b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerNet.md deleted file mode 100644 index 27a51380..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseIntermediateInnerNet.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostFeedlot200ResponseIntermediateInnerNet - -Net emissions for feedlot - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | - -## Example - -```python -from openapi_client.models.post_feedlot200_response_intermediate_inner_net import PostFeedlot200ResponseIntermediateInnerNet - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlot200ResponseIntermediateInnerNet from a JSON string -post_feedlot200_response_intermediate_inner_net_instance = PostFeedlot200ResponseIntermediateInnerNet.from_json(json) -# print the JSON string representation of the object -print(PostFeedlot200ResponseIntermediateInnerNet.to_json()) - -# convert the object into a dict -post_feedlot200_response_intermediate_inner_net_dict = post_feedlot200_response_intermediate_inner_net_instance.to_dict() -# create an instance of PostFeedlot200ResponseIntermediateInnerNet from a dict -post_feedlot200_response_intermediate_inner_net_from_dict = PostFeedlot200ResponseIntermediateInnerNet.from_dict(post_feedlot200_response_intermediate_inner_net_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope1.md deleted file mode 100644 index ae2922b2..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope1.md +++ /dev/null @@ -1,47 +0,0 @@ -# PostFeedlot200ResponseScope1 - -Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**transport_co2** | **float** | CO2 emissions from transport, in tonnes-CO2e | -**transport_ch4** | **float** | CH4 emissions from transport, in tonnes-CO2e | -**transport_n2_o** | **float** | N2O emissions from transport, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**manure_direct_n2_o** | **float** | CH4 emissions from manure management (direct), in tonnes-CO2e | -**manure_indirect_n2_o** | **float** | CH4 emissions from manure management (indirect), in tonnes-CO2e | -**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | -**manure_applied_to_soil_n2_o** | **float** | CH4 emissions from manure applied to soil, in tonnes-CO2e | -**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_feedlot200_response_scope1 import PostFeedlot200ResponseScope1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlot200ResponseScope1 from a JSON string -post_feedlot200_response_scope1_instance = PostFeedlot200ResponseScope1.from_json(json) -# print the JSON string representation of the object -print(PostFeedlot200ResponseScope1.to_json()) - -# convert the object into a dict -post_feedlot200_response_scope1_dict = post_feedlot200_response_scope1_instance.to_dict() -# create an instance of PostFeedlot200ResponseScope1 from a dict -post_feedlot200_response_scope1_from_dict = PostFeedlot200ResponseScope1.from_dict(post_feedlot200_response_scope1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope3.md deleted file mode 100644 index f4fbcdc2..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlot200ResponseScope3.md +++ /dev/null @@ -1,37 +0,0 @@ -# PostFeedlot200ResponseScope3 - -Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**lime** | **float** | Emissions from lime, in tonnes-CO2e | -**feed** | **float** | Emissions from feed, in tonnes-CO2e | -**purchase_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_feedlot200_response_scope3 import PostFeedlot200ResponseScope3 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlot200ResponseScope3 from a JSON string -post_feedlot200_response_scope3_instance = PostFeedlot200ResponseScope3.from_json(json) -# print the JSON string representation of the object -print(PostFeedlot200ResponseScope3.to_json()) - -# convert the object into a dict -post_feedlot200_response_scope3_dict = post_feedlot200_response_scope3_instance.to_dict() -# create an instance of PostFeedlot200ResponseScope3 from a dict -post_feedlot200_response_scope3_from_dict = PostFeedlot200ResponseScope3.from_dict(post_feedlot200_response_scope3_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequest.md b/examples/python-api-client/api-client/docs/PostFeedlotRequest.md deleted file mode 100644 index f7b48094..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlotRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostFeedlotRequest - -Input data required for the `feedlot` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**feedlots** | [**List[PostFeedlotRequestFeedlotsInner]**](PostFeedlotRequestFeedlotsInner.md) | | -**vegetation** | [**List[PostFeedlotRequestVegetationInner]**](PostFeedlotRequestVegetationInner.md) | | - -## Example - -```python -from openapi_client.models.post_feedlot_request import PostFeedlotRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlotRequest from a JSON string -post_feedlot_request_instance = PostFeedlotRequest.from_json(json) -# print the JSON string representation of the object -print(PostFeedlotRequest.to_json()) - -# convert the object into a dict -post_feedlot_request_dict = post_feedlot_request_instance.to_dict() -# create an instance of PostFeedlotRequest from a dict -post_feedlot_request_from_dict = PostFeedlotRequest.from_dict(post_feedlot_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInner.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInner.md deleted file mode 100644 index 6805c3b0..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInner.md +++ /dev/null @@ -1,50 +0,0 @@ -# PostFeedlotRequestFeedlotsInner - -All fields needed to describe the activity of a single feedlot enterprise - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for the feedlot enterprise | [optional] -**system** | **str** | Type of feedlot/production system | -**groups** | [**List[PostFeedlotRequestFeedlotsInnerGroupsInner]**](PostFeedlotRequestFeedlotsInnerGroupsInner.md) | | -**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**purchases** | [**PostFeedlotRequestFeedlotsInnerPurchases**](PostFeedlotRequestFeedlotsInnerPurchases.md) | | -**sales** | [**PostFeedlotRequestFeedlotsInnerSales**](PostFeedlotRequestFeedlotsInnerSales.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**electricity_source** | **str** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | -**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | -**cottonseed_feed** | **float** | Cotton seed purchased for cattle feed in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**distance_cattle_transported** | **float** | Distance cattle are transported to farm, in km (kilometres) | -**truck_type** | **str** | Type of truck used for cattle transport | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | - -## Example - -```python -from openapi_client.models.post_feedlot_request_feedlots_inner import PostFeedlotRequestFeedlotsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlotRequestFeedlotsInner from a JSON string -post_feedlot_request_feedlots_inner_instance = PostFeedlotRequestFeedlotsInner.from_json(json) -# print the JSON string representation of the object -print(PostFeedlotRequestFeedlotsInner.to_json()) - -# convert the object into a dict -post_feedlot_request_feedlots_inner_dict = post_feedlot_request_feedlots_inner_instance.to_dict() -# create an instance of PostFeedlotRequestFeedlotsInner from a dict -post_feedlot_request_feedlots_inner_from_dict = PostFeedlotRequestFeedlotsInner.from_dict(post_feedlot_request_feedlots_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInner.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInner.md deleted file mode 100644 index 1c6d733f..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInner.md +++ /dev/null @@ -1,29 +0,0 @@ -# PostFeedlotRequestFeedlotsInnerGroupsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stays** | [**List[PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner]**](PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md) | | - -## Example - -```python -from openapi_client.models.post_feedlot_request_feedlots_inner_groups_inner import PostFeedlotRequestFeedlotsInnerGroupsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlotRequestFeedlotsInnerGroupsInner from a JSON string -post_feedlot_request_feedlots_inner_groups_inner_instance = PostFeedlotRequestFeedlotsInnerGroupsInner.from_json(json) -# print the JSON string representation of the object -print(PostFeedlotRequestFeedlotsInnerGroupsInner.to_json()) - -# convert the object into a dict -post_feedlot_request_feedlots_inner_groups_inner_dict = post_feedlot_request_feedlots_inner_groups_inner_instance.to_dict() -# create an instance of PostFeedlotRequestFeedlotsInnerGroupsInner from a dict -post_feedlot_request_feedlots_inner_groups_inner_from_dict = PostFeedlotRequestFeedlotsInnerGroupsInner.from_dict(post_feedlot_request_feedlots_inner_groups_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md deleted file mode 100644 index 08d6eff5..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.md +++ /dev/null @@ -1,38 +0,0 @@ -# PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner - -A class of cattle with a specific feedlot stay duration - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**livestock** | **float** | Number of animals (head) | -**stay_average_duration** | **float** | Average stay length in feedlot, in days | -**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | -**dry_matter_digestibility** | **float** | Percent dry matter digestibility of the feed eaten, from 0 to 100 | -**crude_protein** | **float** | Percent crude protein of the whole diet, from 0 to 100 | -**nitrogen_retention** | **float** | Percent nitrogen retention of intake, from 0 to 100 | -**daily_intake** | **float** | Daily intake of dry matter in kilograms per head per day | -**ndf** | **float** | Percent Neutral detergent fibre (NDF) of intake, from 0 to 100 | -**ether_extract** | **float** | Percent ether extract of intake, from 0 to 100 | - -## Example - -```python -from openapi_client.models.post_feedlot_request_feedlots_inner_groups_inner_stays_inner import PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner from a JSON string -post_feedlot_request_feedlots_inner_groups_inner_stays_inner_instance = PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.from_json(json) -# print the JSON string representation of the object -print(PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.to_json()) - -# convert the object into a dict -post_feedlot_request_feedlots_inner_groups_inner_stays_inner_dict = post_feedlot_request_feedlots_inner_groups_inner_stays_inner_instance.to_dict() -# create an instance of PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner from a dict -post_feedlot_request_feedlots_inner_groups_inner_stays_inner_from_dict = PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner.from_dict(post_feedlot_request_feedlots_inner_groups_inner_stays_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchases.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchases.md deleted file mode 100644 index 72712269..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchases.md +++ /dev/null @@ -1,45 +0,0 @@ -# PostFeedlotRequestFeedlotsInnerPurchases - -Note: passing a single `FeedlotPurchase` for each class is now deprecated, please pass an array (`FeedlotPurchases[]`) instead - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bulls_gt1** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for bulls whose age is greater than 1 year old | [optional] -**bulls_gt1_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded bulls whose age is greater than 1 year old | [optional] -**steers_lt1** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Steers whose age is less than 1 year old | [optional] -**steers_lt1_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Steers whose age is less than 1 year old | [optional] -**steers1_to2** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Steers whose age is between 1 and 2 years old | [optional] -**steers1_to2_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Steers whose age is between 1 and 2 years old | [optional] -**steers_gt2** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Steers whose age is greater than 2 years old | [optional] -**steers_gt2_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Steers whose age is greater than 2 years old | [optional] -**cows_gt2** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Cows whose age is greater than 2 years old | [optional] -**cows_gt2_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Cows whose age is greater than 2 years old | [optional] -**heifers_lt1** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Heifers whose age is less than 1 year old | [optional] -**heifers_lt1_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Heifers whose age is less than 1 year old | [optional] -**heifers1_to2** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Heifers whose age is between 1 and 2 years old | [optional] -**heifers1_to2_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Heifers whose age is between 1 and 2 years old | [optional] -**heifers_gt2** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for Heifers whose age is greater than 2 years old | [optional] -**heifers_gt2_traded** | [**List[PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md) | Livestock purchases for traded Heifers whose age is greater than 2 years old | [optional] - -## Example - -```python -from openapi_client.models.post_feedlot_request_feedlots_inner_purchases import PostFeedlotRequestFeedlotsInnerPurchases - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlotRequestFeedlotsInnerPurchases from a JSON string -post_feedlot_request_feedlots_inner_purchases_instance = PostFeedlotRequestFeedlotsInnerPurchases.from_json(json) -# print the JSON string representation of the object -print(PostFeedlotRequestFeedlotsInnerPurchases.to_json()) - -# convert the object into a dict -post_feedlot_request_feedlots_inner_purchases_dict = post_feedlot_request_feedlots_inner_purchases_instance.to_dict() -# create an instance of PostFeedlotRequestFeedlotsInnerPurchases from a dict -post_feedlot_request_feedlots_inner_purchases_from_dict = PostFeedlotRequestFeedlotsInnerPurchases.from_dict(post_feedlot_request_feedlots_inner_purchases_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md deleted file mode 100644 index 786660b1..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals purchased (head) | -**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | -**purchase_source** | **str** | Source location of trading cattle purchases | [default to 'sth NSW/VIC/sth SA'] - -## Example - -```python -from openapi_client.models.post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner from a JSON string -post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner_instance = PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_json(json) -# print the JSON string representation of the object -print(PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.to_json()) - -# convert the object into a dict -post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner_dict = post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner_instance.to_dict() -# create an instance of PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner from a dict -post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner_from_dict = PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner.from_dict(post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSales.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSales.md deleted file mode 100644 index b5c1be18..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSales.md +++ /dev/null @@ -1,45 +0,0 @@ -# PostFeedlotRequestFeedlotsInnerSales - -Note: passing a single `FeedlotSale` for each class is now deprecated, please pass an array (`FeedlotSales[]`) instead - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bulls_gt1** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for bulls whose age is greater than 1 year old | -**bulls_gt1_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded bulls whose age is greater than 1 year old | -**steers_lt1** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Steers whose age is less than 1 year old | -**steers_lt1_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Steers whose age is less than 1 year old | -**steers1_to2** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Steers whose age is between 1 and 2 years old | -**steers1_to2_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Steers whose age is between 1 and 2 years old | -**steers_gt2** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Steers whose age is greater than 2 years old | -**steers_gt2_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Steers whose age is greater than 2 years old | -**cows_gt2** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Cows whose age is greater than 2 years old | -**cows_gt2_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Cows whose age is greater than 2 years old | -**heifers_lt1** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Heifers whose age is less than 1 year old | -**heifers_lt1_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Heifers whose age is less than 1 year old | -**heifers1_to2** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Heifers whose age is between 1 and 2 years old | -**heifers1_to2_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Heifers whose age is between 1 and 2 years old | -**heifers_gt2** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for Heifers whose age is greater than 2 years old | -**heifers_gt2_traded** | [**List[PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner]**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | Livestock sales for traded Heifers whose age is greater than 2 years old | - -## Example - -```python -from openapi_client.models.post_feedlot_request_feedlots_inner_sales import PostFeedlotRequestFeedlotsInnerSales - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlotRequestFeedlotsInnerSales from a JSON string -post_feedlot_request_feedlots_inner_sales_instance = PostFeedlotRequestFeedlotsInnerSales.from_json(json) -# print the JSON string representation of the object -print(PostFeedlotRequestFeedlotsInnerSales.to_json()) - -# convert the object into a dict -post_feedlot_request_feedlots_inner_sales_dict = post_feedlot_request_feedlots_inner_sales_instance.to_dict() -# create an instance of PostFeedlotRequestFeedlotsInnerSales from a dict -post_feedlot_request_feedlots_inner_sales_from_dict = PostFeedlotRequestFeedlotsInnerSales.from_dict(post_feedlot_request_feedlots_inner_sales_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md deleted file mode 100644 index 13218801..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | - -## Example - -```python -from openapi_client.models.post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner from a JSON string -post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner_instance = PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_json(json) -# print the JSON string representation of the object -print(PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.to_json()) - -# convert the object into a dict -post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner_dict = post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner_instance.to_dict() -# create an instance of PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner from a dict -post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner_from_dict = PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.from_dict(post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostFeedlotRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostFeedlotRequestVegetationInner.md deleted file mode 100644 index 16b9c7ed..00000000 --- a/examples/python-api-client/api-client/docs/PostFeedlotRequestVegetationInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostFeedlotRequestVegetationInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**feedlot_proportion** | **List[float]** | | - -## Example - -```python -from openapi_client.models.post_feedlot_request_vegetation_inner import PostFeedlotRequestVegetationInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFeedlotRequestVegetationInner from a JSON string -post_feedlot_request_vegetation_inner_instance = PostFeedlotRequestVegetationInner.from_json(json) -# print the JSON string representation of the object -print(PostFeedlotRequestVegetationInner.to_json()) - -# convert the object into a dict -post_feedlot_request_vegetation_inner_dict = post_feedlot_request_vegetation_inner_instance.to_dict() -# create an instance of PostFeedlotRequestVegetationInner from a dict -post_feedlot_request_vegetation_inner_from_dict = PostFeedlotRequestVegetationInner.from_dict(post_feedlot_request_vegetation_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoat200Response.md b/examples/python-api-client/api-client/docs/PostGoat200Response.md deleted file mode 100644 index 4044c9d6..00000000 --- a/examples/python-api-client/api-client/docs/PostGoat200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostGoat200Response - -Emissions calculation output for the `goat` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**net** | [**PostGoat200ResponseNet**](PostGoat200ResponseNet.md) | | -**intensities** | [**PostGoat200ResponseIntensities**](PostGoat200ResponseIntensities.md) | | -**intermediate** | [**List[PostGoat200ResponseIntermediateInner]**](PostGoat200ResponseIntermediateInner.md) | | - -## Example - -```python -from openapi_client.models.post_goat200_response import PostGoat200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoat200Response from a JSON string -post_goat200_response_instance = PostGoat200Response.from_json(json) -# print the JSON string representation of the object -print(PostGoat200Response.to_json()) - -# convert the object into a dict -post_goat200_response_dict = post_goat200_response_instance.to_dict() -# create an instance of PostGoat200Response from a dict -post_goat200_response_from_dict = PostGoat200Response.from_dict(post_goat200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoat200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostGoat200ResponseIntensities.md deleted file mode 100644 index e39eb73f..00000000 --- a/examples/python-api-client/api-client/docs/PostGoat200ResponseIntensities.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostGoat200ResponseIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount_meat_produced** | **float** | Amount of goat meat produced in kg liveweight | -**amount_wool_produced** | **float** | Amount of wool produced in kg greasy | -**goat_meat_breeding_including_sequestration** | **float** | Goat meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight | -**goat_meat_breeding_excluding_sequestration** | **float** | Goat meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight | -**wool_including_sequestration** | **float** | Wool production including carbon sequestration, in kg-CO2e/kg greasy | -**wool_excluding_sequestration** | **float** | Wool production excluding carbon sequestration, in kg-CO2e/kg greasy | - -## Example - -```python -from openapi_client.models.post_goat200_response_intensities import PostGoat200ResponseIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoat200ResponseIntensities from a JSON string -post_goat200_response_intensities_instance = PostGoat200ResponseIntensities.from_json(json) -# print the JSON string representation of the object -print(PostGoat200ResponseIntensities.to_json()) - -# convert the object into a dict -post_goat200_response_intensities_dict = post_goat200_response_intensities_instance.to_dict() -# create an instance of PostGoat200ResponseIntensities from a dict -post_goat200_response_intensities_from_dict = PostGoat200ResponseIntensities.from_dict(post_goat200_response_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoat200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostGoat200ResponseIntermediateInner.md deleted file mode 100644 index 50e8c174..00000000 --- a/examples/python-api-client/api-client/docs/PostGoat200ResponseIntermediateInner.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostGoat200ResponseIntermediateInner - -Intermediate emissions calculation output for the Goat calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**net** | [**PostGoat200ResponseNet**](PostGoat200ResponseNet.md) | | -**intensities** | [**PostGoat200ResponseIntensities**](PostGoat200ResponseIntensities.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -## Example - -```python -from openapi_client.models.post_goat200_response_intermediate_inner import PostGoat200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoat200ResponseIntermediateInner from a JSON string -post_goat200_response_intermediate_inner_instance = PostGoat200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostGoat200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_goat200_response_intermediate_inner_dict = post_goat200_response_intermediate_inner_instance.to_dict() -# create an instance of PostGoat200ResponseIntermediateInner from a dict -post_goat200_response_intermediate_inner_from_dict = PostGoat200ResponseIntermediateInner.from_dict(post_goat200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoat200ResponseNet.md b/examples/python-api-client/api-client/docs/PostGoat200ResponseNet.md deleted file mode 100644 index c8bfe176..00000000 --- a/examples/python-api-client/api-client/docs/PostGoat200ResponseNet.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostGoat200ResponseNet - -Net emissions for goat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | - -## Example - -```python -from openapi_client.models.post_goat200_response_net import PostGoat200ResponseNet - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoat200ResponseNet from a JSON string -post_goat200_response_net_instance = PostGoat200ResponseNet.from_json(json) -# print the JSON string representation of the object -print(PostGoat200ResponseNet.to_json()) - -# convert the object into a dict -post_goat200_response_net_dict = post_goat200_response_net_instance.to_dict() -# create an instance of PostGoat200ResponseNet from a dict -post_goat200_response_net_from_dict = PostGoat200ResponseNet.from_dict(post_goat200_response_net_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequest.md b/examples/python-api-client/api-client/docs/PostGoatRequest.md deleted file mode 100644 index b02332a8..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequest.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostGoatRequest - -Input data required for the `goat` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**goats** | [**List[PostGoatRequestGoatsInner]**](PostGoatRequestGoatsInner.md) | | -**vegetation** | [**List[PostGoatRequestVegetationInner]**](PostGoatRequestVegetationInner.md) | | [default to []] - -## Example - -```python -from openapi_client.models.post_goat_request import PostGoatRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequest from a JSON string -post_goat_request_instance = PostGoatRequest.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequest.to_json()) - -# convert the object into a dict -post_goat_request_dict = post_goat_request_instance.to_dict() -# create an instance of PostGoatRequest from a dict -post_goat_request_from_dict = PostGoatRequest.from_dict(post_goat_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInner.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInner.md deleted file mode 100644 index 2c96a1cd..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInner.md +++ /dev/null @@ -1,44 +0,0 @@ -# PostGoatRequestGoatsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**classes** | [**PostGoatRequestGoatsInnerClasses**](PostGoatRequestGoatsInnerClasses.md) | | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**mineral_supplementation** | [**PostBeefRequestBeefInnerMineralSupplementation**](PostBeefRequestBeefInnerMineralSupplementation.md) | | -**electricity_source** | **str** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | -**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner import PostGoatRequestGoatsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInner from a JSON string -post_goat_request_goats_inner_instance = PostGoatRequestGoatsInner.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInner.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_dict = post_goat_request_goats_inner_instance.to_dict() -# create an instance of PostGoatRequestGoatsInner from a dict -post_goat_request_goats_inner_from_dict = PostGoatRequestGoatsInner.from_dict(post_goat_request_goats_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClasses.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClasses.md deleted file mode 100644 index 5bc39e55..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClasses.md +++ /dev/null @@ -1,42 +0,0 @@ -# PostGoatRequestGoatsInnerClasses - -Goat classes of different types - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bucks_billy** | [**PostGoatRequestGoatsInnerClassesBucksBilly**](PostGoatRequestGoatsInnerClassesBucksBilly.md) | | [optional] -**trade_bucks** | [**PostGoatRequestGoatsInnerClassesTradeBucks**](PostGoatRequestGoatsInnerClassesTradeBucks.md) | | [optional] -**wethers** | [**PostGoatRequestGoatsInnerClassesWethers**](PostGoatRequestGoatsInnerClassesWethers.md) | | [optional] -**trade_wethers** | [**PostGoatRequestGoatsInnerClassesTradeWethers**](PostGoatRequestGoatsInnerClassesTradeWethers.md) | | [optional] -**maiden_breeding_does_nannies** | [**PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md) | | [optional] -**trade_maiden_breeding_does_nannies** | [**PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md) | | [optional] -**breeding_does_nannies** | [**PostGoatRequestGoatsInnerClassesBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md) | | [optional] -**trade_breeding_does_nannies** | [**PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies**](PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md) | | [optional] -**other_does_culled_females** | [**PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales**](PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md) | | [optional] -**trade_other_does_culled_females** | [**PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales**](PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md) | | [optional] -**kids** | [**PostGoatRequestGoatsInnerClassesKids**](PostGoatRequestGoatsInnerClassesKids.md) | | [optional] -**trade_kids** | [**PostGoatRequestGoatsInnerClassesTradeKids**](PostGoatRequestGoatsInnerClassesTradeKids.md) | | [optional] -**trade_does** | [**PostGoatRequestGoatsInnerClassesTradeDoes**](PostGoatRequestGoatsInnerClassesTradeDoes.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner_classes import PostGoatRequestGoatsInnerClasses - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInnerClasses from a JSON string -post_goat_request_goats_inner_classes_instance = PostGoatRequestGoatsInnerClasses.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInnerClasses.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_classes_dict = post_goat_request_goats_inner_classes_instance.to_dict() -# create an instance of PostGoatRequestGoatsInnerClasses from a dict -post_goat_request_goats_inner_classes_from_dict = PostGoatRequestGoatsInnerClasses.from_dict(post_goat_request_goats_inner_classes_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md deleted file mode 100644 index 172bd006..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBreedingDoesNannies.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostGoatRequestGoatsInnerClassesBreedingDoesNannies - -breeding does/nannies - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner_classes_breeding_does_nannies import PostGoatRequestGoatsInnerClassesBreedingDoesNannies - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInnerClassesBreedingDoesNannies from a JSON string -post_goat_request_goats_inner_classes_breeding_does_nannies_instance = PostGoatRequestGoatsInnerClassesBreedingDoesNannies.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInnerClassesBreedingDoesNannies.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_classes_breeding_does_nannies_dict = post_goat_request_goats_inner_classes_breeding_does_nannies_instance.to_dict() -# create an instance of PostGoatRequestGoatsInnerClassesBreedingDoesNannies from a dict -post_goat_request_goats_inner_classes_breeding_does_nannies_from_dict = PostGoatRequestGoatsInnerClassesBreedingDoesNannies.from_dict(post_goat_request_goats_inner_classes_breeding_does_nannies_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBucksBilly.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBucksBilly.md deleted file mode 100644 index 1a8fd243..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesBucksBilly.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostGoatRequestGoatsInnerClassesBucksBilly - -Bucks / Billy - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner_classes_bucks_billy import PostGoatRequestGoatsInnerClassesBucksBilly - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInnerClassesBucksBilly from a JSON string -post_goat_request_goats_inner_classes_bucks_billy_instance = PostGoatRequestGoatsInnerClassesBucksBilly.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInnerClassesBucksBilly.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_classes_bucks_billy_dict = post_goat_request_goats_inner_classes_bucks_billy_instance.to_dict() -# create an instance of PostGoatRequestGoatsInnerClassesBucksBilly from a dict -post_goat_request_goats_inner_classes_bucks_billy_from_dict = PostGoatRequestGoatsInnerClassesBucksBilly.from_dict(post_goat_request_goats_inner_classes_bucks_billy_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesKids.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesKids.md deleted file mode 100644 index bf65d919..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesKids.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostGoatRequestGoatsInnerClassesKids - -kids - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner_classes_kids import PostGoatRequestGoatsInnerClassesKids - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInnerClassesKids from a JSON string -post_goat_request_goats_inner_classes_kids_instance = PostGoatRequestGoatsInnerClassesKids.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInnerClassesKids.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_classes_kids_dict = post_goat_request_goats_inner_classes_kids_instance.to_dict() -# create an instance of PostGoatRequestGoatsInnerClassesKids from a dict -post_goat_request_goats_inner_classes_kids_from_dict = PostGoatRequestGoatsInnerClassesKids.from_dict(post_goat_request_goats_inner_classes_kids_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md deleted file mode 100644 index ad2fac4a..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies - -maiden breeding does/nannies - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner_classes_maiden_breeding_does_nannies import PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies from a JSON string -post_goat_request_goats_inner_classes_maiden_breeding_does_nannies_instance = PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_classes_maiden_breeding_does_nannies_dict = post_goat_request_goats_inner_classes_maiden_breeding_does_nannies_instance.to_dict() -# create an instance of PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies from a dict -post_goat_request_goats_inner_classes_maiden_breeding_does_nannies_from_dict = PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies.from_dict(post_goat_request_goats_inner_classes_maiden_breeding_does_nannies_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md deleted file mode 100644 index 86e2fc3e..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales - -other does/culled females - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner_classes_other_does_culled_females import PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales from a JSON string -post_goat_request_goats_inner_classes_other_does_culled_females_instance = PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_classes_other_does_culled_females_dict = post_goat_request_goats_inner_classes_other_does_culled_females_instance.to_dict() -# create an instance of PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales from a dict -post_goat_request_goats_inner_classes_other_does_culled_females_from_dict = PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales.from_dict(post_goat_request_goats_inner_classes_other_does_culled_females_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md deleted file mode 100644 index de7aa08c..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies - -trade breeding does/nannies - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner_classes_trade_breeding_does_nannies import PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies from a JSON string -post_goat_request_goats_inner_classes_trade_breeding_does_nannies_instance = PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_classes_trade_breeding_does_nannies_dict = post_goat_request_goats_inner_classes_trade_breeding_does_nannies_instance.to_dict() -# create an instance of PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies from a dict -post_goat_request_goats_inner_classes_trade_breeding_does_nannies_from_dict = PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies.from_dict(post_goat_request_goats_inner_classes_trade_breeding_does_nannies_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBucks.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBucks.md deleted file mode 100644 index 129e8700..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeBucks.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostGoatRequestGoatsInnerClassesTradeBucks - -Trade Bucks / Billy - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner_classes_trade_bucks import PostGoatRequestGoatsInnerClassesTradeBucks - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInnerClassesTradeBucks from a JSON string -post_goat_request_goats_inner_classes_trade_bucks_instance = PostGoatRequestGoatsInnerClassesTradeBucks.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInnerClassesTradeBucks.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_classes_trade_bucks_dict = post_goat_request_goats_inner_classes_trade_bucks_instance.to_dict() -# create an instance of PostGoatRequestGoatsInnerClassesTradeBucks from a dict -post_goat_request_goats_inner_classes_trade_bucks_from_dict = PostGoatRequestGoatsInnerClassesTradeBucks.from_dict(post_goat_request_goats_inner_classes_trade_bucks_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeDoes.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeDoes.md deleted file mode 100644 index b6c483cb..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeDoes.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostGoatRequestGoatsInnerClassesTradeDoes - -Trade does. Deprecation note: More specific trade doe classes now available - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner_classes_trade_does import PostGoatRequestGoatsInnerClassesTradeDoes - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInnerClassesTradeDoes from a JSON string -post_goat_request_goats_inner_classes_trade_does_instance = PostGoatRequestGoatsInnerClassesTradeDoes.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInnerClassesTradeDoes.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_classes_trade_does_dict = post_goat_request_goats_inner_classes_trade_does_instance.to_dict() -# create an instance of PostGoatRequestGoatsInnerClassesTradeDoes from a dict -post_goat_request_goats_inner_classes_trade_does_from_dict = PostGoatRequestGoatsInnerClassesTradeDoes.from_dict(post_goat_request_goats_inner_classes_trade_does_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeKids.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeKids.md deleted file mode 100644 index ed6c89ab..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeKids.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostGoatRequestGoatsInnerClassesTradeKids - -trade kids - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner_classes_trade_kids import PostGoatRequestGoatsInnerClassesTradeKids - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInnerClassesTradeKids from a JSON string -post_goat_request_goats_inner_classes_trade_kids_instance = PostGoatRequestGoatsInnerClassesTradeKids.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInnerClassesTradeKids.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_classes_trade_kids_dict = post_goat_request_goats_inner_classes_trade_kids_instance.to_dict() -# create an instance of PostGoatRequestGoatsInnerClassesTradeKids from a dict -post_goat_request_goats_inner_classes_trade_kids_from_dict = PostGoatRequestGoatsInnerClassesTradeKids.from_dict(post_goat_request_goats_inner_classes_trade_kids_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md deleted file mode 100644 index 341d2471..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies - -trade maiden breeding does/nannies - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies import PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies from a JSON string -post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies_instance = PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies_dict = post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies_instance.to_dict() -# create an instance of PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies from a dict -post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies_from_dict = PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies.from_dict(post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md deleted file mode 100644 index 5429b29b..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales - -trade other does/culled females - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner_classes_trade_other_does_culled_females import PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales from a JSON string -post_goat_request_goats_inner_classes_trade_other_does_culled_females_instance = PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_classes_trade_other_does_culled_females_dict = post_goat_request_goats_inner_classes_trade_other_does_culled_females_instance.to_dict() -# create an instance of PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales from a dict -post_goat_request_goats_inner_classes_trade_other_does_culled_females_from_dict = PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales.from_dict(post_goat_request_goats_inner_classes_trade_other_does_culled_females_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeWethers.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeWethers.md deleted file mode 100644 index ea292e16..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesTradeWethers.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostGoatRequestGoatsInnerClassesTradeWethers - -trade wethers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner_classes_trade_wethers import PostGoatRequestGoatsInnerClassesTradeWethers - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInnerClassesTradeWethers from a JSON string -post_goat_request_goats_inner_classes_trade_wethers_instance = PostGoatRequestGoatsInnerClassesTradeWethers.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInnerClassesTradeWethers.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_classes_trade_wethers_dict = post_goat_request_goats_inner_classes_trade_wethers_instance.to_dict() -# create an instance of PostGoatRequestGoatsInnerClassesTradeWethers from a dict -post_goat_request_goats_inner_classes_trade_wethers_from_dict = PostGoatRequestGoatsInnerClassesTradeWethers.from_dict(post_goat_request_goats_inner_classes_trade_wethers_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesWethers.md b/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesWethers.md deleted file mode 100644 index 00d2a1bf..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestGoatsInnerClassesWethers.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostGoatRequestGoatsInnerClassesWethers - -wethers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**winter** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**spring** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**summer** | [**PostBuffaloRequestBuffalosInnerClassesBullsAutumn**](PostBuffaloRequestBuffalosInnerClassesBullsAutumn.md) | | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**head_shorn** | **float** | Number of goat shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_goat_request_goats_inner_classes_wethers import PostGoatRequestGoatsInnerClassesWethers - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestGoatsInnerClassesWethers from a JSON string -post_goat_request_goats_inner_classes_wethers_instance = PostGoatRequestGoatsInnerClassesWethers.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestGoatsInnerClassesWethers.to_json()) - -# convert the object into a dict -post_goat_request_goats_inner_classes_wethers_dict = post_goat_request_goats_inner_classes_wethers_instance.to_dict() -# create an instance of PostGoatRequestGoatsInnerClassesWethers from a dict -post_goat_request_goats_inner_classes_wethers_from_dict = PostGoatRequestGoatsInnerClassesWethers.from_dict(post_goat_request_goats_inner_classes_wethers_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGoatRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostGoatRequestVegetationInner.md deleted file mode 100644 index fe6b9970..00000000 --- a/examples/python-api-client/api-client/docs/PostGoatRequestVegetationInner.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostGoatRequestVegetationInner - -Non-productive vegetation inputs along with allocations to goat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**goat_proportion** | **List[float]** | The proportion of the sequestration that is allocated to goat | - -## Example - -```python -from openapi_client.models.post_goat_request_vegetation_inner import PostGoatRequestVegetationInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGoatRequestVegetationInner from a JSON string -post_goat_request_vegetation_inner_instance = PostGoatRequestVegetationInner.from_json(json) -# print the JSON string representation of the object -print(PostGoatRequestVegetationInner.to_json()) - -# convert the object into a dict -post_goat_request_vegetation_inner_dict = post_goat_request_vegetation_inner_instance.to_dict() -# create an instance of PostGoatRequestVegetationInner from a dict -post_goat_request_vegetation_inner_from_dict = PostGoatRequestVegetationInner.from_dict(post_goat_request_vegetation_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGrains200Response.md b/examples/python-api-client/api-client/docs/PostGrains200Response.md deleted file mode 100644 index dc7eef5a..00000000 --- a/examples/python-api-client/api-client/docs/PostGrains200Response.md +++ /dev/null @@ -1,37 +0,0 @@ -# PostGrains200Response - -Emissions calculation output for the `grains` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**List[PostGrains200ResponseIntermediateInner]**](PostGrains200ResponseIntermediateInner.md) | | -**net** | [**PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | -**intensities_with_sequestration** | [**List[PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration]**](PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md) | Emissions intensity for each crop (in order), in t-CO2e/t crop | -**intensities** | **List[float]** | Emissions intensity for each crop (in order), in t-CO2e/t crop | - -## Example - -```python -from openapi_client.models.post_grains200_response import PostGrains200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGrains200Response from a JSON string -post_grains200_response_instance = PostGrains200Response.from_json(json) -# print the JSON string representation of the object -print(PostGrains200Response.to_json()) - -# convert the object into a dict -post_grains200_response_dict = post_grains200_response_instance.to_dict() -# create an instance of PostGrains200Response from a dict -post_grains200_response_from_dict = PostGrains200Response.from_dict(post_grains200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInner.md deleted file mode 100644 index edaad799..00000000 --- a/examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInner.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostGrains200ResponseIntermediateInner - -Intermediate emissions calculation output for the Grains calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**intensities_with_sequestration** | [**PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration**](PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -## Example - -```python -from openapi_client.models.post_grains200_response_intermediate_inner import PostGrains200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGrains200ResponseIntermediateInner from a JSON string -post_grains200_response_intermediate_inner_instance = PostGrains200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostGrains200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_grains200_response_intermediate_inner_dict = post_grains200_response_intermediate_inner_instance.to_dict() -# create an instance of PostGrains200ResponseIntermediateInner from a dict -post_grains200_response_intermediate_inner_from_dict = PostGrains200ResponseIntermediateInner.from_dict(post_grains200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md b/examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md deleted file mode 100644 index 4ec5d2c3..00000000 --- a/examples/python-api-client/api-client/docs/PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**grain_produced_tonnes** | **float** | Grain produced in tonnes | -**grains_excluding_sequestration** | **float** | Grains excluding sequestration, in t-CO2e/t grain | -**grains_including_sequestration** | **float** | Grains including sequestration, in t-CO2e/t grain | - -## Example - -```python -from openapi_client.models.post_grains200_response_intermediate_inner_intensities_with_sequestration import PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration from a JSON string -post_grains200_response_intermediate_inner_intensities_with_sequestration_instance = PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.from_json(json) -# print the JSON string representation of the object -print(PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.to_json()) - -# convert the object into a dict -post_grains200_response_intermediate_inner_intensities_with_sequestration_dict = post_grains200_response_intermediate_inner_intensities_with_sequestration_instance.to_dict() -# create an instance of PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration from a dict -post_grains200_response_intermediate_inner_intensities_with_sequestration_from_dict = PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration.from_dict(post_grains200_response_intermediate_inner_intensities_with_sequestration_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGrainsRequest.md b/examples/python-api-client/api-client/docs/PostGrainsRequest.md deleted file mode 100644 index 0c05577d..00000000 --- a/examples/python-api-client/api-client/docs/PostGrainsRequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostGrainsRequest - -Input data required for the `grains` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**crops** | [**List[PostGrainsRequestCropsInner]**](PostGrainsRequestCropsInner.md) | | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**vegetation** | [**List[PostCottonRequestVegetationInner]**](PostCottonRequestVegetationInner.md) | | - -## Example - -```python -from openapi_client.models.post_grains_request import PostGrainsRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGrainsRequest from a JSON string -post_grains_request_instance = PostGrainsRequest.from_json(json) -# print the JSON string representation of the object -print(PostGrainsRequest.to_json()) - -# convert the object into a dict -post_grains_request_dict = post_grains_request_instance.to_dict() -# create an instance of PostGrainsRequest from a dict -post_grains_request_from_dict = PostGrainsRequest.from_dict(post_grains_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostGrainsRequestCropsInner.md b/examples/python-api-client/api-client/docs/PostGrainsRequestCropsInner.md deleted file mode 100644 index 41bf5b0e..00000000 --- a/examples/python-api-client/api-client/docs/PostGrainsRequestCropsInner.md +++ /dev/null @@ -1,50 +0,0 @@ -# PostGrainsRequestCropsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**type** | **str** | Crop type. Note that the following crop types are now deprecated, the relevant full calculator should be used instead: 'Cotton', 'Rice', 'Sugar Cane' | -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**production_system** | **str** | Production system of this crop. Note that the following production systems are now deprecated, the relevant full calculator should be used instead: 'Cotton', 'Rice', 'Sugar cane' | -**average_grain_yield** | **float** | Average grain yield, in t/ha (tonnes per hectare) | -**area_sown** | **float** | Area sown, in ha (hectares) | -**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | -**urea_application** | **float** | Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) | -**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | -**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | -**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | -**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | -**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | -**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | -**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | -**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | -**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**diesel_use** | **float** | Diesel usage in L (litres) | -**petrol_use** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | - -## Example - -```python -from openapi_client.models.post_grains_request_crops_inner import PostGrainsRequestCropsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostGrainsRequestCropsInner from a JSON string -post_grains_request_crops_inner_instance = PostGrainsRequestCropsInner.from_json(json) -# print the JSON string representation of the object -print(PostGrainsRequestCropsInner.to_json()) - -# convert the object into a dict -post_grains_request_crops_inner_dict = post_grains_request_crops_inner_instance.to_dict() -# create an instance of PostGrainsRequestCropsInner from a dict -post_grains_request_crops_inner_from_dict = PostGrainsRequestCropsInner.from_dict(post_grains_request_crops_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostHorticulture200Response.md b/examples/python-api-client/api-client/docs/PostHorticulture200Response.md deleted file mode 100644 index 938a46f4..00000000 --- a/examples/python-api-client/api-client/docs/PostHorticulture200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostHorticulture200Response - -Emissions calculation output for the `horticulture` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostHorticulture200ResponseScope1**](PostHorticulture200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**List[PostHorticulture200ResponseIntermediateInner]**](PostHorticulture200ResponseIntermediateInner.md) | | -**net** | [**PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | -**intensities** | [**List[PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration]**](PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md) | Emissions intensity for each crop (in order) | - -## Example - -```python -from openapi_client.models.post_horticulture200_response import PostHorticulture200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostHorticulture200Response from a JSON string -post_horticulture200_response_instance = PostHorticulture200Response.from_json(json) -# print the JSON string representation of the object -print(PostHorticulture200Response.to_json()) - -# convert the object into a dict -post_horticulture200_response_dict = post_horticulture200_response_instance.to_dict() -# create an instance of PostHorticulture200Response from a dict -post_horticulture200_response_from_dict = PostHorticulture200Response.from_dict(post_horticulture200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInner.md deleted file mode 100644 index 39983722..00000000 --- a/examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInner.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostHorticulture200ResponseIntermediateInner - -Intermediate emissions calculation output for the Horticulture calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostHorticulture200ResponseScope1**](PostHorticulture200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**intensities_with_sequestration** | [**PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration**](PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -## Example - -```python -from openapi_client.models.post_horticulture200_response_intermediate_inner import PostHorticulture200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostHorticulture200ResponseIntermediateInner from a JSON string -post_horticulture200_response_intermediate_inner_instance = PostHorticulture200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostHorticulture200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_horticulture200_response_intermediate_inner_dict = post_horticulture200_response_intermediate_inner_instance.to_dict() -# create an instance of PostHorticulture200ResponseIntermediateInner from a dict -post_horticulture200_response_intermediate_inner_from_dict = PostHorticulture200ResponseIntermediateInner.from_dict(post_horticulture200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md b/examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md deleted file mode 100644 index e72bc699..00000000 --- a/examples/python-api-client/api-client/docs/PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration - -Horticulture intensities output - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**crop_produced_tonnes** | **float** | Horticultural crop produced in tonnes | -**tonnes_crop_excluding_sequestration** | **float** | Emissions intensity excluding sequestration, in t-CO2e/t crop | -**tonnes_crop_including_sequestration** | **float** | Emissions intensity including sequestration, in t-CO2e/t crop | - -## Example - -```python -from openapi_client.models.post_horticulture200_response_intermediate_inner_intensities_with_sequestration import PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration - -# TODO update the JSON string below -json = "{}" -# create an instance of PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration from a JSON string -post_horticulture200_response_intermediate_inner_intensities_with_sequestration_instance = PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.from_json(json) -# print the JSON string representation of the object -print(PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.to_json()) - -# convert the object into a dict -post_horticulture200_response_intermediate_inner_intensities_with_sequestration_dict = post_horticulture200_response_intermediate_inner_intensities_with_sequestration_instance.to_dict() -# create an instance of PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration from a dict -post_horticulture200_response_intermediate_inner_intensities_with_sequestration_from_dict = PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration.from_dict(post_horticulture200_response_intermediate_inner_intensities_with_sequestration_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostHorticulture200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostHorticulture200ResponseScope1.md deleted file mode 100644 index 12e1f1ca..00000000 --- a/examples/python-api-client/api-client/docs/PostHorticulture200ResponseScope1.md +++ /dev/null @@ -1,46 +0,0 @@ -# PostHorticulture200ResponseScope1 - -Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | -**field_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | -**field_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | -**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_horticulture200_response_scope1 import PostHorticulture200ResponseScope1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostHorticulture200ResponseScope1 from a JSON string -post_horticulture200_response_scope1_instance = PostHorticulture200ResponseScope1.from_json(json) -# print the JSON string representation of the object -print(PostHorticulture200ResponseScope1.to_json()) - -# convert the object into a dict -post_horticulture200_response_scope1_dict = post_horticulture200_response_scope1_instance.to_dict() -# create an instance of PostHorticulture200ResponseScope1 from a dict -post_horticulture200_response_scope1_from_dict = PostHorticulture200ResponseScope1.from_dict(post_horticulture200_response_scope1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostHorticultureRequest.md b/examples/python-api-client/api-client/docs/PostHorticultureRequest.md deleted file mode 100644 index 9742cfe7..00000000 --- a/examples/python-api-client/api-client/docs/PostHorticultureRequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostHorticultureRequest - -Input data required for the `horticulture` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**crops** | [**List[PostHorticultureRequestCropsInner]**](PostHorticultureRequestCropsInner.md) | | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**vegetation** | [**List[PostCottonRequestVegetationInner]**](PostCottonRequestVegetationInner.md) | | - -## Example - -```python -from openapi_client.models.post_horticulture_request import PostHorticultureRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostHorticultureRequest from a JSON string -post_horticulture_request_instance = PostHorticultureRequest.from_json(json) -# print the JSON string representation of the object -print(PostHorticultureRequest.to_json()) - -# convert the object into a dict -post_horticulture_request_dict = post_horticulture_request_instance.to_dict() -# create an instance of PostHorticultureRequest from a dict -post_horticulture_request_from_dict = PostHorticultureRequest.from_dict(post_horticulture_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInner.md b/examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInner.md deleted file mode 100644 index 6d13128f..00000000 --- a/examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInner.md +++ /dev/null @@ -1,51 +0,0 @@ -# PostHorticultureRequestCropsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**type** | **str** | Crop type | -**average_yield** | **float** | Average crop yield, in t/ha (tonnes per hectare) | -**area_sown** | **float** | Area sown, in ha (hectares) | -**urea_application** | **float** | Urea application, in kg Urea/ha (kilograms of urea per hectare) | -**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | -**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | -**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | -**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | -**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | -**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | -**urease_inhibitor_used** | **bool** | Urease inhibitor used. Deprecation note: No longer used (since v1.1.0) | [optional] -**nitrification_inhibitor_used** | **bool** | Nitrification inhibitor used. Deprecation note: No longer used (since v1.1.0) | [optional] -**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | -**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | -**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | -**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**diesel_use** | **float** | Diesel usage in L (litres) | -**petrol_use** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**refrigerants** | [**List[PostHorticultureRequestCropsInnerRefrigerantsInner]**](PostHorticultureRequestCropsInnerRefrigerantsInner.md) | | - -## Example - -```python -from openapi_client.models.post_horticulture_request_crops_inner import PostHorticultureRequestCropsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostHorticultureRequestCropsInner from a JSON string -post_horticulture_request_crops_inner_instance = PostHorticultureRequestCropsInner.from_json(json) -# print the JSON string representation of the object -print(PostHorticultureRequestCropsInner.to_json()) - -# convert the object into a dict -post_horticulture_request_crops_inner_dict = post_horticulture_request_crops_inner_instance.to_dict() -# create an instance of PostHorticultureRequestCropsInner from a dict -post_horticulture_request_crops_inner_from_dict = PostHorticultureRequestCropsInner.from_dict(post_horticulture_request_crops_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInnerRefrigerantsInner.md b/examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInnerRefrigerantsInner.md deleted file mode 100644 index 6d34c3ed..00000000 --- a/examples/python-api-client/api-client/docs/PostHorticultureRequestCropsInnerRefrigerantsInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostHorticultureRequestCropsInnerRefrigerantsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**refrigerant** | **str** | Refrigerant type | -**charge_size** | **float** | Amount of refrigerant contained in the appliance, in kg | - -## Example - -```python -from openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner import PostHorticultureRequestCropsInnerRefrigerantsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostHorticultureRequestCropsInnerRefrigerantsInner from a JSON string -post_horticulture_request_crops_inner_refrigerants_inner_instance = PostHorticultureRequestCropsInnerRefrigerantsInner.from_json(json) -# print the JSON string representation of the object -print(PostHorticultureRequestCropsInnerRefrigerantsInner.to_json()) - -# convert the object into a dict -post_horticulture_request_crops_inner_refrigerants_inner_dict = post_horticulture_request_crops_inner_refrigerants_inner_instance.to_dict() -# create an instance of PostHorticultureRequestCropsInnerRefrigerantsInner from a dict -post_horticulture_request_crops_inner_refrigerants_inner_from_dict = PostHorticultureRequestCropsInnerRefrigerantsInner.from_dict(post_horticulture_request_crops_inner_refrigerants_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPork200Response.md b/examples/python-api-client/api-client/docs/PostPork200Response.md deleted file mode 100644 index d302317d..00000000 --- a/examples/python-api-client/api-client/docs/PostPork200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostPork200Response - -Emissions calculation output for the `pork` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostPork200ResponseScope1**](PostPork200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostPork200ResponseScope3**](PostPork200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**net** | [**PostPork200ResponseNet**](PostPork200ResponseNet.md) | | -**intensities** | [**PostPork200ResponseIntensities**](PostPork200ResponseIntensities.md) | | -**intermediate** | [**List[PostPork200ResponseIntermediateInner]**](PostPork200ResponseIntermediateInner.md) | | - -## Example - -```python -from openapi_client.models.post_pork200_response import PostPork200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPork200Response from a JSON string -post_pork200_response_instance = PostPork200Response.from_json(json) -# print the JSON string representation of the object -print(PostPork200Response.to_json()) - -# convert the object into a dict -post_pork200_response_dict = post_pork200_response_instance.to_dict() -# create an instance of PostPork200Response from a dict -post_pork200_response_from_dict = PostPork200Response.from_dict(post_pork200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPork200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostPork200ResponseIntensities.md deleted file mode 100644 index d6aefac2..00000000 --- a/examples/python-api-client/api-client/docs/PostPork200ResponseIntensities.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostPork200ResponseIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pork_meat_including_sequestration** | **float** | Pork meat including carbon sequestration, in kg-CO2e/kg liveweight | -**pork_meat_excluding_sequestration** | **float** | Pork meat excluding carbon sequestration, in kg-CO2e/kg liveweight | -**liveweight_produced_kg** | **float** | Pork meat produced in kg liveweight | - -## Example - -```python -from openapi_client.models.post_pork200_response_intensities import PostPork200ResponseIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPork200ResponseIntensities from a JSON string -post_pork200_response_intensities_instance = PostPork200ResponseIntensities.from_json(json) -# print the JSON string representation of the object -print(PostPork200ResponseIntensities.to_json()) - -# convert the object into a dict -post_pork200_response_intensities_dict = post_pork200_response_intensities_instance.to_dict() -# create an instance of PostPork200ResponseIntensities from a dict -post_pork200_response_intensities_from_dict = PostPork200ResponseIntensities.from_dict(post_pork200_response_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPork200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostPork200ResponseIntermediateInner.md deleted file mode 100644 index 8fd4491f..00000000 --- a/examples/python-api-client/api-client/docs/PostPork200ResponseIntermediateInner.md +++ /dev/null @@ -1,35 +0,0 @@ -# PostPork200ResponseIntermediateInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**scope1** | [**PostPork200ResponseScope1**](PostPork200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostPork200ResponseScope3**](PostPork200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**net** | [**PostPork200ResponseNet**](PostPork200ResponseNet.md) | | -**intensities** | [**PostPork200ResponseIntensities**](PostPork200ResponseIntensities.md) | | - -## Example - -```python -from openapi_client.models.post_pork200_response_intermediate_inner import PostPork200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPork200ResponseIntermediateInner from a JSON string -post_pork200_response_intermediate_inner_instance = PostPork200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostPork200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_pork200_response_intermediate_inner_dict = post_pork200_response_intermediate_inner_instance.to_dict() -# create an instance of PostPork200ResponseIntermediateInner from a dict -post_pork200_response_intermediate_inner_from_dict = PostPork200ResponseIntermediateInner.from_dict(post_pork200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPork200ResponseNet.md b/examples/python-api-client/api-client/docs/PostPork200ResponseNet.md deleted file mode 100644 index 9a2b22f5..00000000 --- a/examples/python-api-client/api-client/docs/PostPork200ResponseNet.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostPork200ResponseNet - -Net emissions for pork - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | - -## Example - -```python -from openapi_client.models.post_pork200_response_net import PostPork200ResponseNet - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPork200ResponseNet from a JSON string -post_pork200_response_net_instance = PostPork200ResponseNet.from_json(json) -# print the JSON string representation of the object -print(PostPork200ResponseNet.to_json()) - -# convert the object into a dict -post_pork200_response_net_dict = post_pork200_response_net_instance.to_dict() -# create an instance of PostPork200ResponseNet from a dict -post_pork200_response_net_from_dict = PostPork200ResponseNet.from_dict(post_pork200_response_net_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPork200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostPork200ResponseScope1.md deleted file mode 100644 index 7bf4a805..00000000 --- a/examples/python-api-client/api-client/docs/PostPork200ResponseScope1.md +++ /dev/null @@ -1,46 +0,0 @@ -# PostPork200ResponseScope1 - -Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**enteric_ch4** | **float** | CH4 emissions from enteric fermentation, in tonnes-CO2e | -**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | -**manure_management_direct_n2_o** | **float** | CH4 emissions from manure management (direct), in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**atmospheric_deposition_indirect_n2_o** | **float** | N2O emissions from atmospheric deposition indirect, in tonnes-CO2e | -**leaching_and_runoff_soil_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**leaching_and_runoff_mmsn2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_pork200_response_scope1 import PostPork200ResponseScope1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPork200ResponseScope1 from a JSON string -post_pork200_response_scope1_instance = PostPork200ResponseScope1.from_json(json) -# print the JSON string representation of the object -print(PostPork200ResponseScope1.to_json()) - -# convert the object into a dict -post_pork200_response_scope1_dict = post_pork200_response_scope1_instance.to_dict() -# create an instance of PostPork200ResponseScope1 from a dict -post_pork200_response_scope1_from_dict = PostPork200ResponseScope1.from_dict(post_pork200_response_scope1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPork200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostPork200ResponseScope3.md deleted file mode 100644 index f87a8d78..00000000 --- a/examples/python-api-client/api-client/docs/PostPork200ResponseScope3.md +++ /dev/null @@ -1,38 +0,0 @@ -# PostPork200ResponseScope3 - -Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | -**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**lime** | **float** | Emissions from lime, in tonnes-CO2e | -**purchased_livestock** | **float** | Emissions from purchased pigs, in tonnes-CO2e | -**bedding** | **float** | Emissions from purchased bedding, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_pork200_response_scope3 import PostPork200ResponseScope3 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPork200ResponseScope3 from a JSON string -post_pork200_response_scope3_instance = PostPork200ResponseScope3.from_json(json) -# print the JSON string representation of the object -print(PostPork200ResponseScope3.to_json()) - -# convert the object into a dict -post_pork200_response_scope3_dict = post_pork200_response_scope3_instance.to_dict() -# create an instance of PostPork200ResponseScope3 from a dict -post_pork200_response_scope3_from_dict = PostPork200ResponseScope3.from_dict(post_pork200_response_scope3_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequest.md b/examples/python-api-client/api-client/docs/PostPorkRequest.md deleted file mode 100644 index 1673ee68..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostPorkRequest - -Input data required for the `pork` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude. Deprecation note: This field is deprecated | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**pork** | [**List[PostPorkRequestPorkInner]**](PostPorkRequestPorkInner.md) | | -**vegetation** | [**List[PostPorkRequestVegetationInner]**](PostPorkRequestVegetationInner.md) | | - -## Example - -```python -from openapi_client.models.post_pork_request import PostPorkRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequest from a JSON string -post_pork_request_instance = PostPorkRequest.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequest.to_json()) - -# convert the object into a dict -post_pork_request_dict = post_pork_request_instance.to_dict() -# create an instance of PostPorkRequest from a dict -post_pork_request_from_dict = PostPorkRequest.from_dict(post_pork_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInner.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInner.md deleted file mode 100644 index 59b9a6ef..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInner.md +++ /dev/null @@ -1,43 +0,0 @@ -# PostPorkRequestPorkInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**classes** | [**PostPorkRequestPorkInnerClasses**](PostPorkRequestPorkInnerClasses.md) | | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**electricity_source** | **str** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**bedding_hay_barley_straw** | **float** | Hay, barley, straw, etc. purchased for pig bedding, in tonnes | -**feed_products** | [**List[PostPorkRequestPorkInnerFeedProductsInner]**](PostPorkRequestPorkInnerFeedProductsInner.md) | | - -## Example - -```python -from openapi_client.models.post_pork_request_pork_inner import PostPorkRequestPorkInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequestPorkInner from a JSON string -post_pork_request_pork_inner_instance = PostPorkRequestPorkInner.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequestPorkInner.to_json()) - -# convert the object into a dict -post_pork_request_pork_inner_dict = post_pork_request_pork_inner_instance.to_dict() -# create an instance of PostPorkRequestPorkInner from a dict -post_pork_request_pork_inner_from_dict = PostPorkRequestPorkInner.from_dict(post_pork_request_pork_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClasses.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClasses.md deleted file mode 100644 index dfbc255b..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClasses.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostPorkRequestPorkInnerClasses - -Pork classes of different types - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sows** | [**PostPorkRequestPorkInnerClassesSows**](PostPorkRequestPorkInnerClassesSows.md) | | [optional] -**boars** | [**PostPorkRequestPorkInnerClassesBoars**](PostPorkRequestPorkInnerClassesBoars.md) | | [optional] -**gilts** | [**PostPorkRequestPorkInnerClassesGilts**](PostPorkRequestPorkInnerClassesGilts.md) | | [optional] -**suckers** | [**PostPorkRequestPorkInnerClassesSuckers**](PostPorkRequestPorkInnerClassesSuckers.md) | | [optional] -**weaners** | [**PostPorkRequestPorkInnerClassesWeaners**](PostPorkRequestPorkInnerClassesWeaners.md) | | [optional] -**growers** | [**PostPorkRequestPorkInnerClassesGrowers**](PostPorkRequestPorkInnerClassesGrowers.md) | | [optional] -**slaughter_pigs** | [**PostPorkRequestPorkInnerClassesSlaughterPigs**](PostPorkRequestPorkInnerClassesSlaughterPigs.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_pork_request_pork_inner_classes import PostPorkRequestPorkInnerClasses - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequestPorkInnerClasses from a JSON string -post_pork_request_pork_inner_classes_instance = PostPorkRequestPorkInnerClasses.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequestPorkInnerClasses.to_json()) - -# convert the object into a dict -post_pork_request_pork_inner_classes_dict = post_pork_request_pork_inner_classes_instance.to_dict() -# create an instance of PostPorkRequestPorkInnerClasses from a dict -post_pork_request_pork_inner_classes_from_dict = PostPorkRequestPorkInnerClasses.from_dict(post_pork_request_pork_inner_classes_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesBoars.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesBoars.md deleted file mode 100644 index 31e8c1d8..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesBoars.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostPorkRequestPorkInnerClassesBoars - -Boars - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Pig numbers in autumn | -**winter** | **float** | Pig numbers in winter | -**spring** | **float** | Pig numbers in spring | -**summer** | **float** | Pig numbers in summer | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] -**manure** | [**PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | - -## Example - -```python -from openapi_client.models.post_pork_request_pork_inner_classes_boars import PostPorkRequestPorkInnerClassesBoars - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequestPorkInnerClassesBoars from a JSON string -post_pork_request_pork_inner_classes_boars_instance = PostPorkRequestPorkInnerClassesBoars.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequestPorkInnerClassesBoars.to_json()) - -# convert the object into a dict -post_pork_request_pork_inner_classes_boars_dict = post_pork_request_pork_inner_classes_boars_instance.to_dict() -# create an instance of PostPorkRequestPorkInnerClassesBoars from a dict -post_pork_request_pork_inner_classes_boars_from_dict = PostPorkRequestPorkInnerClassesBoars.from_dict(post_pork_request_pork_inner_classes_boars_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGilts.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGilts.md deleted file mode 100644 index c52275d3..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGilts.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostPorkRequestPorkInnerClassesGilts - -Gilts - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Pig numbers in autumn | -**winter** | **float** | Pig numbers in winter | -**spring** | **float** | Pig numbers in spring | -**summer** | **float** | Pig numbers in summer | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] -**manure** | [**PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | - -## Example - -```python -from openapi_client.models.post_pork_request_pork_inner_classes_gilts import PostPorkRequestPorkInnerClassesGilts - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequestPorkInnerClassesGilts from a JSON string -post_pork_request_pork_inner_classes_gilts_instance = PostPorkRequestPorkInnerClassesGilts.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequestPorkInnerClassesGilts.to_json()) - -# convert the object into a dict -post_pork_request_pork_inner_classes_gilts_dict = post_pork_request_pork_inner_classes_gilts_instance.to_dict() -# create an instance of PostPorkRequestPorkInnerClassesGilts from a dict -post_pork_request_pork_inner_classes_gilts_from_dict = PostPorkRequestPorkInnerClassesGilts.from_dict(post_pork_request_pork_inner_classes_gilts_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGrowers.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGrowers.md deleted file mode 100644 index 1ca69147..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesGrowers.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostPorkRequestPorkInnerClassesGrowers - -Growers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Pig numbers in autumn | -**winter** | **float** | Pig numbers in winter | -**spring** | **float** | Pig numbers in spring | -**summer** | **float** | Pig numbers in summer | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] -**manure** | [**PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | - -## Example - -```python -from openapi_client.models.post_pork_request_pork_inner_classes_growers import PostPorkRequestPorkInnerClassesGrowers - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequestPorkInnerClassesGrowers from a JSON string -post_pork_request_pork_inner_classes_growers_instance = PostPorkRequestPorkInnerClassesGrowers.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequestPorkInnerClassesGrowers.to_json()) - -# convert the object into a dict -post_pork_request_pork_inner_classes_growers_dict = post_pork_request_pork_inner_classes_growers_instance.to_dict() -# create an instance of PostPorkRequestPorkInnerClassesGrowers from a dict -post_pork_request_pork_inner_classes_growers_from_dict = PostPorkRequestPorkInnerClassesGrowers.from_dict(post_pork_request_pork_inner_classes_growers_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSlaughterPigs.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSlaughterPigs.md deleted file mode 100644 index 2569dc5f..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSlaughterPigs.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostPorkRequestPorkInnerClassesSlaughterPigs - -Slaughter Pigs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Pig numbers in autumn | -**winter** | **float** | Pig numbers in winter | -**spring** | **float** | Pig numbers in spring | -**summer** | **float** | Pig numbers in summer | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] -**manure** | [**PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | - -## Example - -```python -from openapi_client.models.post_pork_request_pork_inner_classes_slaughter_pigs import PostPorkRequestPorkInnerClassesSlaughterPigs - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequestPorkInnerClassesSlaughterPigs from a JSON string -post_pork_request_pork_inner_classes_slaughter_pigs_instance = PostPorkRequestPorkInnerClassesSlaughterPigs.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequestPorkInnerClassesSlaughterPigs.to_json()) - -# convert the object into a dict -post_pork_request_pork_inner_classes_slaughter_pigs_dict = post_pork_request_pork_inner_classes_slaughter_pigs_instance.to_dict() -# create an instance of PostPorkRequestPorkInnerClassesSlaughterPigs from a dict -post_pork_request_pork_inner_classes_slaughter_pigs_from_dict = PostPorkRequestPorkInnerClassesSlaughterPigs.from_dict(post_pork_request_pork_inner_classes_slaughter_pigs_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSows.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSows.md deleted file mode 100644 index c1b366ea..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSows.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostPorkRequestPorkInnerClassesSows - -Sows - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Pig numbers in autumn | -**winter** | **float** | Pig numbers in winter | -**spring** | **float** | Pig numbers in spring | -**summer** | **float** | Pig numbers in summer | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] -**manure** | [**PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | - -## Example - -```python -from openapi_client.models.post_pork_request_pork_inner_classes_sows import PostPorkRequestPorkInnerClassesSows - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequestPorkInnerClassesSows from a JSON string -post_pork_request_pork_inner_classes_sows_instance = PostPorkRequestPorkInnerClassesSows.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequestPorkInnerClassesSows.to_json()) - -# convert the object into a dict -post_pork_request_pork_inner_classes_sows_dict = post_pork_request_pork_inner_classes_sows_instance.to_dict() -# create an instance of PostPorkRequestPorkInnerClassesSows from a dict -post_pork_request_pork_inner_classes_sows_from_dict = PostPorkRequestPorkInnerClassesSows.from_dict(post_pork_request_pork_inner_classes_sows_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManure.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManure.md deleted file mode 100644 index 4fcf7eca..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManure.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostPorkRequestPorkInnerClassesSowsManure - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**spring** | [**PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | -**summer** | [**PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | -**autumn** | [**PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | -**winter** | [**PostPorkRequestPorkInnerClassesSowsManureSpring**](PostPorkRequestPorkInnerClassesSowsManureSpring.md) | | - -## Example - -```python -from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure import PostPorkRequestPorkInnerClassesSowsManure - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequestPorkInnerClassesSowsManure from a JSON string -post_pork_request_pork_inner_classes_sows_manure_instance = PostPorkRequestPorkInnerClassesSowsManure.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequestPorkInnerClassesSowsManure.to_json()) - -# convert the object into a dict -post_pork_request_pork_inner_classes_sows_manure_dict = post_pork_request_pork_inner_classes_sows_manure_instance.to_dict() -# create an instance of PostPorkRequestPorkInnerClassesSowsManure from a dict -post_pork_request_pork_inner_classes_sows_manure_from_dict = PostPorkRequestPorkInnerClassesSowsManure.from_dict(post_pork_request_pork_inner_classes_sows_manure_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManureSpring.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManureSpring.md deleted file mode 100644 index 1c66c3d7..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSowsManureSpring.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostPorkRequestPorkInnerClassesSowsManureSpring - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**outdoor_systems** | **float** | Amount of volatile solids sent to outoor systems in t (tonnes) | [optional] -**covered_anaerobic_pond** | **float** | Amount of volatile solids sent to covered anaerobic pond in t (tonnes) | [optional] -**uncovered_anaerobic_pond** | **float** | Amount of volatile solids sent to uncovered anaerobic pond in t (tonnes) | [optional] -**deep_litter** | **float** | Amount of volatile solids sent to deep litter in t (tonnes) | [optional] -**undefined_system** | **float** | Amount of volatile solids where manure management system is not known or defined, in t (tonnes) | [optional] - -## Example - -```python -from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure_spring import PostPorkRequestPorkInnerClassesSowsManureSpring - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequestPorkInnerClassesSowsManureSpring from a JSON string -post_pork_request_pork_inner_classes_sows_manure_spring_instance = PostPorkRequestPorkInnerClassesSowsManureSpring.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequestPorkInnerClassesSowsManureSpring.to_json()) - -# convert the object into a dict -post_pork_request_pork_inner_classes_sows_manure_spring_dict = post_pork_request_pork_inner_classes_sows_manure_spring_instance.to_dict() -# create an instance of PostPorkRequestPorkInnerClassesSowsManureSpring from a dict -post_pork_request_pork_inner_classes_sows_manure_spring_from_dict = PostPorkRequestPorkInnerClassesSowsManureSpring.from_dict(post_pork_request_pork_inner_classes_sows_manure_spring_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSuckers.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSuckers.md deleted file mode 100644 index 5b925e5d..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesSuckers.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostPorkRequestPorkInnerClassesSuckers - -Suckers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Pig numbers in autumn | -**winter** | **float** | Pig numbers in winter | -**spring** | **float** | Pig numbers in spring | -**summer** | **float** | Pig numbers in summer | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] -**manure** | [**PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | - -## Example - -```python -from openapi_client.models.post_pork_request_pork_inner_classes_suckers import PostPorkRequestPorkInnerClassesSuckers - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequestPorkInnerClassesSuckers from a JSON string -post_pork_request_pork_inner_classes_suckers_instance = PostPorkRequestPorkInnerClassesSuckers.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequestPorkInnerClassesSuckers.to_json()) - -# convert the object into a dict -post_pork_request_pork_inner_classes_suckers_dict = post_pork_request_pork_inner_classes_suckers_instance.to_dict() -# create an instance of PostPorkRequestPorkInnerClassesSuckers from a dict -post_pork_request_pork_inner_classes_suckers_from_dict = PostPorkRequestPorkInnerClassesSuckers.from_dict(post_pork_request_pork_inner_classes_suckers_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesWeaners.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesWeaners.md deleted file mode 100644 index e29f7c26..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerClassesWeaners.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostPorkRequestPorkInnerClassesWeaners - -Weaners - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Pig numbers in autumn | -**winter** | **float** | Pig numbers in winter | -**spring** | **float** | Pig numbers in spring | -**summer** | **float** | Pig numbers in summer | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] -**manure** | [**PostPorkRequestPorkInnerClassesSowsManure**](PostPorkRequestPorkInnerClassesSowsManure.md) | | - -## Example - -```python -from openapi_client.models.post_pork_request_pork_inner_classes_weaners import PostPorkRequestPorkInnerClassesWeaners - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequestPorkInnerClassesWeaners from a JSON string -post_pork_request_pork_inner_classes_weaners_instance = PostPorkRequestPorkInnerClassesWeaners.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequestPorkInnerClassesWeaners.to_json()) - -# convert the object into a dict -post_pork_request_pork_inner_classes_weaners_dict = post_pork_request_pork_inner_classes_weaners_instance.to_dict() -# create an instance of PostPorkRequestPorkInnerClassesWeaners from a dict -post_pork_request_pork_inner_classes_weaners_from_dict = PostPorkRequestPorkInnerClassesWeaners.from_dict(post_pork_request_pork_inner_classes_weaners_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInner.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInner.md deleted file mode 100644 index c4abf9ce..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInner.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostPorkRequestPorkInnerFeedProductsInner - -Pig feed product - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**feed_purchased** | **float** | Pig feed purchased, in tonnes | -**additional_ingredients** | **float** | Fraction of additional ingredient in feed mix, from 0 to 1 | -**emissions_intensity** | **float** | Emissions intensity of feed product in GHG (kg CO2-e/kg input) | -**ingredients** | [**PostPorkRequestPorkInnerFeedProductsInnerIngredients**](PostPorkRequestPorkInnerFeedProductsInnerIngredients.md) | | - -## Example - -```python -from openapi_client.models.post_pork_request_pork_inner_feed_products_inner import PostPorkRequestPorkInnerFeedProductsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequestPorkInnerFeedProductsInner from a JSON string -post_pork_request_pork_inner_feed_products_inner_instance = PostPorkRequestPorkInnerFeedProductsInner.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequestPorkInnerFeedProductsInner.to_json()) - -# convert the object into a dict -post_pork_request_pork_inner_feed_products_inner_dict = post_pork_request_pork_inner_feed_products_inner_instance.to_dict() -# create an instance of PostPorkRequestPorkInnerFeedProductsInner from a dict -post_pork_request_pork_inner_feed_products_inner_from_dict = PostPorkRequestPorkInnerFeedProductsInner.from_dict(post_pork_request_pork_inner_feed_products_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md b/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md deleted file mode 100644 index 3d2f4fc6..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequestPorkInnerFeedProductsInnerIngredients.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostPorkRequestPorkInnerFeedProductsInnerIngredients - -Feed product ingredients, each ingredient is a fraction from 0 to 1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**wheat** | **float** | | [optional] -**barley** | **float** | | [optional] -**whey_powder** | **float** | | [optional] -**canola_meal** | **float** | | [optional] -**soybean_meal** | **float** | | [optional] -**meat_meal** | **float** | | [optional] -**blood_meal** | **float** | | [optional] -**fishmeal** | **float** | | [optional] -**tallow** | **float** | | [optional] -**wheat_bran** | **float** | | [optional] -**beet_pulp** | **float** | | [optional] -**mill_mix** | **float** | | [optional] - -## Example - -```python -from openapi_client.models.post_pork_request_pork_inner_feed_products_inner_ingredients import PostPorkRequestPorkInnerFeedProductsInnerIngredients - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequestPorkInnerFeedProductsInnerIngredients from a JSON string -post_pork_request_pork_inner_feed_products_inner_ingredients_instance = PostPorkRequestPorkInnerFeedProductsInnerIngredients.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequestPorkInnerFeedProductsInnerIngredients.to_json()) - -# convert the object into a dict -post_pork_request_pork_inner_feed_products_inner_ingredients_dict = post_pork_request_pork_inner_feed_products_inner_ingredients_instance.to_dict() -# create an instance of PostPorkRequestPorkInnerFeedProductsInnerIngredients from a dict -post_pork_request_pork_inner_feed_products_inner_ingredients_from_dict = PostPorkRequestPorkInnerFeedProductsInnerIngredients.from_dict(post_pork_request_pork_inner_feed_products_inner_ingredients_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPorkRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostPorkRequestVegetationInner.md deleted file mode 100644 index c63431c0..00000000 --- a/examples/python-api-client/api-client/docs/PostPorkRequestVegetationInner.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostPorkRequestVegetationInner - -Non-productive vegetation inputs allocated to a particular activity type - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**allocated_proportion** | **List[float]** | The proportion of the sequestration that is allocated to the activity | - -## Example - -```python -from openapi_client.models.post_pork_request_vegetation_inner import PostPorkRequestVegetationInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPorkRequestVegetationInner from a JSON string -post_pork_request_vegetation_inner_instance = PostPorkRequestVegetationInner.from_json(json) -# print the JSON string representation of the object -print(PostPorkRequestVegetationInner.to_json()) - -# convert the object into a dict -post_pork_request_vegetation_inner_dict = post_pork_request_vegetation_inner_instance.to_dict() -# create an instance of PostPorkRequestVegetationInner from a dict -post_pork_request_vegetation_inner_from_dict = PostPorkRequestVegetationInner.from_dict(post_pork_request_vegetation_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultry200Response.md b/examples/python-api-client/api-client/docs/PostPoultry200Response.md deleted file mode 100644 index 5c4b5c75..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultry200Response.md +++ /dev/null @@ -1,37 +0,0 @@ -# PostPoultry200Response - -Emissions calculation output for the `poultry` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostPoultry200ResponseScope1**](PostPoultry200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostPoultry200ResponseScope3**](PostPoultry200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate_broilers** | [**List[PostPoultry200ResponseIntermediateBroilersInner]**](PostPoultry200ResponseIntermediateBroilersInner.md) | | -**intermediate_layers** | [**List[PostPoultry200ResponseIntermediateLayersInner]**](PostPoultry200ResponseIntermediateLayersInner.md) | | -**net** | [**PostPoultry200ResponseNet**](PostPoultry200ResponseNet.md) | | -**intensities** | [**PostPoultry200ResponseIntensities**](PostPoultry200ResponseIntensities.md) | | - -## Example - -```python -from openapi_client.models.post_poultry200_response import PostPoultry200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultry200Response from a JSON string -post_poultry200_response_instance = PostPoultry200Response.from_json(json) -# print the JSON string representation of the object -print(PostPoultry200Response.to_json()) - -# convert the object into a dict -post_poultry200_response_dict = post_poultry200_response_instance.to_dict() -# create an instance of PostPoultry200Response from a dict -post_poultry200_response_from_dict = PostPoultry200Response.from_dict(post_poultry200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntensities.md deleted file mode 100644 index 6198d3f5..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntensities.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostPoultry200ResponseIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**poultry_meat_including_sequestration** | **float** | Poultry meat including carbon sequestration, in kg-CO2e/kg liveweight | -**poultry_meat_excluding_sequestration** | **float** | Poultry meat excluding carbon sequestration, in kg-CO2e/kg liveweight | -**poultry_eggs_including_sequestration** | **float** | Poultry eggs including carbon sequestration, in kg-CO2e/kg liveweight | -**poultry_eggs_excluding_sequestration** | **float** | Poultry eggs excluding carbon sequestration, in kg-CO2e/kg liveweight | -**meat_produced_kg** | **float** | Poultry meat produced in kg | -**eggs_produced_kg** | **float** | Amount of eggs produced, in kg | - -## Example - -```python -from openapi_client.models.post_poultry200_response_intensities import PostPoultry200ResponseIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultry200ResponseIntensities from a JSON string -post_poultry200_response_intensities_instance = PostPoultry200ResponseIntensities.from_json(json) -# print the JSON string representation of the object -print(PostPoultry200ResponseIntensities.to_json()) - -# convert the object into a dict -post_poultry200_response_intensities_dict = post_poultry200_response_intensities_instance.to_dict() -# create an instance of PostPoultry200ResponseIntensities from a dict -post_poultry200_response_intensities_from_dict = PostPoultry200ResponseIntensities.from_dict(post_poultry200_response_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInner.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInner.md deleted file mode 100644 index 39460303..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInner.md +++ /dev/null @@ -1,35 +0,0 @@ -# PostPoultry200ResponseIntermediateBroilersInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**scope1** | [**PostPoultry200ResponseScope1**](PostPoultry200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostPoultry200ResponseScope3**](PostPoultry200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | -**intensities** | [**PostPoultry200ResponseIntermediateBroilersInnerIntensities**](PostPoultry200ResponseIntermediateBroilersInnerIntensities.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -## Example - -```python -from openapi_client.models.post_poultry200_response_intermediate_broilers_inner import PostPoultry200ResponseIntermediateBroilersInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultry200ResponseIntermediateBroilersInner from a JSON string -post_poultry200_response_intermediate_broilers_inner_instance = PostPoultry200ResponseIntermediateBroilersInner.from_json(json) -# print the JSON string representation of the object -print(PostPoultry200ResponseIntermediateBroilersInner.to_json()) - -# convert the object into a dict -post_poultry200_response_intermediate_broilers_inner_dict = post_poultry200_response_intermediate_broilers_inner_instance.to_dict() -# create an instance of PostPoultry200ResponseIntermediateBroilersInner from a dict -post_poultry200_response_intermediate_broilers_inner_from_dict = PostPoultry200ResponseIntermediateBroilersInner.from_dict(post_poultry200_response_intermediate_broilers_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md deleted file mode 100644 index 29755e1d..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateBroilersInnerIntensities.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostPoultry200ResponseIntermediateBroilersInnerIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**poultry_meat_including_sequestration** | **float** | Poultry meat including carbon sequestration, in kg-CO2e/kg liveweight | -**poultry_meat_excluding_sequestration** | **float** | Poultry meat excluding carbon sequestration, in kg-CO2e/kg liveweight | -**meat_produced_kg** | **float** | Poultry meat produced in kg liveweight | - -## Example - -```python -from openapi_client.models.post_poultry200_response_intermediate_broilers_inner_intensities import PostPoultry200ResponseIntermediateBroilersInnerIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultry200ResponseIntermediateBroilersInnerIntensities from a JSON string -post_poultry200_response_intermediate_broilers_inner_intensities_instance = PostPoultry200ResponseIntermediateBroilersInnerIntensities.from_json(json) -# print the JSON string representation of the object -print(PostPoultry200ResponseIntermediateBroilersInnerIntensities.to_json()) - -# convert the object into a dict -post_poultry200_response_intermediate_broilers_inner_intensities_dict = post_poultry200_response_intermediate_broilers_inner_intensities_instance.to_dict() -# create an instance of PostPoultry200ResponseIntermediateBroilersInnerIntensities from a dict -post_poultry200_response_intermediate_broilers_inner_intensities_from_dict = PostPoultry200ResponseIntermediateBroilersInnerIntensities.from_dict(post_poultry200_response_intermediate_broilers_inner_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInner.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInner.md deleted file mode 100644 index a6e1e4e2..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInner.md +++ /dev/null @@ -1,35 +0,0 @@ -# PostPoultry200ResponseIntermediateLayersInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**scope1** | [**PostPoultry200ResponseScope1**](PostPoultry200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostPoultry200ResponseScope3**](PostPoultry200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | -**intensities** | [**PostPoultry200ResponseIntermediateLayersInnerIntensities**](PostPoultry200ResponseIntermediateLayersInnerIntensities.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -## Example - -```python -from openapi_client.models.post_poultry200_response_intermediate_layers_inner import PostPoultry200ResponseIntermediateLayersInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultry200ResponseIntermediateLayersInner from a JSON string -post_poultry200_response_intermediate_layers_inner_instance = PostPoultry200ResponseIntermediateLayersInner.from_json(json) -# print the JSON string representation of the object -print(PostPoultry200ResponseIntermediateLayersInner.to_json()) - -# convert the object into a dict -post_poultry200_response_intermediate_layers_inner_dict = post_poultry200_response_intermediate_layers_inner_instance.to_dict() -# create an instance of PostPoultry200ResponseIntermediateLayersInner from a dict -post_poultry200_response_intermediate_layers_inner_from_dict = PostPoultry200ResponseIntermediateLayersInner.from_dict(post_poultry200_response_intermediate_layers_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInnerIntensities.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInnerIntensities.md deleted file mode 100644 index 4d215f20..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultry200ResponseIntermediateLayersInnerIntensities.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostPoultry200ResponseIntermediateLayersInnerIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**poultry_eggs_including_sequestration** | **float** | Poultry eggs including carbon sequestration, in kg-CO2e/kg eggs | -**poultry_eggs_excluding_sequestration** | **float** | Poultry eggs excluding carbon sequestration, in kg-CO2e/kg eggs | -**eggs_produced_kg** | **float** | Poultry eggs produced in kg | - -## Example - -```python -from openapi_client.models.post_poultry200_response_intermediate_layers_inner_intensities import PostPoultry200ResponseIntermediateLayersInnerIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultry200ResponseIntermediateLayersInnerIntensities from a JSON string -post_poultry200_response_intermediate_layers_inner_intensities_instance = PostPoultry200ResponseIntermediateLayersInnerIntensities.from_json(json) -# print the JSON string representation of the object -print(PostPoultry200ResponseIntermediateLayersInnerIntensities.to_json()) - -# convert the object into a dict -post_poultry200_response_intermediate_layers_inner_intensities_dict = post_poultry200_response_intermediate_layers_inner_intensities_instance.to_dict() -# create an instance of PostPoultry200ResponseIntermediateLayersInnerIntensities from a dict -post_poultry200_response_intermediate_layers_inner_intensities_from_dict = PostPoultry200ResponseIntermediateLayersInnerIntensities.from_dict(post_poultry200_response_intermediate_layers_inner_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseNet.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseNet.md deleted file mode 100644 index 35db5c1e..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultry200ResponseNet.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostPoultry200ResponseNet - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | -**broilers** | **float** | Net emissions of broilers, in tonnes-CO2e/year | -**layers** | **float** | Net emissions of layers, in tonnes-CO2e/year | - -## Example - -```python -from openapi_client.models.post_poultry200_response_net import PostPoultry200ResponseNet - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultry200ResponseNet from a JSON string -post_poultry200_response_net_instance = PostPoultry200ResponseNet.from_json(json) -# print the JSON string representation of the object -print(PostPoultry200ResponseNet.to_json()) - -# convert the object into a dict -post_poultry200_response_net_dict = post_poultry200_response_net_instance.to_dict() -# create an instance of PostPoultry200ResponseNet from a dict -post_poultry200_response_net_from_dict = PostPoultry200ResponseNet.from_dict(post_poultry200_response_net_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseScope1.md deleted file mode 100644 index a693a538..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultry200ResponseScope1.md +++ /dev/null @@ -1,40 +0,0 @@ -# PostPoultry200ResponseScope1 - -Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**manure_management_ch4** | **float** | CH4 emissions from manure management, in tonnes-CO2e | -**manure_management_n2_o** | **float** | N2O emissions from manure management, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_poultry200_response_scope1 import PostPoultry200ResponseScope1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultry200ResponseScope1 from a JSON string -post_poultry200_response_scope1_instance = PostPoultry200ResponseScope1.from_json(json) -# print the JSON string representation of the object -print(PostPoultry200ResponseScope1.to_json()) - -# convert the object into a dict -post_poultry200_response_scope1_dict = post_poultry200_response_scope1_instance.to_dict() -# create an instance of PostPoultry200ResponseScope1 from a dict -post_poultry200_response_scope1_from_dict = PostPoultry200ResponseScope1.from_dict(post_poultry200_response_scope1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultry200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostPoultry200ResponseScope3.md deleted file mode 100644 index a3aac991..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultry200ResponseScope3.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostPoultry200ResponseScope3 - -Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**purchased_feed** | **float** | Emissions from purchased feed, in tonnes-CO2e | -**purchased_hay** | **float** | Emissions from purchased hay, in tonnes-CO2e | -**purchased_livestock** | **float** | Emissions from purchased livestock, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_poultry200_response_scope3 import PostPoultry200ResponseScope3 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultry200ResponseScope3 from a JSON string -post_poultry200_response_scope3_instance = PostPoultry200ResponseScope3.from_json(json) -# print the JSON string representation of the object -print(PostPoultry200ResponseScope3.to_json()) - -# convert the object into a dict -post_poultry200_response_scope3_dict = post_poultry200_response_scope3_instance.to_dict() -# create an instance of PostPoultry200ResponseScope3 from a dict -post_poultry200_response_scope3_from_dict = PostPoultry200ResponseScope3.from_dict(post_poultry200_response_scope3_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequest.md b/examples/python-api-client/api-client/docs/PostPoultryRequest.md deleted file mode 100644 index 9ccaba9d..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequest.md +++ /dev/null @@ -1,35 +0,0 @@ -# PostPoultryRequest - -Input data required for the `poultry` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**broilers** | [**List[PostPoultryRequestBroilersInner]**](PostPoultryRequestBroilersInner.md) | | -**layers** | [**List[PostPoultryRequestLayersInner]**](PostPoultryRequestLayersInner.md) | | -**vegetation** | [**List[PostPoultryRequestVegetationInner]**](PostPoultryRequestVegetationInner.md) | | - -## Example - -```python -from openapi_client.models.post_poultry_request import PostPoultryRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequest from a JSON string -post_poultry_request_instance = PostPoultryRequest.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequest.to_json()) - -# convert the object into a dict -post_poultry_request_dict = post_poultry_request_instance.to_dict() -# create an instance of PostPoultryRequest from a dict -post_poultry_request_from_dict = PostPoultryRequest.from_dict(post_poultry_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInner.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInner.md deleted file mode 100644 index a3e0817e..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInner.md +++ /dev/null @@ -1,48 +0,0 @@ -# PostPoultryRequestBroilersInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**groups** | [**List[PostPoultryRequestBroilersInnerGroupsInner]**](PostPoultryRequestBroilersInnerGroupsInner.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**electricity_source** | **str** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**hay** | **float** | Hay purchased in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**manure_waste_allocation** | **float** | Fraction allocation of manure waste, from 0 to 1. Note: only for pasture range, paddock and free range systems | -**waste_handled_drylot_or_storage** | **float** | Fraction of waste handled through dryland and solid storage, from 0 to 1 | -**litter_recycled** | **float** | Fraction of litter recycled, from 0 to 1 | -**litter_recycle_frequency** | **float** | Number of litter cycles per year | -**purchased_free_range** | **float** | Fraction of chickens purchased that are free range. Note: fraction of chickens purchased that are conventional is `1 - purchasedFreeRange` | -**meat_chicken_growers_purchases** | [**PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases**](PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md) | | -**meat_chicken_layers_purchases** | [**PostPoultryRequestBroilersInnerMeatChickenLayersPurchases**](PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md) | | -**meat_other_purchases** | [**PostPoultryRequestBroilersInnerMeatOtherPurchases**](PostPoultryRequestBroilersInnerMeatOtherPurchases.md) | | -**sales** | [**List[PostPoultryRequestBroilersInnerSalesInner]**](PostPoultryRequestBroilersInnerSalesInner.md) | Broiler sales | - -## Example - -```python -from openapi_client.models.post_poultry_request_broilers_inner import PostPoultryRequestBroilersInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestBroilersInner from a JSON string -post_poultry_request_broilers_inner_instance = PostPoultryRequestBroilersInner.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestBroilersInner.to_json()) - -# convert the object into a dict -post_poultry_request_broilers_inner_dict = post_poultry_request_broilers_inner_instance.to_dict() -# create an instance of PostPoultryRequestBroilersInner from a dict -post_poultry_request_broilers_inner_from_dict = PostPoultryRequestBroilersInner.from_dict(post_poultry_request_broilers_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInner.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInner.md deleted file mode 100644 index 5d03eec3..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInner.md +++ /dev/null @@ -1,35 +0,0 @@ -# PostPoultryRequestBroilersInnerGroupsInner - -Poultry broiler group - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meat_chicken_growers** | [**PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers**](PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md) | | -**meat_chicken_layers** | [**PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers**](PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md) | | -**meat_other** | [**PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers**](PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md) | | -**feed** | [**List[PostPoultryRequestBroilersInnerGroupsInnerFeedInner]**](PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md) | | -**custom_feed_purchased** | **float** | Custom feed purchased, in tonnes | -**custom_feed_emission_intensity** | **float** | Emissions intensity of custom feed in GHG (kg CO2-e/kg input) | - -## Example - -```python -from openapi_client.models.post_poultry_request_broilers_inner_groups_inner import PostPoultryRequestBroilersInnerGroupsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestBroilersInnerGroupsInner from a JSON string -post_poultry_request_broilers_inner_groups_inner_instance = PostPoultryRequestBroilersInnerGroupsInner.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestBroilersInnerGroupsInner.to_json()) - -# convert the object into a dict -post_poultry_request_broilers_inner_groups_inner_dict = post_poultry_request_broilers_inner_groups_inner_instance.to_dict() -# create an instance of PostPoultryRequestBroilersInnerGroupsInner from a dict -post_poultry_request_broilers_inner_groups_inner_from_dict = PostPoultryRequestBroilersInnerGroupsInner.from_dict(post_poultry_request_broilers_inner_groups_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md deleted file mode 100644 index a8f3ea08..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostPoultryRequestBroilersInnerGroupsInnerFeedInner - -Poultry feed - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ingredients** | [**PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients**](PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md) | | -**feed_purchased** | **float** | Feed purchased, in tonnes | -**additional_ingredient** | **float** | Fraction of additional ingredients in feed mix, from 0 to 1 | -**emission_intensity** | **float** | Emissions intensity of feed product in GHG (kg CO2-e/kg input) | - -## Example - -```python -from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner import PostPoultryRequestBroilersInnerGroupsInnerFeedInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestBroilersInnerGroupsInnerFeedInner from a JSON string -post_poultry_request_broilers_inner_groups_inner_feed_inner_instance = PostPoultryRequestBroilersInnerGroupsInnerFeedInner.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestBroilersInnerGroupsInnerFeedInner.to_json()) - -# convert the object into a dict -post_poultry_request_broilers_inner_groups_inner_feed_inner_dict = post_poultry_request_broilers_inner_groups_inner_feed_inner_instance.to_dict() -# create an instance of PostPoultryRequestBroilersInnerGroupsInnerFeedInner from a dict -post_poultry_request_broilers_inner_groups_inner_feed_inner_from_dict = PostPoultryRequestBroilersInnerGroupsInnerFeedInner.from_dict(post_poultry_request_broilers_inner_groups_inner_feed_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md deleted file mode 100644 index d4312fda..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients - -Poultry broiler feed ingredients as fractions, each from 0 to 1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**wheat** | **float** | | [optional] -**barley** | **float** | | [optional] -**sorghum** | **float** | | [optional] -**soybean** | **float** | | [optional] -**millrun** | **float** | | [optional] - -## Example - -```python -from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients import PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients from a JSON string -post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients_instance = PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.to_json()) - -# convert the object into a dict -post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients_dict = post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients_instance.to_dict() -# create an instance of PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients from a dict -post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients_from_dict = PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients.from_dict(post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md deleted file mode 100644 index 0341f330..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers - -Broiler class with seasonal data - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**birds** | **float** | Total number of birds/head | -**average_stay_length50** | **float** | Average length of stay until 50% of the flock is depleted, in days | -**liveweight50** | **float** | Average liveweight during the 50% depletion period, in kg | -**average_stay_length100** | **float** | Average length of stay until 100% of the flock is depleted, in days | -**liveweight100** | **float** | Average liveweight during the 100% depletion period, in kg | -**dry_matter_intake** | **float** | Dry matter intake, in kg/head/day | [optional] -**dry_matter_digestibility** | **float** | Dry matter digestibility fraction, from 0 to 1 | [optional] -**crude_protein** | **float** | Crude protein fraction, from 0 to 1 | [optional] -**manure_ash** | **float** | Manure ash fraction, from 0 to 1 | [optional] -**nitrogen_retention_rate** | **float** | Nitrogen retention rate fraction, from 0 to 1 | [optional] - -## Example - -```python -from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers import PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers from a JSON string -post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers_instance = PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.to_json()) - -# convert the object into a dict -post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers_dict = post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers_instance.to_dict() -# create an instance of PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers from a dict -post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers_from_dict = PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers.from_dict(post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md deleted file mode 100644 index e006b5bd..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases - -Livestock purchases of meat chicken growers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals purchased (head) | -**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | - -## Example - -```python -from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_growers_purchases import PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases from a JSON string -post_poultry_request_broilers_inner_meat_chicken_growers_purchases_instance = PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.to_json()) - -# convert the object into a dict -post_poultry_request_broilers_inner_meat_chicken_growers_purchases_dict = post_poultry_request_broilers_inner_meat_chicken_growers_purchases_instance.to_dict() -# create an instance of PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases from a dict -post_poultry_request_broilers_inner_meat_chicken_growers_purchases_from_dict = PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases.from_dict(post_poultry_request_broilers_inner_meat_chicken_growers_purchases_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md deleted file mode 100644 index 35e627b3..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostPoultryRequestBroilersInnerMeatChickenLayersPurchases - -Livestock purchases of meat chicken layers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals purchased (head) | -**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | - -## Example - -```python -from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_layers_purchases import PostPoultryRequestBroilersInnerMeatChickenLayersPurchases - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestBroilersInnerMeatChickenLayersPurchases from a JSON string -post_poultry_request_broilers_inner_meat_chicken_layers_purchases_instance = PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.to_json()) - -# convert the object into a dict -post_poultry_request_broilers_inner_meat_chicken_layers_purchases_dict = post_poultry_request_broilers_inner_meat_chicken_layers_purchases_instance.to_dict() -# create an instance of PostPoultryRequestBroilersInnerMeatChickenLayersPurchases from a dict -post_poultry_request_broilers_inner_meat_chicken_layers_purchases_from_dict = PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.from_dict(post_poultry_request_broilers_inner_meat_chicken_layers_purchases_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatOtherPurchases.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatOtherPurchases.md deleted file mode 100644 index a74e34d6..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerMeatOtherPurchases.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostPoultryRequestBroilersInnerMeatOtherPurchases - -Livestock purchases of meat other - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals purchased (head) | -**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | - -## Example - -```python -from openapi_client.models.post_poultry_request_broilers_inner_meat_other_purchases import PostPoultryRequestBroilersInnerMeatOtherPurchases - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestBroilersInnerMeatOtherPurchases from a JSON string -post_poultry_request_broilers_inner_meat_other_purchases_instance = PostPoultryRequestBroilersInnerMeatOtherPurchases.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestBroilersInnerMeatOtherPurchases.to_json()) - -# convert the object into a dict -post_poultry_request_broilers_inner_meat_other_purchases_dict = post_poultry_request_broilers_inner_meat_other_purchases_instance.to_dict() -# create an instance of PostPoultryRequestBroilersInnerMeatOtherPurchases from a dict -post_poultry_request_broilers_inner_meat_other_purchases_from_dict = PostPoultryRequestBroilersInnerMeatOtherPurchases.from_dict(post_poultry_request_broilers_inner_meat_other_purchases_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerSalesInner.md b/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerSalesInner.md deleted file mode 100644 index b99cb3d6..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestBroilersInnerSalesInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostPoultryRequestBroilersInnerSalesInner - -Poultry broiler sales - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meat_chicken_growers_sales** | [**PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | | -**meat_chicken_layers** | [**PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | | -**meat_other** | [**PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner**](PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner.md) | | - -## Example - -```python -from openapi_client.models.post_poultry_request_broilers_inner_sales_inner import PostPoultryRequestBroilersInnerSalesInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestBroilersInnerSalesInner from a JSON string -post_poultry_request_broilers_inner_sales_inner_instance = PostPoultryRequestBroilersInnerSalesInner.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestBroilersInnerSalesInner.to_json()) - -# convert the object into a dict -post_poultry_request_broilers_inner_sales_inner_dict = post_poultry_request_broilers_inner_sales_inner_instance.to_dict() -# create an instance of PostPoultryRequestBroilersInnerSalesInner from a dict -post_poultry_request_broilers_inner_sales_inner_from_dict = PostPoultryRequestBroilersInnerSalesInner.from_dict(post_poultry_request_broilers_inner_sales_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInner.md b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInner.md deleted file mode 100644 index 74b0e8b6..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInner.md +++ /dev/null @@ -1,52 +0,0 @@ -# PostPoultryRequestLayersInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**layers** | [**PostPoultryRequestLayersInnerLayers**](PostPoultryRequestLayersInnerLayers.md) | | -**meat_chicken_layers** | [**PostPoultryRequestLayersInnerMeatChickenLayers**](PostPoultryRequestLayersInnerMeatChickenLayers.md) | | -**feed** | [**List[PostPoultryRequestBroilersInnerGroupsInnerFeedInner]**](PostPoultryRequestBroilersInnerGroupsInnerFeedInner.md) | | -**purchased_free_range** | **float** | Fraction of chickens purchased that are free range. Note: fraction of chickens purchased that are conventional is `1 - purchasedFreeRange` | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**electricity_source** | **str** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**hay** | **float** | Hay purchased in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**manure_waste_allocation** | **float** | Fraction allocation of manure waste, from 0 to 1. Note: only for pasture range, paddock and free range systems | -**waste_handled_drylot_or_storage** | **float** | Fraction of waste handled through dryland and solid storage, from 0 to 1 | -**litter_recycled** | **float** | Fraction of litter recycled, from 0 to 1 | -**litter_recycle_frequency** | **float** | Number of litter cycles per year | -**meat_chicken_layers_purchases** | [**PostPoultryRequestBroilersInnerMeatChickenLayersPurchases**](PostPoultryRequestBroilersInnerMeatChickenLayersPurchases.md) | | -**layers_purchases** | [**PostPoultryRequestLayersInnerLayersPurchases**](PostPoultryRequestLayersInnerLayersPurchases.md) | | -**custom_feed_purchased** | **float** | Custom feed purchased, in tonnes | -**custom_feed_emission_intensity** | **float** | Emissions intensity of custom feed in GHG (kg CO2-e/kg input) | -**meat_chicken_layers_egg_sale** | [**PostPoultryRequestLayersInnerMeatChickenLayersEggSale**](PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md) | | -**layers_egg_sale** | [**PostPoultryRequestLayersInnerLayersEggSale**](PostPoultryRequestLayersInnerLayersEggSale.md) | | - -## Example - -```python -from openapi_client.models.post_poultry_request_layers_inner import PostPoultryRequestLayersInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestLayersInner from a JSON string -post_poultry_request_layers_inner_instance = PostPoultryRequestLayersInner.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestLayersInner.to_json()) - -# convert the object into a dict -post_poultry_request_layers_inner_dict = post_poultry_request_layers_inner_instance.to_dict() -# create an instance of PostPoultryRequestLayersInner from a dict -post_poultry_request_layers_inner_from_dict = PostPoultryRequestLayersInner.from_dict(post_poultry_request_layers_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayers.md b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayers.md deleted file mode 100644 index 9ec3228d..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayers.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostPoultryRequestLayersInnerLayers - -Layers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Flock numbers in autumn | -**winter** | **float** | Flock numbers in winter | -**spring** | **float** | Flock numbers in spring | -**summer** | **float** | Flock numbers in summer | - -## Example - -```python -from openapi_client.models.post_poultry_request_layers_inner_layers import PostPoultryRequestLayersInnerLayers - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestLayersInnerLayers from a JSON string -post_poultry_request_layers_inner_layers_instance = PostPoultryRequestLayersInnerLayers.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestLayersInnerLayers.to_json()) - -# convert the object into a dict -post_poultry_request_layers_inner_layers_dict = post_poultry_request_layers_inner_layers_instance.to_dict() -# create an instance of PostPoultryRequestLayersInnerLayers from a dict -post_poultry_request_layers_inner_layers_from_dict = PostPoultryRequestLayersInnerLayers.from_dict(post_poultry_request_layers_inner_layers_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersEggSale.md b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersEggSale.md deleted file mode 100644 index 5dde1643..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersEggSale.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostPoultryRequestLayersInnerLayersEggSale - -Layers egg sales - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**eggs_produced** | **float** | Number of eggs produced in a year per bird | -**average_weight** | **float** | Average egg weight in grams | - -## Example - -```python -from openapi_client.models.post_poultry_request_layers_inner_layers_egg_sale import PostPoultryRequestLayersInnerLayersEggSale - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestLayersInnerLayersEggSale from a JSON string -post_poultry_request_layers_inner_layers_egg_sale_instance = PostPoultryRequestLayersInnerLayersEggSale.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestLayersInnerLayersEggSale.to_json()) - -# convert the object into a dict -post_poultry_request_layers_inner_layers_egg_sale_dict = post_poultry_request_layers_inner_layers_egg_sale_instance.to_dict() -# create an instance of PostPoultryRequestLayersInnerLayersEggSale from a dict -post_poultry_request_layers_inner_layers_egg_sale_from_dict = PostPoultryRequestLayersInnerLayersEggSale.from_dict(post_poultry_request_layers_inner_layers_egg_sale_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersPurchases.md b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersPurchases.md deleted file mode 100644 index d4fbebd2..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerLayersPurchases.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostPoultryRequestLayersInnerLayersPurchases - -Livestock purchases of layers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals purchased (head) | -**purchase_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head) | - -## Example - -```python -from openapi_client.models.post_poultry_request_layers_inner_layers_purchases import PostPoultryRequestLayersInnerLayersPurchases - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestLayersInnerLayersPurchases from a JSON string -post_poultry_request_layers_inner_layers_purchases_instance = PostPoultryRequestLayersInnerLayersPurchases.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestLayersInnerLayersPurchases.to_json()) - -# convert the object into a dict -post_poultry_request_layers_inner_layers_purchases_dict = post_poultry_request_layers_inner_layers_purchases_instance.to_dict() -# create an instance of PostPoultryRequestLayersInnerLayersPurchases from a dict -post_poultry_request_layers_inner_layers_purchases_from_dict = PostPoultryRequestLayersInnerLayersPurchases.from_dict(post_poultry_request_layers_inner_layers_purchases_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayers.md b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayers.md deleted file mode 100644 index 397791c1..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayers.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostPoultryRequestLayersInnerMeatChickenLayers - -Meat chicken layers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | Flock numbers in autumn | -**winter** | **float** | Flock numbers in winter | -**spring** | **float** | Flock numbers in spring | -**summer** | **float** | Flock numbers in summer | - -## Example - -```python -from openapi_client.models.post_poultry_request_layers_inner_meat_chicken_layers import PostPoultryRequestLayersInnerMeatChickenLayers - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestLayersInnerMeatChickenLayers from a JSON string -post_poultry_request_layers_inner_meat_chicken_layers_instance = PostPoultryRequestLayersInnerMeatChickenLayers.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestLayersInnerMeatChickenLayers.to_json()) - -# convert the object into a dict -post_poultry_request_layers_inner_meat_chicken_layers_dict = post_poultry_request_layers_inner_meat_chicken_layers_instance.to_dict() -# create an instance of PostPoultryRequestLayersInnerMeatChickenLayers from a dict -post_poultry_request_layers_inner_meat_chicken_layers_from_dict = PostPoultryRequestLayersInnerMeatChickenLayers.from_dict(post_poultry_request_layers_inner_meat_chicken_layers_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md b/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md deleted file mode 100644 index d0ade43d..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestLayersInnerMeatChickenLayersEggSale.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostPoultryRequestLayersInnerMeatChickenLayersEggSale - -Meat chicken layers egg sales - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**eggs_produced** | **float** | Number of eggs produced in a year per bird | -**average_weight** | **float** | Average egg weight in grams | - -## Example - -```python -from openapi_client.models.post_poultry_request_layers_inner_meat_chicken_layers_egg_sale import PostPoultryRequestLayersInnerMeatChickenLayersEggSale - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestLayersInnerMeatChickenLayersEggSale from a JSON string -post_poultry_request_layers_inner_meat_chicken_layers_egg_sale_instance = PostPoultryRequestLayersInnerMeatChickenLayersEggSale.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestLayersInnerMeatChickenLayersEggSale.to_json()) - -# convert the object into a dict -post_poultry_request_layers_inner_meat_chicken_layers_egg_sale_dict = post_poultry_request_layers_inner_meat_chicken_layers_egg_sale_instance.to_dict() -# create an instance of PostPoultryRequestLayersInnerMeatChickenLayersEggSale from a dict -post_poultry_request_layers_inner_meat_chicken_layers_egg_sale_from_dict = PostPoultryRequestLayersInnerMeatChickenLayersEggSale.from_dict(post_poultry_request_layers_inner_meat_chicken_layers_egg_sale_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostPoultryRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostPoultryRequestVegetationInner.md deleted file mode 100644 index 7d3b2d42..00000000 --- a/examples/python-api-client/api-client/docs/PostPoultryRequestVegetationInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostPoultryRequestVegetationInner - -Non-productive vegetation inputs along with allocations to broilers and layers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**broilers_proportion** | **List[float]** | The proportion of the sequestration that is allocated to broilers | -**layers_proportion** | **List[float]** | The proportion of the sequestration that is allocated to layers | - -## Example - -```python -from openapi_client.models.post_poultry_request_vegetation_inner import PostPoultryRequestVegetationInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostPoultryRequestVegetationInner from a JSON string -post_poultry_request_vegetation_inner_instance = PostPoultryRequestVegetationInner.from_json(json) -# print the JSON string representation of the object -print(PostPoultryRequestVegetationInner.to_json()) - -# convert the object into a dict -post_poultry_request_vegetation_inner_dict = post_poultry_request_vegetation_inner_instance.to_dict() -# create an instance of PostPoultryRequestVegetationInner from a dict -post_poultry_request_vegetation_inner_from_dict = PostPoultryRequestVegetationInner.from_dict(post_poultry_request_vegetation_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostProcessing200Response.md b/examples/python-api-client/api-client/docs/PostProcessing200Response.md deleted file mode 100644 index e58a6bb5..00000000 --- a/examples/python-api-client/api-client/docs/PostProcessing200Response.md +++ /dev/null @@ -1,37 +0,0 @@ -# PostProcessing200Response - -Emissions calculation output for the `processing` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostProcessing200ResponseScope1**](PostProcessing200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostProcessing200ResponseScope3**](PostProcessing200ResponseScope3.md) | | -**purchased_offsets** | [**PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | -**net** | [**PostProcessing200ResponseNet**](PostProcessing200ResponseNet.md) | | -**intensities** | [**List[PostProcessing200ResponseIntensitiesInner]**](PostProcessing200ResponseIntensitiesInner.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**List[PostProcessing200ResponseIntermediateInner]**](PostProcessing200ResponseIntermediateInner.md) | | - -## Example - -```python -from openapi_client.models.post_processing200_response import PostProcessing200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostProcessing200Response from a JSON string -post_processing200_response_instance = PostProcessing200Response.from_json(json) -# print the JSON string representation of the object -print(PostProcessing200Response.to_json()) - -# convert the object into a dict -post_processing200_response_dict = post_processing200_response_instance.to_dict() -# create an instance of PostProcessing200Response from a dict -post_processing200_response_from_dict = PostProcessing200Response.from_dict(post_processing200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostProcessing200ResponseIntensitiesInner.md b/examples/python-api-client/api-client/docs/PostProcessing200ResponseIntensitiesInner.md deleted file mode 100644 index 771dacd3..00000000 --- a/examples/python-api-client/api-client/docs/PostProcessing200ResponseIntensitiesInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostProcessing200ResponseIntensitiesInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**units_produced** | **float** | Number of processed product units produced | -**unit_of_product** | **str** | Unit type of the product being produced (used by \"unitsProduced\") | -**processing_excluding_carbon_offsets** | **float** | Processing emissions intensity excluding carbon offsets, in kg-CO2e/number of units produced | -**processing_including_carbon_offsets** | **float** | Processing emissions intensity including carbon offsets, in kg-CO2e/number of units produced | - -## Example - -```python -from openapi_client.models.post_processing200_response_intensities_inner import PostProcessing200ResponseIntensitiesInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostProcessing200ResponseIntensitiesInner from a JSON string -post_processing200_response_intensities_inner_instance = PostProcessing200ResponseIntensitiesInner.from_json(json) -# print the JSON string representation of the object -print(PostProcessing200ResponseIntensitiesInner.to_json()) - -# convert the object into a dict -post_processing200_response_intensities_inner_dict = post_processing200_response_intensities_inner_instance.to_dict() -# create an instance of PostProcessing200ResponseIntensitiesInner from a dict -post_processing200_response_intensities_inner_from_dict = PostProcessing200ResponseIntensitiesInner.from_dict(post_processing200_response_intensities_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostProcessing200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostProcessing200ResponseIntermediateInner.md deleted file mode 100644 index 7eda03b6..00000000 --- a/examples/python-api-client/api-client/docs/PostProcessing200ResponseIntermediateInner.md +++ /dev/null @@ -1,35 +0,0 @@ -# PostProcessing200ResponseIntermediateInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostProcessing200ResponseScope1**](PostProcessing200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostProcessing200ResponseScope3**](PostProcessing200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | -**intensities** | [**PostProcessing200ResponseIntensitiesInner**](PostProcessing200ResponseIntensitiesInner.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -## Example - -```python -from openapi_client.models.post_processing200_response_intermediate_inner import PostProcessing200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostProcessing200ResponseIntermediateInner from a JSON string -post_processing200_response_intermediate_inner_instance = PostProcessing200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostProcessing200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_processing200_response_intermediate_inner_dict = post_processing200_response_intermediate_inner_instance.to_dict() -# create an instance of PostProcessing200ResponseIntermediateInner from a dict -post_processing200_response_intermediate_inner_from_dict = PostProcessing200ResponseIntermediateInner.from_dict(post_processing200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostProcessing200ResponseNet.md b/examples/python-api-client/api-client/docs/PostProcessing200ResponseNet.md deleted file mode 100644 index 4ab343d7..00000000 --- a/examples/python-api-client/api-client/docs/PostProcessing200ResponseNet.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostProcessing200ResponseNet - -Net emissions for the processing activity - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | - -## Example - -```python -from openapi_client.models.post_processing200_response_net import PostProcessing200ResponseNet - -# TODO update the JSON string below -json = "{}" -# create an instance of PostProcessing200ResponseNet from a JSON string -post_processing200_response_net_instance = PostProcessing200ResponseNet.from_json(json) -# print the JSON string representation of the object -print(PostProcessing200ResponseNet.to_json()) - -# convert the object into a dict -post_processing200_response_net_dict = post_processing200_response_net_instance.to_dict() -# create an instance of PostProcessing200ResponseNet from a dict -post_processing200_response_net_from_dict = PostProcessing200ResponseNet.from_dict(post_processing200_response_net_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostProcessing200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostProcessing200ResponseScope1.md deleted file mode 100644 index 3eb65000..00000000 --- a/examples/python-api-client/api-client/docs/PostProcessing200ResponseScope1.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostProcessing200ResponseScope1 - -Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | -**purchased_co2** | **float** | Emissions from purchased CO2, in tonnes-CO2e | -**wastewater_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | -**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_processing200_response_scope1 import PostProcessing200ResponseScope1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostProcessing200ResponseScope1 from a JSON string -post_processing200_response_scope1_instance = PostProcessing200ResponseScope1.from_json(json) -# print the JSON string representation of the object -print(PostProcessing200ResponseScope1.to_json()) - -# convert the object into a dict -post_processing200_response_scope1_dict = post_processing200_response_scope1_instance.to_dict() -# create an instance of PostProcessing200ResponseScope1 from a dict -post_processing200_response_scope1_from_dict = PostProcessing200ResponseScope1.from_dict(post_processing200_response_scope1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostProcessing200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostProcessing200ResponseScope3.md deleted file mode 100644 index d4c747e2..00000000 --- a/examples/python-api-client/api-client/docs/PostProcessing200ResponseScope3.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostProcessing200ResponseScope3 - -Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**solid_waste_sent_offsite** | **float** | Emissions from solid waste sent offsite, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_processing200_response_scope3 import PostProcessing200ResponseScope3 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostProcessing200ResponseScope3 from a JSON string -post_processing200_response_scope3_instance = PostProcessing200ResponseScope3.from_json(json) -# print the JSON string representation of the object -print(PostProcessing200ResponseScope3.to_json()) - -# convert the object into a dict -post_processing200_response_scope3_dict = post_processing200_response_scope3_instance.to_dict() -# create an instance of PostProcessing200ResponseScope3 from a dict -post_processing200_response_scope3_from_dict = PostProcessing200ResponseScope3.from_dict(post_processing200_response_scope3_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostProcessingRequest.md b/examples/python-api-client/api-client/docs/PostProcessingRequest.md deleted file mode 100644 index 9190ecc9..00000000 --- a/examples/python-api-client/api-client/docs/PostProcessingRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostProcessingRequest - -Input data required for the `processing` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**products** | [**List[PostProcessingRequestProductsInner]**](PostProcessingRequestProductsInner.md) | | - -## Example - -```python -from openapi_client.models.post_processing_request import PostProcessingRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostProcessingRequest from a JSON string -post_processing_request_instance = PostProcessingRequest.from_json(json) -# print the JSON string representation of the object -print(PostProcessingRequest.to_json()) - -# convert the object into a dict -post_processing_request_dict = post_processing_request_instance.to_dict() -# create an instance of PostProcessingRequest from a dict -post_processing_request_from_dict = PostProcessingRequest.from_dict(post_processing_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostProcessingRequestProductsInner.md b/examples/python-api-client/api-client/docs/PostProcessingRequestProductsInner.md deleted file mode 100644 index c070d6c9..00000000 --- a/examples/python-api-client/api-client/docs/PostProcessingRequestProductsInner.md +++ /dev/null @@ -1,40 +0,0 @@ -# PostProcessingRequestProductsInner - -Input data required for processing a specific product - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**product** | [**PostProcessingRequestProductsInnerProduct**](PostProcessingRequestProductsInnerProduct.md) | | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**electricity_source** | **str** | Source of electricity | -**fuel** | [**PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | -**refrigerants** | [**List[PostHorticultureRequestCropsInnerRefrigerantsInner]**](PostHorticultureRequestCropsInnerRefrigerantsInner.md) | Refrigerant type | -**fluid_waste** | [**List[PostAquacultureRequestEnterprisesInnerFluidWasteInner]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | -**solid_waste** | [**PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | -**purchased_co2** | **float** | Quantity of CO2 purchased, in kg CO2 | -**carbon_offsets** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | [optional] - -## Example - -```python -from openapi_client.models.post_processing_request_products_inner import PostProcessingRequestProductsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostProcessingRequestProductsInner from a JSON string -post_processing_request_products_inner_instance = PostProcessingRequestProductsInner.from_json(json) -# print the JSON string representation of the object -print(PostProcessingRequestProductsInner.to_json()) - -# convert the object into a dict -post_processing_request_products_inner_dict = post_processing_request_products_inner_instance.to_dict() -# create an instance of PostProcessingRequestProductsInner from a dict -post_processing_request_products_inner_from_dict = PostProcessingRequestProductsInner.from_dict(post_processing_request_products_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostProcessingRequestProductsInnerProduct.md b/examples/python-api-client/api-client/docs/PostProcessingRequestProductsInnerProduct.md deleted file mode 100644 index 892df028..00000000 --- a/examples/python-api-client/api-client/docs/PostProcessingRequestProductsInnerProduct.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostProcessingRequestProductsInnerProduct - -Product being processed - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**unit** | **str** | | -**amount_made_per_year** | **float** | | - -## Example - -```python -from openapi_client.models.post_processing_request_products_inner_product import PostProcessingRequestProductsInnerProduct - -# TODO update the JSON string below -json = "{}" -# create an instance of PostProcessingRequestProductsInnerProduct from a JSON string -post_processing_request_products_inner_product_instance = PostProcessingRequestProductsInnerProduct.from_json(json) -# print the JSON string representation of the object -print(PostProcessingRequestProductsInnerProduct.to_json()) - -# convert the object into a dict -post_processing_request_products_inner_product_dict = post_processing_request_products_inner_product_instance.to_dict() -# create an instance of PostProcessingRequestProductsInnerProduct from a dict -post_processing_request_products_inner_product_from_dict = PostProcessingRequestProductsInnerProduct.from_dict(post_processing_request_products_inner_product_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostRice200Response.md b/examples/python-api-client/api-client/docs/PostRice200Response.md deleted file mode 100644 index 77fe2758..00000000 --- a/examples/python-api-client/api-client/docs/PostRice200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostRice200Response - -Emissions calculation output for the `rice` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostRice200ResponseScope1**](PostRice200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**List[PostRice200ResponseIntermediateInner]**](PostRice200ResponseIntermediateInner.md) | | -**net** | [**PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | -**intensities** | [**PostRice200ResponseIntensities**](PostRice200ResponseIntensities.md) | | - -## Example - -```python -from openapi_client.models.post_rice200_response import PostRice200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostRice200Response from a JSON string -post_rice200_response_instance = PostRice200Response.from_json(json) -# print the JSON string representation of the object -print(PostRice200Response.to_json()) - -# convert the object into a dict -post_rice200_response_dict = post_rice200_response_instance.to_dict() -# create an instance of PostRice200Response from a dict -post_rice200_response_from_dict = PostRice200Response.from_dict(post_rice200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostRice200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostRice200ResponseIntensities.md deleted file mode 100644 index 838afea3..00000000 --- a/examples/python-api-client/api-client/docs/PostRice200ResponseIntensities.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostRice200ResponseIntensities - -Emissions intensities for the crop - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rice_produced_tonnes** | **float** | Rice produced in tonnes | -**rice_excluding_sequestration** | **float** | Rice excluding sequestration, in t-CO2e/t rice | -**rice_including_sequestration** | **float** | Rice including sequestration, in t-CO2e/t rice | -**intensity** | **float** | Emissions intensity of rice production. Deprecation note: Use `riceIncludingSequestration` instead | - -## Example - -```python -from openapi_client.models.post_rice200_response_intensities import PostRice200ResponseIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostRice200ResponseIntensities from a JSON string -post_rice200_response_intensities_instance = PostRice200ResponseIntensities.from_json(json) -# print the JSON string representation of the object -print(PostRice200ResponseIntensities.to_json()) - -# convert the object into a dict -post_rice200_response_intensities_dict = post_rice200_response_intensities_instance.to_dict() -# create an instance of PostRice200ResponseIntensities from a dict -post_rice200_response_intensities_from_dict = PostRice200ResponseIntensities.from_dict(post_rice200_response_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInner.md deleted file mode 100644 index 1eb1efd9..00000000 --- a/examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInner.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostRice200ResponseIntermediateInner - -Intermediate emissions calculation output for the Rice calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostRice200ResponseScope1**](PostRice200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**intensities** | [**PostRice200ResponseIntermediateInnerIntensities**](PostRice200ResponseIntermediateInnerIntensities.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -## Example - -```python -from openapi_client.models.post_rice200_response_intermediate_inner import PostRice200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostRice200ResponseIntermediateInner from a JSON string -post_rice200_response_intermediate_inner_instance = PostRice200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostRice200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_rice200_response_intermediate_inner_dict = post_rice200_response_intermediate_inner_instance.to_dict() -# create an instance of PostRice200ResponseIntermediateInner from a dict -post_rice200_response_intermediate_inner_from_dict = PostRice200ResponseIntermediateInner.from_dict(post_rice200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index 19531406..00000000 --- a/examples/python-api-client/api-client/docs/PostRice200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostRice200ResponseIntermediateInnerIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rice_produced_tonnes** | **float** | Rice produced in tonnes | -**rice_excluding_sequestration** | **float** | Rice excluding sequestration, in t-CO2e/t rice | -**rice_including_sequestration** | **float** | Rice including sequestration, in t-CO2e/t rice | -**intensity** | **float** | Emissions intensity of rice production. Deprecation note: Use `riceIncludingSequestration` instead | - -## Example - -```python -from openapi_client.models.post_rice200_response_intermediate_inner_intensities import PostRice200ResponseIntermediateInnerIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostRice200ResponseIntermediateInnerIntensities from a JSON string -post_rice200_response_intermediate_inner_intensities_instance = PostRice200ResponseIntermediateInnerIntensities.from_json(json) -# print the JSON string representation of the object -print(PostRice200ResponseIntermediateInnerIntensities.to_json()) - -# convert the object into a dict -post_rice200_response_intermediate_inner_intensities_dict = post_rice200_response_intermediate_inner_intensities_instance.to_dict() -# create an instance of PostRice200ResponseIntermediateInnerIntensities from a dict -post_rice200_response_intermediate_inner_intensities_from_dict = PostRice200ResponseIntermediateInnerIntensities.from_dict(post_rice200_response_intermediate_inner_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostRice200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostRice200ResponseScope1.md deleted file mode 100644 index 73152e2b..00000000 --- a/examples/python-api-client/api-client/docs/PostRice200ResponseScope1.md +++ /dev/null @@ -1,45 +0,0 @@ -# PostRice200ResponseScope1 - -Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**field_burning_ch4** | **float** | CH4 emissions from field burning, in tonnes-CO2e | -**rice_cultivation_ch4** | **float** | CH4 emissions from rice cultivation, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**field_burning_n2_o** | **float** | N2O emissions from field burning, in tonnes-CO2e | -**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_rice200_response_scope1 import PostRice200ResponseScope1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostRice200ResponseScope1 from a JSON string -post_rice200_response_scope1_instance = PostRice200ResponseScope1.from_json(json) -# print the JSON string representation of the object -print(PostRice200ResponseScope1.to_json()) - -# convert the object into a dict -post_rice200_response_scope1_dict = post_rice200_response_scope1_instance.to_dict() -# create an instance of PostRice200ResponseScope1 from a dict -post_rice200_response_scope1_from_dict = PostRice200ResponseScope1.from_dict(post_rice200_response_scope1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostRiceRequest.md b/examples/python-api-client/api-client/docs/PostRiceRequest.md deleted file mode 100644 index 8d2a1591..00000000 --- a/examples/python-api-client/api-client/docs/PostRiceRequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostRiceRequest - -Input data required for the `rice` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**crops** | [**List[PostRiceRequestCropsInner]**](PostRiceRequestCropsInner.md) | | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**vegetation** | [**List[PostCottonRequestVegetationInner]**](PostCottonRequestVegetationInner.md) | | - -## Example - -```python -from openapi_client.models.post_rice_request import PostRiceRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostRiceRequest from a JSON string -post_rice_request_instance = PostRiceRequest.from_json(json) -# print the JSON string representation of the object -print(PostRiceRequest.to_json()) - -# convert the object into a dict -post_rice_request_dict = post_rice_request_instance.to_dict() -# create an instance of PostRiceRequest from a dict -post_rice_request_from_dict = PostRiceRequest.from_dict(post_rice_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostRiceRequestCropsInner.md b/examples/python-api-client/api-client/docs/PostRiceRequestCropsInner.md deleted file mode 100644 index 75243e21..00000000 --- a/examples/python-api-client/api-client/docs/PostRiceRequestCropsInner.md +++ /dev/null @@ -1,51 +0,0 @@ -# PostRiceRequestCropsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**average_rice_yield** | **float** | Average rice yield, in t/ha (tonnes per hectare) | -**area_sown** | **float** | Area sown, in ha (hectares) | -**growing_season_days** | **float** | The length of the growing season for this crop, in days | -**water_regime_type** | **str** | | -**water_regime_sub_type** | **str** | | -**rice_preseason_flooding_period** | **str** | | -**urea_application** | **float** | Urea application, in kg Urea/ha (kilograms of urea per hectare) | -**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | -**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | -**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | -**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | -**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | -**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | -**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | -**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | -**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**diesel_use** | **float** | Diesel usage in L (litres) | -**petrol_use** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | - -## Example - -```python -from openapi_client.models.post_rice_request_crops_inner import PostRiceRequestCropsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostRiceRequestCropsInner from a JSON string -post_rice_request_crops_inner_instance = PostRiceRequestCropsInner.from_json(json) -# print the JSON string representation of the object -print(PostRiceRequestCropsInner.to_json()) - -# convert the object into a dict -post_rice_request_crops_inner_dict = post_rice_request_crops_inner_instance.to_dict() -# create an instance of PostRiceRequestCropsInner from a dict -post_rice_request_crops_inner_from_dict = PostRiceRequestCropsInner.from_dict(post_rice_request_crops_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheep200Response.md b/examples/python-api-client/api-client/docs/PostSheep200Response.md deleted file mode 100644 index 9835ffb1..00000000 --- a/examples/python-api-client/api-client/docs/PostSheep200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostSheep200Response - -Emissions calculation output for the `sheep` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**List[PostSheep200ResponseIntermediateInner]**](PostSheep200ResponseIntermediateInner.md) | | -**net** | [**PostSheep200ResponseNet**](PostSheep200ResponseNet.md) | | -**intensities** | [**PostSheep200ResponseIntermediateInnerIntensities**](PostSheep200ResponseIntermediateInnerIntensities.md) | | - -## Example - -```python -from openapi_client.models.post_sheep200_response import PostSheep200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheep200Response from a JSON string -post_sheep200_response_instance = PostSheep200Response.from_json(json) -# print the JSON string representation of the object -print(PostSheep200Response.to_json()) - -# convert the object into a dict -post_sheep200_response_dict = post_sheep200_response_instance.to_dict() -# create an instance of PostSheep200Response from a dict -post_sheep200_response_from_dict = PostSheep200Response.from_dict(post_sheep200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInner.md deleted file mode 100644 index 4d627702..00000000 --- a/examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInner.md +++ /dev/null @@ -1,35 +0,0 @@ -# PostSheep200ResponseIntermediateInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostBuffalo200ResponseScope1**](PostBuffalo200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**intensities** | [**PostSheep200ResponseIntermediateInnerIntensities**](PostSheep200ResponseIntermediateInnerIntensities.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -## Example - -```python -from openapi_client.models.post_sheep200_response_intermediate_inner import PostSheep200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheep200ResponseIntermediateInner from a JSON string -post_sheep200_response_intermediate_inner_instance = PostSheep200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostSheep200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_sheep200_response_intermediate_inner_dict = post_sheep200_response_intermediate_inner_instance.to_dict() -# create an instance of PostSheep200ResponseIntermediateInner from a dict -post_sheep200_response_intermediate_inner_from_dict = PostSheep200ResponseIntermediateInner.from_dict(post_sheep200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index f76f475b..00000000 --- a/examples/python-api-client/api-client/docs/PostSheep200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostSheep200ResponseIntermediateInnerIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**wool_produced_kg** | **float** | Greasy wool produced in kg | -**sheep_meat_produced_kg** | **float** | Sheep meat produced in kg liveweight | -**wool_including_sequestration** | **float** | Wool production including carbon sequestration, in kg-CO2e/kg greasy | -**wool_excluding_sequestration** | **float** | Wool production excluding carbon sequestration, in kg-CO2e/kg greasy | -**sheep_meat_breeding_including_sequestration** | **float** | Sheep meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight | -**sheep_meat_breeding_excluding_sequestration** | **float** | Sheep meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight | - -## Example - -```python -from openapi_client.models.post_sheep200_response_intermediate_inner_intensities import PostSheep200ResponseIntermediateInnerIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheep200ResponseIntermediateInnerIntensities from a JSON string -post_sheep200_response_intermediate_inner_intensities_instance = PostSheep200ResponseIntermediateInnerIntensities.from_json(json) -# print the JSON string representation of the object -print(PostSheep200ResponseIntermediateInnerIntensities.to_json()) - -# convert the object into a dict -post_sheep200_response_intermediate_inner_intensities_dict = post_sheep200_response_intermediate_inner_intensities_instance.to_dict() -# create an instance of PostSheep200ResponseIntermediateInnerIntensities from a dict -post_sheep200_response_intermediate_inner_intensities_from_dict = PostSheep200ResponseIntermediateInnerIntensities.from_dict(post_sheep200_response_intermediate_inner_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheep200ResponseNet.md b/examples/python-api-client/api-client/docs/PostSheep200ResponseNet.md deleted file mode 100644 index dd80a0ca..00000000 --- a/examples/python-api-client/api-client/docs/PostSheep200ResponseNet.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostSheep200ResponseNet - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | -**sheep** | **float** | Net emissions of sheep, in tonnes-CO2e/year | - -## Example - -```python -from openapi_client.models.post_sheep200_response_net import PostSheep200ResponseNet - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheep200ResponseNet from a JSON string -post_sheep200_response_net_instance = PostSheep200ResponseNet.from_json(json) -# print the JSON string representation of the object -print(PostSheep200ResponseNet.to_json()) - -# convert the object into a dict -post_sheep200_response_net_dict = post_sheep200_response_net_instance.to_dict() -# create an instance of PostSheep200ResponseNet from a dict -post_sheep200_response_net_from_dict = PostSheep200ResponseNet.from_dict(post_sheep200_response_net_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepRequest.md b/examples/python-api-client/api-client/docs/PostSheepRequest.md deleted file mode 100644 index 85af29ca..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepRequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostSheepRequest - -Input data required for the `sheep` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**sheep** | [**List[PostSheepRequestSheepInner]**](PostSheepRequestSheepInner.md) | | -**vegetation** | [**List[PostSheepRequestVegetationInner]**](PostSheepRequestVegetationInner.md) | | - -## Example - -```python -from openapi_client.models.post_sheep_request import PostSheepRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepRequest from a JSON string -post_sheep_request_instance = PostSheepRequest.from_json(json) -# print the JSON string representation of the object -print(PostSheepRequest.to_json()) - -# convert the object into a dict -post_sheep_request_dict = post_sheep_request_instance.to_dict() -# create an instance of PostSheepRequest from a dict -post_sheep_request_from_dict = PostSheepRequest.from_dict(post_sheep_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInner.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInner.md deleted file mode 100644 index cef9205a..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInner.md +++ /dev/null @@ -1,47 +0,0 @@ -# PostSheepRequestSheepInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**classes** | [**PostSheepRequestSheepInnerClasses**](PostSheepRequestSheepInnerClasses.md) | | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**fertiliser** | [**PostBeefRequestBeefInnerFertiliser**](PostBeefRequestBeefInnerFertiliser.md) | | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**mineral_supplementation** | [**PostBeefRequestBeefInnerMineralSupplementation**](PostBeefRequestBeefInnerMineralSupplementation.md) | | -**electricity_source** | **str** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**grain_feed** | **float** | Grain purchased for cattle feed in tonnes | -**hay_feed** | **float** | Hay purchased for cattle feed in tonnes | -**herbicide** | **float** | Total amount of active ingredients of from herbicide (Paraquat, Diquat, Glyphosate) in kg (kilograms) | -**herbicide_other** | **float** | Total amount of active ingredients of from other herbicides in kg (kilograms) | -**merino_percent** | **float** | Percent of sheep purchases that are of type Merino, from 0 to 100 | -**ewes_lambing** | [**PostSheepRequestSheepInnerEwesLambing**](PostSheepRequestSheepInnerEwesLambing.md) | | -**seasonal_lambing** | [**PostSheepRequestSheepInnerSeasonalLambing**](PostSheepRequestSheepInnerSeasonalLambing.md) | | - -## Example - -```python -from openapi_client.models.post_sheep_request_sheep_inner import PostSheepRequestSheepInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepRequestSheepInner from a JSON string -post_sheep_request_sheep_inner_instance = PostSheepRequestSheepInner.from_json(json) -# print the JSON string representation of the object -print(PostSheepRequestSheepInner.to_json()) - -# convert the object into a dict -post_sheep_request_sheep_inner_dict = post_sheep_request_sheep_inner_instance.to_dict() -# create an instance of PostSheepRequestSheepInner from a dict -post_sheep_request_sheep_inner_from_dict = PostSheepRequestSheepInner.from_dict(post_sheep_request_sheep_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClasses.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClasses.md deleted file mode 100644 index e06cd728..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClasses.md +++ /dev/null @@ -1,44 +0,0 @@ -# PostSheepRequestSheepInnerClasses - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rams** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**trade_rams** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**wethers** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**trade_wethers** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**maiden_breeding_ewes** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**trade_maiden_breeding_ewes** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**breeding_ewes** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | -**trade_breeding_ewes** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**other_ewes** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**trade_other_ewes** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**ewe_lambs** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | -**trade_ewe_lambs** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**wether_lambs** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | -**trade_wether_lambs** | [**PostSheepRequestSheepInnerClassesRams**](PostSheepRequestSheepInnerClassesRams.md) | | [optional] -**trade_ewes** | [**PostSheepRequestSheepInnerClassesTradeEwes**](PostSheepRequestSheepInnerClassesTradeEwes.md) | | [optional] -**trade_lambs_and_hoggets** | [**PostSheepRequestSheepInnerClassesTradeLambsAndHoggets**](PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_sheep_request_sheep_inner_classes import PostSheepRequestSheepInnerClasses - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepRequestSheepInnerClasses from a JSON string -post_sheep_request_sheep_inner_classes_instance = PostSheepRequestSheepInnerClasses.from_json(json) -# print the JSON string representation of the object -print(PostSheepRequestSheepInnerClasses.to_json()) - -# convert the object into a dict -post_sheep_request_sheep_inner_classes_dict = post_sheep_request_sheep_inner_classes_instance.to_dict() -# create an instance of PostSheepRequestSheepInnerClasses from a dict -post_sheep_request_sheep_inner_classes_from_dict = PostSheepRequestSheepInnerClasses.from_dict(post_sheep_request_sheep_inner_classes_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRams.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRams.md deleted file mode 100644 index 36ad7170..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRams.md +++ /dev/null @@ -1,40 +0,0 @@ -# PostSheepRequestSheepInnerClassesRams - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**winter** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**spring** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**summer** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**head_shorn** | **float** | Number of sheep shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_sheep_request_sheep_inner_classes_rams import PostSheepRequestSheepInnerClassesRams - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepRequestSheepInnerClassesRams from a JSON string -post_sheep_request_sheep_inner_classes_rams_instance = PostSheepRequestSheepInnerClassesRams.from_json(json) -# print the JSON string representation of the object -print(PostSheepRequestSheepInnerClassesRams.to_json()) - -# convert the object into a dict -post_sheep_request_sheep_inner_classes_rams_dict = post_sheep_request_sheep_inner_classes_rams_instance.to_dict() -# create an instance of PostSheepRequestSheepInnerClassesRams from a dict -post_sheep_request_sheep_inner_classes_rams_from_dict = PostSheepRequestSheepInnerClassesRams.from_dict(post_sheep_request_sheep_inner_classes_rams_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRamsAutumn.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRamsAutumn.md deleted file mode 100644 index 2483edbf..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesRamsAutumn.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostSheepRequestSheepInnerClassesRamsAutumn - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**head** | **float** | Number of animals (head) | -**liveweight** | **float** | Average liveweight of animals in kg/head (kilogram per head) | -**liveweight_gain** | **float** | Average liveweight gain in kg/day (kilogram per day) | -**crude_protein** | **float** | Crude protein percent, between 0 and 100 | [optional] -**dry_matter_digestibility** | **float** | Dry matter digestibility percent, between 0 and 100 | [optional] -**feed_availability** | **float** | Feed availability, in t/ha (tonnes per hectare) | [optional] - -## Example - -```python -from openapi_client.models.post_sheep_request_sheep_inner_classes_rams_autumn import PostSheepRequestSheepInnerClassesRamsAutumn - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepRequestSheepInnerClassesRamsAutumn from a JSON string -post_sheep_request_sheep_inner_classes_rams_autumn_instance = PostSheepRequestSheepInnerClassesRamsAutumn.from_json(json) -# print the JSON string representation of the object -print(PostSheepRequestSheepInnerClassesRamsAutumn.to_json()) - -# convert the object into a dict -post_sheep_request_sheep_inner_classes_rams_autumn_dict = post_sheep_request_sheep_inner_classes_rams_autumn_instance.to_dict() -# create an instance of PostSheepRequestSheepInnerClassesRamsAutumn from a dict -post_sheep_request_sheep_inner_classes_rams_autumn_from_dict = PostSheepRequestSheepInnerClassesRamsAutumn.from_dict(post_sheep_request_sheep_inner_classes_rams_autumn_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeEwes.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeEwes.md deleted file mode 100644 index 55865d8b..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeEwes.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostSheepRequestSheepInnerClassesTradeEwes - -Trading ewes. Deprecation note: More specific trading classes are now available - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**winter** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**spring** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**summer** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**head_shorn** | **float** | Number of sheep shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_sheep_request_sheep_inner_classes_trade_ewes import PostSheepRequestSheepInnerClassesTradeEwes - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepRequestSheepInnerClassesTradeEwes from a JSON string -post_sheep_request_sheep_inner_classes_trade_ewes_instance = PostSheepRequestSheepInnerClassesTradeEwes.from_json(json) -# print the JSON string representation of the object -print(PostSheepRequestSheepInnerClassesTradeEwes.to_json()) - -# convert the object into a dict -post_sheep_request_sheep_inner_classes_trade_ewes_dict = post_sheep_request_sheep_inner_classes_trade_ewes_instance.to_dict() -# create an instance of PostSheepRequestSheepInnerClassesTradeEwes from a dict -post_sheep_request_sheep_inner_classes_trade_ewes_from_dict = PostSheepRequestSheepInnerClassesTradeEwes.from_dict(post_sheep_request_sheep_inner_classes_trade_ewes_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md deleted file mode 100644 index a59a6d46..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.md +++ /dev/null @@ -1,41 +0,0 @@ -# PostSheepRequestSheepInnerClassesTradeLambsAndHoggets - -Trading lambs and hoggets. Deprecation note: More specific trading classes are now available - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**winter** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**spring** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**summer** | [**PostSheepRequestSheepInnerClassesRamsAutumn**](PostSheepRequestSheepInnerClassesRamsAutumn.md) | | -**head_shorn** | **float** | Number of sheep shorn, in head | -**wool_shorn** | **float** | Weight of wool shorn, in kg/head (kilogram per head) | -**clean_wool_yield** | **float** | Percentage of clean wool from weight of yield, from 0 to 100 | -**head_purchased** | **float** | Number of animals purchased (head). Deprecation note: Please use `purchases` instead | [optional] -**purchased_weight** | **float** | Weight at purchase, in liveweight kg/head (kilogram per head). Deprecation note: Please use `purchases` instead | [optional] -**head_sold** | **float** | Number of animals sold (head) | -**sale_weight** | **float** | Weight at sale, in liveweight kg/head (kilogram per head) | -**purchases** | [**List[PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner]**](PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner.md) | | [optional] - -## Example - -```python -from openapi_client.models.post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets import PostSheepRequestSheepInnerClassesTradeLambsAndHoggets - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepRequestSheepInnerClassesTradeLambsAndHoggets from a JSON string -post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets_instance = PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.from_json(json) -# print the JSON string representation of the object -print(PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.to_json()) - -# convert the object into a dict -post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets_dict = post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets_instance.to_dict() -# create an instance of PostSheepRequestSheepInnerClassesTradeLambsAndHoggets from a dict -post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets_from_dict = PostSheepRequestSheepInnerClassesTradeLambsAndHoggets.from_dict(post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerEwesLambing.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerEwesLambing.md deleted file mode 100644 index c13e6d07..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerEwesLambing.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostSheepRequestSheepInnerEwesLambing - -The proportion of ewes lambing in each season, as a value from 0 to 1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | | -**winter** | **float** | | -**spring** | **float** | | -**summer** | **float** | | - -## Example - -```python -from openapi_client.models.post_sheep_request_sheep_inner_ewes_lambing import PostSheepRequestSheepInnerEwesLambing - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepRequestSheepInnerEwesLambing from a JSON string -post_sheep_request_sheep_inner_ewes_lambing_instance = PostSheepRequestSheepInnerEwesLambing.from_json(json) -# print the JSON string representation of the object -print(PostSheepRequestSheepInnerEwesLambing.to_json()) - -# convert the object into a dict -post_sheep_request_sheep_inner_ewes_lambing_dict = post_sheep_request_sheep_inner_ewes_lambing_instance.to_dict() -# create an instance of PostSheepRequestSheepInnerEwesLambing from a dict -post_sheep_request_sheep_inner_ewes_lambing_from_dict = PostSheepRequestSheepInnerEwesLambing.from_dict(post_sheep_request_sheep_inner_ewes_lambing_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerSeasonalLambing.md b/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerSeasonalLambing.md deleted file mode 100644 index 4b698655..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepRequestSheepInnerSeasonalLambing.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostSheepRequestSheepInnerSeasonalLambing - -Seasonal lamb marking rates, i.e. the rate of lambs marked per ewe lambed. Values may exceed 1 if there are more lambs marked than ewes lambed in a season. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**autumn** | **float** | | -**winter** | **float** | | -**spring** | **float** | | -**summer** | **float** | | - -## Example - -```python -from openapi_client.models.post_sheep_request_sheep_inner_seasonal_lambing import PostSheepRequestSheepInnerSeasonalLambing - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepRequestSheepInnerSeasonalLambing from a JSON string -post_sheep_request_sheep_inner_seasonal_lambing_instance = PostSheepRequestSheepInnerSeasonalLambing.from_json(json) -# print the JSON string representation of the object -print(PostSheepRequestSheepInnerSeasonalLambing.to_json()) - -# convert the object into a dict -post_sheep_request_sheep_inner_seasonal_lambing_dict = post_sheep_request_sheep_inner_seasonal_lambing_instance.to_dict() -# create an instance of PostSheepRequestSheepInnerSeasonalLambing from a dict -post_sheep_request_sheep_inner_seasonal_lambing_from_dict = PostSheepRequestSheepInnerSeasonalLambing.from_dict(post_sheep_request_sheep_inner_seasonal_lambing_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostSheepRequestVegetationInner.md deleted file mode 100644 index 87318d65..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepRequestVegetationInner.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostSheepRequestVegetationInner - -Non-productive vegetation inputs along with allocations to sheep - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**sheep_proportion** | **List[float]** | The proportion of the sequestration that is allocated to sheep | - -## Example - -```python -from openapi_client.models.post_sheep_request_vegetation_inner import PostSheepRequestVegetationInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepRequestVegetationInner from a JSON string -post_sheep_request_vegetation_inner_instance = PostSheepRequestVegetationInner.from_json(json) -# print the JSON string representation of the object -print(PostSheepRequestVegetationInner.to_json()) - -# convert the object into a dict -post_sheep_request_vegetation_inner_dict = post_sheep_request_vegetation_inner_instance.to_dict() -# create an instance of PostSheepRequestVegetationInner from a dict -post_sheep_request_vegetation_inner_from_dict = PostSheepRequestVegetationInner.from_dict(post_sheep_request_vegetation_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepbeef200Response.md b/examples/python-api-client/api-client/docs/PostSheepbeef200Response.md deleted file mode 100644 index 3d130cb4..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepbeef200Response.md +++ /dev/null @@ -1,38 +0,0 @@ -# PostSheepbeef200Response - -Emissions calculation output for the `sheepbeef` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**PostSheepbeef200ResponseIntermediate**](PostSheepbeef200ResponseIntermediate.md) | | -**intermediate_beef** | [**List[PostBeef200ResponseIntermediateInner]**](PostBeef200ResponseIntermediateInner.md) | | -**intermediate_sheep** | [**List[PostSheep200ResponseIntermediateInner]**](PostSheep200ResponseIntermediateInner.md) | | -**net** | [**PostSheepbeef200ResponseNet**](PostSheepbeef200ResponseNet.md) | | -**intensities** | [**PostSheepbeef200ResponseIntensities**](PostSheepbeef200ResponseIntensities.md) | | - -## Example - -```python -from openapi_client.models.post_sheepbeef200_response import PostSheepbeef200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepbeef200Response from a JSON string -post_sheepbeef200_response_instance = PostSheepbeef200Response.from_json(json) -# print the JSON string representation of the object -print(PostSheepbeef200Response.to_json()) - -# convert the object into a dict -post_sheepbeef200_response_dict = post_sheepbeef200_response_instance.to_dict() -# create an instance of PostSheepbeef200Response from a dict -post_sheepbeef200_response_from_dict = PostSheepbeef200Response.from_dict(post_sheepbeef200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntensities.md deleted file mode 100644 index 40c7b293..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntensities.md +++ /dev/null @@ -1,37 +0,0 @@ -# PostSheepbeef200ResponseIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**beef_including_sequestration** | **float** | Beef including carbon sequestration, in kg-CO2e/kg liveweight | -**beef_excluding_sequestration** | **float** | Beef excluding carbon sequestration, in kg-CO2e/kg liveweight | -**liveweight_beef_produced_kg** | **float** | Liveweight produced in kg | -**wool_including_sequestration** | **float** | Wool production including carbon sequestration, in kg-CO2e/kg greasy | -**wool_excluding_sequestration** | **float** | Wool production excluding carbon sequestration, in kg-CO2e/kg greasy | -**sheep_meat_breeding_including_sequestration** | **float** | Sheep meat (breeding herd) including carbon sequestration, in kg-CO2e/kg liveweight | -**sheep_meat_breeding_excluding_sequestration** | **float** | Sheep meat (breeding herd) excluding carbon sequestration, in kg-CO2e/kg liveweight | -**wool_produced_kg** | **float** | Greasy wool produced in kg | -**sheep_meat_produced_kg** | **float** | Sheep meat produced in kg liveweight | - -## Example - -```python -from openapi_client.models.post_sheepbeef200_response_intensities import PostSheepbeef200ResponseIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepbeef200ResponseIntensities from a JSON string -post_sheepbeef200_response_intensities_instance = PostSheepbeef200ResponseIntensities.from_json(json) -# print the JSON string representation of the object -print(PostSheepbeef200ResponseIntensities.to_json()) - -# convert the object into a dict -post_sheepbeef200_response_intensities_dict = post_sheepbeef200_response_intensities_instance.to_dict() -# create an instance of PostSheepbeef200ResponseIntensities from a dict -post_sheepbeef200_response_intensities_from_dict = PostSheepbeef200ResponseIntensities.from_dict(post_sheepbeef200_response_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediate.md b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediate.md deleted file mode 100644 index a2c72dc4..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediate.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostSheepbeef200ResponseIntermediate - -Intermediate emission output breakdown just for sheep and beef livestock. These combine to make up the total emission output for each scope - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**beef** | [**PostSheepbeef200ResponseIntermediateBeef**](PostSheepbeef200ResponseIntermediateBeef.md) | | -**sheep** | [**PostSheepbeef200ResponseIntermediateSheep**](PostSheepbeef200ResponseIntermediateSheep.md) | | - -## Example - -```python -from openapi_client.models.post_sheepbeef200_response_intermediate import PostSheepbeef200ResponseIntermediate - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepbeef200ResponseIntermediate from a JSON string -post_sheepbeef200_response_intermediate_instance = PostSheepbeef200ResponseIntermediate.from_json(json) -# print the JSON string representation of the object -print(PostSheepbeef200ResponseIntermediate.to_json()) - -# convert the object into a dict -post_sheepbeef200_response_intermediate_dict = post_sheepbeef200_response_intermediate_instance.to_dict() -# create an instance of PostSheepbeef200ResponseIntermediate from a dict -post_sheepbeef200_response_intermediate_from_dict = PostSheepbeef200ResponseIntermediate.from_dict(post_sheepbeef200_response_intermediate_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateBeef.md b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateBeef.md deleted file mode 100644 index 9ba3d83e..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateBeef.md +++ /dev/null @@ -1,35 +0,0 @@ -# PostSheepbeef200ResponseIntermediateBeef - -Emission output breakdown just for beef livestock - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**intensities** | [**PostBeef200ResponseIntermediateInnerIntensities**](PostBeef200ResponseIntermediateInnerIntensities.md) | | - -## Example - -```python -from openapi_client.models.post_sheepbeef200_response_intermediate_beef import PostSheepbeef200ResponseIntermediateBeef - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepbeef200ResponseIntermediateBeef from a JSON string -post_sheepbeef200_response_intermediate_beef_instance = PostSheepbeef200ResponseIntermediateBeef.from_json(json) -# print the JSON string representation of the object -print(PostSheepbeef200ResponseIntermediateBeef.to_json()) - -# convert the object into a dict -post_sheepbeef200_response_intermediate_beef_dict = post_sheepbeef200_response_intermediate_beef_instance.to_dict() -# create an instance of PostSheepbeef200ResponseIntermediateBeef from a dict -post_sheepbeef200_response_intermediate_beef_from_dict = PostSheepbeef200ResponseIntermediateBeef.from_dict(post_sheepbeef200_response_intermediate_beef_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateSheep.md b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateSheep.md deleted file mode 100644 index aafe1d39..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseIntermediateSheep.md +++ /dev/null @@ -1,35 +0,0 @@ -# PostSheepbeef200ResponseIntermediateSheep - -Emission output breakdown just for sheep livestock - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostBeef200ResponseScope1**](PostBeef200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostBeef200ResponseScope3**](PostBeef200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**intensities** | [**PostSheep200ResponseIntermediateInnerIntensities**](PostSheep200ResponseIntermediateInnerIntensities.md) | | - -## Example - -```python -from openapi_client.models.post_sheepbeef200_response_intermediate_sheep import PostSheepbeef200ResponseIntermediateSheep - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepbeef200ResponseIntermediateSheep from a JSON string -post_sheepbeef200_response_intermediate_sheep_instance = PostSheepbeef200ResponseIntermediateSheep.from_json(json) -# print the JSON string representation of the object -print(PostSheepbeef200ResponseIntermediateSheep.to_json()) - -# convert the object into a dict -post_sheepbeef200_response_intermediate_sheep_dict = post_sheepbeef200_response_intermediate_sheep_instance.to_dict() -# create an instance of PostSheepbeef200ResponseIntermediateSheep from a dict -post_sheepbeef200_response_intermediate_sheep_from_dict = PostSheepbeef200ResponseIntermediateSheep.from_dict(post_sheepbeef200_response_intermediate_sheep_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseNet.md b/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseNet.md deleted file mode 100644 index e04dcf42..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepbeef200ResponseNet.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostSheepbeef200ResponseNet - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Total net emissions of this activity, in tonnes-CO2e/year | -**beef** | **float** | Net emissions of beef, in tonnes-CO2e/year | -**sheep** | **float** | Net emissions of sheep, in tonnes-CO2e/year | - -## Example - -```python -from openapi_client.models.post_sheepbeef200_response_net import PostSheepbeef200ResponseNet - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepbeef200ResponseNet from a JSON string -post_sheepbeef200_response_net_instance = PostSheepbeef200ResponseNet.from_json(json) -# print the JSON string representation of the object -print(PostSheepbeef200ResponseNet.to_json()) - -# convert the object into a dict -post_sheepbeef200_response_net_dict = post_sheepbeef200_response_net_instance.to_dict() -# create an instance of PostSheepbeef200ResponseNet from a dict -post_sheepbeef200_response_net_from_dict = PostSheepbeef200ResponseNet.from_dict(post_sheepbeef200_response_net_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepbeefRequest.md b/examples/python-api-client/api-client/docs/PostSheepbeefRequest.md deleted file mode 100644 index 7be7034a..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepbeefRequest.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostSheepbeefRequest - -Input data required for the `sheepbeef` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**north_of_tropic_of_capricorn** | **bool** | Is this farm north of the Tropic of Capricorn. Note: this is currently approximately -23.43621 degrees latitude | -**rainfall_above600** | **bool** | Is there enough rainfall to drain through the soil profile. Note: this is typically above 600mm | -**beef** | [**List[PostBeefRequestBeefInner]**](PostBeefRequestBeefInner.md) | | -**sheep** | [**List[PostSheepRequestSheepInner]**](PostSheepRequestSheepInner.md) | | -**burning** | [**List[PostBeefRequestBurningInnerBurning]**](PostBeefRequestBurningInnerBurning.md) | | -**vegetation** | [**List[PostSheepbeefRequestVegetationInner]**](PostSheepbeefRequestVegetationInner.md) | | [default to []] - -## Example - -```python -from openapi_client.models.post_sheepbeef_request import PostSheepbeefRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepbeefRequest from a JSON string -post_sheepbeef_request_instance = PostSheepbeefRequest.from_json(json) -# print the JSON string representation of the object -print(PostSheepbeefRequest.to_json()) - -# convert the object into a dict -post_sheepbeef_request_dict = post_sheepbeef_request_instance.to_dict() -# create an instance of PostSheepbeefRequest from a dict -post_sheepbeef_request_from_dict = PostSheepbeefRequest.from_dict(post_sheepbeef_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSheepbeefRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostSheepbeefRequestVegetationInner.md deleted file mode 100644 index ef5d8e27..00000000 --- a/examples/python-api-client/api-client/docs/PostSheepbeefRequestVegetationInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostSheepbeefRequestVegetationInner - -Non-productive vegetation inputs along with allocations to sheep and beef - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**beef_proportion** | **List[float]** | The proportion of the sequestration that is allocated to beef | -**sheep_proportion** | **List[float]** | The proportion of the sequestration that is allocated to sheep | - -## Example - -```python -from openapi_client.models.post_sheepbeef_request_vegetation_inner import PostSheepbeefRequestVegetationInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSheepbeefRequestVegetationInner from a JSON string -post_sheepbeef_request_vegetation_inner_instance = PostSheepbeefRequestVegetationInner.from_json(json) -# print the JSON string representation of the object -print(PostSheepbeefRequestVegetationInner.to_json()) - -# convert the object into a dict -post_sheepbeef_request_vegetation_inner_dict = post_sheepbeef_request_vegetation_inner_instance.to_dict() -# create an instance of PostSheepbeefRequestVegetationInner from a dict -post_sheepbeef_request_vegetation_inner_from_dict = PostSheepbeefRequestVegetationInner.from_dict(post_sheepbeef_request_vegetation_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSugar200Response.md b/examples/python-api-client/api-client/docs/PostSugar200Response.md deleted file mode 100644 index 393bf484..00000000 --- a/examples/python-api-client/api-client/docs/PostSugar200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostSugar200Response - -Emissions calculation output for the `sugar` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**List[PostSugar200ResponseIntermediateInner]**](PostSugar200ResponseIntermediateInner.md) | | -**net** | [**PostCotton200ResponseNet**](PostCotton200ResponseNet.md) | | -**intensities** | [**List[PostSugar200ResponseIntermediateInnerIntensities]**](PostSugar200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each crop (in order), in t-CO2e/t crop | - -## Example - -```python -from openapi_client.models.post_sugar200_response import PostSugar200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSugar200Response from a JSON string -post_sugar200_response_instance = PostSugar200Response.from_json(json) -# print the JSON string representation of the object -print(PostSugar200Response.to_json()) - -# convert the object into a dict -post_sugar200_response_dict = post_sugar200_response_instance.to_dict() -# create an instance of PostSugar200Response from a dict -post_sugar200_response_from_dict = PostSugar200Response.from_dict(post_sugar200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInner.md deleted file mode 100644 index 26065cd7..00000000 --- a/examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInner.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostSugar200ResponseIntermediateInner - -Intermediate emissions calculation output for the Sugar calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostCotton200ResponseScope1**](PostCotton200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostCotton200ResponseScope3**](PostCotton200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**intensities** | [**PostSugar200ResponseIntermediateInnerIntensities**](PostSugar200ResponseIntermediateInnerIntensities.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -## Example - -```python -from openapi_client.models.post_sugar200_response_intermediate_inner import PostSugar200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSugar200ResponseIntermediateInner from a JSON string -post_sugar200_response_intermediate_inner_instance = PostSugar200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostSugar200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_sugar200_response_intermediate_inner_dict = post_sugar200_response_intermediate_inner_instance.to_dict() -# create an instance of PostSugar200ResponseIntermediateInner from a dict -post_sugar200_response_intermediate_inner_from_dict = PostSugar200ResponseIntermediateInner.from_dict(post_sugar200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index e8add89c..00000000 --- a/examples/python-api-client/api-client/docs/PostSugar200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostSugar200ResponseIntermediateInnerIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sugar_excluding_sequestration** | **float** | Sugar emissions intensity excluding sequestration, in kg-CO2e/kg sugar | -**sugar_including_sequestration** | **float** | Sugar emissions intensity including sequestration, in kg-CO2e/kg sugar | -**sugar_produced_kg** | **float** | Sugar produced in kg | - -## Example - -```python -from openapi_client.models.post_sugar200_response_intermediate_inner_intensities import PostSugar200ResponseIntermediateInnerIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSugar200ResponseIntermediateInnerIntensities from a JSON string -post_sugar200_response_intermediate_inner_intensities_instance = PostSugar200ResponseIntermediateInnerIntensities.from_json(json) -# print the JSON string representation of the object -print(PostSugar200ResponseIntermediateInnerIntensities.to_json()) - -# convert the object into a dict -post_sugar200_response_intermediate_inner_intensities_dict = post_sugar200_response_intermediate_inner_intensities_instance.to_dict() -# create an instance of PostSugar200ResponseIntermediateInnerIntensities from a dict -post_sugar200_response_intermediate_inner_intensities_from_dict = PostSugar200ResponseIntermediateInnerIntensities.from_dict(post_sugar200_response_intermediate_inner_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSugarRequest.md b/examples/python-api-client/api-client/docs/PostSugarRequest.md deleted file mode 100644 index 9b849021..00000000 --- a/examples/python-api-client/api-client/docs/PostSugarRequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# PostSugarRequest - -Input data required for the `sugar` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**crops** | [**List[PostSugarRequestCropsInner]**](PostSugarRequestCropsInner.md) | | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**vegetation** | [**List[PostCottonRequestVegetationInner]**](PostCottonRequestVegetationInner.md) | | - -## Example - -```python -from openapi_client.models.post_sugar_request import PostSugarRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSugarRequest from a JSON string -post_sugar_request_instance = PostSugarRequest.from_json(json) -# print the JSON string representation of the object -print(PostSugarRequest.to_json()) - -# convert the object into a dict -post_sugar_request_dict = post_sugar_request_instance.to_dict() -# create an instance of PostSugarRequest from a dict -post_sugar_request_from_dict = PostSugarRequest.from_dict(post_sugar_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostSugarRequestCropsInner.md b/examples/python-api-client/api-client/docs/PostSugarRequestCropsInner.md deleted file mode 100644 index 8e38f627..00000000 --- a/examples/python-api-client/api-client/docs/PostSugarRequestCropsInner.md +++ /dev/null @@ -1,50 +0,0 @@ -# PostSugarRequestCropsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**production_system** | **str** | Production system of this crop | -**average_cane_yield** | **float** | Average cane/crop yield, in t/ha (tonnes per hectare) | -**percent_milled_cane_yield** | **float** | Percentage of cane yield that becomes milled sugar, from 0 to 1 | [optional] -**area_sown** | **float** | Area sown, in ha (hectares) | -**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | -**urea_application** | **float** | Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) | -**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | -**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | -**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | -**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | -**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | -**fraction_of_annual_crop_burnt** | **float** | Fraction of annual production of crop that is burnt, from 0 to 1 | -**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | -**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | -**electricity_allocation** | **float** | Percentage of electricity use to allocate to this crop, from 0 to 1 | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**diesel_use** | **float** | Diesel usage in L (litres) | -**petrol_use** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | - -## Example - -```python -from openapi_client.models.post_sugar_request_crops_inner import PostSugarRequestCropsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostSugarRequestCropsInner from a JSON string -post_sugar_request_crops_inner_instance = PostSugarRequestCropsInner.from_json(json) -# print the JSON string representation of the object -print(PostSugarRequestCropsInner.to_json()) - -# convert the object into a dict -post_sugar_request_crops_inner_dict = post_sugar_request_crops_inner_instance.to_dict() -# create an instance of PostSugarRequestCropsInner from a dict -post_sugar_request_crops_inner_from_dict = PostSugarRequestCropsInner.from_dict(post_sugar_request_crops_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostVineyard200Response.md b/examples/python-api-client/api-client/docs/PostVineyard200Response.md deleted file mode 100644 index 5fa27c18..00000000 --- a/examples/python-api-client/api-client/docs/PostVineyard200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostVineyard200Response - -Emissions calculation output for the `vineyard` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostVineyard200ResponseScope1**](PostVineyard200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostVineyard200ResponseScope3**](PostVineyard200ResponseScope3.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**List[PostVineyard200ResponseIntermediateInner]**](PostVineyard200ResponseIntermediateInner.md) | | -**net** | [**PostVineyard200ResponseNet**](PostVineyard200ResponseNet.md) | | -**intensities** | [**List[PostVineyard200ResponseIntermediateInnerIntensities]**](PostVineyard200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each vineyard (in order), in t-CO2e/t yield | - -## Example - -```python -from openapi_client.models.post_vineyard200_response import PostVineyard200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostVineyard200Response from a JSON string -post_vineyard200_response_instance = PostVineyard200Response.from_json(json) -# print the JSON string representation of the object -print(PostVineyard200Response.to_json()) - -# convert the object into a dict -post_vineyard200_response_dict = post_vineyard200_response_instance.to_dict() -# create an instance of PostVineyard200Response from a dict -post_vineyard200_response_from_dict = PostVineyard200Response.from_dict(post_vineyard200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInner.md deleted file mode 100644 index 511e689c..00000000 --- a/examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInner.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostVineyard200ResponseIntermediateInner - -Intermediate emissions calculation output for the Vineyard calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostVineyard200ResponseScope1**](PostVineyard200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostVineyard200ResponseScope3**](PostVineyard200ResponseScope3.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**intensities** | [**PostVineyard200ResponseIntermediateInnerIntensities**](PostVineyard200ResponseIntermediateInnerIntensities.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -## Example - -```python -from openapi_client.models.post_vineyard200_response_intermediate_inner import PostVineyard200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostVineyard200ResponseIntermediateInner from a JSON string -post_vineyard200_response_intermediate_inner_instance = PostVineyard200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostVineyard200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_vineyard200_response_intermediate_inner_dict = post_vineyard200_response_intermediate_inner_instance.to_dict() -# create an instance of PostVineyard200ResponseIntermediateInner from a dict -post_vineyard200_response_intermediate_inner_from_dict = PostVineyard200ResponseIntermediateInner.from_dict(post_vineyard200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index 9512fedc..00000000 --- a/examples/python-api-client/api-client/docs/PostVineyard200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostVineyard200ResponseIntermediateInnerIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vineyards_excluding_sequestration** | **float** | Vineyard emissions intensity excluding sequestration, in kg-CO2e/kg crop | -**vineyards_including_sequestration** | **float** | Vineyard emissions intensity including sequestration, in kg-CO2e/kg crop | -**crop_produced_kg** | **float** | Vineyard crop produced in kg | - -## Example - -```python -from openapi_client.models.post_vineyard200_response_intermediate_inner_intensities import PostVineyard200ResponseIntermediateInnerIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostVineyard200ResponseIntermediateInnerIntensities from a JSON string -post_vineyard200_response_intermediate_inner_intensities_instance = PostVineyard200ResponseIntermediateInnerIntensities.from_json(json) -# print the JSON string representation of the object -print(PostVineyard200ResponseIntermediateInnerIntensities.to_json()) - -# convert the object into a dict -post_vineyard200_response_intermediate_inner_intensities_dict = post_vineyard200_response_intermediate_inner_intensities_instance.to_dict() -# create an instance of PostVineyard200ResponseIntermediateInnerIntensities from a dict -post_vineyard200_response_intermediate_inner_intensities_from_dict = PostVineyard200ResponseIntermediateInnerIntensities.from_dict(post_vineyard200_response_intermediate_inner_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostVineyard200ResponseNet.md b/examples/python-api-client/api-client/docs/PostVineyard200ResponseNet.md deleted file mode 100644 index 6512748e..00000000 --- a/examples/python-api-client/api-client/docs/PostVineyard200ResponseNet.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostVineyard200ResponseNet - -Net emissions for each vineyard (in order) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | -**vineyards** | **List[float]** | | - -## Example - -```python -from openapi_client.models.post_vineyard200_response_net import PostVineyard200ResponseNet - -# TODO update the JSON string below -json = "{}" -# create an instance of PostVineyard200ResponseNet from a JSON string -post_vineyard200_response_net_instance = PostVineyard200ResponseNet.from_json(json) -# print the JSON string representation of the object -print(PostVineyard200ResponseNet.to_json()) - -# convert the object into a dict -post_vineyard200_response_net_dict = post_vineyard200_response_net_instance.to_dict() -# create an instance of PostVineyard200ResponseNet from a dict -post_vineyard200_response_net_from_dict = PostVineyard200ResponseNet.from_dict(post_vineyard200_response_net_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostVineyard200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostVineyard200ResponseScope1.md deleted file mode 100644 index 21510d36..00000000 --- a/examples/python-api-client/api-client/docs/PostVineyard200ResponseScope1.md +++ /dev/null @@ -1,44 +0,0 @@ -# PostVineyard200ResponseScope1 - -Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**lime_co2** | **float** | CO2 emissions from lime, in tonnes-CO2e | -**urea_co2** | **float** | CO2 emissions from urea, in tonnes-CO2e | -**waste_water_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | -**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fertiliser_n2_o** | **float** | N2O emissions from fertiliser, in tonnes-CO2e | -**atmospheric_deposition_n2_o** | **float** | N2O emissions from atmospheric deposition, in tonnes-CO2e | -**crop_residue_n2_o** | **float** | N2O emissions from crop residue, in tonnes-CO2e | -**leaching_and_runoff_n2_o** | **float** | N2O emissions from leeching and runoff, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_vineyard200_response_scope1 import PostVineyard200ResponseScope1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostVineyard200ResponseScope1 from a JSON string -post_vineyard200_response_scope1_instance = PostVineyard200ResponseScope1.from_json(json) -# print the JSON string representation of the object -print(PostVineyard200ResponseScope1.to_json()) - -# convert the object into a dict -post_vineyard200_response_scope1_dict = post_vineyard200_response_scope1_instance.to_dict() -# create an instance of PostVineyard200ResponseScope1 from a dict -post_vineyard200_response_scope1_from_dict = PostVineyard200ResponseScope1.from_dict(post_vineyard200_response_scope1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostVineyard200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostVineyard200ResponseScope3.md deleted file mode 100644 index b8bcc4c9..00000000 --- a/examples/python-api-client/api-client/docs/PostVineyard200ResponseScope3.md +++ /dev/null @@ -1,39 +0,0 @@ -# PostVineyard200ResponseScope3 - -Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fertiliser** | **float** | Emissions from fertiliser, in tonnes-CO2e | -**herbicide** | **float** | Emissions from herbicide, in tonnes-CO2e | -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**lime** | **float** | Emissions from lime, in tonnes-CO2e | -**commercial_flights** | **float** | Emissions from commercial flights, in tonnes-CO2e | -**inbound_freight** | **float** | Emissions from inbound freight, in tonnes-CO2e | -**solid_waste_sent_offsite** | **float** | Emissions from solid waste sent offsite, in tonnes-CO2e | -**outbound_freight** | **float** | Emissions from outbound freight, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_vineyard200_response_scope3 import PostVineyard200ResponseScope3 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostVineyard200ResponseScope3 from a JSON string -post_vineyard200_response_scope3_instance = PostVineyard200ResponseScope3.from_json(json) -# print the JSON string representation of the object -print(PostVineyard200ResponseScope3.to_json()) - -# convert the object into a dict -post_vineyard200_response_scope3_dict = post_vineyard200_response_scope3_instance.to_dict() -# create an instance of PostVineyard200ResponseScope3 from a dict -post_vineyard200_response_scope3_from_dict = PostVineyard200ResponseScope3.from_dict(post_vineyard200_response_scope3_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostVineyardRequest.md b/examples/python-api-client/api-client/docs/PostVineyardRequest.md deleted file mode 100644 index d47bf2d4..00000000 --- a/examples/python-api-client/api-client/docs/PostVineyardRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostVineyardRequest - -Input data required for the `vineyard` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vineyards** | [**List[PostVineyardRequestVineyardsInner]**](PostVineyardRequestVineyardsInner.md) | | -**vegetation** | [**List[PostVineyardRequestVegetationInner]**](PostVineyardRequestVegetationInner.md) | | - -## Example - -```python -from openapi_client.models.post_vineyard_request import PostVineyardRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostVineyardRequest from a JSON string -post_vineyard_request_instance = PostVineyardRequest.from_json(json) -# print the JSON string representation of the object -print(PostVineyardRequest.to_json()) - -# convert the object into a dict -post_vineyard_request_dict = post_vineyard_request_instance.to_dict() -# create an instance of PostVineyardRequest from a dict -post_vineyard_request_from_dict = PostVineyardRequest.from_dict(post_vineyard_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostVineyardRequestVegetationInner.md b/examples/python-api-client/api-client/docs/PostVineyardRequestVegetationInner.md deleted file mode 100644 index 102b9318..00000000 --- a/examples/python-api-client/api-client/docs/PostVineyardRequestVegetationInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostVineyardRequestVegetationInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vegetation** | [**PostBeefRequestVegetationInnerVegetation**](PostBeefRequestVegetationInnerVegetation.md) | | -**allocation_to_vineyards** | **List[float]** | | - -## Example - -```python -from openapi_client.models.post_vineyard_request_vegetation_inner import PostVineyardRequestVegetationInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostVineyardRequestVegetationInner from a JSON string -post_vineyard_request_vegetation_inner_instance = PostVineyardRequestVegetationInner.from_json(json) -# print the JSON string representation of the object -print(PostVineyardRequestVegetationInner.to_json()) - -# convert the object into a dict -post_vineyard_request_vegetation_inner_dict = post_vineyard_request_vegetation_inner_instance.to_dict() -# create an instance of PostVineyardRequestVegetationInner from a dict -post_vineyard_request_vegetation_inner_from_dict = PostVineyardRequestVegetationInner.from_dict(post_vineyard_request_vegetation_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostVineyardRequestVineyardsInner.md b/examples/python-api-client/api-client/docs/PostVineyardRequestVineyardsInner.md deleted file mode 100644 index 2f625c87..00000000 --- a/examples/python-api-client/api-client/docs/PostVineyardRequestVineyardsInner.md +++ /dev/null @@ -1,53 +0,0 @@ -# PostVineyardRequestVineyardsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**rainfall_above600** | **bool** | Is there enough rainfall or irrigation to drain through the soil profile, typically above 600mm | -**irrigated** | **bool** | Is the crop irrigated? | -**area_planted** | **float** | Area planted, in ha (hectares) | -**average_yield** | **float** | Average yield, in t/ha (tonnes per hectare) | -**non_urea_nitrogen** | **float** | Non-urea nitrogen application, in kg N/ha (kilograms of nitrogen per hectare) | -**phosphorus_application** | **float** | Phosphorus application, in kg P/ha (kilograms of phosphorus per hectare) | -**potassium_application** | **float** | Potassium application, in kg K/ha (kilograms of potassium per hectare) | -**sulfur_application** | **float** | Sulfur application, in kg S/ha (kilograms of sulfur per hectare) | -**urea_application** | **float** | Urea nitrogen application, in kg Urea/ha (kilograms of urea per hectare) | -**urea_ammonium_nitrate** | **float** | Urea-Ammonium nitrate application, in kg product/ha (kilograms of product per hectare) | -**limestone** | **float** | Lime applied in tonnes | -**limestone_fraction** | **float** | Fraction of lime as limestone vs dolomite, between 0 and 1 | -**herbicide_use** | **float** | Total amount of active ingredients from general herbicide/pesticide use, in kg (kilogram) | -**glyphosate_other_herbicide_use** | **float** | Total amount of active ingredients from other herbicide use (Paraquat, Diquat, Glyphosate), in kg (kilogram) | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**electricity_source** | **str** | Source of electricity | -**fuel** | [**PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | -**fluid_waste** | [**List[PostAquacultureRequestEnterprisesInnerFluidWasteInner]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | -**solid_waste** | [**PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | -**inbound_freight** | [**List[PostAquacultureRequestEnterprisesInnerInboundFreightInner]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods to the enterprise | -**outbound_freight** | [**List[PostAquacultureRequestEnterprisesInnerInboundFreightInner]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods from the enterprise | -**total_commercial_flights_km** | **float** | Total distance of commercial flights, in km (kilometers) | - -## Example - -```python -from openapi_client.models.post_vineyard_request_vineyards_inner import PostVineyardRequestVineyardsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostVineyardRequestVineyardsInner from a JSON string -post_vineyard_request_vineyards_inner_instance = PostVineyardRequestVineyardsInner.from_json(json) -# print the JSON string representation of the object -print(PostVineyardRequestVineyardsInner.to_json()) - -# convert the object into a dict -post_vineyard_request_vineyards_inner_dict = post_vineyard_request_vineyards_inner_instance.to_dict() -# create an instance of PostVineyardRequestVineyardsInner from a dict -post_vineyard_request_vineyards_inner_from_dict = PostVineyardRequestVineyardsInner.from_dict(post_vineyard_request_vineyards_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildcatchfishery200Response.md b/examples/python-api-client/api-client/docs/PostWildcatchfishery200Response.md deleted file mode 100644 index 7aed3607..00000000 --- a/examples/python-api-client/api-client/docs/PostWildcatchfishery200Response.md +++ /dev/null @@ -1,37 +0,0 @@ -# PostWildcatchfishery200Response - -Emissions calculation output for the `wildcatchfishery` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostWildcatchfishery200ResponseScope1**](PostWildcatchfishery200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | -**purchased_offsets** | [**PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**intensities** | [**PostWildcatchfishery200ResponseIntensities**](PostWildcatchfishery200ResponseIntensities.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseCarbonSequestration**](PostAquaculture200ResponseCarbonSequestration.md) | | -**intermediate** | [**List[PostWildcatchfishery200ResponseIntermediateInner]**](PostWildcatchfishery200ResponseIntermediateInner.md) | | - -## Example - -```python -from openapi_client.models.post_wildcatchfishery200_response import PostWildcatchfishery200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildcatchfishery200Response from a JSON string -post_wildcatchfishery200_response_instance = PostWildcatchfishery200Response.from_json(json) -# print the JSON string representation of the object -print(PostWildcatchfishery200Response.to_json()) - -# convert the object into a dict -post_wildcatchfishery200_response_dict = post_wildcatchfishery200_response_instance.to_dict() -# create an instance of PostWildcatchfishery200Response from a dict -post_wildcatchfishery200_response_from_dict = PostWildcatchfishery200Response.from_dict(post_wildcatchfishery200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntensities.md b/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntensities.md deleted file mode 100644 index 76721620..00000000 --- a/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntensities.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostWildcatchfishery200ResponseIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total_harvest_weight_kg** | **float** | Total harvest weight in kg | -**wild_catch_fishery_excluding_carbon_offsets** | **float** | Wild catch fishery emissions intensity excluding sequestration, in kg-CO2e/kg harvest weight | -**wild_catch_fishery_including_carbon_offsets** | **float** | Wild catch fishery emissions intensity including sequestration, in kg-CO2e/kg harvest weight | - -## Example - -```python -from openapi_client.models.post_wildcatchfishery200_response_intensities import PostWildcatchfishery200ResponseIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildcatchfishery200ResponseIntensities from a JSON string -post_wildcatchfishery200_response_intensities_instance = PostWildcatchfishery200ResponseIntensities.from_json(json) -# print the JSON string representation of the object -print(PostWildcatchfishery200ResponseIntensities.to_json()) - -# convert the object into a dict -post_wildcatchfishery200_response_intensities_dict = post_wildcatchfishery200_response_intensities_instance.to_dict() -# create an instance of PostWildcatchfishery200ResponseIntensities from a dict -post_wildcatchfishery200_response_intensities_from_dict = PostWildcatchfishery200ResponseIntensities.from_dict(post_wildcatchfishery200_response_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntermediateInner.md deleted file mode 100644 index 2b9ac241..00000000 --- a/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseIntermediateInner.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostWildcatchfishery200ResponseIntermediateInner - -Intermediate emissions calculation output for the `wildcatchfishery` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostWildcatchfishery200ResponseScope1**](PostWildcatchfishery200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostAquaculture200ResponseScope3**](PostAquaculture200ResponseScope3.md) | | -**intensities** | [**PostWildcatchfishery200ResponseIntensities**](PostWildcatchfishery200ResponseIntensities.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**carbon_sequestration** | [**PostAquaculture200ResponseIntermediateInnerCarbonSequestration**](PostAquaculture200ResponseIntermediateInnerCarbonSequestration.md) | | - -## Example - -```python -from openapi_client.models.post_wildcatchfishery200_response_intermediate_inner import PostWildcatchfishery200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildcatchfishery200ResponseIntermediateInner from a JSON string -post_wildcatchfishery200_response_intermediate_inner_instance = PostWildcatchfishery200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostWildcatchfishery200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_wildcatchfishery200_response_intermediate_inner_dict = post_wildcatchfishery200_response_intermediate_inner_instance.to_dict() -# create an instance of PostWildcatchfishery200ResponseIntermediateInner from a dict -post_wildcatchfishery200_response_intermediate_inner_from_dict = PostWildcatchfishery200ResponseIntermediateInner.from_dict(post_wildcatchfishery200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseScope1.md deleted file mode 100644 index 97634f69..00000000 --- a/examples/python-api-client/api-client/docs/PostWildcatchfishery200ResponseScope1.md +++ /dev/null @@ -1,40 +0,0 @@ -# PostWildcatchfishery200ResponseScope1 - -Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**waste_water_co2** | **float** | Emissions from wastewater, in tonnes-CO2e | -**composted_solid_waste_co2** | **float** | Emissions from composted solid waste, in tonnes-CO2e | -**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_wildcatchfishery200_response_scope1 import PostWildcatchfishery200ResponseScope1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildcatchfishery200ResponseScope1 from a JSON string -post_wildcatchfishery200_response_scope1_instance = PostWildcatchfishery200ResponseScope1.from_json(json) -# print the JSON string representation of the object -print(PostWildcatchfishery200ResponseScope1.to_json()) - -# convert the object into a dict -post_wildcatchfishery200_response_scope1_dict = post_wildcatchfishery200_response_scope1_instance.to_dict() -# create an instance of PostWildcatchfishery200ResponseScope1 from a dict -post_wildcatchfishery200_response_scope1_from_dict = PostWildcatchfishery200ResponseScope1.from_dict(post_wildcatchfishery200_response_scope1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequest.md b/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequest.md deleted file mode 100644 index df34db74..00000000 --- a/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostWildcatchfisheryRequest - -Input data required for the `wildcatchfishery` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enterprises** | [**List[PostWildcatchfisheryRequestEnterprisesInner]**](PostWildcatchfisheryRequestEnterprisesInner.md) | | - -## Example - -```python -from openapi_client.models.post_wildcatchfishery_request import PostWildcatchfisheryRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildcatchfisheryRequest from a JSON string -post_wildcatchfishery_request_instance = PostWildcatchfisheryRequest.from_json(json) -# print the JSON string representation of the object -print(PostWildcatchfisheryRequest.to_json()) - -# convert the object into a dict -post_wildcatchfishery_request_dict = post_wildcatchfishery_request_instance.to_dict() -# create an instance of PostWildcatchfisheryRequest from a dict -post_wildcatchfishery_request_from_dict = PostWildcatchfisheryRequest.from_dict(post_wildcatchfishery_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInner.md b/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInner.md deleted file mode 100644 index e890d195..00000000 --- a/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInner.md +++ /dev/null @@ -1,46 +0,0 @@ -# PostWildcatchfisheryRequestEnterprisesInner - -Input data required for a single wild catch fishery enterprise - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**production_system** | **str** | Production system of the wild catch fishery enterprise | -**total_harvest_kg** | **float** | Total harvest in kg | -**refrigerants** | [**List[PostHorticultureRequestCropsInnerRefrigerantsInner]**](PostHorticultureRequestCropsInnerRefrigerantsInner.md) | Refrigerant type | -**bait** | [**List[PostWildcatchfisheryRequestEnterprisesInnerBaitInner]**](PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md) | Bait purchases | -**custom_bait** | [**List[PostAquacultureRequestEnterprisesInnerCustomBaitInner]**](PostAquacultureRequestEnterprisesInnerCustomBaitInner.md) | Custom bait purchases | -**inbound_freight** | [**List[PostAquacultureRequestEnterprisesInnerInboundFreightInner]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods to the enterprise | -**outbound_freight** | [**List[PostAquacultureRequestEnterprisesInnerInboundFreightInner]**](PostAquacultureRequestEnterprisesInnerInboundFreightInner.md) | Services used to transport goods from the enterprise | -**total_commercial_flights_km** | **float** | Total distance of commercial flights, in km (kilometers) | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**electricity_source** | **str** | Source of electricity | -**fuel** | [**PostAquacultureRequestEnterprisesInnerFuel**](PostAquacultureRequestEnterprisesInnerFuel.md) | | -**fluid_waste** | [**List[PostAquacultureRequestEnterprisesInnerFluidWasteInner]**](PostAquacultureRequestEnterprisesInnerFluidWasteInner.md) | Amount of fluid waste, in kL (kilolitres) | -**solid_waste** | [**PostAquacultureRequestEnterprisesInnerSolidWaste**](PostAquacultureRequestEnterprisesInnerSolidWaste.md) | | -**carbon_offsets** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | [optional] - -## Example - -```python -from openapi_client.models.post_wildcatchfishery_request_enterprises_inner import PostWildcatchfisheryRequestEnterprisesInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildcatchfisheryRequestEnterprisesInner from a JSON string -post_wildcatchfishery_request_enterprises_inner_instance = PostWildcatchfisheryRequestEnterprisesInner.from_json(json) -# print the JSON string representation of the object -print(PostWildcatchfisheryRequestEnterprisesInner.to_json()) - -# convert the object into a dict -post_wildcatchfishery_request_enterprises_inner_dict = post_wildcatchfishery_request_enterprises_inner_instance.to_dict() -# create an instance of PostWildcatchfisheryRequestEnterprisesInner from a dict -post_wildcatchfishery_request_enterprises_inner_from_dict = PostWildcatchfisheryRequestEnterprisesInner.from_dict(post_wildcatchfishery_request_enterprises_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md b/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md deleted file mode 100644 index c7c386a2..00000000 --- a/examples/python-api-client/api-client/docs/PostWildcatchfisheryRequestEnterprisesInnerBaitInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostWildcatchfisheryRequestEnterprisesInnerBaitInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | Bait product type | -**purchased_tonnes** | **float** | Purchased product in tonnes | -**additional_ingredients** | **float** | Additional ingredient fraction, from 0 to 1 | -**emissions_intensity** | **float** | Emissions intensity of additional ingredients, in kg CO2e/kg bait (default 0) | [default to 0] - -## Example - -```python -from openapi_client.models.post_wildcatchfishery_request_enterprises_inner_bait_inner import PostWildcatchfisheryRequestEnterprisesInnerBaitInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildcatchfisheryRequestEnterprisesInnerBaitInner from a JSON string -post_wildcatchfishery_request_enterprises_inner_bait_inner_instance = PostWildcatchfisheryRequestEnterprisesInnerBaitInner.from_json(json) -# print the JSON string representation of the object -print(PostWildcatchfisheryRequestEnterprisesInnerBaitInner.to_json()) - -# convert the object into a dict -post_wildcatchfishery_request_enterprises_inner_bait_inner_dict = post_wildcatchfishery_request_enterprises_inner_bait_inner_instance.to_dict() -# create an instance of PostWildcatchfisheryRequestEnterprisesInnerBaitInner from a dict -post_wildcatchfishery_request_enterprises_inner_bait_inner_from_dict = PostWildcatchfisheryRequestEnterprisesInnerBaitInner.from_dict(post_wildcatchfishery_request_enterprises_inner_bait_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheries200Response.md b/examples/python-api-client/api-client/docs/PostWildseafisheries200Response.md deleted file mode 100644 index 25baba3e..00000000 --- a/examples/python-api-client/api-client/docs/PostWildseafisheries200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# PostWildseafisheries200Response - -Emissions calculation output for the `wildseafisheries` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope1** | [**PostWildseafisheries200ResponseScope1**](PostWildseafisheries200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostWildseafisheries200ResponseScope3**](PostWildseafisheries200ResponseScope3.md) | | -**purchased_offsets** | [**PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | -**intermediate** | [**List[PostWildseafisheries200ResponseIntermediateInner]**](PostWildseafisheries200ResponseIntermediateInner.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | -**intensities** | [**List[PostWildseafisheries200ResponseIntermediateInnerIntensities]**](PostWildseafisheries200ResponseIntermediateInnerIntensities.md) | Emissions intensity for each enterprise (in order), in t-CO2e/t product caught | - -## Example - -```python -from openapi_client.models.post_wildseafisheries200_response import PostWildseafisheries200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildseafisheries200Response from a JSON string -post_wildseafisheries200_response_instance = PostWildseafisheries200Response.from_json(json) -# print the JSON string representation of the object -print(PostWildseafisheries200Response.to_json()) - -# convert the object into a dict -post_wildseafisheries200_response_dict = post_wildseafisheries200_response_instance.to_dict() -# create an instance of PostWildseafisheries200Response from a dict -post_wildseafisheries200_response_from_dict = PostWildseafisheries200Response.from_dict(post_wildseafisheries200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInner.md b/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInner.md deleted file mode 100644 index d9502055..00000000 --- a/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInner.md +++ /dev/null @@ -1,37 +0,0 @@ -# PostWildseafisheries200ResponseIntermediateInner - -Intermediate emissions calculation output for the Wild Sea Fisheries calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | -**scope1** | [**PostWildseafisheries200ResponseScope1**](PostWildseafisheries200ResponseScope1.md) | | -**scope2** | [**PostAquaculture200ResponseScope2**](PostAquaculture200ResponseScope2.md) | | -**scope3** | [**PostWildseafisheries200ResponseScope3**](PostWildseafisheries200ResponseScope3.md) | | -**purchased_offsets** | [**PostAquaculture200ResponsePurchasedOffsets**](PostAquaculture200ResponsePurchasedOffsets.md) | | -**carbon_sequestration** | **float** | Carbon sequestration, in tonnes-CO2e | -**intensities** | [**PostWildseafisheries200ResponseIntermediateInnerIntensities**](PostWildseafisheries200ResponseIntermediateInnerIntensities.md) | | -**net** | [**PostAquaculture200ResponseNet**](PostAquaculture200ResponseNet.md) | | - -## Example - -```python -from openapi_client.models.post_wildseafisheries200_response_intermediate_inner import PostWildseafisheries200ResponseIntermediateInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildseafisheries200ResponseIntermediateInner from a JSON string -post_wildseafisheries200_response_intermediate_inner_instance = PostWildseafisheries200ResponseIntermediateInner.from_json(json) -# print the JSON string representation of the object -print(PostWildseafisheries200ResponseIntermediateInner.to_json()) - -# convert the object into a dict -post_wildseafisheries200_response_intermediate_inner_dict = post_wildseafisheries200_response_intermediate_inner_instance.to_dict() -# create an instance of PostWildseafisheries200ResponseIntermediateInner from a dict -post_wildseafisheries200_response_intermediate_inner_from_dict = PostWildseafisheries200ResponseIntermediateInner.from_dict(post_wildseafisheries200_response_intermediate_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInnerIntensities.md b/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInnerIntensities.md deleted file mode 100644 index 3886aca0..00000000 --- a/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseIntermediateInnerIntensities.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostWildseafisheries200ResponseIntermediateInnerIntensities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**intensity_excluding_carbon_offset** | **float** | Wild sea fisheries emissions intensity excluding carbon offsets, in kg-CO2e/kg | -**intensity_including_carbon_offset** | **float** | Wild sea fisheries emissions intensity including carbon offsets, in kg-CO2e/kg | -**total_harvest_weight_tonnes** | **float** | Total harvest weight in tonnes | - -## Example - -```python -from openapi_client.models.post_wildseafisheries200_response_intermediate_inner_intensities import PostWildseafisheries200ResponseIntermediateInnerIntensities - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildseafisheries200ResponseIntermediateInnerIntensities from a JSON string -post_wildseafisheries200_response_intermediate_inner_intensities_instance = PostWildseafisheries200ResponseIntermediateInnerIntensities.from_json(json) -# print the JSON string representation of the object -print(PostWildseafisheries200ResponseIntermediateInnerIntensities.to_json()) - -# convert the object into a dict -post_wildseafisheries200_response_intermediate_inner_intensities_dict = post_wildseafisheries200_response_intermediate_inner_intensities_instance.to_dict() -# create an instance of PostWildseafisheries200ResponseIntermediateInnerIntensities from a dict -post_wildseafisheries200_response_intermediate_inner_intensities_from_dict = PostWildseafisheries200ResponseIntermediateInnerIntensities.from_dict(post_wildseafisheries200_response_intermediate_inner_intensities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope1.md b/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope1.md deleted file mode 100644 index 07958bea..00000000 --- a/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope1.md +++ /dev/null @@ -1,38 +0,0 @@ -# PostWildseafisheries200ResponseScope1 - -Scope 1 greenhouse gas emissions are the emissions released to the atmosphere as a direct result of an activity, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fuel_co2** | **float** | CO2 emissions from fuel use, in tonnes-CO2e | -**fuel_ch4** | **float** | CH4 emissions from fuel use, in tonnes-CO2e | -**fuel_n2_o** | **float** | N2O emissions from fuel use, in tonnes-CO2e | -**hfcs_refrigerant_leakage** | **float** | Emissions from refrigerant leakage, in tonnes-HFCs | -**total_co2** | **float** | Total CO2 scope 1 emissions, in tonnes-CO2e | -**total_ch4** | **float** | Total CH4 scope 1 emissions, in tonnes-CO2e | -**total_n2_o** | **float** | Total N2O scope 1 emissions, in tonnes-CO2e | -**total_hfcs** | **float** | Total HFCs scope 1 emissions, in tonnes-CO2e | -**total** | **float** | Total scope 1 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_wildseafisheries200_response_scope1 import PostWildseafisheries200ResponseScope1 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildseafisheries200ResponseScope1 from a JSON string -post_wildseafisheries200_response_scope1_instance = PostWildseafisheries200ResponseScope1.from_json(json) -# print the JSON string representation of the object -print(PostWildseafisheries200ResponseScope1.to_json()) - -# convert the object into a dict -post_wildseafisheries200_response_scope1_dict = post_wildseafisheries200_response_scope1_instance.to_dict() -# create an instance of PostWildseafisheries200ResponseScope1 from a dict -post_wildseafisheries200_response_scope1_from_dict = PostWildseafisheries200ResponseScope1.from_dict(post_wildseafisheries200_response_scope1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope3.md b/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope3.md deleted file mode 100644 index b15c4f44..00000000 --- a/examples/python-api-client/api-client/docs/PostWildseafisheries200ResponseScope3.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostWildseafisheries200ResponseScope3 - -Scope 3 emissions are indirect greenhouse gas emissions other than scope 2 emissions that are generated in the wider economy, in tonnes-CO2e (tonnes of carbon dioxide equivalent) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**electricity** | **float** | Emissions from electricity, in tonnes-CO2e | -**fuel** | **float** | Emissions from fuel, in tonnes-CO2e | -**bait** | **float** | Emissions from purchased bait, in tonnes-CO2e | -**total** | **float** | Total scope 3 emissions, in tonnes-CO2e | - -## Example - -```python -from openapi_client.models.post_wildseafisheries200_response_scope3 import PostWildseafisheries200ResponseScope3 - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildseafisheries200ResponseScope3 from a JSON string -post_wildseafisheries200_response_scope3_instance = PostWildseafisheries200ResponseScope3.from_json(json) -# print the JSON string representation of the object -print(PostWildseafisheries200ResponseScope3.to_json()) - -# convert the object into a dict -post_wildseafisheries200_response_scope3_dict = post_wildseafisheries200_response_scope3_instance.to_dict() -# create an instance of PostWildseafisheries200ResponseScope3 from a dict -post_wildseafisheries200_response_scope3_from_dict = PostWildseafisheries200ResponseScope3.from_dict(post_wildseafisheries200_response_scope3_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequest.md b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequest.md deleted file mode 100644 index aae1a168..00000000 --- a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostWildseafisheriesRequest - -Input data required for the `wildseafisheries` calculator - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enterprises** | [**List[PostWildseafisheriesRequestEnterprisesInner]**](PostWildseafisheriesRequestEnterprisesInner.md) | | - -## Example - -```python -from openapi_client.models.post_wildseafisheries_request import PostWildseafisheriesRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildseafisheriesRequest from a JSON string -post_wildseafisheries_request_instance = PostWildseafisheriesRequest.from_json(json) -# print the JSON string representation of the object -print(PostWildseafisheriesRequest.to_json()) - -# convert the object into a dict -post_wildseafisheries_request_dict = post_wildseafisheries_request_instance.to_dict() -# create an instance of PostWildseafisheriesRequest from a dict -post_wildseafisheries_request_from_dict = PostWildseafisheriesRequest.from_dict(post_wildseafisheries_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInner.md b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInner.md deleted file mode 100644 index 7d043c56..00000000 --- a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInner.md +++ /dev/null @@ -1,43 +0,0 @@ -# PostWildseafisheriesRequestEnterprisesInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for this activity | [optional] -**state** | **str** | What state the location is in. Note: Western Australia is split up into two regions, `wa_nw` is North-West Western Australia, `wa_sw` is South-West Western Australia | -**electricity_source** | **str** | Source of electricity | -**electricity_renewable** | **float** | Percent of total electricity usage that is drawn from renewable sources, between 0 and 1. Unused if `electricitySource` is `Renewable` | -**electricity_use** | **float** | Electricity use in KWh (kilowatt hours) | -**total_whole_weight_caught** | **float** | Total whole weight caught in kg | -**diesel** | **float** | Diesel usage in L (litres) | -**petrol** | **float** | Petrol usage in L (litres) | -**lpg** | **float** | LPG Fuel usage in L (litres) | -**refrigerants** | [**List[PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner]**](PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md) | | -**transports** | [**List[PostWildseafisheriesRequestEnterprisesInnerTransportsInner]**](PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md) | Transportation | -**flights** | [**List[PostWildseafisheriesRequestEnterprisesInnerFlightsInner]**](PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md) | CommercialFlight | -**bait** | [**List[PostWildseafisheriesRequestEnterprisesInnerBaitInner]**](PostWildseafisheriesRequestEnterprisesInnerBaitInner.md) | Bait | -**custombait** | [**List[PostWildseafisheriesRequestEnterprisesInnerCustombaitInner]**](PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md) | Custom bait | -**carbon_offset** | **float** | Carbon offsets purchased, in t CO2. Offsetting 2 t CO2 would be 2.0 (not -2.0) | - -## Example - -```python -from openapi_client.models.post_wildseafisheries_request_enterprises_inner import PostWildseafisheriesRequestEnterprisesInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildseafisheriesRequestEnterprisesInner from a JSON string -post_wildseafisheries_request_enterprises_inner_instance = PostWildseafisheriesRequestEnterprisesInner.from_json(json) -# print the JSON string representation of the object -print(PostWildseafisheriesRequestEnterprisesInner.to_json()) - -# convert the object into a dict -post_wildseafisheries_request_enterprises_inner_dict = post_wildseafisheries_request_enterprises_inner_instance.to_dict() -# create an instance of PostWildseafisheriesRequestEnterprisesInner from a dict -post_wildseafisheries_request_enterprises_inner_from_dict = PostWildseafisheriesRequestEnterprisesInner.from_dict(post_wildseafisheries_request_enterprises_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md deleted file mode 100644 index 48129d0f..00000000 --- a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerBaitInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostWildseafisheriesRequestEnterprisesInnerBaitInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | Bait product type | -**purchased** | **float** | Purchased product in tonnes | -**additional_ingredient** | **float** | Additional ingredient fraction, from 0 to 1 | -**emissions_intensity** | **float** | Emissions intensity of product, in kg CO2e/kg | - -## Example - -```python -from openapi_client.models.post_wildseafisheries_request_enterprises_inner_bait_inner import PostWildseafisheriesRequestEnterprisesInnerBaitInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildseafisheriesRequestEnterprisesInnerBaitInner from a JSON string -post_wildseafisheries_request_enterprises_inner_bait_inner_instance = PostWildseafisheriesRequestEnterprisesInnerBaitInner.from_json(json) -# print the JSON string representation of the object -print(PostWildseafisheriesRequestEnterprisesInnerBaitInner.to_json()) - -# convert the object into a dict -post_wildseafisheries_request_enterprises_inner_bait_inner_dict = post_wildseafisheries_request_enterprises_inner_bait_inner_instance.to_dict() -# create an instance of PostWildseafisheriesRequestEnterprisesInnerBaitInner from a dict -post_wildseafisheries_request_enterprises_inner_bait_inner_from_dict = PostWildseafisheriesRequestEnterprisesInnerBaitInner.from_dict(post_wildseafisheries_request_enterprises_inner_bait_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md deleted file mode 100644 index d0958fec..00000000 --- a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostWildseafisheriesRequestEnterprisesInnerCustombaitInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**purchased** | **float** | Purchased product in tonnes | -**emissions_intensity** | **float** | Emissions intensity of product, in kg CO2e/kg | - -## Example - -```python -from openapi_client.models.post_wildseafisheries_request_enterprises_inner_custombait_inner import PostWildseafisheriesRequestEnterprisesInnerCustombaitInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildseafisheriesRequestEnterprisesInnerCustombaitInner from a JSON string -post_wildseafisheries_request_enterprises_inner_custombait_inner_instance = PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.from_json(json) -# print the JSON string representation of the object -print(PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.to_json()) - -# convert the object into a dict -post_wildseafisheries_request_enterprises_inner_custombait_inner_dict = post_wildseafisheries_request_enterprises_inner_custombait_inner_instance.to_dict() -# create an instance of PostWildseafisheriesRequestEnterprisesInnerCustombaitInner from a dict -post_wildseafisheries_request_enterprises_inner_custombait_inner_from_dict = PostWildseafisheriesRequestEnterprisesInnerCustombaitInner.from_dict(post_wildseafisheries_request_enterprises_inner_custombait_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md deleted file mode 100644 index 03687d51..00000000 --- a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerFlightsInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostWildseafisheriesRequestEnterprisesInnerFlightsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**commercial_flight_passengers** | **float** | Commercial flight passengers per year | -**total_flight_distance** | **float** | Total commercial flight distance in km | - -## Example - -```python -from openapi_client.models.post_wildseafisheries_request_enterprises_inner_flights_inner import PostWildseafisheriesRequestEnterprisesInnerFlightsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildseafisheriesRequestEnterprisesInnerFlightsInner from a JSON string -post_wildseafisheries_request_enterprises_inner_flights_inner_instance = PostWildseafisheriesRequestEnterprisesInnerFlightsInner.from_json(json) -# print the JSON string representation of the object -print(PostWildseafisheriesRequestEnterprisesInnerFlightsInner.to_json()) - -# convert the object into a dict -post_wildseafisheries_request_enterprises_inner_flights_inner_dict = post_wildseafisheries_request_enterprises_inner_flights_inner_instance.to_dict() -# create an instance of PostWildseafisheriesRequestEnterprisesInnerFlightsInner from a dict -post_wildseafisheries_request_enterprises_inner_flights_inner_from_dict = PostWildseafisheriesRequestEnterprisesInnerFlightsInner.from_dict(post_wildseafisheries_request_enterprises_inner_flights_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md deleted file mode 100644 index 44cba23d..00000000 --- a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**refrigerant** | **str** | Refrigerant type | -**annual_recharge** | **float** | Amount of refrigerant annually recharged, kg product/year | - -## Example - -```python -from openapi_client.models.post_wildseafisheries_request_enterprises_inner_refrigerants_inner import PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner from a JSON string -post_wildseafisheries_request_enterprises_inner_refrigerants_inner_instance = PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.from_json(json) -# print the JSON string representation of the object -print(PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.to_json()) - -# convert the object into a dict -post_wildseafisheries_request_enterprises_inner_refrigerants_inner_dict = post_wildseafisheries_request_enterprises_inner_refrigerants_inner_instance.to_dict() -# create an instance of PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner from a dict -post_wildseafisheries_request_enterprises_inner_refrigerants_inner_from_dict = PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner.from_dict(post_wildseafisheries_request_enterprises_inner_refrigerants_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md b/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md deleted file mode 100644 index 3064866d..00000000 --- a/examples/python-api-client/api-client/docs/PostWildseafisheriesRequestEnterprisesInnerTransportsInner.md +++ /dev/null @@ -1,31 +0,0 @@ -# PostWildseafisheriesRequestEnterprisesInnerTransportsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | Transport type | -**fuel** | **str** | Fuel type | -**distance** | **float** | Distance in km | - -## Example - -```python -from openapi_client.models.post_wildseafisheries_request_enterprises_inner_transports_inner import PostWildseafisheriesRequestEnterprisesInnerTransportsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PostWildseafisheriesRequestEnterprisesInnerTransportsInner from a JSON string -post_wildseafisheries_request_enterprises_inner_transports_inner_instance = PostWildseafisheriesRequestEnterprisesInnerTransportsInner.from_json(json) -# print the JSON string representation of the object -print(PostWildseafisheriesRequestEnterprisesInnerTransportsInner.to_json()) - -# convert the object into a dict -post_wildseafisheries_request_enterprises_inner_transports_inner_dict = post_wildseafisheries_request_enterprises_inner_transports_inner_instance.to_dict() -# create an instance of PostWildseafisheriesRequestEnterprisesInnerTransportsInner from a dict -post_wildseafisheries_request_enterprises_inner_transports_inner_from_dict = PostWildseafisheriesRequestEnterprisesInnerTransportsInner.from_dict(post_wildseafisheries_request_enterprises_inner_transports_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/examples/python-api-client/api-client/test/__init__.py b/examples/python-api-client/api-client/test/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/examples/python-api-client/api-client/test/test_gaf_api.py b/examples/python-api-client/api-client/test/test_gaf_api.py deleted file mode 100644 index d62c5b86..00000000 --- a/examples/python-api-client/api-client/test/test_gaf_api.py +++ /dev/null @@ -1,172 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.api.gaf_api import GAFApi - - -class TestGAFApi(unittest.TestCase): - """GAFApi unit test stubs""" - - def setUp(self) -> None: - self.api = GAFApi() - - def tearDown(self) -> None: - pass - - def test_post_aquaculture(self) -> None: - """Test case for post_aquaculture - - Perform aquaculture calculation - """ - pass - - def test_post_beef(self) -> None: - """Test case for post_beef - - Perform beef calculation - """ - pass - - def test_post_buffalo(self) -> None: - """Test case for post_buffalo - - Perform buffalo calculation - """ - pass - - def test_post_cotton(self) -> None: - """Test case for post_cotton - - Perform cotton calculation - """ - pass - - def test_post_dairy(self) -> None: - """Test case for post_dairy - - Perform dairy calculation - """ - pass - - def test_post_deer(self) -> None: - """Test case for post_deer - - Perform deer calculation - """ - pass - - def test_post_feedlot(self) -> None: - """Test case for post_feedlot - - Perform feedlot calculation - """ - pass - - def test_post_goat(self) -> None: - """Test case for post_goat - - Perform goat calculation - """ - pass - - def test_post_grains(self) -> None: - """Test case for post_grains - - Perform grains calculation - """ - pass - - def test_post_horticulture(self) -> None: - """Test case for post_horticulture - - Perform horticulture calculation - """ - pass - - def test_post_pork(self) -> None: - """Test case for post_pork - - Perform pork calculation - """ - pass - - def test_post_poultry(self) -> None: - """Test case for post_poultry - - Perform poultry calculation - """ - pass - - def test_post_processing(self) -> None: - """Test case for post_processing - - Perform processing calculation - """ - pass - - def test_post_rice(self) -> None: - """Test case for post_rice - - Perform rice calculation - """ - pass - - def test_post_sheep(self) -> None: - """Test case for post_sheep - - Perform sheep calculation - """ - pass - - def test_post_sheepbeef(self) -> None: - """Test case for post_sheepbeef - - Perform sheepbeef calculation - """ - pass - - def test_post_sugar(self) -> None: - """Test case for post_sugar - - Perform sugar calculation - """ - pass - - def test_post_vineyard(self) -> None: - """Test case for post_vineyard - - Perform vineyard calculation - """ - pass - - def test_post_wildcatchfishery(self) -> None: - """Test case for post_wildcatchfishery - - Perform wildcatchfishery calculation - """ - pass - - def test_post_wildseafisheries(self) -> None: - """Test case for post_wildseafisheries - - Perform wildseafisheries calculation - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response.py deleted file mode 100644 index 338e4a8e..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture200_response.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture200_response import PostAquaculture200Response - -class TestPostAquaculture200Response(unittest.TestCase): - """PostAquaculture200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquaculture200Response: - """Test PostAquaculture200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquaculture200Response` - """ - model = PostAquaculture200Response() - if include_optional: - return PostAquaculture200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - purchased_offsets = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ] - ) - else: - return PostAquaculture200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - purchased_offsets = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - ) - """ - - def testPostAquaculture200Response(self): - """Test PostAquaculture200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_carbon_sequestration.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_carbon_sequestration.py deleted file mode 100644 index 902e7203..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_carbon_sequestration.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture200_response_carbon_sequestration import PostAquaculture200ResponseCarbonSequestration - -class TestPostAquaculture200ResponseCarbonSequestration(unittest.TestCase): - """PostAquaculture200ResponseCarbonSequestration unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquaculture200ResponseCarbonSequestration: - """Test PostAquaculture200ResponseCarbonSequestration - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquaculture200ResponseCarbonSequestration` - """ - model = PostAquaculture200ResponseCarbonSequestration() - if include_optional: - return PostAquaculture200ResponseCarbonSequestration( - total = 1.337, - intermediate = [ - 1.337 - ] - ) - else: - return PostAquaculture200ResponseCarbonSequestration( - total = 1.337, - intermediate = [ - 1.337 - ], - ) - """ - - def testPostAquaculture200ResponseCarbonSequestration(self): - """Test PostAquaculture200ResponseCarbonSequestration""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intensities.py deleted file mode 100644 index 4b0dbf21..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intensities.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture200_response_intensities import PostAquaculture200ResponseIntensities - -class TestPostAquaculture200ResponseIntensities(unittest.TestCase): - """PostAquaculture200ResponseIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquaculture200ResponseIntensities: - """Test PostAquaculture200ResponseIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquaculture200ResponseIntensities` - """ - model = PostAquaculture200ResponseIntensities() - if include_optional: - return PostAquaculture200ResponseIntensities( - total_harvest_weight_kg = 1.337, - aquaculture_excluding_carbon_offsets = 1.337, - aquaculture_including_carbon_offsets = 1.337 - ) - else: - return PostAquaculture200ResponseIntensities( - total_harvest_weight_kg = 1.337, - aquaculture_excluding_carbon_offsets = 1.337, - aquaculture_including_carbon_offsets = 1.337, - ) - """ - - def testPostAquaculture200ResponseIntensities(self): - """Test PostAquaculture200ResponseIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner.py deleted file mode 100644 index 65d10074..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture200_response_intermediate_inner import PostAquaculture200ResponseIntermediateInner - -class TestPostAquaculture200ResponseIntermediateInner(unittest.TestCase): - """PostAquaculture200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquaculture200ResponseIntermediateInner: - """Test PostAquaculture200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquaculture200ResponseIntermediateInner` - """ - model = PostAquaculture200ResponseIntermediateInner() - if include_optional: - return PostAquaculture200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - } - ) - else: - return PostAquaculture200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - ) - """ - - def testPostAquaculture200ResponseIntermediateInner(self): - """Test PostAquaculture200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner_carbon_sequestration.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner_carbon_sequestration.py deleted file mode 100644 index 9b4692e3..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_intermediate_inner_carbon_sequestration.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture200_response_intermediate_inner_carbon_sequestration import PostAquaculture200ResponseIntermediateInnerCarbonSequestration - -class TestPostAquaculture200ResponseIntermediateInnerCarbonSequestration(unittest.TestCase): - """PostAquaculture200ResponseIntermediateInnerCarbonSequestration unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquaculture200ResponseIntermediateInnerCarbonSequestration: - """Test PostAquaculture200ResponseIntermediateInnerCarbonSequestration - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquaculture200ResponseIntermediateInnerCarbonSequestration` - """ - model = PostAquaculture200ResponseIntermediateInnerCarbonSequestration() - if include_optional: - return PostAquaculture200ResponseIntermediateInnerCarbonSequestration( - total = 1.337 - ) - else: - return PostAquaculture200ResponseIntermediateInnerCarbonSequestration( - total = 1.337, - ) - """ - - def testPostAquaculture200ResponseIntermediateInnerCarbonSequestration(self): - """Test PostAquaculture200ResponseIntermediateInnerCarbonSequestration""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_net.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_net.py deleted file mode 100644 index c8a0fd06..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_net.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture200_response_net import PostAquaculture200ResponseNet - -class TestPostAquaculture200ResponseNet(unittest.TestCase): - """PostAquaculture200ResponseNet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquaculture200ResponseNet: - """Test PostAquaculture200ResponseNet - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquaculture200ResponseNet` - """ - model = PostAquaculture200ResponseNet() - if include_optional: - return PostAquaculture200ResponseNet( - total = 1.337 - ) - else: - return PostAquaculture200ResponseNet( - total = 1.337, - ) - """ - - def testPostAquaculture200ResponseNet(self): - """Test PostAquaculture200ResponseNet""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_purchased_offsets.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_purchased_offsets.py deleted file mode 100644 index 58f478cd..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_purchased_offsets.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture200_response_purchased_offsets import PostAquaculture200ResponsePurchasedOffsets - -class TestPostAquaculture200ResponsePurchasedOffsets(unittest.TestCase): - """PostAquaculture200ResponsePurchasedOffsets unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquaculture200ResponsePurchasedOffsets: - """Test PostAquaculture200ResponsePurchasedOffsets - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquaculture200ResponsePurchasedOffsets` - """ - model = PostAquaculture200ResponsePurchasedOffsets() - if include_optional: - return PostAquaculture200ResponsePurchasedOffsets( - total = 1.337 - ) - else: - return PostAquaculture200ResponsePurchasedOffsets( - total = 1.337, - ) - """ - - def testPostAquaculture200ResponsePurchasedOffsets(self): - """Test PostAquaculture200ResponsePurchasedOffsets""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope1.py deleted file mode 100644 index bf6e9e5c..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope1.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture200_response_scope1 import PostAquaculture200ResponseScope1 - -class TestPostAquaculture200ResponseScope1(unittest.TestCase): - """PostAquaculture200ResponseScope1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquaculture200ResponseScope1: - """Test PostAquaculture200ResponseScope1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquaculture200ResponseScope1` - """ - model = PostAquaculture200ResponseScope1() - if include_optional: - return PostAquaculture200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - hfcs_refrigerant_leakage = 1.337, - waste_water_co2 = 1.337, - composted_solid_waste_co2 = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total_hfcs = 1.337, - total = 1.337 - ) - else: - return PostAquaculture200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - hfcs_refrigerant_leakage = 1.337, - waste_water_co2 = 1.337, - composted_solid_waste_co2 = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total_hfcs = 1.337, - total = 1.337, - ) - """ - - def testPostAquaculture200ResponseScope1(self): - """Test PostAquaculture200ResponseScope1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope2.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope2.py deleted file mode 100644 index 186ec90f..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope2.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture200_response_scope2 import PostAquaculture200ResponseScope2 - -class TestPostAquaculture200ResponseScope2(unittest.TestCase): - """PostAquaculture200ResponseScope2 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquaculture200ResponseScope2: - """Test PostAquaculture200ResponseScope2 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquaculture200ResponseScope2` - """ - model = PostAquaculture200ResponseScope2() - if include_optional: - return PostAquaculture200ResponseScope2( - electricity = 1.337, - total = 1.337 - ) - else: - return PostAquaculture200ResponseScope2( - electricity = 1.337, - total = 1.337, - ) - """ - - def testPostAquaculture200ResponseScope2(self): - """Test PostAquaculture200ResponseScope2""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope3.py deleted file mode 100644 index 532b4e45..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture200_response_scope3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture200_response_scope3 import PostAquaculture200ResponseScope3 - -class TestPostAquaculture200ResponseScope3(unittest.TestCase): - """PostAquaculture200ResponseScope3 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquaculture200ResponseScope3: - """Test PostAquaculture200ResponseScope3 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquaculture200ResponseScope3` - """ - model = PostAquaculture200ResponseScope3() - if include_optional: - return PostAquaculture200ResponseScope3( - purchased_bait = 1.337, - electricity = 1.337, - fuel = 1.337, - commercial_flights = 1.337, - inbound_freight = 1.337, - outbound_freight = 1.337, - solid_waste_sent_offsite = 1.337, - total = 1.337 - ) - else: - return PostAquaculture200ResponseScope3( - purchased_bait = 1.337, - electricity = 1.337, - fuel = 1.337, - commercial_flights = 1.337, - inbound_freight = 1.337, - outbound_freight = 1.337, - solid_waste_sent_offsite = 1.337, - total = 1.337, - ) - """ - - def testPostAquaculture200ResponseScope3(self): - """Test PostAquaculture200ResponseScope3""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request.py deleted file mode 100644 index 11a69df5..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture_request.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture_request import PostAquacultureRequest - -class TestPostAquacultureRequest(unittest.TestCase): - """PostAquacultureRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquacultureRequest: - """Test PostAquacultureRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquacultureRequest` - """ - model = PostAquacultureRequest() - if include_optional: - return PostAquacultureRequest( - enterprises = [ - { - 'key' : null - } - ] - ) - else: - return PostAquacultureRequest( - enterprises = [ - { - 'key' : null - } - ], - ) - """ - - def testPostAquacultureRequest(self): - """Test PostAquacultureRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner.py deleted file mode 100644 index 7fd75c70..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture_request_enterprises_inner import PostAquacultureRequestEnterprisesInner - -class TestPostAquacultureRequestEnterprisesInner(unittest.TestCase): - """PostAquacultureRequestEnterprisesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInner: - """Test PostAquacultureRequestEnterprisesInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInner` - """ - model = PostAquacultureRequestEnterprisesInner() - if include_optional: - return PostAquacultureRequestEnterprisesInner( - id = '', - state = 'nsw', - production_system = 'Abalone Farming', - total_harvest_kg = 1.337, - refrigerants = [ - { - 'key' : null - } - ], - bait = [ - { - 'key' : null - } - ], - custom_bait = [ - { - 'key' : null - } - ], - inbound_freight = [ - { - 'key' : null - } - ], - outbound_freight = [ - { - 'key' : null - } - ], - total_commercial_flights_km = 1.337, - electricity_renewable = 0, - electricity_use = 1.337, - electricity_source = 'State Grid', - fuel = { - 'key' : null - }, - fluid_waste = [ - { - 'key' : null - } - ], - solid_waste = { - 'key' : null - }, - carbon_offsets = 1.337 - ) - else: - return PostAquacultureRequestEnterprisesInner( - state = 'nsw', - production_system = 'Abalone Farming', - total_harvest_kg = 1.337, - refrigerants = [ - { - 'key' : null - } - ], - bait = [ - { - 'key' : null - } - ], - custom_bait = [ - { - 'key' : null - } - ], - inbound_freight = [ - { - 'key' : null - } - ], - outbound_freight = [ - { - 'key' : null - } - ], - total_commercial_flights_km = 1.337, - electricity_renewable = 0, - electricity_use = 1.337, - electricity_source = 'State Grid', - fuel = { - 'key' : null - }, - fluid_waste = [ - { - 'key' : null - } - ], - solid_waste = { - 'key' : null - }, - ) - """ - - def testPostAquacultureRequestEnterprisesInner(self): - """Test PostAquacultureRequestEnterprisesInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_bait_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_bait_inner.py deleted file mode 100644 index 0114fabb..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_bait_inner.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture_request_enterprises_inner_bait_inner import PostAquacultureRequestEnterprisesInnerBaitInner - -class TestPostAquacultureRequestEnterprisesInnerBaitInner(unittest.TestCase): - """PostAquacultureRequestEnterprisesInnerBaitInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerBaitInner: - """Test PostAquacultureRequestEnterprisesInnerBaitInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerBaitInner` - """ - model = PostAquacultureRequestEnterprisesInnerBaitInner() - if include_optional: - return PostAquacultureRequestEnterprisesInnerBaitInner( - type = 'Whole Sardines', - purchased_tonnes = 1.337, - additional_ingredients = 0, - emissions_intensity = 1.337 - ) - else: - return PostAquacultureRequestEnterprisesInnerBaitInner( - type = 'Whole Sardines', - purchased_tonnes = 1.337, - additional_ingredients = 0, - emissions_intensity = 1.337, - ) - """ - - def testPostAquacultureRequestEnterprisesInnerBaitInner(self): - """Test PostAquacultureRequestEnterprisesInnerBaitInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_custom_bait_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_custom_bait_inner.py deleted file mode 100644 index 7807adb4..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_custom_bait_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture_request_enterprises_inner_custom_bait_inner import PostAquacultureRequestEnterprisesInnerCustomBaitInner - -class TestPostAquacultureRequestEnterprisesInnerCustomBaitInner(unittest.TestCase): - """PostAquacultureRequestEnterprisesInnerCustomBaitInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerCustomBaitInner: - """Test PostAquacultureRequestEnterprisesInnerCustomBaitInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerCustomBaitInner` - """ - model = PostAquacultureRequestEnterprisesInnerCustomBaitInner() - if include_optional: - return PostAquacultureRequestEnterprisesInnerCustomBaitInner( - purchased_tonnes = 1.337, - emissions_intensity = 1.337 - ) - else: - return PostAquacultureRequestEnterprisesInnerCustomBaitInner( - purchased_tonnes = 1.337, - emissions_intensity = 1.337, - ) - """ - - def testPostAquacultureRequestEnterprisesInnerCustomBaitInner(self): - """Test PostAquacultureRequestEnterprisesInnerCustomBaitInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fluid_waste_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fluid_waste_inner.py deleted file mode 100644 index 40a25b8c..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fluid_waste_inner.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture_request_enterprises_inner_fluid_waste_inner import PostAquacultureRequestEnterprisesInnerFluidWasteInner - -class TestPostAquacultureRequestEnterprisesInnerFluidWasteInner(unittest.TestCase): - """PostAquacultureRequestEnterprisesInnerFluidWasteInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerFluidWasteInner: - """Test PostAquacultureRequestEnterprisesInnerFluidWasteInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerFluidWasteInner` - """ - model = PostAquacultureRequestEnterprisesInnerFluidWasteInner() - if include_optional: - return PostAquacultureRequestEnterprisesInnerFluidWasteInner( - fluid_waste_kl = 1.337, - fluid_waste_treatment_type = 'Managed Aerobic', - average_inlet_cod = 1.337, - average_outlet_cod = 1.337, - flared_combusted_fraction = 1.337 - ) - else: - return PostAquacultureRequestEnterprisesInnerFluidWasteInner( - fluid_waste_kl = 1.337, - fluid_waste_treatment_type = 'Managed Aerobic', - average_inlet_cod = 1.337, - average_outlet_cod = 1.337, - flared_combusted_fraction = 1.337, - ) - """ - - def testPostAquacultureRequestEnterprisesInnerFluidWasteInner(self): - """Test PostAquacultureRequestEnterprisesInnerFluidWasteInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel.py deleted file mode 100644 index 19d84e79..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel import PostAquacultureRequestEnterprisesInnerFuel - -class TestPostAquacultureRequestEnterprisesInnerFuel(unittest.TestCase): - """PostAquacultureRequestEnterprisesInnerFuel unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerFuel: - """Test PostAquacultureRequestEnterprisesInnerFuel - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerFuel` - """ - model = PostAquacultureRequestEnterprisesInnerFuel() - if include_optional: - return PostAquacultureRequestEnterprisesInnerFuel( - transport_fuel = [ - { - 'key' : null - } - ], - stationary_fuel = [ - { - 'key' : null - } - ], - natural_gas = 1.337 - ) - else: - return PostAquacultureRequestEnterprisesInnerFuel( - transport_fuel = [ - { - 'key' : null - } - ], - stationary_fuel = [ - { - 'key' : null - } - ], - natural_gas = 1.337, - ) - """ - - def testPostAquacultureRequestEnterprisesInnerFuel(self): - """Test PostAquacultureRequestEnterprisesInnerFuel""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py deleted file mode 100644 index 4b540160..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel_stationary_fuel_inner import PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner - -class TestPostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner(unittest.TestCase): - """PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner: - """Test PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner` - """ - model = PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner() - if include_optional: - return PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner( - type = 'petrol', - amount_litres = 1.337 - ) - else: - return PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner( - type = 'petrol', - amount_litres = 1.337, - ) - """ - - def testPostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner(self): - """Test PostAquacultureRequestEnterprisesInnerFuelStationaryFuelInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py deleted file mode 100644 index 9e3ab5f0..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture_request_enterprises_inner_fuel_transport_fuel_inner import PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner - -class TestPostAquacultureRequestEnterprisesInnerFuelTransportFuelInner(unittest.TestCase): - """PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner: - """Test PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner` - """ - model = PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner() - if include_optional: - return PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner( - type = 'petrol', - amount_litres = 1.337 - ) - else: - return PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner( - type = 'petrol', - amount_litres = 1.337, - ) - """ - - def testPostAquacultureRequestEnterprisesInnerFuelTransportFuelInner(self): - """Test PostAquacultureRequestEnterprisesInnerFuelTransportFuelInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_inbound_freight_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_inbound_freight_inner.py deleted file mode 100644 index 3c456e00..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_inbound_freight_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture_request_enterprises_inner_inbound_freight_inner import PostAquacultureRequestEnterprisesInnerInboundFreightInner - -class TestPostAquacultureRequestEnterprisesInnerInboundFreightInner(unittest.TestCase): - """PostAquacultureRequestEnterprisesInnerInboundFreightInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerInboundFreightInner: - """Test PostAquacultureRequestEnterprisesInnerInboundFreightInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerInboundFreightInner` - """ - model = PostAquacultureRequestEnterprisesInnerInboundFreightInner() - if include_optional: - return PostAquacultureRequestEnterprisesInnerInboundFreightInner( - type = 'Truck', - total_km_tonnes = 1.337 - ) - else: - return PostAquacultureRequestEnterprisesInnerInboundFreightInner( - type = 'Truck', - total_km_tonnes = 1.337, - ) - """ - - def testPostAquacultureRequestEnterprisesInnerInboundFreightInner(self): - """Test PostAquacultureRequestEnterprisesInnerInboundFreightInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_refrigerants_inner.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_refrigerants_inner.py deleted file mode 100644 index 836c9bb7..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_refrigerants_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture_request_enterprises_inner_refrigerants_inner import PostAquacultureRequestEnterprisesInnerRefrigerantsInner - -class TestPostAquacultureRequestEnterprisesInnerRefrigerantsInner(unittest.TestCase): - """PostAquacultureRequestEnterprisesInnerRefrigerantsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerRefrigerantsInner: - """Test PostAquacultureRequestEnterprisesInnerRefrigerantsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerRefrigerantsInner` - """ - model = PostAquacultureRequestEnterprisesInnerRefrigerantsInner() - if include_optional: - return PostAquacultureRequestEnterprisesInnerRefrigerantsInner( - refrigerant = 'HFC-23', - charge_size = 1.337 - ) - else: - return PostAquacultureRequestEnterprisesInnerRefrigerantsInner( - refrigerant = 'HFC-23', - charge_size = 1.337, - ) - """ - - def testPostAquacultureRequestEnterprisesInnerRefrigerantsInner(self): - """Test PostAquacultureRequestEnterprisesInnerRefrigerantsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_solid_waste.py b/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_solid_waste.py deleted file mode 100644 index 90becb20..00000000 --- a/examples/python-api-client/api-client/test/test_post_aquaculture_request_enterprises_inner_solid_waste.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_aquaculture_request_enterprises_inner_solid_waste import PostAquacultureRequestEnterprisesInnerSolidWaste - -class TestPostAquacultureRequestEnterprisesInnerSolidWaste(unittest.TestCase): - """PostAquacultureRequestEnterprisesInnerSolidWaste unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostAquacultureRequestEnterprisesInnerSolidWaste: - """Test PostAquacultureRequestEnterprisesInnerSolidWaste - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostAquacultureRequestEnterprisesInnerSolidWaste` - """ - model = PostAquacultureRequestEnterprisesInnerSolidWaste() - if include_optional: - return PostAquacultureRequestEnterprisesInnerSolidWaste( - sent_offsite_tonnes = 1.337, - onsite_composting_tonnes = 1.337 - ) - else: - return PostAquacultureRequestEnterprisesInnerSolidWaste( - sent_offsite_tonnes = 1.337, - onsite_composting_tonnes = 1.337, - ) - """ - - def testPostAquacultureRequestEnterprisesInnerSolidWaste(self): - """Test PostAquacultureRequestEnterprisesInnerSolidWaste""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef200_response.py b/examples/python-api-client/api-client/test/test_post_beef200_response.py deleted file mode 100644 index 87bd656f..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef200_response.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef200_response import PostBeef200Response - -class TestPostBeef200Response(unittest.TestCase): - """PostBeef200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeef200Response: - """Test PostBeef200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeef200Response` - """ - model = PostBeef200Response() - if include_optional: - return PostBeef200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = { - 'key' : null - } - ) - else: - return PostBeef200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - ) - """ - - def testPostBeef200Response(self): - """Test PostBeef200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner.py deleted file mode 100644 index 90afba7c..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef200_response_intermediate_inner import PostBeef200ResponseIntermediateInner - -class TestPostBeef200ResponseIntermediateInner(unittest.TestCase): - """PostBeef200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeef200ResponseIntermediateInner: - """Test PostBeef200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeef200ResponseIntermediateInner` - """ - model = PostBeef200ResponseIntermediateInner() - if include_optional: - return PostBeef200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - intensities = { - 'key' : null - }, - net = { - 'key' : null - } - ) - else: - return PostBeef200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - ) - """ - - def testPostBeef200ResponseIntermediateInner(self): - """Test PostBeef200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner_intensities.py deleted file mode 100644 index 6e9686b4..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef200_response_intermediate_inner_intensities.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef200_response_intermediate_inner_intensities import PostBeef200ResponseIntermediateInnerIntensities - -class TestPostBeef200ResponseIntermediateInnerIntensities(unittest.TestCase): - """PostBeef200ResponseIntermediateInnerIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeef200ResponseIntermediateInnerIntensities: - """Test PostBeef200ResponseIntermediateInnerIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeef200ResponseIntermediateInnerIntensities` - """ - model = PostBeef200ResponseIntermediateInnerIntensities() - if include_optional: - return PostBeef200ResponseIntermediateInnerIntensities( - liveweight_beef_produced_kg = 1.337, - beef_excluding_sequestration = 1.337, - beef_including_sequestration = 1.337 - ) - else: - return PostBeef200ResponseIntermediateInnerIntensities( - liveweight_beef_produced_kg = 1.337, - beef_excluding_sequestration = 1.337, - beef_including_sequestration = 1.337, - ) - """ - - def testPostBeef200ResponseIntermediateInnerIntensities(self): - """Test PostBeef200ResponseIntermediateInnerIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef200_response_net.py b/examples/python-api-client/api-client/test/test_post_beef200_response_net.py deleted file mode 100644 index 966e4c43..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef200_response_net.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef200_response_net import PostBeef200ResponseNet - -class TestPostBeef200ResponseNet(unittest.TestCase): - """PostBeef200ResponseNet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeef200ResponseNet: - """Test PostBeef200ResponseNet - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeef200ResponseNet` - """ - model = PostBeef200ResponseNet() - if include_optional: - return PostBeef200ResponseNet( - total = 1.337, - beef = 1.337 - ) - else: - return PostBeef200ResponseNet( - total = 1.337, - beef = 1.337, - ) - """ - - def testPostBeef200ResponseNet(self): - """Test PostBeef200ResponseNet""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_beef200_response_scope1.py deleted file mode 100644 index 39bb174b..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef200_response_scope1.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef200_response_scope1 import PostBeef200ResponseScope1 - -class TestPostBeef200ResponseScope1(unittest.TestCase): - """PostBeef200ResponseScope1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeef200ResponseScope1: - """Test PostBeef200ResponseScope1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeef200ResponseScope1` - """ - model = PostBeef200ResponseScope1() - if include_optional: - return PostBeef200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - urea_co2 = 1.337, - lime_co2 = 1.337, - fertiliser_n2_o = 1.337, - enteric_ch4 = 1.337, - manure_management_ch4 = 1.337, - urine_and_dung_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - savannah_burning_n2_o = 1.337, - savannah_burning_ch4 = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337 - ) - else: - return PostBeef200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - urea_co2 = 1.337, - lime_co2 = 1.337, - fertiliser_n2_o = 1.337, - enteric_ch4 = 1.337, - manure_management_ch4 = 1.337, - urine_and_dung_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - savannah_burning_n2_o = 1.337, - savannah_burning_ch4 = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337, - ) - """ - - def testPostBeef200ResponseScope1(self): - """Test PostBeef200ResponseScope1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_beef200_response_scope3.py deleted file mode 100644 index 7cb4603e..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef200_response_scope3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef200_response_scope3 import PostBeef200ResponseScope3 - -class TestPostBeef200ResponseScope3(unittest.TestCase): - """PostBeef200ResponseScope3 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeef200ResponseScope3: - """Test PostBeef200ResponseScope3 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeef200ResponseScope3` - """ - model = PostBeef200ResponseScope3() - if include_optional: - return PostBeef200ResponseScope3( - fertiliser = 1.337, - purchased_mineral_supplementation = 1.337, - purchased_feed = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - lime = 1.337, - purchased_livestock = 1.337, - total = 1.337 - ) - else: - return PostBeef200ResponseScope3( - fertiliser = 1.337, - purchased_mineral_supplementation = 1.337, - purchased_feed = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - lime = 1.337, - purchased_livestock = 1.337, - total = 1.337, - ) - """ - - def testPostBeef200ResponseScope3(self): - """Test PostBeef200ResponseScope3""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request.py b/examples/python-api-client/api-client/test/test_post_beef_request.py deleted file mode 100644 index 5ff133b9..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request import PostBeefRequest - -class TestPostBeefRequest(unittest.TestCase): - """PostBeefRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequest: - """Test PostBeefRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequest` - """ - model = PostBeefRequest() - if include_optional: - return PostBeefRequest( - state = 'nsw', - north_of_tropic_of_capricorn = True, - rainfall_above600 = True, - beef = [ - { - 'key' : null - } - ], - burning = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequest( - state = 'nsw', - north_of_tropic_of_capricorn = True, - rainfall_above600 = True, - beef = [ - { - 'key' : null - } - ], - burning = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostBeefRequest(self): - """Test PostBeefRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner.py deleted file mode 100644 index 1996e5aa..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner import PostBeefRequestBeefInner - -class TestPostBeefRequestBeefInner(unittest.TestCase): - """PostBeefRequestBeefInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInner: - """Test PostBeefRequestBeefInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInner` - """ - model = PostBeefRequestBeefInner() - if include_optional: - return PostBeefRequestBeefInner( - id = '', - classes = { - 'key' : null - }, - limestone = 1.337, - limestone_fraction = 1.337, - fertiliser = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - mineral_supplementation = { - 'key' : null - }, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - grain_feed = 1.337, - hay_feed = 1.337, - cottonseed_feed = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - cows_calving = { - 'key' : null - } - ) - else: - return PostBeefRequestBeefInner( - classes = { - 'key' : null - }, - limestone = 1.337, - limestone_fraction = 1.337, - fertiliser = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - mineral_supplementation = { - 'key' : null - }, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - grain_feed = 1.337, - hay_feed = 1.337, - cottonseed_feed = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - cows_calving = { - 'key' : null - }, - ) - """ - - def testPostBeefRequestBeefInner(self): - """Test PostBeefRequestBeefInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes.py deleted file mode 100644 index 31de7529..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes import PostBeefRequestBeefInnerClasses - -class TestPostBeefRequestBeefInnerClasses(unittest.TestCase): - """PostBeefRequestBeefInnerClasses unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClasses: - """Test PostBeefRequestBeefInnerClasses - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClasses` - """ - model = PostBeefRequestBeefInnerClasses() - if include_optional: - return PostBeefRequestBeefInnerClasses( - bulls_gt1 = { - 'key' : null - }, - bulls_gt1_traded = { - 'key' : null - }, - steers_lt1 = { - 'key' : null - }, - steers_lt1_traded = { - 'key' : null - }, - steers1_to2 = { - 'key' : null - }, - steers1_to2_traded = { - 'key' : null - }, - steers_gt2 = { - 'key' : null - }, - steers_gt2_traded = { - 'key' : null - }, - cows_gt2 = { - 'key' : null - }, - cows_gt2_traded = { - 'key' : null - }, - heifers_lt1 = { - 'key' : null - }, - heifers_lt1_traded = { - 'key' : null - }, - heifers1_to2 = { - 'key' : null - }, - heifers1_to2_traded = { - 'key' : null - }, - heifers_gt2 = { - 'key' : null - }, - heifers_gt2_traded = { - 'key' : null - } - ) - else: - return PostBeefRequestBeefInnerClasses( - ) - """ - - def testPostBeefRequestBeefInnerClasses(self): - """Test PostBeefRequestBeefInnerClasses""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1.py deleted file mode 100644 index dfd19c1a..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1 import PostBeefRequestBeefInnerClassesBullsGt1 - -class TestPostBeefRequestBeefInnerClassesBullsGt1(unittest.TestCase): - """PostBeefRequestBeefInnerClassesBullsGt1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesBullsGt1: - """Test PostBeefRequestBeefInnerClassesBullsGt1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesBullsGt1` - """ - model = PostBeefRequestBeefInnerClassesBullsGt1() - if include_optional: - return PostBeefRequestBeefInnerClassesBullsGt1( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesBullsGt1( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesBullsGt1(self): - """Test PostBeefRequestBeefInnerClassesBullsGt1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_autumn.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_autumn.py deleted file mode 100644 index 10ffee9d..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_autumn.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_autumn import PostBeefRequestBeefInnerClassesBullsGt1Autumn - -class TestPostBeefRequestBeefInnerClassesBullsGt1Autumn(unittest.TestCase): - """PostBeefRequestBeefInnerClassesBullsGt1Autumn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesBullsGt1Autumn: - """Test PostBeefRequestBeefInnerClassesBullsGt1Autumn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesBullsGt1Autumn` - """ - model = PostBeefRequestBeefInnerClassesBullsGt1Autumn() - if include_optional: - return PostBeefRequestBeefInnerClassesBullsGt1Autumn( - head = 1.337, - liveweight = 1.337, - liveweight_gain = 1.337, - crude_protein = 1.337, - dry_matter_digestibility = 1.337 - ) - else: - return PostBeefRequestBeefInnerClassesBullsGt1Autumn( - head = 1.337, - liveweight = 1.337, - liveweight_gain = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesBullsGt1Autumn(self): - """Test PostBeefRequestBeefInnerClassesBullsGt1Autumn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py deleted file mode 100644 index 0358c9fb..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_purchases_inner import PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner - -class TestPostBeefRequestBeefInnerClassesBullsGt1PurchasesInner(unittest.TestCase): - """PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner: - """Test PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner` - """ - model = PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner() - if include_optional: - return PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner( - head = 1.337, - purchase_weight = 1.337, - purchase_source = 'Dairy origin' - ) - else: - return PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner( - head = 1.337, - purchase_weight = 1.337, - purchase_source = 'Dairy origin', - ) - """ - - def testPostBeefRequestBeefInnerClassesBullsGt1PurchasesInner(self): - """Test PostBeefRequestBeefInnerClassesBullsGt1PurchasesInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_traded.py deleted file mode 100644 index d9ed0e4c..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_bulls_gt1_traded.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_bulls_gt1_traded import PostBeefRequestBeefInnerClassesBullsGt1Traded - -class TestPostBeefRequestBeefInnerClassesBullsGt1Traded(unittest.TestCase): - """PostBeefRequestBeefInnerClassesBullsGt1Traded unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesBullsGt1Traded: - """Test PostBeefRequestBeefInnerClassesBullsGt1Traded - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesBullsGt1Traded` - """ - model = PostBeefRequestBeefInnerClassesBullsGt1Traded() - if include_optional: - return PostBeefRequestBeefInnerClassesBullsGt1Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesBullsGt1Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesBullsGt1Traded(self): - """Test PostBeefRequestBeefInnerClassesBullsGt1Traded""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2.py deleted file mode 100644 index d0f0b13c..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_cows_gt2 import PostBeefRequestBeefInnerClassesCowsGt2 - -class TestPostBeefRequestBeefInnerClassesCowsGt2(unittest.TestCase): - """PostBeefRequestBeefInnerClassesCowsGt2 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesCowsGt2: - """Test PostBeefRequestBeefInnerClassesCowsGt2 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesCowsGt2` - """ - model = PostBeefRequestBeefInnerClassesCowsGt2() - if include_optional: - return PostBeefRequestBeefInnerClassesCowsGt2( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesCowsGt2( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesCowsGt2(self): - """Test PostBeefRequestBeefInnerClassesCowsGt2""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2_traded.py deleted file mode 100644 index afc5b133..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_cows_gt2_traded.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_cows_gt2_traded import PostBeefRequestBeefInnerClassesCowsGt2Traded - -class TestPostBeefRequestBeefInnerClassesCowsGt2Traded(unittest.TestCase): - """PostBeefRequestBeefInnerClassesCowsGt2Traded unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesCowsGt2Traded: - """Test PostBeefRequestBeefInnerClassesCowsGt2Traded - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesCowsGt2Traded` - """ - model = PostBeefRequestBeefInnerClassesCowsGt2Traded() - if include_optional: - return PostBeefRequestBeefInnerClassesCowsGt2Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesCowsGt2Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesCowsGt2Traded(self): - """Test PostBeefRequestBeefInnerClassesCowsGt2Traded""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2.py deleted file mode 100644 index 3c1349b7..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_heifers1_to2 import PostBeefRequestBeefInnerClassesHeifers1To2 - -class TestPostBeefRequestBeefInnerClassesHeifers1To2(unittest.TestCase): - """PostBeefRequestBeefInnerClassesHeifers1To2 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesHeifers1To2: - """Test PostBeefRequestBeefInnerClassesHeifers1To2 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesHeifers1To2` - """ - model = PostBeefRequestBeefInnerClassesHeifers1To2() - if include_optional: - return PostBeefRequestBeefInnerClassesHeifers1To2( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesHeifers1To2( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesHeifers1To2(self): - """Test PostBeefRequestBeefInnerClassesHeifers1To2""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2_traded.py deleted file mode 100644 index 6b499afc..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers1_to2_traded.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_heifers1_to2_traded import PostBeefRequestBeefInnerClassesHeifers1To2Traded - -class TestPostBeefRequestBeefInnerClassesHeifers1To2Traded(unittest.TestCase): - """PostBeefRequestBeefInnerClassesHeifers1To2Traded unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesHeifers1To2Traded: - """Test PostBeefRequestBeefInnerClassesHeifers1To2Traded - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesHeifers1To2Traded` - """ - model = PostBeefRequestBeefInnerClassesHeifers1To2Traded() - if include_optional: - return PostBeefRequestBeefInnerClassesHeifers1To2Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesHeifers1To2Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesHeifers1To2Traded(self): - """Test PostBeefRequestBeefInnerClassesHeifers1To2Traded""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2.py deleted file mode 100644 index b1373cbe..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_heifers_gt2 import PostBeefRequestBeefInnerClassesHeifersGt2 - -class TestPostBeefRequestBeefInnerClassesHeifersGt2(unittest.TestCase): - """PostBeefRequestBeefInnerClassesHeifersGt2 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesHeifersGt2: - """Test PostBeefRequestBeefInnerClassesHeifersGt2 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesHeifersGt2` - """ - model = PostBeefRequestBeefInnerClassesHeifersGt2() - if include_optional: - return PostBeefRequestBeefInnerClassesHeifersGt2( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesHeifersGt2( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesHeifersGt2(self): - """Test PostBeefRequestBeefInnerClassesHeifersGt2""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2_traded.py deleted file mode 100644 index 62bfafaa..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_gt2_traded.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_heifers_gt2_traded import PostBeefRequestBeefInnerClassesHeifersGt2Traded - -class TestPostBeefRequestBeefInnerClassesHeifersGt2Traded(unittest.TestCase): - """PostBeefRequestBeefInnerClassesHeifersGt2Traded unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesHeifersGt2Traded: - """Test PostBeefRequestBeefInnerClassesHeifersGt2Traded - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesHeifersGt2Traded` - """ - model = PostBeefRequestBeefInnerClassesHeifersGt2Traded() - if include_optional: - return PostBeefRequestBeefInnerClassesHeifersGt2Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesHeifersGt2Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesHeifersGt2Traded(self): - """Test PostBeefRequestBeefInnerClassesHeifersGt2Traded""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1.py deleted file mode 100644 index 300b7944..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_heifers_lt1 import PostBeefRequestBeefInnerClassesHeifersLt1 - -class TestPostBeefRequestBeefInnerClassesHeifersLt1(unittest.TestCase): - """PostBeefRequestBeefInnerClassesHeifersLt1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesHeifersLt1: - """Test PostBeefRequestBeefInnerClassesHeifersLt1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesHeifersLt1` - """ - model = PostBeefRequestBeefInnerClassesHeifersLt1() - if include_optional: - return PostBeefRequestBeefInnerClassesHeifersLt1( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesHeifersLt1( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesHeifersLt1(self): - """Test PostBeefRequestBeefInnerClassesHeifersLt1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1_traded.py deleted file mode 100644 index 7dc9ac9f..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_heifers_lt1_traded.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_heifers_lt1_traded import PostBeefRequestBeefInnerClassesHeifersLt1Traded - -class TestPostBeefRequestBeefInnerClassesHeifersLt1Traded(unittest.TestCase): - """PostBeefRequestBeefInnerClassesHeifersLt1Traded unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesHeifersLt1Traded: - """Test PostBeefRequestBeefInnerClassesHeifersLt1Traded - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesHeifersLt1Traded` - """ - model = PostBeefRequestBeefInnerClassesHeifersLt1Traded() - if include_optional: - return PostBeefRequestBeefInnerClassesHeifersLt1Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesHeifersLt1Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesHeifersLt1Traded(self): - """Test PostBeefRequestBeefInnerClassesHeifersLt1Traded""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2.py deleted file mode 100644 index 980a4894..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_steers1_to2 import PostBeefRequestBeefInnerClassesSteers1To2 - -class TestPostBeefRequestBeefInnerClassesSteers1To2(unittest.TestCase): - """PostBeefRequestBeefInnerClassesSteers1To2 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesSteers1To2: - """Test PostBeefRequestBeefInnerClassesSteers1To2 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesSteers1To2` - """ - model = PostBeefRequestBeefInnerClassesSteers1To2() - if include_optional: - return PostBeefRequestBeefInnerClassesSteers1To2( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesSteers1To2( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesSteers1To2(self): - """Test PostBeefRequestBeefInnerClassesSteers1To2""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2_traded.py deleted file mode 100644 index b546b3e0..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers1_to2_traded.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_steers1_to2_traded import PostBeefRequestBeefInnerClassesSteers1To2Traded - -class TestPostBeefRequestBeefInnerClassesSteers1To2Traded(unittest.TestCase): - """PostBeefRequestBeefInnerClassesSteers1To2Traded unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesSteers1To2Traded: - """Test PostBeefRequestBeefInnerClassesSteers1To2Traded - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesSteers1To2Traded` - """ - model = PostBeefRequestBeefInnerClassesSteers1To2Traded() - if include_optional: - return PostBeefRequestBeefInnerClassesSteers1To2Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesSteers1To2Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesSteers1To2Traded(self): - """Test PostBeefRequestBeefInnerClassesSteers1To2Traded""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2.py deleted file mode 100644 index 577bc36d..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_steers_gt2 import PostBeefRequestBeefInnerClassesSteersGt2 - -class TestPostBeefRequestBeefInnerClassesSteersGt2(unittest.TestCase): - """PostBeefRequestBeefInnerClassesSteersGt2 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesSteersGt2: - """Test PostBeefRequestBeefInnerClassesSteersGt2 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesSteersGt2` - """ - model = PostBeefRequestBeefInnerClassesSteersGt2() - if include_optional: - return PostBeefRequestBeefInnerClassesSteersGt2( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesSteersGt2( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesSteersGt2(self): - """Test PostBeefRequestBeefInnerClassesSteersGt2""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2_traded.py deleted file mode 100644 index 1ec56f7f..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_gt2_traded.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_steers_gt2_traded import PostBeefRequestBeefInnerClassesSteersGt2Traded - -class TestPostBeefRequestBeefInnerClassesSteersGt2Traded(unittest.TestCase): - """PostBeefRequestBeefInnerClassesSteersGt2Traded unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesSteersGt2Traded: - """Test PostBeefRequestBeefInnerClassesSteersGt2Traded - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesSteersGt2Traded` - """ - model = PostBeefRequestBeefInnerClassesSteersGt2Traded() - if include_optional: - return PostBeefRequestBeefInnerClassesSteersGt2Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesSteersGt2Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesSteersGt2Traded(self): - """Test PostBeefRequestBeefInnerClassesSteersGt2Traded""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1.py deleted file mode 100644 index 0f2cb7e3..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_steers_lt1 import PostBeefRequestBeefInnerClassesSteersLt1 - -class TestPostBeefRequestBeefInnerClassesSteersLt1(unittest.TestCase): - """PostBeefRequestBeefInnerClassesSteersLt1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesSteersLt1: - """Test PostBeefRequestBeefInnerClassesSteersLt1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesSteersLt1` - """ - model = PostBeefRequestBeefInnerClassesSteersLt1() - if include_optional: - return PostBeefRequestBeefInnerClassesSteersLt1( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesSteersLt1( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesSteersLt1(self): - """Test PostBeefRequestBeefInnerClassesSteersLt1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1_traded.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1_traded.py deleted file mode 100644 index bcb8174d..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_classes_steers_lt1_traded.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_classes_steers_lt1_traded import PostBeefRequestBeefInnerClassesSteersLt1Traded - -class TestPostBeefRequestBeefInnerClassesSteersLt1Traded(unittest.TestCase): - """PostBeefRequestBeefInnerClassesSteersLt1Traded unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerClassesSteersLt1Traded: - """Test PostBeefRequestBeefInnerClassesSteersLt1Traded - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerClassesSteersLt1Traded` - """ - model = PostBeefRequestBeefInnerClassesSteersLt1Traded() - if include_optional: - return PostBeefRequestBeefInnerClassesSteersLt1Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - source = 'Dairy origin', - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerClassesSteersLt1Traded( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerClassesSteersLt1Traded(self): - """Test PostBeefRequestBeefInnerClassesSteersLt1Traded""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_cows_calving.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_cows_calving.py deleted file mode 100644 index 04aef4fd..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_cows_calving.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_cows_calving import PostBeefRequestBeefInnerCowsCalving - -class TestPostBeefRequestBeefInnerCowsCalving(unittest.TestCase): - """PostBeefRequestBeefInnerCowsCalving unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerCowsCalving: - """Test PostBeefRequestBeefInnerCowsCalving - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerCowsCalving` - """ - model = PostBeefRequestBeefInnerCowsCalving() - if include_optional: - return PostBeefRequestBeefInnerCowsCalving( - spring = 1.337, - summer = 1.337, - autumn = 1.337, - winter = 1.337 - ) - else: - return PostBeefRequestBeefInnerCowsCalving( - spring = 1.337, - summer = 1.337, - autumn = 1.337, - winter = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerCowsCalving(self): - """Test PostBeefRequestBeefInnerCowsCalving""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser.py deleted file mode 100644 index 13e4e49a..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_fertiliser import PostBeefRequestBeefInnerFertiliser - -class TestPostBeefRequestBeefInnerFertiliser(unittest.TestCase): - """PostBeefRequestBeefInnerFertiliser unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerFertiliser: - """Test PostBeefRequestBeefInnerFertiliser - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerFertiliser` - """ - model = PostBeefRequestBeefInnerFertiliser() - if include_optional: - return PostBeefRequestBeefInnerFertiliser( - single_superphosphate = 1.337, - other_type = 'Monoammonium phosphate (MAP)', - pasture_dryland = 1.337, - pasture_irrigated = 1.337, - crops_dryland = 1.337, - crops_irrigated = 1.337, - other_dryland = 1.337, - other_irrigated = 1.337, - other_fertilisers = [ - { - 'key' : null - } - ] - ) - else: - return PostBeefRequestBeefInnerFertiliser( - single_superphosphate = 1.337, - pasture_dryland = 1.337, - pasture_irrigated = 1.337, - crops_dryland = 1.337, - crops_irrigated = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerFertiliser(self): - """Test PostBeefRequestBeefInnerFertiliser""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py deleted file mode 100644 index d90404e5..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_fertiliser_other_fertilisers_inner.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_fertiliser_other_fertilisers_inner import PostBeefRequestBeefInnerFertiliserOtherFertilisersInner - -class TestPostBeefRequestBeefInnerFertiliserOtherFertilisersInner(unittest.TestCase): - """PostBeefRequestBeefInnerFertiliserOtherFertilisersInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerFertiliserOtherFertilisersInner: - """Test PostBeefRequestBeefInnerFertiliserOtherFertilisersInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerFertiliserOtherFertilisersInner` - """ - model = PostBeefRequestBeefInnerFertiliserOtherFertilisersInner() - if include_optional: - return PostBeefRequestBeefInnerFertiliserOtherFertilisersInner( - other_type = 'Monoammonium phosphate (MAP)', - other_dryland = 1.337, - other_irrigated = 1.337 - ) - else: - return PostBeefRequestBeefInnerFertiliserOtherFertilisersInner( - other_type = 'Monoammonium phosphate (MAP)', - other_dryland = 1.337, - other_irrigated = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerFertiliserOtherFertilisersInner(self): - """Test PostBeefRequestBeefInnerFertiliserOtherFertilisersInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_mineral_supplementation.py b/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_mineral_supplementation.py deleted file mode 100644 index cb016383..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_beef_inner_mineral_supplementation.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_beef_inner_mineral_supplementation import PostBeefRequestBeefInnerMineralSupplementation - -class TestPostBeefRequestBeefInnerMineralSupplementation(unittest.TestCase): - """PostBeefRequestBeefInnerMineralSupplementation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBeefInnerMineralSupplementation: - """Test PostBeefRequestBeefInnerMineralSupplementation - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBeefInnerMineralSupplementation` - """ - model = PostBeefRequestBeefInnerMineralSupplementation() - if include_optional: - return PostBeefRequestBeefInnerMineralSupplementation( - mineral_block = 1.337, - mineral_block_urea = 1.337, - weaner_block = 1.337, - weaner_block_urea = 1.337, - dry_season_mix = 1.337, - dry_season_mix_urea = 1.337 - ) - else: - return PostBeefRequestBeefInnerMineralSupplementation( - mineral_block = 1.337, - mineral_block_urea = 1.337, - weaner_block = 1.337, - weaner_block_urea = 1.337, - dry_season_mix = 1.337, - dry_season_mix_urea = 1.337, - ) - """ - - def testPostBeefRequestBeefInnerMineralSupplementation(self): - """Test PostBeefRequestBeefInnerMineralSupplementation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_burning_inner.py b/examples/python-api-client/api-client/test/test_post_beef_request_burning_inner.py deleted file mode 100644 index 9c54c4da..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_burning_inner.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_burning_inner import PostBeefRequestBurningInner - -class TestPostBeefRequestBurningInner(unittest.TestCase): - """PostBeefRequestBurningInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBurningInner: - """Test PostBeefRequestBurningInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBurningInner` - """ - model = PostBeefRequestBurningInner() - if include_optional: - return PostBeefRequestBurningInner( - burning = { - 'key' : null - }, - allocation_to_beef = [ - 1.337 - ] - ) - else: - return PostBeefRequestBurningInner( - burning = { - 'key' : null - }, - allocation_to_beef = [ - 1.337 - ], - ) - """ - - def testPostBeefRequestBurningInner(self): - """Test PostBeefRequestBurningInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_burning_inner_burning.py b/examples/python-api-client/api-client/test/test_post_beef_request_burning_inner_burning.py deleted file mode 100644 index 86c6627c..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_burning_inner_burning.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_burning_inner_burning import PostBeefRequestBurningInnerBurning - -class TestPostBeefRequestBurningInnerBurning(unittest.TestCase): - """PostBeefRequestBurningInnerBurning unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestBurningInnerBurning: - """Test PostBeefRequestBurningInnerBurning - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestBurningInnerBurning` - """ - model = PostBeefRequestBurningInnerBurning() - if include_optional: - return PostBeefRequestBurningInnerBurning( - fuel = 'coarse', - season = 'early dry season', - patchiness = 'high', - rainfall_zone = 'low', - years_since_last_fire = 1.337, - fire_scar_area = 1.337, - vegetation = 'Melaleuca woodland' - ) - else: - return PostBeefRequestBurningInnerBurning( - fuel = 'coarse', - season = 'early dry season', - patchiness = 'high', - rainfall_zone = 'low', - years_since_last_fire = 1.337, - fire_scar_area = 1.337, - vegetation = 'Melaleuca woodland', - ) - """ - - def testPostBeefRequestBurningInnerBurning(self): - """Test PostBeefRequestBurningInnerBurning""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner.py deleted file mode 100644 index 7734765d..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_vegetation_inner import PostBeefRequestVegetationInner - -class TestPostBeefRequestVegetationInner(unittest.TestCase): - """PostBeefRequestVegetationInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestVegetationInner: - """Test PostBeefRequestVegetationInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestVegetationInner` - """ - model = PostBeefRequestVegetationInner() - if include_optional: - return PostBeefRequestVegetationInner( - vegetation = { - 'key' : null - }, - beef_proportion = 1.337, - allocation_to_beef = [ - 1.337 - ] - ) - else: - return PostBeefRequestVegetationInner( - vegetation = { - 'key' : null - }, - allocation_to_beef = [ - 1.337 - ], - ) - """ - - def testPostBeefRequestVegetationInner(self): - """Test PostBeefRequestVegetationInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner_vegetation.py b/examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner_vegetation.py deleted file mode 100644 index 4c19e8b6..00000000 --- a/examples/python-api-client/api-client/test/test_post_beef_request_vegetation_inner_vegetation.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_beef_request_vegetation_inner_vegetation import PostBeefRequestVegetationInnerVegetation - -class TestPostBeefRequestVegetationInnerVegetation(unittest.TestCase): - """PostBeefRequestVegetationInnerVegetation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBeefRequestVegetationInnerVegetation: - """Test PostBeefRequestVegetationInnerVegetation - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBeefRequestVegetationInnerVegetation` - """ - model = PostBeefRequestVegetationInnerVegetation() - if include_optional: - return PostBeefRequestVegetationInnerVegetation( - region = 'South West', - tree_species = 'Mixed species (Environmental Plantings)', - soil = 'Loams & Clays', - area = 1.337, - age = 1.337 - ) - else: - return PostBeefRequestVegetationInnerVegetation( - region = 'South West', - tree_species = 'Mixed species (Environmental Plantings)', - soil = 'Loams & Clays', - area = 1.337, - age = 1.337, - ) - """ - - def testPostBeefRequestVegetationInnerVegetation(self): - """Test PostBeefRequestVegetationInnerVegetation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo200_response.py b/examples/python-api-client/api-client/test/test_post_buffalo200_response.py deleted file mode 100644 index 433f951b..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo200_response.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo200_response import PostBuffalo200Response - -class TestPostBuffalo200Response(unittest.TestCase): - """PostBuffalo200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffalo200Response: - """Test PostBuffalo200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffalo200Response` - """ - model = PostBuffalo200Response() - if include_optional: - return PostBuffalo200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ] - ) - else: - return PostBuffalo200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - ) - """ - - def testPostBuffalo200Response(self): - """Test PostBuffalo200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_buffalo200_response_intensities.py deleted file mode 100644 index f28daa58..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo200_response_intensities.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo200_response_intensities import PostBuffalo200ResponseIntensities - -class TestPostBuffalo200ResponseIntensities(unittest.TestCase): - """PostBuffalo200ResponseIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffalo200ResponseIntensities: - """Test PostBuffalo200ResponseIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffalo200ResponseIntensities` - """ - model = PostBuffalo200ResponseIntensities() - if include_optional: - return PostBuffalo200ResponseIntensities( - liveweight_produced_kg = 1.337, - buffalo_meat_excluding_sequestration = 1.337, - buffalo_meat_including_sequestration = 1.337 - ) - else: - return PostBuffalo200ResponseIntensities( - liveweight_produced_kg = 1.337, - buffalo_meat_excluding_sequestration = 1.337, - buffalo_meat_including_sequestration = 1.337, - ) - """ - - def testPostBuffalo200ResponseIntensities(self): - """Test PostBuffalo200ResponseIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_buffalo200_response_intermediate_inner.py deleted file mode 100644 index 1960f961..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo200_response_intermediate_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo200_response_intermediate_inner import PostBuffalo200ResponseIntermediateInner - -class TestPostBuffalo200ResponseIntermediateInner(unittest.TestCase): - """PostBuffalo200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffalo200ResponseIntermediateInner: - """Test PostBuffalo200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffalo200ResponseIntermediateInner` - """ - model = PostBuffalo200ResponseIntermediateInner() - if include_optional: - return PostBuffalo200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - } - ) - else: - return PostBuffalo200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - ) - """ - - def testPostBuffalo200ResponseIntermediateInner(self): - """Test PostBuffalo200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo200_response_net.py b/examples/python-api-client/api-client/test/test_post_buffalo200_response_net.py deleted file mode 100644 index 988cebe0..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo200_response_net.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo200_response_net import PostBuffalo200ResponseNet - -class TestPostBuffalo200ResponseNet(unittest.TestCase): - """PostBuffalo200ResponseNet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffalo200ResponseNet: - """Test PostBuffalo200ResponseNet - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffalo200ResponseNet` - """ - model = PostBuffalo200ResponseNet() - if include_optional: - return PostBuffalo200ResponseNet( - total = 1.337 - ) - else: - return PostBuffalo200ResponseNet( - total = 1.337, - ) - """ - - def testPostBuffalo200ResponseNet(self): - """Test PostBuffalo200ResponseNet""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_buffalo200_response_scope1.py deleted file mode 100644 index 2daaf6e1..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo200_response_scope1.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo200_response_scope1 import PostBuffalo200ResponseScope1 - -class TestPostBuffalo200ResponseScope1(unittest.TestCase): - """PostBuffalo200ResponseScope1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffalo200ResponseScope1: - """Test PostBuffalo200ResponseScope1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffalo200ResponseScope1` - """ - model = PostBuffalo200ResponseScope1() - if include_optional: - return PostBuffalo200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - urea_co2 = 1.337, - lime_co2 = 1.337, - fertiliser_n2_o = 1.337, - enteric_ch4 = 1.337, - manure_management_ch4 = 1.337, - urine_and_dung_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337 - ) - else: - return PostBuffalo200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - urea_co2 = 1.337, - lime_co2 = 1.337, - fertiliser_n2_o = 1.337, - enteric_ch4 = 1.337, - manure_management_ch4 = 1.337, - urine_and_dung_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337, - ) - """ - - def testPostBuffalo200ResponseScope1(self): - """Test PostBuffalo200ResponseScope1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_buffalo200_response_scope3.py deleted file mode 100644 index fd8f93a6..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo200_response_scope3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo200_response_scope3 import PostBuffalo200ResponseScope3 - -class TestPostBuffalo200ResponseScope3(unittest.TestCase): - """PostBuffalo200ResponseScope3 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffalo200ResponseScope3: - """Test PostBuffalo200ResponseScope3 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffalo200ResponseScope3` - """ - model = PostBuffalo200ResponseScope3() - if include_optional: - return PostBuffalo200ResponseScope3( - fertiliser = 1.337, - purchased_feed = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - lime = 1.337, - purchased_livestock = 1.337, - total = 1.337 - ) - else: - return PostBuffalo200ResponseScope3( - fertiliser = 1.337, - purchased_feed = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - lime = 1.337, - purchased_livestock = 1.337, - total = 1.337, - ) - """ - - def testPostBuffalo200ResponseScope3(self): - """Test PostBuffalo200ResponseScope3""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request.py b/examples/python-api-client/api-client/test/test_post_buffalo_request.py deleted file mode 100644 index b4fa7146..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request import PostBuffaloRequest - -class TestPostBuffaloRequest(unittest.TestCase): - """PostBuffaloRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequest: - """Test PostBuffaloRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequest` - """ - model = PostBuffaloRequest() - if include_optional: - return PostBuffaloRequest( - state = 'nsw', - rainfall_above600 = True, - buffalos = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostBuffaloRequest( - state = 'nsw', - rainfall_above600 = True, - buffalos = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostBuffaloRequest(self): - """Test PostBuffaloRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner.py deleted file mode 100644 index 2513e6c2..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_buffalos_inner import PostBuffaloRequestBuffalosInner - -class TestPostBuffaloRequestBuffalosInner(unittest.TestCase): - """PostBuffaloRequestBuffalosInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInner: - """Test PostBuffaloRequestBuffalosInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestBuffalosInner` - """ - model = PostBuffaloRequestBuffalosInner() - if include_optional: - return PostBuffaloRequestBuffalosInner( - id = '', - classes = { - 'key' : null - }, - limestone = 1.337, - limestone_fraction = 1.337, - fertiliser = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - grain_feed = 1.337, - hay_feed = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - cows_calving = { - 'key' : null - }, - seasonal_calving = { - 'key' : null - } - ) - else: - return PostBuffaloRequestBuffalosInner( - classes = { - 'key' : null - }, - limestone = 1.337, - limestone_fraction = 1.337, - fertiliser = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - grain_feed = 1.337, - hay_feed = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - cows_calving = { - 'key' : null - }, - seasonal_calving = { - 'key' : null - }, - ) - """ - - def testPostBuffaloRequestBuffalosInner(self): - """Test PostBuffaloRequestBuffalosInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes.py deleted file mode 100644 index 18f4a7f2..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_buffalos_inner_classes import PostBuffaloRequestBuffalosInnerClasses - -class TestPostBuffaloRequestBuffalosInnerClasses(unittest.TestCase): - """PostBuffaloRequestBuffalosInnerClasses unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClasses: - """Test PostBuffaloRequestBuffalosInnerClasses - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClasses` - """ - model = PostBuffaloRequestBuffalosInnerClasses() - if include_optional: - return PostBuffaloRequestBuffalosInnerClasses( - bulls = { - 'key' : null - }, - trade_bulls = { - 'key' : null - }, - cows = { - 'key' : null - }, - trade_cows = { - 'key' : null - }, - steers = { - 'key' : null - }, - trade_steers = { - 'key' : null - }, - calfs = { - 'key' : null - }, - trade_calfs = { - 'key' : null - } - ) - else: - return PostBuffaloRequestBuffalosInnerClasses( - ) - """ - - def testPostBuffaloRequestBuffalosInnerClasses(self): - """Test PostBuffaloRequestBuffalosInnerClasses""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls.py deleted file mode 100644 index 5cf29124..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls import PostBuffaloRequestBuffalosInnerClassesBulls - -class TestPostBuffaloRequestBuffalosInnerClassesBulls(unittest.TestCase): - """PostBuffaloRequestBuffalosInnerClassesBulls unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesBulls: - """Test PostBuffaloRequestBuffalosInnerClassesBulls - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesBulls` - """ - model = PostBuffaloRequestBuffalosInnerClassesBulls() - if include_optional: - return PostBuffaloRequestBuffalosInnerClassesBulls( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBuffaloRequestBuffalosInnerClassesBulls( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBuffaloRequestBuffalosInnerClassesBulls(self): - """Test PostBuffaloRequestBuffalosInnerClassesBulls""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_autumn.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_autumn.py deleted file mode 100644 index 687966f7..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_autumn.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_autumn import PostBuffaloRequestBuffalosInnerClassesBullsAutumn - -class TestPostBuffaloRequestBuffalosInnerClassesBullsAutumn(unittest.TestCase): - """PostBuffaloRequestBuffalosInnerClassesBullsAutumn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesBullsAutumn: - """Test PostBuffaloRequestBuffalosInnerClassesBullsAutumn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesBullsAutumn` - """ - model = PostBuffaloRequestBuffalosInnerClassesBullsAutumn() - if include_optional: - return PostBuffaloRequestBuffalosInnerClassesBullsAutumn( - head = 1.337 - ) - else: - return PostBuffaloRequestBuffalosInnerClassesBullsAutumn( - head = 1.337, - ) - """ - - def testPostBuffaloRequestBuffalosInnerClassesBullsAutumn(self): - """Test PostBuffaloRequestBuffalosInnerClassesBullsAutumn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py deleted file mode 100644 index ea14496f..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_bulls_purchases_inner import PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner - -class TestPostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner(unittest.TestCase): - """PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner: - """Test PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner` - """ - model = PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner() - if include_optional: - return PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner( - head = 1.337, - purchase_weight = 1.337 - ) - else: - return PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner( - head = 1.337, - purchase_weight = 1.337, - ) - """ - - def testPostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner(self): - """Test PostBuffaloRequestBuffalosInnerClassesBullsPurchasesInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_calfs.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_calfs.py deleted file mode 100644 index 0c69786a..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_calfs.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_calfs import PostBuffaloRequestBuffalosInnerClassesCalfs - -class TestPostBuffaloRequestBuffalosInnerClassesCalfs(unittest.TestCase): - """PostBuffaloRequestBuffalosInnerClassesCalfs unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesCalfs: - """Test PostBuffaloRequestBuffalosInnerClassesCalfs - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesCalfs` - """ - model = PostBuffaloRequestBuffalosInnerClassesCalfs() - if include_optional: - return PostBuffaloRequestBuffalosInnerClassesCalfs( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBuffaloRequestBuffalosInnerClassesCalfs( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBuffaloRequestBuffalosInnerClassesCalfs(self): - """Test PostBuffaloRequestBuffalosInnerClassesCalfs""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_cows.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_cows.py deleted file mode 100644 index cc043407..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_cows.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_cows import PostBuffaloRequestBuffalosInnerClassesCows - -class TestPostBuffaloRequestBuffalosInnerClassesCows(unittest.TestCase): - """PostBuffaloRequestBuffalosInnerClassesCows unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesCows: - """Test PostBuffaloRequestBuffalosInnerClassesCows - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesCows` - """ - model = PostBuffaloRequestBuffalosInnerClassesCows() - if include_optional: - return PostBuffaloRequestBuffalosInnerClassesCows( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBuffaloRequestBuffalosInnerClassesCows( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBuffaloRequestBuffalosInnerClassesCows(self): - """Test PostBuffaloRequestBuffalosInnerClassesCows""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_steers.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_steers.py deleted file mode 100644 index db3e901b..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_steers.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_steers import PostBuffaloRequestBuffalosInnerClassesSteers - -class TestPostBuffaloRequestBuffalosInnerClassesSteers(unittest.TestCase): - """PostBuffaloRequestBuffalosInnerClassesSteers unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesSteers: - """Test PostBuffaloRequestBuffalosInnerClassesSteers - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesSteers` - """ - model = PostBuffaloRequestBuffalosInnerClassesSteers() - if include_optional: - return PostBuffaloRequestBuffalosInnerClassesSteers( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBuffaloRequestBuffalosInnerClassesSteers( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBuffaloRequestBuffalosInnerClassesSteers(self): - """Test PostBuffaloRequestBuffalosInnerClassesSteers""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_bulls.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_bulls.py deleted file mode 100644 index 17e461dc..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_bulls.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_bulls import PostBuffaloRequestBuffalosInnerClassesTradeBulls - -class TestPostBuffaloRequestBuffalosInnerClassesTradeBulls(unittest.TestCase): - """PostBuffaloRequestBuffalosInnerClassesTradeBulls unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesTradeBulls: - """Test PostBuffaloRequestBuffalosInnerClassesTradeBulls - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesTradeBulls` - """ - model = PostBuffaloRequestBuffalosInnerClassesTradeBulls() - if include_optional: - return PostBuffaloRequestBuffalosInnerClassesTradeBulls( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBuffaloRequestBuffalosInnerClassesTradeBulls( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBuffaloRequestBuffalosInnerClassesTradeBulls(self): - """Test PostBuffaloRequestBuffalosInnerClassesTradeBulls""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_calfs.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_calfs.py deleted file mode 100644 index 1e82e4a1..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_calfs.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_calfs import PostBuffaloRequestBuffalosInnerClassesTradeCalfs - -class TestPostBuffaloRequestBuffalosInnerClassesTradeCalfs(unittest.TestCase): - """PostBuffaloRequestBuffalosInnerClassesTradeCalfs unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesTradeCalfs: - """Test PostBuffaloRequestBuffalosInnerClassesTradeCalfs - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesTradeCalfs` - """ - model = PostBuffaloRequestBuffalosInnerClassesTradeCalfs() - if include_optional: - return PostBuffaloRequestBuffalosInnerClassesTradeCalfs( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBuffaloRequestBuffalosInnerClassesTradeCalfs( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBuffaloRequestBuffalosInnerClassesTradeCalfs(self): - """Test PostBuffaloRequestBuffalosInnerClassesTradeCalfs""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_cows.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_cows.py deleted file mode 100644 index deceb274..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_cows.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_cows import PostBuffaloRequestBuffalosInnerClassesTradeCows - -class TestPostBuffaloRequestBuffalosInnerClassesTradeCows(unittest.TestCase): - """PostBuffaloRequestBuffalosInnerClassesTradeCows unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesTradeCows: - """Test PostBuffaloRequestBuffalosInnerClassesTradeCows - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesTradeCows` - """ - model = PostBuffaloRequestBuffalosInnerClassesTradeCows() - if include_optional: - return PostBuffaloRequestBuffalosInnerClassesTradeCows( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBuffaloRequestBuffalosInnerClassesTradeCows( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBuffaloRequestBuffalosInnerClassesTradeCows(self): - """Test PostBuffaloRequestBuffalosInnerClassesTradeCows""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_steers.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_steers.py deleted file mode 100644 index 83843337..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_classes_trade_steers.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_buffalos_inner_classes_trade_steers import PostBuffaloRequestBuffalosInnerClassesTradeSteers - -class TestPostBuffaloRequestBuffalosInnerClassesTradeSteers(unittest.TestCase): - """PostBuffaloRequestBuffalosInnerClassesTradeSteers unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerClassesTradeSteers: - """Test PostBuffaloRequestBuffalosInnerClassesTradeSteers - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerClassesTradeSteers` - """ - model = PostBuffaloRequestBuffalosInnerClassesTradeSteers() - if include_optional: - return PostBuffaloRequestBuffalosInnerClassesTradeSteers( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostBuffaloRequestBuffalosInnerClassesTradeSteers( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostBuffaloRequestBuffalosInnerClassesTradeSteers(self): - """Test PostBuffaloRequestBuffalosInnerClassesTradeSteers""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_cows_calving.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_cows_calving.py deleted file mode 100644 index bdc8dbd1..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_cows_calving.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_buffalos_inner_cows_calving import PostBuffaloRequestBuffalosInnerCowsCalving - -class TestPostBuffaloRequestBuffalosInnerCowsCalving(unittest.TestCase): - """PostBuffaloRequestBuffalosInnerCowsCalving unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerCowsCalving: - """Test PostBuffaloRequestBuffalosInnerCowsCalving - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerCowsCalving` - """ - model = PostBuffaloRequestBuffalosInnerCowsCalving() - if include_optional: - return PostBuffaloRequestBuffalosInnerCowsCalving( - spring = 1.337, - summer = 1.337, - autumn = 1.337, - winter = 1.337 - ) - else: - return PostBuffaloRequestBuffalosInnerCowsCalving( - spring = 1.337, - summer = 1.337, - autumn = 1.337, - winter = 1.337, - ) - """ - - def testPostBuffaloRequestBuffalosInnerCowsCalving(self): - """Test PostBuffaloRequestBuffalosInnerCowsCalving""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_seasonal_calving.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_seasonal_calving.py deleted file mode 100644 index 73faa93f..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_buffalos_inner_seasonal_calving.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_buffalos_inner_seasonal_calving import PostBuffaloRequestBuffalosInnerSeasonalCalving - -class TestPostBuffaloRequestBuffalosInnerSeasonalCalving(unittest.TestCase): - """PostBuffaloRequestBuffalosInnerSeasonalCalving unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestBuffalosInnerSeasonalCalving: - """Test PostBuffaloRequestBuffalosInnerSeasonalCalving - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestBuffalosInnerSeasonalCalving` - """ - model = PostBuffaloRequestBuffalosInnerSeasonalCalving() - if include_optional: - return PostBuffaloRequestBuffalosInnerSeasonalCalving( - spring = 1.337, - summer = 1.337, - autumn = 1.337, - winter = 1.337 - ) - else: - return PostBuffaloRequestBuffalosInnerSeasonalCalving( - spring = 1.337, - summer = 1.337, - autumn = 1.337, - winter = 1.337, - ) - """ - - def testPostBuffaloRequestBuffalosInnerSeasonalCalving(self): - """Test PostBuffaloRequestBuffalosInnerSeasonalCalving""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_buffalo_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_buffalo_request_vegetation_inner.py deleted file mode 100644 index f8471675..00000000 --- a/examples/python-api-client/api-client/test/test_post_buffalo_request_vegetation_inner.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_buffalo_request_vegetation_inner import PostBuffaloRequestVegetationInner - -class TestPostBuffaloRequestVegetationInner(unittest.TestCase): - """PostBuffaloRequestVegetationInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostBuffaloRequestVegetationInner: - """Test PostBuffaloRequestVegetationInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostBuffaloRequestVegetationInner` - """ - model = PostBuffaloRequestVegetationInner() - if include_optional: - return PostBuffaloRequestVegetationInner( - vegetation = { - 'key' : null - }, - buffalo_proportion = [ - 1.337 - ] - ) - else: - return PostBuffaloRequestVegetationInner( - vegetation = { - 'key' : null - }, - buffalo_proportion = [ - 1.337 - ], - ) - """ - - def testPostBuffaloRequestVegetationInner(self): - """Test PostBuffaloRequestVegetationInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton200_response.py b/examples/python-api-client/api-client/test/test_post_cotton200_response.py deleted file mode 100644 index 7a72ec04..00000000 --- a/examples/python-api-client/api-client/test/test_post_cotton200_response.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_cotton200_response import PostCotton200Response - -class TestPostCotton200Response(unittest.TestCase): - """PostCotton200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostCotton200Response: - """Test PostCotton200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostCotton200Response` - """ - model = PostCotton200Response() - if include_optional: - return PostCotton200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = [ - { - 'key' : null - } - ] - ) - else: - return PostCotton200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = [ - { - 'key' : null - } - ], - ) - """ - - def testPostCotton200Response(self): - """Test PostCotton200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner.py deleted file mode 100644 index ccf9e57e..00000000 --- a/examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_cotton200_response_intermediate_inner import PostCotton200ResponseIntermediateInner - -class TestPostCotton200ResponseIntermediateInner(unittest.TestCase): - """PostCotton200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostCotton200ResponseIntermediateInner: - """Test PostCotton200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostCotton200ResponseIntermediateInner` - """ - model = PostCotton200ResponseIntermediateInner() - if include_optional: - return PostCotton200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - } - ) - else: - return PostCotton200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - ) - """ - - def testPostCotton200ResponseIntermediateInner(self): - """Test PostCotton200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner_intensities.py deleted file mode 100644 index e4616a99..00000000 --- a/examples/python-api-client/api-client/test/test_post_cotton200_response_intermediate_inner_intensities.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_cotton200_response_intermediate_inner_intensities import PostCotton200ResponseIntermediateInnerIntensities - -class TestPostCotton200ResponseIntermediateInnerIntensities(unittest.TestCase): - """PostCotton200ResponseIntermediateInnerIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostCotton200ResponseIntermediateInnerIntensities: - """Test PostCotton200ResponseIntermediateInnerIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostCotton200ResponseIntermediateInnerIntensities` - """ - model = PostCotton200ResponseIntermediateInnerIntensities() - if include_optional: - return PostCotton200ResponseIntermediateInnerIntensities( - cotton_yield_produced_tonnes = 1.337, - bales_produced = 1.337, - lint_produced_tonnes = 1.337, - seed_produced_tonnes = 1.337, - tonnes_crop_excluding_sequestration = 1.337, - tonnes_crop_including_sequestration = 1.337, - bales_excluding_sequestration = 1.337, - bales_including_sequestration = 1.337, - lint_including_sequestration = 1.337, - lint_excluding_sequestration = 1.337, - seed_including_sequestration = 1.337, - seed_excluding_sequestration = 1.337, - lint_economic_allocation = 1.337, - seed_economic_allocation = 1.337 - ) - else: - return PostCotton200ResponseIntermediateInnerIntensities( - cotton_yield_produced_tonnes = 1.337, - bales_produced = 1.337, - lint_produced_tonnes = 1.337, - seed_produced_tonnes = 1.337, - tonnes_crop_excluding_sequestration = 1.337, - tonnes_crop_including_sequestration = 1.337, - bales_excluding_sequestration = 1.337, - bales_including_sequestration = 1.337, - lint_including_sequestration = 1.337, - lint_excluding_sequestration = 1.337, - seed_including_sequestration = 1.337, - seed_excluding_sequestration = 1.337, - lint_economic_allocation = 1.337, - seed_economic_allocation = 1.337, - ) - """ - - def testPostCotton200ResponseIntermediateInnerIntensities(self): - """Test PostCotton200ResponseIntermediateInnerIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton200_response_net.py b/examples/python-api-client/api-client/test/test_post_cotton200_response_net.py deleted file mode 100644 index 9f013ae5..00000000 --- a/examples/python-api-client/api-client/test/test_post_cotton200_response_net.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_cotton200_response_net import PostCotton200ResponseNet - -class TestPostCotton200ResponseNet(unittest.TestCase): - """PostCotton200ResponseNet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostCotton200ResponseNet: - """Test PostCotton200ResponseNet - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostCotton200ResponseNet` - """ - model = PostCotton200ResponseNet() - if include_optional: - return PostCotton200ResponseNet( - total = 1.337, - crops = [ - 1.337 - ] - ) - else: - return PostCotton200ResponseNet( - total = 1.337, - crops = [ - 1.337 - ], - ) - """ - - def testPostCotton200ResponseNet(self): - """Test PostCotton200ResponseNet""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_cotton200_response_scope1.py deleted file mode 100644 index 579b7213..00000000 --- a/examples/python-api-client/api-client/test/test_post_cotton200_response_scope1.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_cotton200_response_scope1 import PostCotton200ResponseScope1 - -class TestPostCotton200ResponseScope1(unittest.TestCase): - """PostCotton200ResponseScope1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostCotton200ResponseScope1: - """Test PostCotton200ResponseScope1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostCotton200ResponseScope1` - """ - model = PostCotton200ResponseScope1() - if include_optional: - return PostCotton200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - urea_co2 = 1.337, - lime_co2 = 1.337, - fertiliser_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - crop_residue_n2_o = 1.337, - field_burning_n2_o = 1.337, - field_burning_ch4 = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337 - ) - else: - return PostCotton200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - urea_co2 = 1.337, - lime_co2 = 1.337, - fertiliser_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - crop_residue_n2_o = 1.337, - field_burning_n2_o = 1.337, - field_burning_ch4 = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337, - ) - """ - - def testPostCotton200ResponseScope1(self): - """Test PostCotton200ResponseScope1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_cotton200_response_scope3.py deleted file mode 100644 index c22cb001..00000000 --- a/examples/python-api-client/api-client/test/test_post_cotton200_response_scope3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_cotton200_response_scope3 import PostCotton200ResponseScope3 - -class TestPostCotton200ResponseScope3(unittest.TestCase): - """PostCotton200ResponseScope3 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostCotton200ResponseScope3: - """Test PostCotton200ResponseScope3 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostCotton200ResponseScope3` - """ - model = PostCotton200ResponseScope3() - if include_optional: - return PostCotton200ResponseScope3( - fertiliser = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - lime = 1.337, - total = 1.337 - ) - else: - return PostCotton200ResponseScope3( - fertiliser = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - lime = 1.337, - total = 1.337, - ) - """ - - def testPostCotton200ResponseScope3(self): - """Test PostCotton200ResponseScope3""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton_request.py b/examples/python-api-client/api-client/test/test_post_cotton_request.py deleted file mode 100644 index 0fb369ee..00000000 --- a/examples/python-api-client/api-client/test/test_post_cotton_request.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_cotton_request import PostCottonRequest - -class TestPostCottonRequest(unittest.TestCase): - """PostCottonRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostCottonRequest: - """Test PostCottonRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostCottonRequest` - """ - model = PostCottonRequest() - if include_optional: - return PostCottonRequest( - state = 'nsw', - crops = [ - { - 'key' : null - } - ], - electricity_renewable = 0, - electricity_use = 1.337, - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostCottonRequest( - state = 'nsw', - crops = [ - { - 'key' : null - } - ], - electricity_renewable = 0, - electricity_use = 1.337, - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostCottonRequest(self): - """Test PostCottonRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton_request_crops_inner.py b/examples/python-api-client/api-client/test/test_post_cotton_request_crops_inner.py deleted file mode 100644 index 4784d13c..00000000 --- a/examples/python-api-client/api-client/test/test_post_cotton_request_crops_inner.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_cotton_request_crops_inner import PostCottonRequestCropsInner - -class TestPostCottonRequestCropsInner(unittest.TestCase): - """PostCottonRequestCropsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostCottonRequestCropsInner: - """Test PostCottonRequestCropsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostCottonRequestCropsInner` - """ - model = PostCottonRequestCropsInner() - if include_optional: - return PostCottonRequestCropsInner( - id = '', - state = 'nsw', - average_cotton_yield = 1.337, - area_sown = 1.337, - average_weight_per_bale_kg = 1.337, - cotton_lint_per_bale_kg = 1.337, - cotton_seed_per_bale_kg = 1.337, - waste_per_bale_kg = 1.337, - urea_application = 1.337, - other_fertiliser_type = 'Monoammonium phosphate (MAP)', - other_fertiliser_application = 1.337, - non_urea_nitrogen = 1.337, - urea_ammonium_nitrate = 1.337, - phosphorus_application = 1.337, - potassium_application = 1.337, - sulfur_application = 1.337, - single_super_phosphate = 1.337, - rainfall_above600 = True, - fraction_of_annual_crop_burnt = 1.337, - herbicide_use = 1.337, - glyphosate_other_herbicide_use = 1.337, - electricity_allocation = 1.337, - limestone = 1.337, - limestone_fraction = 1.337, - diesel_use = 1.337, - petrol_use = 1.337, - lpg = 1.337 - ) - else: - return PostCottonRequestCropsInner( - state = 'nsw', - average_cotton_yield = 1.337, - area_sown = 1.337, - average_weight_per_bale_kg = 1.337, - cotton_lint_per_bale_kg = 1.337, - cotton_seed_per_bale_kg = 1.337, - waste_per_bale_kg = 1.337, - urea_application = 1.337, - other_fertiliser_application = 1.337, - non_urea_nitrogen = 1.337, - urea_ammonium_nitrate = 1.337, - phosphorus_application = 1.337, - potassium_application = 1.337, - sulfur_application = 1.337, - single_super_phosphate = 1.337, - rainfall_above600 = True, - fraction_of_annual_crop_burnt = 1.337, - herbicide_use = 1.337, - glyphosate_other_herbicide_use = 1.337, - electricity_allocation = 1.337, - limestone = 1.337, - limestone_fraction = 1.337, - diesel_use = 1.337, - petrol_use = 1.337, - lpg = 1.337, - ) - """ - - def testPostCottonRequestCropsInner(self): - """Test PostCottonRequestCropsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_cotton_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_cotton_request_vegetation_inner.py deleted file mode 100644 index befa6319..00000000 --- a/examples/python-api-client/api-client/test/test_post_cotton_request_vegetation_inner.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_cotton_request_vegetation_inner import PostCottonRequestVegetationInner - -class TestPostCottonRequestVegetationInner(unittest.TestCase): - """PostCottonRequestVegetationInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostCottonRequestVegetationInner: - """Test PostCottonRequestVegetationInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostCottonRequestVegetationInner` - """ - model = PostCottonRequestVegetationInner() - if include_optional: - return PostCottonRequestVegetationInner( - vegetation = { - 'key' : null - }, - allocation_to_crops = [ - 1.337 - ] - ) - else: - return PostCottonRequestVegetationInner( - vegetation = { - 'key' : null - }, - allocation_to_crops = [ - 1.337 - ], - ) - """ - - def testPostCottonRequestVegetationInner(self): - """Test PostCottonRequestVegetationInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy200_response.py b/examples/python-api-client/api-client/test/test_post_dairy200_response.py deleted file mode 100644 index 71037664..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy200_response.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy200_response import PostDairy200Response - -class TestPostDairy200Response(unittest.TestCase): - """PostDairy200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairy200Response: - """Test PostDairy200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairy200Response` - """ - model = PostDairy200Response() - if include_optional: - return PostDairy200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ] - ) - else: - return PostDairy200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - ) - """ - - def testPostDairy200Response(self): - """Test PostDairy200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_dairy200_response_intensities.py deleted file mode 100644 index 4bdc61fb..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy200_response_intensities.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy200_response_intensities import PostDairy200ResponseIntensities - -class TestPostDairy200ResponseIntensities(unittest.TestCase): - """PostDairy200ResponseIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairy200ResponseIntensities: - """Test PostDairy200ResponseIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairy200ResponseIntensities` - """ - model = PostDairy200ResponseIntensities() - if include_optional: - return PostDairy200ResponseIntensities( - milk_solids_produced_tonnes = 1.337, - intensity = 1.337 - ) - else: - return PostDairy200ResponseIntensities( - milk_solids_produced_tonnes = 1.337, - intensity = 1.337, - ) - """ - - def testPostDairy200ResponseIntensities(self): - """Test PostDairy200ResponseIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_dairy200_response_intermediate_inner.py deleted file mode 100644 index 9e6e7bf3..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy200_response_intermediate_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy200_response_intermediate_inner import PostDairy200ResponseIntermediateInner - -class TestPostDairy200ResponseIntermediateInner(unittest.TestCase): - """PostDairy200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairy200ResponseIntermediateInner: - """Test PostDairy200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairy200ResponseIntermediateInner` - """ - model = PostDairy200ResponseIntermediateInner() - if include_optional: - return PostDairy200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - } - ) - else: - return PostDairy200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - ) - """ - - def testPostDairy200ResponseIntermediateInner(self): - """Test PostDairy200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy200_response_net.py b/examples/python-api-client/api-client/test/test_post_dairy200_response_net.py deleted file mode 100644 index 9f4b5dfb..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy200_response_net.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy200_response_net import PostDairy200ResponseNet - -class TestPostDairy200ResponseNet(unittest.TestCase): - """PostDairy200ResponseNet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairy200ResponseNet: - """Test PostDairy200ResponseNet - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairy200ResponseNet` - """ - model = PostDairy200ResponseNet() - if include_optional: - return PostDairy200ResponseNet( - total = 1.337 - ) - else: - return PostDairy200ResponseNet( - total = 1.337, - ) - """ - - def testPostDairy200ResponseNet(self): - """Test PostDairy200ResponseNet""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_dairy200_response_scope1.py deleted file mode 100644 index 29a3c411..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy200_response_scope1.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy200_response_scope1 import PostDairy200ResponseScope1 - -class TestPostDairy200ResponseScope1(unittest.TestCase): - """PostDairy200ResponseScope1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairy200ResponseScope1: - """Test PostDairy200ResponseScope1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairy200ResponseScope1` - """ - model = PostDairy200ResponseScope1() - if include_optional: - return PostDairy200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - urea_co2 = 1.337, - lime_co2 = 1.337, - enteric_ch4 = 1.337, - manure_management_ch4 = 1.337, - manure_management_n2_o = 1.337, - animal_waste_n2_o = 1.337, - fertiliser_n2_o = 1.337, - urine_and_dung_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - transport_n2_o = 1.337, - transport_ch4 = 1.337, - transport_co2 = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337 - ) - else: - return PostDairy200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - urea_co2 = 1.337, - lime_co2 = 1.337, - enteric_ch4 = 1.337, - manure_management_ch4 = 1.337, - manure_management_n2_o = 1.337, - animal_waste_n2_o = 1.337, - fertiliser_n2_o = 1.337, - urine_and_dung_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - transport_n2_o = 1.337, - transport_ch4 = 1.337, - transport_co2 = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337, - ) - """ - - def testPostDairy200ResponseScope1(self): - """Test PostDairy200ResponseScope1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_dairy200_response_scope3.py deleted file mode 100644 index 3312c804..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy200_response_scope3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy200_response_scope3 import PostDairy200ResponseScope3 - -class TestPostDairy200ResponseScope3(unittest.TestCase): - """PostDairy200ResponseScope3 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairy200ResponseScope3: - """Test PostDairy200ResponseScope3 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairy200ResponseScope3` - """ - model = PostDairy200ResponseScope3() - if include_optional: - return PostDairy200ResponseScope3( - fertiliser = 1.337, - purchased_feed = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - lime = 1.337, - total = 1.337 - ) - else: - return PostDairy200ResponseScope3( - fertiliser = 1.337, - purchased_feed = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - lime = 1.337, - total = 1.337, - ) - """ - - def testPostDairy200ResponseScope3(self): - """Test PostDairy200ResponseScope3""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request.py b/examples/python-api-client/api-client/test/test_post_dairy_request.py deleted file mode 100644 index 525fadc3..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy_request.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy_request import PostDairyRequest - -class TestPostDairyRequest(unittest.TestCase): - """PostDairyRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairyRequest: - """Test PostDairyRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairyRequest` - """ - model = PostDairyRequest() - if include_optional: - return PostDairyRequest( - state = 'nsw', - rainfall_above600 = True, - production_system = 'Non-irrigated Crop', - dairy = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostDairyRequest( - state = 'nsw', - rainfall_above600 = True, - production_system = 'Non-irrigated Crop', - dairy = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostDairyRequest(self): - """Test PostDairyRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner.py deleted file mode 100644 index dd2346d8..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy_request_dairy_inner import PostDairyRequestDairyInner - -class TestPostDairyRequestDairyInner(unittest.TestCase): - """PostDairyRequestDairyInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairyRequestDairyInner: - """Test PostDairyRequestDairyInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairyRequestDairyInner` - """ - model = PostDairyRequestDairyInner() - if include_optional: - return PostDairyRequestDairyInner( - id = '', - classes = { - 'key' : null - }, - limestone = 1.337, - limestone_fraction = 1.337, - fertiliser = { - 'key' : null - }, - seasonal_fertiliser = { - 'key' : null - }, - areas = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - electricity_renewable = 0, - electricity_use = 1.337, - grain_feed = 1.337, - hay_feed = 1.337, - cottonseed_feed = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - manure_management_milking_cows = { - 'key' : null - }, - manure_management_other_dairy_cows = { - 'key' : null - }, - emissions_allocation_to_red_meat_production = 0, - truck_type = '4 Deck Trailer', - distance_cattle_transported = 1.337 - ) - else: - return PostDairyRequestDairyInner( - classes = { - 'key' : null - }, - limestone = 1.337, - limestone_fraction = 1.337, - fertiliser = { - 'key' : null - }, - seasonal_fertiliser = { - 'key' : null - }, - areas = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - electricity_renewable = 0, - electricity_use = 1.337, - grain_feed = 1.337, - hay_feed = 1.337, - cottonseed_feed = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - manure_management_milking_cows = { - 'key' : null - }, - manure_management_other_dairy_cows = { - 'key' : null - }, - emissions_allocation_to_red_meat_production = 0, - truck_type = '4 Deck Trailer', - distance_cattle_transported = 1.337, - ) - """ - - def testPostDairyRequestDairyInner(self): - """Test PostDairyRequestDairyInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_areas.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_areas.py deleted file mode 100644 index 71fcbf58..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_areas.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy_request_dairy_inner_areas import PostDairyRequestDairyInnerAreas - -class TestPostDairyRequestDairyInnerAreas(unittest.TestCase): - """PostDairyRequestDairyInnerAreas unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairyRequestDairyInnerAreas: - """Test PostDairyRequestDairyInnerAreas - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairyRequestDairyInnerAreas` - """ - model = PostDairyRequestDairyInnerAreas() - if include_optional: - return PostDairyRequestDairyInnerAreas( - cropped_dryland = 1.337, - cropped_irrigated = 1.337, - improved_pasture_dryland = 1.337, - improved_pasture_irrigated = 1.337 - ) - else: - return PostDairyRequestDairyInnerAreas( - cropped_dryland = 1.337, - cropped_irrigated = 1.337, - improved_pasture_dryland = 1.337, - improved_pasture_irrigated = 1.337, - ) - """ - - def testPostDairyRequestDairyInnerAreas(self): - """Test PostDairyRequestDairyInnerAreas""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes.py deleted file mode 100644 index 525a897c..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy_request_dairy_inner_classes import PostDairyRequestDairyInnerClasses - -class TestPostDairyRequestDairyInnerClasses(unittest.TestCase): - """PostDairyRequestDairyInnerClasses unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairyRequestDairyInnerClasses: - """Test PostDairyRequestDairyInnerClasses - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairyRequestDairyInnerClasses` - """ - model = PostDairyRequestDairyInnerClasses() - if include_optional: - return PostDairyRequestDairyInnerClasses( - milking_cows = { - 'key' : null - }, - heifers_lt1 = { - 'key' : null - }, - heifers_gt1 = { - 'key' : null - }, - dairy_bulls_lt1 = { - 'key' : null - }, - dairy_bulls_gt1 = { - 'key' : null - } - ) - else: - return PostDairyRequestDairyInnerClasses( - milking_cows = { - 'key' : null - }, - heifers_lt1 = { - 'key' : null - }, - heifers_gt1 = { - 'key' : null - }, - dairy_bulls_lt1 = { - 'key' : null - }, - dairy_bulls_gt1 = { - 'key' : null - }, - ) - """ - - def testPostDairyRequestDairyInnerClasses(self): - """Test PostDairyRequestDairyInnerClasses""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py deleted file mode 100644 index 5ee15d1e..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_gt1.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy_request_dairy_inner_classes_dairy_bulls_gt1 import PostDairyRequestDairyInnerClassesDairyBullsGt1 - -class TestPostDairyRequestDairyInnerClassesDairyBullsGt1(unittest.TestCase): - """PostDairyRequestDairyInnerClassesDairyBullsGt1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairyRequestDairyInnerClassesDairyBullsGt1: - """Test PostDairyRequestDairyInnerClassesDairyBullsGt1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairyRequestDairyInnerClassesDairyBullsGt1` - """ - model = PostDairyRequestDairyInnerClassesDairyBullsGt1() - if include_optional: - return PostDairyRequestDairyInnerClassesDairyBullsGt1( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - } - ) - else: - return PostDairyRequestDairyInnerClassesDairyBullsGt1( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - ) - """ - - def testPostDairyRequestDairyInnerClassesDairyBullsGt1(self): - """Test PostDairyRequestDairyInnerClassesDairyBullsGt1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py deleted file mode 100644 index 27994d6d..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_dairy_bulls_lt1.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy_request_dairy_inner_classes_dairy_bulls_lt1 import PostDairyRequestDairyInnerClassesDairyBullsLt1 - -class TestPostDairyRequestDairyInnerClassesDairyBullsLt1(unittest.TestCase): - """PostDairyRequestDairyInnerClassesDairyBullsLt1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairyRequestDairyInnerClassesDairyBullsLt1: - """Test PostDairyRequestDairyInnerClassesDairyBullsLt1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairyRequestDairyInnerClassesDairyBullsLt1` - """ - model = PostDairyRequestDairyInnerClassesDairyBullsLt1() - if include_optional: - return PostDairyRequestDairyInnerClassesDairyBullsLt1( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - } - ) - else: - return PostDairyRequestDairyInnerClassesDairyBullsLt1( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - ) - """ - - def testPostDairyRequestDairyInnerClassesDairyBullsLt1(self): - """Test PostDairyRequestDairyInnerClassesDairyBullsLt1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_gt1.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_gt1.py deleted file mode 100644 index 3a70b394..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_gt1.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy_request_dairy_inner_classes_heifers_gt1 import PostDairyRequestDairyInnerClassesHeifersGt1 - -class TestPostDairyRequestDairyInnerClassesHeifersGt1(unittest.TestCase): - """PostDairyRequestDairyInnerClassesHeifersGt1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairyRequestDairyInnerClassesHeifersGt1: - """Test PostDairyRequestDairyInnerClassesHeifersGt1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairyRequestDairyInnerClassesHeifersGt1` - """ - model = PostDairyRequestDairyInnerClassesHeifersGt1() - if include_optional: - return PostDairyRequestDairyInnerClassesHeifersGt1( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - } - ) - else: - return PostDairyRequestDairyInnerClassesHeifersGt1( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - ) - """ - - def testPostDairyRequestDairyInnerClassesHeifersGt1(self): - """Test PostDairyRequestDairyInnerClassesHeifersGt1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_lt1.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_lt1.py deleted file mode 100644 index 345814d8..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_heifers_lt1.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy_request_dairy_inner_classes_heifers_lt1 import PostDairyRequestDairyInnerClassesHeifersLt1 - -class TestPostDairyRequestDairyInnerClassesHeifersLt1(unittest.TestCase): - """PostDairyRequestDairyInnerClassesHeifersLt1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairyRequestDairyInnerClassesHeifersLt1: - """Test PostDairyRequestDairyInnerClassesHeifersLt1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairyRequestDairyInnerClassesHeifersLt1` - """ - model = PostDairyRequestDairyInnerClassesHeifersLt1() - if include_optional: - return PostDairyRequestDairyInnerClassesHeifersLt1( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - } - ) - else: - return PostDairyRequestDairyInnerClassesHeifersLt1( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - ) - """ - - def testPostDairyRequestDairyInnerClassesHeifersLt1(self): - """Test PostDairyRequestDairyInnerClassesHeifersLt1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows.py deleted file mode 100644 index 11718a5d..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows import PostDairyRequestDairyInnerClassesMilkingCows - -class TestPostDairyRequestDairyInnerClassesMilkingCows(unittest.TestCase): - """PostDairyRequestDairyInnerClassesMilkingCows unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairyRequestDairyInnerClassesMilkingCows: - """Test PostDairyRequestDairyInnerClassesMilkingCows - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairyRequestDairyInnerClassesMilkingCows` - """ - model = PostDairyRequestDairyInnerClassesMilkingCows() - if include_optional: - return PostDairyRequestDairyInnerClassesMilkingCows( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - } - ) - else: - return PostDairyRequestDairyInnerClassesMilkingCows( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - ) - """ - - def testPostDairyRequestDairyInnerClassesMilkingCows(self): - """Test PostDairyRequestDairyInnerClassesMilkingCows""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows_autumn.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows_autumn.py deleted file mode 100644 index 31134649..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_classes_milking_cows_autumn.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy_request_dairy_inner_classes_milking_cows_autumn import PostDairyRequestDairyInnerClassesMilkingCowsAutumn - -class TestPostDairyRequestDairyInnerClassesMilkingCowsAutumn(unittest.TestCase): - """PostDairyRequestDairyInnerClassesMilkingCowsAutumn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairyRequestDairyInnerClassesMilkingCowsAutumn: - """Test PostDairyRequestDairyInnerClassesMilkingCowsAutumn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairyRequestDairyInnerClassesMilkingCowsAutumn` - """ - model = PostDairyRequestDairyInnerClassesMilkingCowsAutumn() - if include_optional: - return PostDairyRequestDairyInnerClassesMilkingCowsAutumn( - head = 1.337, - liveweight = 1.337, - liveweight_gain = 1.337, - crude_protein = 1.337, - dry_matter_digestibility = 1.337, - milk_production = 1.337 - ) - else: - return PostDairyRequestDairyInnerClassesMilkingCowsAutumn( - head = 1.337, - liveweight = 1.337, - liveweight_gain = 1.337, - ) - """ - - def testPostDairyRequestDairyInnerClassesMilkingCowsAutumn(self): - """Test PostDairyRequestDairyInnerClassesMilkingCowsAutumn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_manure_management_milking_cows.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_manure_management_milking_cows.py deleted file mode 100644 index a8495b90..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_manure_management_milking_cows.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy_request_dairy_inner_manure_management_milking_cows import PostDairyRequestDairyInnerManureManagementMilkingCows - -class TestPostDairyRequestDairyInnerManureManagementMilkingCows(unittest.TestCase): - """PostDairyRequestDairyInnerManureManagementMilkingCows unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairyRequestDairyInnerManureManagementMilkingCows: - """Test PostDairyRequestDairyInnerManureManagementMilkingCows - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairyRequestDairyInnerManureManagementMilkingCows` - """ - model = PostDairyRequestDairyInnerManureManagementMilkingCows() - if include_optional: - return PostDairyRequestDairyInnerManureManagementMilkingCows( - pasture = 0, - anaerobic_lagoon = 0, - sump_and_dispersal = 0, - drain_to_paddocks = 0, - soild_storage = 0 - ) - else: - return PostDairyRequestDairyInnerManureManagementMilkingCows( - pasture = 0, - anaerobic_lagoon = 0, - sump_and_dispersal = 0, - drain_to_paddocks = 0, - soild_storage = 0, - ) - """ - - def testPostDairyRequestDairyInnerManureManagementMilkingCows(self): - """Test PostDairyRequestDairyInnerManureManagementMilkingCows""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser.py deleted file mode 100644 index b71914a4..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy_request_dairy_inner_seasonal_fertiliser import PostDairyRequestDairyInnerSeasonalFertiliser - -class TestPostDairyRequestDairyInnerSeasonalFertiliser(unittest.TestCase): - """PostDairyRequestDairyInnerSeasonalFertiliser unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairyRequestDairyInnerSeasonalFertiliser: - """Test PostDairyRequestDairyInnerSeasonalFertiliser - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairyRequestDairyInnerSeasonalFertiliser` - """ - model = PostDairyRequestDairyInnerSeasonalFertiliser() - if include_optional: - return PostDairyRequestDairyInnerSeasonalFertiliser( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - } - ) - else: - return PostDairyRequestDairyInnerSeasonalFertiliser( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - ) - """ - - def testPostDairyRequestDairyInnerSeasonalFertiliser(self): - """Test PostDairyRequestDairyInnerSeasonalFertiliser""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py b/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py deleted file mode 100644 index 1e0fbb19..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy_request_dairy_inner_seasonal_fertiliser_autumn.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy_request_dairy_inner_seasonal_fertiliser_autumn import PostDairyRequestDairyInnerSeasonalFertiliserAutumn - -class TestPostDairyRequestDairyInnerSeasonalFertiliserAutumn(unittest.TestCase): - """PostDairyRequestDairyInnerSeasonalFertiliserAutumn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairyRequestDairyInnerSeasonalFertiliserAutumn: - """Test PostDairyRequestDairyInnerSeasonalFertiliserAutumn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairyRequestDairyInnerSeasonalFertiliserAutumn` - """ - model = PostDairyRequestDairyInnerSeasonalFertiliserAutumn() - if include_optional: - return PostDairyRequestDairyInnerSeasonalFertiliserAutumn( - crops_irrigated = 1.337, - crops_dryland = 1.337, - pasture_irrigated = 1.337, - pasture_dryland = 1.337 - ) - else: - return PostDairyRequestDairyInnerSeasonalFertiliserAutumn( - crops_irrigated = 1.337, - crops_dryland = 1.337, - pasture_irrigated = 1.337, - pasture_dryland = 1.337, - ) - """ - - def testPostDairyRequestDairyInnerSeasonalFertiliserAutumn(self): - """Test PostDairyRequestDairyInnerSeasonalFertiliserAutumn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_dairy_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_dairy_request_vegetation_inner.py deleted file mode 100644 index 6d957ca1..00000000 --- a/examples/python-api-client/api-client/test/test_post_dairy_request_vegetation_inner.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_dairy_request_vegetation_inner import PostDairyRequestVegetationInner - -class TestPostDairyRequestVegetationInner(unittest.TestCase): - """PostDairyRequestVegetationInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDairyRequestVegetationInner: - """Test PostDairyRequestVegetationInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDairyRequestVegetationInner` - """ - model = PostDairyRequestVegetationInner() - if include_optional: - return PostDairyRequestVegetationInner( - vegetation = { - 'key' : null - }, - dairy_proportion = [ - 1.337 - ] - ) - else: - return PostDairyRequestVegetationInner( - vegetation = { - 'key' : null - }, - dairy_proportion = [ - 1.337 - ], - ) - """ - - def testPostDairyRequestVegetationInner(self): - """Test PostDairyRequestVegetationInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer200_response.py b/examples/python-api-client/api-client/test/test_post_deer200_response.py deleted file mode 100644 index 2e0d0aa0..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer200_response.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer200_response import PostDeer200Response - -class TestPostDeer200Response(unittest.TestCase): - """PostDeer200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeer200Response: - """Test PostDeer200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeer200Response` - """ - model = PostDeer200Response() - if include_optional: - return PostDeer200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ] - ) - else: - return PostDeer200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - ) - """ - - def testPostDeer200Response(self): - """Test PostDeer200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_deer200_response_intensities.py deleted file mode 100644 index cf641d12..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer200_response_intensities.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer200_response_intensities import PostDeer200ResponseIntensities - -class TestPostDeer200ResponseIntensities(unittest.TestCase): - """PostDeer200ResponseIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeer200ResponseIntensities: - """Test PostDeer200ResponseIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeer200ResponseIntensities` - """ - model = PostDeer200ResponseIntensities() - if include_optional: - return PostDeer200ResponseIntensities( - liveweight_produced_kg = 1.337, - deer_meat_excluding_sequestration = 1.337, - deer_meat_including_sequestration = 1.337 - ) - else: - return PostDeer200ResponseIntensities( - liveweight_produced_kg = 1.337, - deer_meat_excluding_sequestration = 1.337, - deer_meat_including_sequestration = 1.337, - ) - """ - - def testPostDeer200ResponseIntensities(self): - """Test PostDeer200ResponseIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_deer200_response_intermediate_inner.py deleted file mode 100644 index 7abc9351..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer200_response_intermediate_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer200_response_intermediate_inner import PostDeer200ResponseIntermediateInner - -class TestPostDeer200ResponseIntermediateInner(unittest.TestCase): - """PostDeer200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeer200ResponseIntermediateInner: - """Test PostDeer200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeer200ResponseIntermediateInner` - """ - model = PostDeer200ResponseIntermediateInner() - if include_optional: - return PostDeer200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - } - ) - else: - return PostDeer200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - ) - """ - - def testPostDeer200ResponseIntermediateInner(self): - """Test PostDeer200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer200_response_net.py b/examples/python-api-client/api-client/test/test_post_deer200_response_net.py deleted file mode 100644 index e8d0a744..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer200_response_net.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer200_response_net import PostDeer200ResponseNet - -class TestPostDeer200ResponseNet(unittest.TestCase): - """PostDeer200ResponseNet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeer200ResponseNet: - """Test PostDeer200ResponseNet - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeer200ResponseNet` - """ - model = PostDeer200ResponseNet() - if include_optional: - return PostDeer200ResponseNet( - total = 1.337 - ) - else: - return PostDeer200ResponseNet( - total = 1.337, - ) - """ - - def testPostDeer200ResponseNet(self): - """Test PostDeer200ResponseNet""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request.py b/examples/python-api-client/api-client/test/test_post_deer_request.py deleted file mode 100644 index e8571d13..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer_request.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer_request import PostDeerRequest - -class TestPostDeerRequest(unittest.TestCase): - """PostDeerRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeerRequest: - """Test PostDeerRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeerRequest` - """ - model = PostDeerRequest() - if include_optional: - return PostDeerRequest( - state = 'nsw', - rainfall_above600 = True, - deers = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostDeerRequest( - state = 'nsw', - rainfall_above600 = True, - deers = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostDeerRequest(self): - """Test PostDeerRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner.py deleted file mode 100644 index 6833b01a..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer_request_deers_inner import PostDeerRequestDeersInner - -class TestPostDeerRequestDeersInner(unittest.TestCase): - """PostDeerRequestDeersInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeerRequestDeersInner: - """Test PostDeerRequestDeersInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeerRequestDeersInner` - """ - model = PostDeerRequestDeersInner() - if include_optional: - return PostDeerRequestDeersInner( - id = '', - classes = { - 'key' : null - }, - limestone = 1.337, - limestone_fraction = 1.337, - fertiliser = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - grain_feed = 1.337, - hay_feed = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - does_fawning = { - 'key' : null - }, - seasonal_fawning = { - 'key' : null - } - ) - else: - return PostDeerRequestDeersInner( - classes = { - 'key' : null - }, - limestone = 1.337, - limestone_fraction = 1.337, - fertiliser = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - grain_feed = 1.337, - hay_feed = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - does_fawning = { - 'key' : null - }, - seasonal_fawning = { - 'key' : null - }, - ) - """ - - def testPostDeerRequestDeersInner(self): - """Test PostDeerRequestDeersInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes.py deleted file mode 100644 index 6cdf3798..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer_request_deers_inner_classes import PostDeerRequestDeersInnerClasses - -class TestPostDeerRequestDeersInnerClasses(unittest.TestCase): - """PostDeerRequestDeersInnerClasses unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClasses: - """Test PostDeerRequestDeersInnerClasses - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeerRequestDeersInnerClasses` - """ - model = PostDeerRequestDeersInnerClasses() - if include_optional: - return PostDeerRequestDeersInnerClasses( - bucks = { - 'key' : null - }, - trade_bucks = { - 'key' : null - }, - breeding_does = { - 'key' : null - }, - trade_does = { - 'key' : null - }, - other_does = { - 'key' : null - }, - trade_other_does = { - 'key' : null - }, - fawn = { - 'key' : null - }, - trade_fawn = { - 'key' : null - } - ) - else: - return PostDeerRequestDeersInnerClasses( - ) - """ - - def testPostDeerRequestDeersInnerClasses(self): - """Test PostDeerRequestDeersInnerClasses""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_breeding_does.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_breeding_does.py deleted file mode 100644 index a23a8a66..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_breeding_does.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer_request_deers_inner_classes_breeding_does import PostDeerRequestDeersInnerClassesBreedingDoes - -class TestPostDeerRequestDeersInnerClassesBreedingDoes(unittest.TestCase): - """PostDeerRequestDeersInnerClassesBreedingDoes unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesBreedingDoes: - """Test PostDeerRequestDeersInnerClassesBreedingDoes - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesBreedingDoes` - """ - model = PostDeerRequestDeersInnerClassesBreedingDoes() - if include_optional: - return PostDeerRequestDeersInnerClassesBreedingDoes( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostDeerRequestDeersInnerClassesBreedingDoes( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostDeerRequestDeersInnerClassesBreedingDoes(self): - """Test PostDeerRequestDeersInnerClassesBreedingDoes""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_bucks.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_bucks.py deleted file mode 100644 index 17278d54..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_bucks.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer_request_deers_inner_classes_bucks import PostDeerRequestDeersInnerClassesBucks - -class TestPostDeerRequestDeersInnerClassesBucks(unittest.TestCase): - """PostDeerRequestDeersInnerClassesBucks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesBucks: - """Test PostDeerRequestDeersInnerClassesBucks - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesBucks` - """ - model = PostDeerRequestDeersInnerClassesBucks() - if include_optional: - return PostDeerRequestDeersInnerClassesBucks( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostDeerRequestDeersInnerClassesBucks( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostDeerRequestDeersInnerClassesBucks(self): - """Test PostDeerRequestDeersInnerClassesBucks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_fawn.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_fawn.py deleted file mode 100644 index 8895b114..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_fawn.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer_request_deers_inner_classes_fawn import PostDeerRequestDeersInnerClassesFawn - -class TestPostDeerRequestDeersInnerClassesFawn(unittest.TestCase): - """PostDeerRequestDeersInnerClassesFawn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesFawn: - """Test PostDeerRequestDeersInnerClassesFawn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesFawn` - """ - model = PostDeerRequestDeersInnerClassesFawn() - if include_optional: - return PostDeerRequestDeersInnerClassesFawn( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostDeerRequestDeersInnerClassesFawn( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostDeerRequestDeersInnerClassesFawn(self): - """Test PostDeerRequestDeersInnerClassesFawn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_other_does.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_other_does.py deleted file mode 100644 index 282434e4..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_other_does.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer_request_deers_inner_classes_other_does import PostDeerRequestDeersInnerClassesOtherDoes - -class TestPostDeerRequestDeersInnerClassesOtherDoes(unittest.TestCase): - """PostDeerRequestDeersInnerClassesOtherDoes unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesOtherDoes: - """Test PostDeerRequestDeersInnerClassesOtherDoes - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesOtherDoes` - """ - model = PostDeerRequestDeersInnerClassesOtherDoes() - if include_optional: - return PostDeerRequestDeersInnerClassesOtherDoes( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostDeerRequestDeersInnerClassesOtherDoes( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostDeerRequestDeersInnerClassesOtherDoes(self): - """Test PostDeerRequestDeersInnerClassesOtherDoes""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_bucks.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_bucks.py deleted file mode 100644 index 47e1c625..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_bucks.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer_request_deers_inner_classes_trade_bucks import PostDeerRequestDeersInnerClassesTradeBucks - -class TestPostDeerRequestDeersInnerClassesTradeBucks(unittest.TestCase): - """PostDeerRequestDeersInnerClassesTradeBucks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesTradeBucks: - """Test PostDeerRequestDeersInnerClassesTradeBucks - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesTradeBucks` - """ - model = PostDeerRequestDeersInnerClassesTradeBucks() - if include_optional: - return PostDeerRequestDeersInnerClassesTradeBucks( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostDeerRequestDeersInnerClassesTradeBucks( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostDeerRequestDeersInnerClassesTradeBucks(self): - """Test PostDeerRequestDeersInnerClassesTradeBucks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_does.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_does.py deleted file mode 100644 index 23fa187e..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_does.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer_request_deers_inner_classes_trade_does import PostDeerRequestDeersInnerClassesTradeDoes - -class TestPostDeerRequestDeersInnerClassesTradeDoes(unittest.TestCase): - """PostDeerRequestDeersInnerClassesTradeDoes unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesTradeDoes: - """Test PostDeerRequestDeersInnerClassesTradeDoes - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesTradeDoes` - """ - model = PostDeerRequestDeersInnerClassesTradeDoes() - if include_optional: - return PostDeerRequestDeersInnerClassesTradeDoes( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostDeerRequestDeersInnerClassesTradeDoes( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostDeerRequestDeersInnerClassesTradeDoes(self): - """Test PostDeerRequestDeersInnerClassesTradeDoes""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_fawn.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_fawn.py deleted file mode 100644 index 8e4a00e2..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_fawn.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer_request_deers_inner_classes_trade_fawn import PostDeerRequestDeersInnerClassesTradeFawn - -class TestPostDeerRequestDeersInnerClassesTradeFawn(unittest.TestCase): - """PostDeerRequestDeersInnerClassesTradeFawn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesTradeFawn: - """Test PostDeerRequestDeersInnerClassesTradeFawn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesTradeFawn` - """ - model = PostDeerRequestDeersInnerClassesTradeFawn() - if include_optional: - return PostDeerRequestDeersInnerClassesTradeFawn( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostDeerRequestDeersInnerClassesTradeFawn( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostDeerRequestDeersInnerClassesTradeFawn(self): - """Test PostDeerRequestDeersInnerClassesTradeFawn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_other_does.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_other_does.py deleted file mode 100644 index e827eb8f..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_classes_trade_other_does.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer_request_deers_inner_classes_trade_other_does import PostDeerRequestDeersInnerClassesTradeOtherDoes - -class TestPostDeerRequestDeersInnerClassesTradeOtherDoes(unittest.TestCase): - """PostDeerRequestDeersInnerClassesTradeOtherDoes unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeerRequestDeersInnerClassesTradeOtherDoes: - """Test PostDeerRequestDeersInnerClassesTradeOtherDoes - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeerRequestDeersInnerClassesTradeOtherDoes` - """ - model = PostDeerRequestDeersInnerClassesTradeOtherDoes() - if include_optional: - return PostDeerRequestDeersInnerClassesTradeOtherDoes( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostDeerRequestDeersInnerClassesTradeOtherDoes( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostDeerRequestDeersInnerClassesTradeOtherDoes(self): - """Test PostDeerRequestDeersInnerClassesTradeOtherDoes""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_does_fawning.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_does_fawning.py deleted file mode 100644 index fc30d97c..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_does_fawning.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer_request_deers_inner_does_fawning import PostDeerRequestDeersInnerDoesFawning - -class TestPostDeerRequestDeersInnerDoesFawning(unittest.TestCase): - """PostDeerRequestDeersInnerDoesFawning unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeerRequestDeersInnerDoesFawning: - """Test PostDeerRequestDeersInnerDoesFawning - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeerRequestDeersInnerDoesFawning` - """ - model = PostDeerRequestDeersInnerDoesFawning() - if include_optional: - return PostDeerRequestDeersInnerDoesFawning( - spring = 1.337, - summer = 1.337, - autumn = 1.337, - winter = 1.337 - ) - else: - return PostDeerRequestDeersInnerDoesFawning( - spring = 1.337, - summer = 1.337, - autumn = 1.337, - winter = 1.337, - ) - """ - - def testPostDeerRequestDeersInnerDoesFawning(self): - """Test PostDeerRequestDeersInnerDoesFawning""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_seasonal_fawning.py b/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_seasonal_fawning.py deleted file mode 100644 index 7f4ead75..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer_request_deers_inner_seasonal_fawning.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer_request_deers_inner_seasonal_fawning import PostDeerRequestDeersInnerSeasonalFawning - -class TestPostDeerRequestDeersInnerSeasonalFawning(unittest.TestCase): - """PostDeerRequestDeersInnerSeasonalFawning unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeerRequestDeersInnerSeasonalFawning: - """Test PostDeerRequestDeersInnerSeasonalFawning - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeerRequestDeersInnerSeasonalFawning` - """ - model = PostDeerRequestDeersInnerSeasonalFawning() - if include_optional: - return PostDeerRequestDeersInnerSeasonalFawning( - spring = 1.337, - summer = 1.337, - autumn = 1.337, - winter = 1.337 - ) - else: - return PostDeerRequestDeersInnerSeasonalFawning( - spring = 1.337, - summer = 1.337, - autumn = 1.337, - winter = 1.337, - ) - """ - - def testPostDeerRequestDeersInnerSeasonalFawning(self): - """Test PostDeerRequestDeersInnerSeasonalFawning""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_deer_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_deer_request_vegetation_inner.py deleted file mode 100644 index b9dcc51f..00000000 --- a/examples/python-api-client/api-client/test/test_post_deer_request_vegetation_inner.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_deer_request_vegetation_inner import PostDeerRequestVegetationInner - -class TestPostDeerRequestVegetationInner(unittest.TestCase): - """PostDeerRequestVegetationInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeerRequestVegetationInner: - """Test PostDeerRequestVegetationInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeerRequestVegetationInner` - """ - model = PostDeerRequestVegetationInner() - if include_optional: - return PostDeerRequestVegetationInner( - vegetation = { - 'key' : null - }, - deer_proportion = [ - 1.337 - ] - ) - else: - return PostDeerRequestVegetationInner( - vegetation = { - 'key' : null - }, - deer_proportion = [ - 1.337 - ], - ) - """ - - def testPostDeerRequestVegetationInner(self): - """Test PostDeerRequestVegetationInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot200_response.py b/examples/python-api-client/api-client/test/test_post_feedlot200_response.py deleted file mode 100644 index 6f6fc466..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot200_response.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot200_response import PostFeedlot200Response - -class TestPostFeedlot200Response(unittest.TestCase): - """PostFeedlot200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlot200Response: - """Test PostFeedlot200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlot200Response` - """ - model = PostFeedlot200Response() - if include_optional: - return PostFeedlot200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = { - 'key' : null - } - ) - else: - return PostFeedlot200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - ) - """ - - def testPostFeedlot200Response(self): - """Test PostFeedlot200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner.py deleted file mode 100644 index 1a28f739..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot200_response_intermediate_inner import PostFeedlot200ResponseIntermediateInner - -class TestPostFeedlot200ResponseIntermediateInner(unittest.TestCase): - """PostFeedlot200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlot200ResponseIntermediateInner: - """Test PostFeedlot200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlot200ResponseIntermediateInner` - """ - model = PostFeedlot200ResponseIntermediateInner() - if include_optional: - return PostFeedlot200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - } - ) - else: - return PostFeedlot200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - ) - """ - - def testPostFeedlot200ResponseIntermediateInner(self): - """Test PostFeedlot200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_intensities.py deleted file mode 100644 index 3261312b..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_intensities.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot200_response_intermediate_inner_intensities import PostFeedlot200ResponseIntermediateInnerIntensities - -class TestPostFeedlot200ResponseIntermediateInnerIntensities(unittest.TestCase): - """PostFeedlot200ResponseIntermediateInnerIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlot200ResponseIntermediateInnerIntensities: - """Test PostFeedlot200ResponseIntermediateInnerIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlot200ResponseIntermediateInnerIntensities` - """ - model = PostFeedlot200ResponseIntermediateInnerIntensities() - if include_optional: - return PostFeedlot200ResponseIntermediateInnerIntensities( - liveweight_produced_kg = 1.337, - beef_including_sequestration = 1.337, - beef_excluding_sequestration = 1.337 - ) - else: - return PostFeedlot200ResponseIntermediateInnerIntensities( - liveweight_produced_kg = 1.337, - beef_including_sequestration = 1.337, - beef_excluding_sequestration = 1.337, - ) - """ - - def testPostFeedlot200ResponseIntermediateInnerIntensities(self): - """Test PostFeedlot200ResponseIntermediateInnerIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_net.py b/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_net.py deleted file mode 100644 index 21915220..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot200_response_intermediate_inner_net.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot200_response_intermediate_inner_net import PostFeedlot200ResponseIntermediateInnerNet - -class TestPostFeedlot200ResponseIntermediateInnerNet(unittest.TestCase): - """PostFeedlot200ResponseIntermediateInnerNet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlot200ResponseIntermediateInnerNet: - """Test PostFeedlot200ResponseIntermediateInnerNet - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlot200ResponseIntermediateInnerNet` - """ - model = PostFeedlot200ResponseIntermediateInnerNet() - if include_optional: - return PostFeedlot200ResponseIntermediateInnerNet( - total = 1.337 - ) - else: - return PostFeedlot200ResponseIntermediateInnerNet( - total = 1.337, - ) - """ - - def testPostFeedlot200ResponseIntermediateInnerNet(self): - """Test PostFeedlot200ResponseIntermediateInnerNet""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_feedlot200_response_scope1.py deleted file mode 100644 index f9f26ada..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot200_response_scope1.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot200_response_scope1 import PostFeedlot200ResponseScope1 - -class TestPostFeedlot200ResponseScope1(unittest.TestCase): - """PostFeedlot200ResponseScope1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlot200ResponseScope1: - """Test PostFeedlot200ResponseScope1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlot200ResponseScope1` - """ - model = PostFeedlot200ResponseScope1() - if include_optional: - return PostFeedlot200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - transport_co2 = 1.337, - transport_ch4 = 1.337, - transport_n2_o = 1.337, - urea_co2 = 1.337, - lime_co2 = 1.337, - atmospheric_deposition_n2_o = 1.337, - manure_direct_n2_o = 1.337, - manure_indirect_n2_o = 1.337, - manure_management_ch4 = 1.337, - manure_applied_to_soil_n2_o = 1.337, - enteric_ch4 = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337 - ) - else: - return PostFeedlot200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - transport_co2 = 1.337, - transport_ch4 = 1.337, - transport_n2_o = 1.337, - urea_co2 = 1.337, - lime_co2 = 1.337, - atmospheric_deposition_n2_o = 1.337, - manure_direct_n2_o = 1.337, - manure_indirect_n2_o = 1.337, - manure_management_ch4 = 1.337, - manure_applied_to_soil_n2_o = 1.337, - enteric_ch4 = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337, - ) - """ - - def testPostFeedlot200ResponseScope1(self): - """Test PostFeedlot200ResponseScope1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_feedlot200_response_scope3.py deleted file mode 100644 index 54c52112..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot200_response_scope3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot200_response_scope3 import PostFeedlot200ResponseScope3 - -class TestPostFeedlot200ResponseScope3(unittest.TestCase): - """PostFeedlot200ResponseScope3 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlot200ResponseScope3: - """Test PostFeedlot200ResponseScope3 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlot200ResponseScope3` - """ - model = PostFeedlot200ResponseScope3() - if include_optional: - return PostFeedlot200ResponseScope3( - fertiliser = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - lime = 1.337, - feed = 1.337, - purchase_livestock = 1.337, - total = 1.337 - ) - else: - return PostFeedlot200ResponseScope3( - fertiliser = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - lime = 1.337, - feed = 1.337, - purchase_livestock = 1.337, - total = 1.337, - ) - """ - - def testPostFeedlot200ResponseScope3(self): - """Test PostFeedlot200ResponseScope3""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request.py b/examples/python-api-client/api-client/test/test_post_feedlot_request.py deleted file mode 100644 index e3b4a061..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot_request.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot_request import PostFeedlotRequest - -class TestPostFeedlotRequest(unittest.TestCase): - """PostFeedlotRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlotRequest: - """Test PostFeedlotRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlotRequest` - """ - model = PostFeedlotRequest() - if include_optional: - return PostFeedlotRequest( - state = 'nsw', - feedlots = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostFeedlotRequest( - state = 'nsw', - feedlots = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostFeedlotRequest(self): - """Test PostFeedlotRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner.py deleted file mode 100644 index 6e6c1e25..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot_request_feedlots_inner import PostFeedlotRequestFeedlotsInner - -class TestPostFeedlotRequestFeedlotsInner(unittest.TestCase): - """PostFeedlotRequestFeedlotsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlotRequestFeedlotsInner: - """Test PostFeedlotRequestFeedlotsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlotRequestFeedlotsInner` - """ - model = PostFeedlotRequestFeedlotsInner() - if include_optional: - return PostFeedlotRequestFeedlotsInner( - id = '', - system = 'Drylot', - groups = [ - { - 'key' : null - } - ], - fertiliser = { - 'key' : null - }, - purchases = { - 'key' : null - }, - sales = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - grain_feed = 1.337, - hay_feed = 1.337, - cottonseed_feed = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - distance_cattle_transported = 1.337, - truck_type = '4 Deck Trailer', - limestone = 1.337, - limestone_fraction = 1.337 - ) - else: - return PostFeedlotRequestFeedlotsInner( - system = 'Drylot', - groups = [ - { - 'key' : null - } - ], - fertiliser = { - 'key' : null - }, - purchases = { - 'key' : null - }, - sales = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - grain_feed = 1.337, - hay_feed = 1.337, - cottonseed_feed = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - distance_cattle_transported = 1.337, - truck_type = '4 Deck Trailer', - limestone = 1.337, - limestone_fraction = 1.337, - ) - """ - - def testPostFeedlotRequestFeedlotsInner(self): - """Test PostFeedlotRequestFeedlotsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner.py deleted file mode 100644 index 80946c02..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot_request_feedlots_inner_groups_inner import PostFeedlotRequestFeedlotsInnerGroupsInner - -class TestPostFeedlotRequestFeedlotsInnerGroupsInner(unittest.TestCase): - """PostFeedlotRequestFeedlotsInnerGroupsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlotRequestFeedlotsInnerGroupsInner: - """Test PostFeedlotRequestFeedlotsInnerGroupsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlotRequestFeedlotsInnerGroupsInner` - """ - model = PostFeedlotRequestFeedlotsInnerGroupsInner() - if include_optional: - return PostFeedlotRequestFeedlotsInnerGroupsInner( - stays = [ - { - 'key' : null - } - ] - ) - else: - return PostFeedlotRequestFeedlotsInnerGroupsInner( - stays = [ - { - 'key' : null - } - ], - ) - """ - - def testPostFeedlotRequestFeedlotsInnerGroupsInner(self): - """Test PostFeedlotRequestFeedlotsInnerGroupsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py deleted file mode 100644 index d63251fd..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_groups_inner_stays_inner.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot_request_feedlots_inner_groups_inner_stays_inner import PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner - -class TestPostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner(unittest.TestCase): - """PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner: - """Test PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner` - """ - model = PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner() - if include_optional: - return PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner( - livestock = 1.337, - stay_average_duration = 1.337, - liveweight = 1.337, - dry_matter_digestibility = 1.337, - crude_protein = 1.337, - nitrogen_retention = 1.337, - daily_intake = 1.337, - ndf = 1.337, - ether_extract = 1.337 - ) - else: - return PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner( - livestock = 1.337, - stay_average_duration = 1.337, - liveweight = 1.337, - dry_matter_digestibility = 1.337, - crude_protein = 1.337, - nitrogen_retention = 1.337, - daily_intake = 1.337, - ndf = 1.337, - ether_extract = 1.337, - ) - """ - - def testPostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner(self): - """Test PostFeedlotRequestFeedlotsInnerGroupsInnerStaysInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases.py deleted file mode 100644 index b47d60b9..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot_request_feedlots_inner_purchases import PostFeedlotRequestFeedlotsInnerPurchases - -class TestPostFeedlotRequestFeedlotsInnerPurchases(unittest.TestCase): - """PostFeedlotRequestFeedlotsInnerPurchases unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlotRequestFeedlotsInnerPurchases: - """Test PostFeedlotRequestFeedlotsInnerPurchases - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlotRequestFeedlotsInnerPurchases` - """ - model = PostFeedlotRequestFeedlotsInnerPurchases() - if include_optional: - return PostFeedlotRequestFeedlotsInnerPurchases( - bulls_gt1 = [ - { - 'key' : null - } - ], - bulls_gt1_traded = [ - { - 'key' : null - } - ], - steers_lt1 = [ - { - 'key' : null - } - ], - steers_lt1_traded = [ - { - 'key' : null - } - ], - steers1_to2 = [ - { - 'key' : null - } - ], - steers1_to2_traded = [ - { - 'key' : null - } - ], - steers_gt2 = [ - { - 'key' : null - } - ], - steers_gt2_traded = [ - { - 'key' : null - } - ], - cows_gt2 = [ - { - 'key' : null - } - ], - cows_gt2_traded = [ - { - 'key' : null - } - ], - heifers_lt1 = [ - { - 'key' : null - } - ], - heifers_lt1_traded = [ - { - 'key' : null - } - ], - heifers1_to2 = [ - { - 'key' : null - } - ], - heifers1_to2_traded = [ - { - 'key' : null - } - ], - heifers_gt2 = [ - { - 'key' : null - } - ], - heifers_gt2_traded = [ - { - 'key' : null - } - ] - ) - else: - return PostFeedlotRequestFeedlotsInnerPurchases( - ) - """ - - def testPostFeedlotRequestFeedlotsInnerPurchases(self): - """Test PostFeedlotRequestFeedlotsInnerPurchases""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py deleted file mode 100644 index 94f99e13..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot_request_feedlots_inner_purchases_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner - -class TestPostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner(unittest.TestCase): - """PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner: - """Test PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner` - """ - model = PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner() - if include_optional: - return PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner( - head = 1.337, - purchase_weight = 1.337, - purchase_source = 'sth NSW/VIC/sth SA' - ) - else: - return PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner( - head = 1.337, - purchase_weight = 1.337, - purchase_source = 'sth NSW/VIC/sth SA', - ) - """ - - def testPostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner(self): - """Test PostFeedlotRequestFeedlotsInnerPurchasesBullsGt1Inner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales.py deleted file mode 100644 index 1f297c52..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales.py +++ /dev/null @@ -1,211 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot_request_feedlots_inner_sales import PostFeedlotRequestFeedlotsInnerSales - -class TestPostFeedlotRequestFeedlotsInnerSales(unittest.TestCase): - """PostFeedlotRequestFeedlotsInnerSales unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlotRequestFeedlotsInnerSales: - """Test PostFeedlotRequestFeedlotsInnerSales - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlotRequestFeedlotsInnerSales` - """ - model = PostFeedlotRequestFeedlotsInnerSales() - if include_optional: - return PostFeedlotRequestFeedlotsInnerSales( - bulls_gt1 = [ - { - 'key' : null - } - ], - bulls_gt1_traded = [ - { - 'key' : null - } - ], - steers_lt1 = [ - { - 'key' : null - } - ], - steers_lt1_traded = [ - { - 'key' : null - } - ], - steers1_to2 = [ - { - 'key' : null - } - ], - steers1_to2_traded = [ - { - 'key' : null - } - ], - steers_gt2 = [ - { - 'key' : null - } - ], - steers_gt2_traded = [ - { - 'key' : null - } - ], - cows_gt2 = [ - { - 'key' : null - } - ], - cows_gt2_traded = [ - { - 'key' : null - } - ], - heifers_lt1 = [ - { - 'key' : null - } - ], - heifers_lt1_traded = [ - { - 'key' : null - } - ], - heifers1_to2 = [ - { - 'key' : null - } - ], - heifers1_to2_traded = [ - { - 'key' : null - } - ], - heifers_gt2 = [ - { - 'key' : null - } - ], - heifers_gt2_traded = [ - { - 'key' : null - } - ] - ) - else: - return PostFeedlotRequestFeedlotsInnerSales( - bulls_gt1 = [ - { - 'key' : null - } - ], - bulls_gt1_traded = [ - { - 'key' : null - } - ], - steers_lt1 = [ - { - 'key' : null - } - ], - steers_lt1_traded = [ - { - 'key' : null - } - ], - steers1_to2 = [ - { - 'key' : null - } - ], - steers1_to2_traded = [ - { - 'key' : null - } - ], - steers_gt2 = [ - { - 'key' : null - } - ], - steers_gt2_traded = [ - { - 'key' : null - } - ], - cows_gt2 = [ - { - 'key' : null - } - ], - cows_gt2_traded = [ - { - 'key' : null - } - ], - heifers_lt1 = [ - { - 'key' : null - } - ], - heifers_lt1_traded = [ - { - 'key' : null - } - ], - heifers1_to2 = [ - { - 'key' : null - } - ], - heifers1_to2_traded = [ - { - 'key' : null - } - ], - heifers_gt2 = [ - { - 'key' : null - } - ], - heifers_gt2_traded = [ - { - 'key' : null - } - ], - ) - """ - - def testPostFeedlotRequestFeedlotsInnerSales(self): - """Test PostFeedlotRequestFeedlotsInnerSales""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py deleted file mode 100644 index 9e8e1bcb..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot_request_feedlots_inner_sales_bulls_gt1_inner import PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner - -class TestPostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner(unittest.TestCase): - """PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner: - """Test PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner` - """ - model = PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner() - if include_optional: - return PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner( - head = 1.337, - sale_weight = 1.337 - ) - else: - return PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner( - head = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner(self): - """Test PostFeedlotRequestFeedlotsInnerSalesBullsGt1Inner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_feedlot_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_feedlot_request_vegetation_inner.py deleted file mode 100644 index 6779a479..00000000 --- a/examples/python-api-client/api-client/test/test_post_feedlot_request_vegetation_inner.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_feedlot_request_vegetation_inner import PostFeedlotRequestVegetationInner - -class TestPostFeedlotRequestVegetationInner(unittest.TestCase): - """PostFeedlotRequestVegetationInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFeedlotRequestVegetationInner: - """Test PostFeedlotRequestVegetationInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFeedlotRequestVegetationInner` - """ - model = PostFeedlotRequestVegetationInner() - if include_optional: - return PostFeedlotRequestVegetationInner( - vegetation = { - 'key' : null - }, - feedlot_proportion = [ - 1.337 - ] - ) - else: - return PostFeedlotRequestVegetationInner( - vegetation = { - 'key' : null - }, - feedlot_proportion = [ - 1.337 - ], - ) - """ - - def testPostFeedlotRequestVegetationInner(self): - """Test PostFeedlotRequestVegetationInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat200_response.py b/examples/python-api-client/api-client/test/test_post_goat200_response.py deleted file mode 100644 index 1efe1d9d..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat200_response.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat200_response import PostGoat200Response - -class TestPostGoat200Response(unittest.TestCase): - """PostGoat200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoat200Response: - """Test PostGoat200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoat200Response` - """ - model = PostGoat200Response() - if include_optional: - return PostGoat200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ] - ) - else: - return PostGoat200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - ) - """ - - def testPostGoat200Response(self): - """Test PostGoat200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_goat200_response_intensities.py deleted file mode 100644 index 1a568f25..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat200_response_intensities.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat200_response_intensities import PostGoat200ResponseIntensities - -class TestPostGoat200ResponseIntensities(unittest.TestCase): - """PostGoat200ResponseIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoat200ResponseIntensities: - """Test PostGoat200ResponseIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoat200ResponseIntensities` - """ - model = PostGoat200ResponseIntensities() - if include_optional: - return PostGoat200ResponseIntensities( - amount_meat_produced = 1.337, - amount_wool_produced = 1.337, - goat_meat_breeding_including_sequestration = 1.337, - goat_meat_breeding_excluding_sequestration = 1.337, - wool_including_sequestration = 1.337, - wool_excluding_sequestration = 1.337 - ) - else: - return PostGoat200ResponseIntensities( - amount_meat_produced = 1.337, - amount_wool_produced = 1.337, - goat_meat_breeding_including_sequestration = 1.337, - goat_meat_breeding_excluding_sequestration = 1.337, - wool_including_sequestration = 1.337, - wool_excluding_sequestration = 1.337, - ) - """ - - def testPostGoat200ResponseIntensities(self): - """Test PostGoat200ResponseIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_goat200_response_intermediate_inner.py deleted file mode 100644 index 7f660710..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat200_response_intermediate_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat200_response_intermediate_inner import PostGoat200ResponseIntermediateInner - -class TestPostGoat200ResponseIntermediateInner(unittest.TestCase): - """PostGoat200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoat200ResponseIntermediateInner: - """Test PostGoat200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoat200ResponseIntermediateInner` - """ - model = PostGoat200ResponseIntermediateInner() - if include_optional: - return PostGoat200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - } - ) - else: - return PostGoat200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - ) - """ - - def testPostGoat200ResponseIntermediateInner(self): - """Test PostGoat200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat200_response_net.py b/examples/python-api-client/api-client/test/test_post_goat200_response_net.py deleted file mode 100644 index 1b995ecc..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat200_response_net.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat200_response_net import PostGoat200ResponseNet - -class TestPostGoat200ResponseNet(unittest.TestCase): - """PostGoat200ResponseNet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoat200ResponseNet: - """Test PostGoat200ResponseNet - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoat200ResponseNet` - """ - model = PostGoat200ResponseNet() - if include_optional: - return PostGoat200ResponseNet( - total = 1.337 - ) - else: - return PostGoat200ResponseNet( - total = 1.337, - ) - """ - - def testPostGoat200ResponseNet(self): - """Test PostGoat200ResponseNet""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request.py b/examples/python-api-client/api-client/test/test_post_goat_request.py deleted file mode 100644 index 34a9f1ff..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request import PostGoatRequest - -class TestPostGoatRequest(unittest.TestCase): - """PostGoatRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequest: - """Test PostGoatRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequest` - """ - model = PostGoatRequest() - if include_optional: - return PostGoatRequest( - state = 'nsw', - rainfall_above600 = True, - goats = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostGoatRequest( - state = 'nsw', - rainfall_above600 = True, - goats = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostGoatRequest(self): - """Test PostGoatRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner.py deleted file mode 100644 index 80b14332..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner import PostGoatRequestGoatsInner - -class TestPostGoatRequestGoatsInner(unittest.TestCase): - """PostGoatRequestGoatsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInner: - """Test PostGoatRequestGoatsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInner` - """ - model = PostGoatRequestGoatsInner() - if include_optional: - return PostGoatRequestGoatsInner( - id = '', - classes = { - 'key' : null - }, - limestone = 1.337, - limestone_fraction = 1.337, - fertiliser = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - mineral_supplementation = { - 'key' : null - }, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - grain_feed = 1.337, - hay_feed = 1.337, - herbicide = 1.337, - herbicide_other = 1.337 - ) - else: - return PostGoatRequestGoatsInner( - classes = { - 'key' : null - }, - limestone = 1.337, - limestone_fraction = 1.337, - fertiliser = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - mineral_supplementation = { - 'key' : null - }, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - grain_feed = 1.337, - hay_feed = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - ) - """ - - def testPostGoatRequestGoatsInner(self): - """Test PostGoatRequestGoatsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes.py deleted file mode 100644 index 6381e1ec..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner_classes import PostGoatRequestGoatsInnerClasses - -class TestPostGoatRequestGoatsInnerClasses(unittest.TestCase): - """PostGoatRequestGoatsInnerClasses unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClasses: - """Test PostGoatRequestGoatsInnerClasses - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInnerClasses` - """ - model = PostGoatRequestGoatsInnerClasses() - if include_optional: - return PostGoatRequestGoatsInnerClasses( - bucks_billy = { - 'key' : null - }, - trade_bucks = { - 'key' : null - }, - wethers = { - 'key' : null - }, - trade_wethers = { - 'key' : null - }, - maiden_breeding_does_nannies = { - 'key' : null - }, - trade_maiden_breeding_does_nannies = { - 'key' : null - }, - breeding_does_nannies = { - 'key' : null - }, - trade_breeding_does_nannies = { - 'key' : null - }, - other_does_culled_females = { - 'key' : null - }, - trade_other_does_culled_females = { - 'key' : null - }, - kids = { - 'key' : null - }, - trade_kids = { - 'key' : null - }, - trade_does = { - 'key' : null - } - ) - else: - return PostGoatRequestGoatsInnerClasses( - ) - """ - - def testPostGoatRequestGoatsInnerClasses(self): - """Test PostGoatRequestGoatsInnerClasses""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_breeding_does_nannies.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_breeding_does_nannies.py deleted file mode 100644 index 8374dc9a..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_breeding_does_nannies.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner_classes_breeding_does_nannies import PostGoatRequestGoatsInnerClassesBreedingDoesNannies - -class TestPostGoatRequestGoatsInnerClassesBreedingDoesNannies(unittest.TestCase): - """PostGoatRequestGoatsInnerClassesBreedingDoesNannies unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesBreedingDoesNannies: - """Test PostGoatRequestGoatsInnerClassesBreedingDoesNannies - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesBreedingDoesNannies` - """ - model = PostGoatRequestGoatsInnerClassesBreedingDoesNannies() - if include_optional: - return PostGoatRequestGoatsInnerClassesBreedingDoesNannies( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostGoatRequestGoatsInnerClassesBreedingDoesNannies( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - ) - """ - - def testPostGoatRequestGoatsInnerClassesBreedingDoesNannies(self): - """Test PostGoatRequestGoatsInnerClassesBreedingDoesNannies""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_bucks_billy.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_bucks_billy.py deleted file mode 100644 index dca559ec..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_bucks_billy.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner_classes_bucks_billy import PostGoatRequestGoatsInnerClassesBucksBilly - -class TestPostGoatRequestGoatsInnerClassesBucksBilly(unittest.TestCase): - """PostGoatRequestGoatsInnerClassesBucksBilly unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesBucksBilly: - """Test PostGoatRequestGoatsInnerClassesBucksBilly - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesBucksBilly` - """ - model = PostGoatRequestGoatsInnerClassesBucksBilly() - if include_optional: - return PostGoatRequestGoatsInnerClassesBucksBilly( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostGoatRequestGoatsInnerClassesBucksBilly( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - ) - """ - - def testPostGoatRequestGoatsInnerClassesBucksBilly(self): - """Test PostGoatRequestGoatsInnerClassesBucksBilly""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_kids.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_kids.py deleted file mode 100644 index a0f2acd7..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_kids.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner_classes_kids import PostGoatRequestGoatsInnerClassesKids - -class TestPostGoatRequestGoatsInnerClassesKids(unittest.TestCase): - """PostGoatRequestGoatsInnerClassesKids unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesKids: - """Test PostGoatRequestGoatsInnerClassesKids - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesKids` - """ - model = PostGoatRequestGoatsInnerClassesKids() - if include_optional: - return PostGoatRequestGoatsInnerClassesKids( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostGoatRequestGoatsInnerClassesKids( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - ) - """ - - def testPostGoatRequestGoatsInnerClassesKids(self): - """Test PostGoatRequestGoatsInnerClassesKids""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py deleted file mode 100644 index f6e8ca63..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_maiden_breeding_does_nannies.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner_classes_maiden_breeding_does_nannies import PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies - -class TestPostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies(unittest.TestCase): - """PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies: - """Test PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies` - """ - model = PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies() - if include_optional: - return PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - ) - """ - - def testPostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies(self): - """Test PostGoatRequestGoatsInnerClassesMaidenBreedingDoesNannies""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_other_does_culled_females.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_other_does_culled_females.py deleted file mode 100644 index e23b854a..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_other_does_culled_females.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner_classes_other_does_culled_females import PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales - -class TestPostGoatRequestGoatsInnerClassesOtherDoesCulledFemales(unittest.TestCase): - """PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales: - """Test PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales` - """ - model = PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales() - if include_optional: - return PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - ) - """ - - def testPostGoatRequestGoatsInnerClassesOtherDoesCulledFemales(self): - """Test PostGoatRequestGoatsInnerClassesOtherDoesCulledFemales""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py deleted file mode 100644 index 388d40e7..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_breeding_does_nannies.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner_classes_trade_breeding_does_nannies import PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies - -class TestPostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies(unittest.TestCase): - """PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies: - """Test PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies` - """ - model = PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies() - if include_optional: - return PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - ) - """ - - def testPostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies(self): - """Test PostGoatRequestGoatsInnerClassesTradeBreedingDoesNannies""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_bucks.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_bucks.py deleted file mode 100644 index e222b66a..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_bucks.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner_classes_trade_bucks import PostGoatRequestGoatsInnerClassesTradeBucks - -class TestPostGoatRequestGoatsInnerClassesTradeBucks(unittest.TestCase): - """PostGoatRequestGoatsInnerClassesTradeBucks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesTradeBucks: - """Test PostGoatRequestGoatsInnerClassesTradeBucks - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesTradeBucks` - """ - model = PostGoatRequestGoatsInnerClassesTradeBucks() - if include_optional: - return PostGoatRequestGoatsInnerClassesTradeBucks( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostGoatRequestGoatsInnerClassesTradeBucks( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - ) - """ - - def testPostGoatRequestGoatsInnerClassesTradeBucks(self): - """Test PostGoatRequestGoatsInnerClassesTradeBucks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_does.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_does.py deleted file mode 100644 index 5c61d44c..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_does.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner_classes_trade_does import PostGoatRequestGoatsInnerClassesTradeDoes - -class TestPostGoatRequestGoatsInnerClassesTradeDoes(unittest.TestCase): - """PostGoatRequestGoatsInnerClassesTradeDoes unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesTradeDoes: - """Test PostGoatRequestGoatsInnerClassesTradeDoes - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesTradeDoes` - """ - model = PostGoatRequestGoatsInnerClassesTradeDoes() - if include_optional: - return PostGoatRequestGoatsInnerClassesTradeDoes( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostGoatRequestGoatsInnerClassesTradeDoes( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - ) - """ - - def testPostGoatRequestGoatsInnerClassesTradeDoes(self): - """Test PostGoatRequestGoatsInnerClassesTradeDoes""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_kids.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_kids.py deleted file mode 100644 index 72d606d3..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_kids.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner_classes_trade_kids import PostGoatRequestGoatsInnerClassesTradeKids - -class TestPostGoatRequestGoatsInnerClassesTradeKids(unittest.TestCase): - """PostGoatRequestGoatsInnerClassesTradeKids unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesTradeKids: - """Test PostGoatRequestGoatsInnerClassesTradeKids - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesTradeKids` - """ - model = PostGoatRequestGoatsInnerClassesTradeKids() - if include_optional: - return PostGoatRequestGoatsInnerClassesTradeKids( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostGoatRequestGoatsInnerClassesTradeKids( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - ) - """ - - def testPostGoatRequestGoatsInnerClassesTradeKids(self): - """Test PostGoatRequestGoatsInnerClassesTradeKids""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py deleted file mode 100644 index c5cb8124..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner_classes_trade_maiden_breeding_does_nannies import PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies - -class TestPostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies(unittest.TestCase): - """PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies: - """Test PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies` - """ - model = PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies() - if include_optional: - return PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - ) - """ - - def testPostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies(self): - """Test PostGoatRequestGoatsInnerClassesTradeMaidenBreedingDoesNannies""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_other_does_culled_females.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_other_does_culled_females.py deleted file mode 100644 index 00a0b8ca..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_other_does_culled_females.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner_classes_trade_other_does_culled_females import PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales - -class TestPostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales(unittest.TestCase): - """PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales: - """Test PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales` - """ - model = PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales() - if include_optional: - return PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - ) - """ - - def testPostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales(self): - """Test PostGoatRequestGoatsInnerClassesTradeOtherDoesCulledFemales""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_wethers.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_wethers.py deleted file mode 100644 index dc063b1e..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_trade_wethers.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner_classes_trade_wethers import PostGoatRequestGoatsInnerClassesTradeWethers - -class TestPostGoatRequestGoatsInnerClassesTradeWethers(unittest.TestCase): - """PostGoatRequestGoatsInnerClassesTradeWethers unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesTradeWethers: - """Test PostGoatRequestGoatsInnerClassesTradeWethers - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesTradeWethers` - """ - model = PostGoatRequestGoatsInnerClassesTradeWethers() - if include_optional: - return PostGoatRequestGoatsInnerClassesTradeWethers( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostGoatRequestGoatsInnerClassesTradeWethers( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - ) - """ - - def testPostGoatRequestGoatsInnerClassesTradeWethers(self): - """Test PostGoatRequestGoatsInnerClassesTradeWethers""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_wethers.py b/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_wethers.py deleted file mode 100644 index 7c4cb171..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_goats_inner_classes_wethers.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_goats_inner_classes_wethers import PostGoatRequestGoatsInnerClassesWethers - -class TestPostGoatRequestGoatsInnerClassesWethers(unittest.TestCase): - """PostGoatRequestGoatsInnerClassesWethers unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestGoatsInnerClassesWethers: - """Test PostGoatRequestGoatsInnerClassesWethers - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestGoatsInnerClassesWethers` - """ - model = PostGoatRequestGoatsInnerClassesWethers() - if include_optional: - return PostGoatRequestGoatsInnerClassesWethers( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostGoatRequestGoatsInnerClassesWethers( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_sold = 1.337, - sale_weight = 1.337, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - ) - """ - - def testPostGoatRequestGoatsInnerClassesWethers(self): - """Test PostGoatRequestGoatsInnerClassesWethers""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_goat_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_goat_request_vegetation_inner.py deleted file mode 100644 index 34d2dbe0..00000000 --- a/examples/python-api-client/api-client/test/test_post_goat_request_vegetation_inner.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_goat_request_vegetation_inner import PostGoatRequestVegetationInner - -class TestPostGoatRequestVegetationInner(unittest.TestCase): - """PostGoatRequestVegetationInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGoatRequestVegetationInner: - """Test PostGoatRequestVegetationInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGoatRequestVegetationInner` - """ - model = PostGoatRequestVegetationInner() - if include_optional: - return PostGoatRequestVegetationInner( - vegetation = { - 'key' : null - }, - goat_proportion = [ - 1.337 - ] - ) - else: - return PostGoatRequestVegetationInner( - vegetation = { - 'key' : null - }, - goat_proportion = [ - 1.337 - ], - ) - """ - - def testPostGoatRequestVegetationInner(self): - """Test PostGoatRequestVegetationInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_grains200_response.py b/examples/python-api-client/api-client/test/test_post_grains200_response.py deleted file mode 100644 index faf560f4..00000000 --- a/examples/python-api-client/api-client/test/test_post_grains200_response.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_grains200_response import PostGrains200Response - -class TestPostGrains200Response(unittest.TestCase): - """PostGrains200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGrains200Response: - """Test PostGrains200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGrains200Response` - """ - model = PostGrains200Response() - if include_optional: - return PostGrains200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities_with_sequestration = [ - { - 'key' : null - } - ], - intensities = [ - 1.337 - ] - ) - else: - return PostGrains200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities_with_sequestration = [ - { - 'key' : null - } - ], - intensities = [ - 1.337 - ], - ) - """ - - def testPostGrains200Response(self): - """Test PostGrains200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner.py deleted file mode 100644 index e4aea811..00000000 --- a/examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_grains200_response_intermediate_inner import PostGrains200ResponseIntermediateInner - -class TestPostGrains200ResponseIntermediateInner(unittest.TestCase): - """PostGrains200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGrains200ResponseIntermediateInner: - """Test PostGrains200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGrains200ResponseIntermediateInner` - """ - model = PostGrains200ResponseIntermediateInner() - if include_optional: - return PostGrains200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - intensities_with_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - } - ) - else: - return PostGrains200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - intensities_with_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - ) - """ - - def testPostGrains200ResponseIntermediateInner(self): - """Test PostGrains200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner_intensities_with_sequestration.py b/examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner_intensities_with_sequestration.py deleted file mode 100644 index a5604bc8..00000000 --- a/examples/python-api-client/api-client/test/test_post_grains200_response_intermediate_inner_intensities_with_sequestration.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_grains200_response_intermediate_inner_intensities_with_sequestration import PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration - -class TestPostGrains200ResponseIntermediateInnerIntensitiesWithSequestration(unittest.TestCase): - """PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration: - """Test PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration` - """ - model = PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration() - if include_optional: - return PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration( - grain_produced_tonnes = 1.337, - grains_excluding_sequestration = 1.337, - grains_including_sequestration = 1.337 - ) - else: - return PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration( - grain_produced_tonnes = 1.337, - grains_excluding_sequestration = 1.337, - grains_including_sequestration = 1.337, - ) - """ - - def testPostGrains200ResponseIntermediateInnerIntensitiesWithSequestration(self): - """Test PostGrains200ResponseIntermediateInnerIntensitiesWithSequestration""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_grains_request.py b/examples/python-api-client/api-client/test/test_post_grains_request.py deleted file mode 100644 index 4b9f096c..00000000 --- a/examples/python-api-client/api-client/test/test_post_grains_request.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_grains_request import PostGrainsRequest - -class TestPostGrainsRequest(unittest.TestCase): - """PostGrainsRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGrainsRequest: - """Test PostGrainsRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGrainsRequest` - """ - model = PostGrainsRequest() - if include_optional: - return PostGrainsRequest( - state = 'nsw', - crops = [ - { - 'key' : null - } - ], - electricity_renewable = 0, - electricity_use = 1.337, - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostGrainsRequest( - state = 'nsw', - crops = [ - { - 'key' : null - } - ], - electricity_renewable = 0, - electricity_use = 1.337, - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostGrainsRequest(self): - """Test PostGrainsRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_grains_request_crops_inner.py b/examples/python-api-client/api-client/test/test_post_grains_request_crops_inner.py deleted file mode 100644 index cc324b1d..00000000 --- a/examples/python-api-client/api-client/test/test_post_grains_request_crops_inner.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_grains_request_crops_inner import PostGrainsRequestCropsInner - -class TestPostGrainsRequestCropsInner(unittest.TestCase): - """PostGrainsRequestCropsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostGrainsRequestCropsInner: - """Test PostGrainsRequestCropsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostGrainsRequestCropsInner` - """ - model = PostGrainsRequestCropsInner() - if include_optional: - return PostGrainsRequestCropsInner( - id = '', - type = 'Wheat', - state = 'nsw', - production_system = 'Non-irrigated crop', - average_grain_yield = 1.337, - area_sown = 1.337, - non_urea_nitrogen = 1.337, - urea_application = 1.337, - urea_ammonium_nitrate = 1.337, - phosphorus_application = 1.337, - potassium_application = 1.337, - sulfur_application = 1.337, - rainfall_above600 = True, - fraction_of_annual_crop_burnt = 1.337, - herbicide_use = 1.337, - glyphosate_other_herbicide_use = 1.337, - electricity_allocation = 1.337, - limestone = 1.337, - limestone_fraction = 1.337, - diesel_use = 1.337, - petrol_use = 1.337, - lpg = 1.337 - ) - else: - return PostGrainsRequestCropsInner( - type = 'Wheat', - state = 'nsw', - production_system = 'Non-irrigated crop', - average_grain_yield = 1.337, - area_sown = 1.337, - non_urea_nitrogen = 1.337, - urea_application = 1.337, - urea_ammonium_nitrate = 1.337, - phosphorus_application = 1.337, - potassium_application = 1.337, - sulfur_application = 1.337, - rainfall_above600 = True, - fraction_of_annual_crop_burnt = 1.337, - herbicide_use = 1.337, - glyphosate_other_herbicide_use = 1.337, - electricity_allocation = 1.337, - limestone = 1.337, - limestone_fraction = 1.337, - diesel_use = 1.337, - petrol_use = 1.337, - lpg = 1.337, - ) - """ - - def testPostGrainsRequestCropsInner(self): - """Test PostGrainsRequestCropsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_horticulture200_response.py b/examples/python-api-client/api-client/test/test_post_horticulture200_response.py deleted file mode 100644 index 9a900a98..00000000 --- a/examples/python-api-client/api-client/test/test_post_horticulture200_response.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_horticulture200_response import PostHorticulture200Response - -class TestPostHorticulture200Response(unittest.TestCase): - """PostHorticulture200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostHorticulture200Response: - """Test PostHorticulture200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostHorticulture200Response` - """ - model = PostHorticulture200Response() - if include_optional: - return PostHorticulture200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = [ - { - 'key' : null - } - ] - ) - else: - return PostHorticulture200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = [ - { - 'key' : null - } - ], - ) - """ - - def testPostHorticulture200Response(self): - """Test PostHorticulture200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner.py deleted file mode 100644 index c80e0a86..00000000 --- a/examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_horticulture200_response_intermediate_inner import PostHorticulture200ResponseIntermediateInner - -class TestPostHorticulture200ResponseIntermediateInner(unittest.TestCase): - """PostHorticulture200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostHorticulture200ResponseIntermediateInner: - """Test PostHorticulture200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostHorticulture200ResponseIntermediateInner` - """ - model = PostHorticulture200ResponseIntermediateInner() - if include_optional: - return PostHorticulture200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - intensities_with_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - } - ) - else: - return PostHorticulture200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - intensities_with_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - ) - """ - - def testPostHorticulture200ResponseIntermediateInner(self): - """Test PostHorticulture200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py b/examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py deleted file mode 100644 index 5d17c297..00000000 --- a/examples/python-api-client/api-client/test/test_post_horticulture200_response_intermediate_inner_intensities_with_sequestration.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_horticulture200_response_intermediate_inner_intensities_with_sequestration import PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration - -class TestPostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration(unittest.TestCase): - """PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration: - """Test PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration` - """ - model = PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration() - if include_optional: - return PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration( - crop_produced_tonnes = 1.337, - tonnes_crop_excluding_sequestration = 1.337, - tonnes_crop_including_sequestration = 1.337 - ) - else: - return PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration( - crop_produced_tonnes = 1.337, - tonnes_crop_excluding_sequestration = 1.337, - tonnes_crop_including_sequestration = 1.337, - ) - """ - - def testPostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration(self): - """Test PostHorticulture200ResponseIntermediateInnerIntensitiesWithSequestration""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_horticulture200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_horticulture200_response_scope1.py deleted file mode 100644 index ebef0e64..00000000 --- a/examples/python-api-client/api-client/test/test_post_horticulture200_response_scope1.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_horticulture200_response_scope1 import PostHorticulture200ResponseScope1 - -class TestPostHorticulture200ResponseScope1(unittest.TestCase): - """PostHorticulture200ResponseScope1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostHorticulture200ResponseScope1: - """Test PostHorticulture200ResponseScope1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostHorticulture200ResponseScope1` - """ - model = PostHorticulture200ResponseScope1() - if include_optional: - return PostHorticulture200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - urea_co2 = 1.337, - lime_co2 = 1.337, - fertiliser_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - crop_residue_n2_o = 1.337, - field_burning_n2_o = 1.337, - field_burning_ch4 = 1.337, - hfcs_refrigerant_leakage = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total_hfcs = 1.337, - total = 1.337 - ) - else: - return PostHorticulture200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - urea_co2 = 1.337, - lime_co2 = 1.337, - fertiliser_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - crop_residue_n2_o = 1.337, - field_burning_n2_o = 1.337, - field_burning_ch4 = 1.337, - hfcs_refrigerant_leakage = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total_hfcs = 1.337, - total = 1.337, - ) - """ - - def testPostHorticulture200ResponseScope1(self): - """Test PostHorticulture200ResponseScope1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_horticulture_request.py b/examples/python-api-client/api-client/test/test_post_horticulture_request.py deleted file mode 100644 index febbe4db..00000000 --- a/examples/python-api-client/api-client/test/test_post_horticulture_request.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_horticulture_request import PostHorticultureRequest - -class TestPostHorticultureRequest(unittest.TestCase): - """PostHorticultureRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostHorticultureRequest: - """Test PostHorticultureRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostHorticultureRequest` - """ - model = PostHorticultureRequest() - if include_optional: - return PostHorticultureRequest( - state = 'nsw', - crops = [ - { - 'key' : null - } - ], - electricity_renewable = 0, - electricity_use = 1.337, - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostHorticultureRequest( - state = 'nsw', - crops = [ - { - 'key' : null - } - ], - electricity_renewable = 0, - electricity_use = 1.337, - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostHorticultureRequest(self): - """Test PostHorticultureRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner.py b/examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner.py deleted file mode 100644 index 5294ed12..00000000 --- a/examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_horticulture_request_crops_inner import PostHorticultureRequestCropsInner - -class TestPostHorticultureRequestCropsInner(unittest.TestCase): - """PostHorticultureRequestCropsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostHorticultureRequestCropsInner: - """Test PostHorticultureRequestCropsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostHorticultureRequestCropsInner` - """ - model = PostHorticultureRequestCropsInner() - if include_optional: - return PostHorticultureRequestCropsInner( - id = '', - type = 'Pulses', - average_yield = 1.337, - area_sown = 1.337, - urea_application = 1.337, - non_urea_nitrogen = 1.337, - urea_ammonium_nitrate = 1.337, - phosphorus_application = 1.337, - potassium_application = 1.337, - sulfur_application = 1.337, - rainfall_above600 = True, - urease_inhibitor_used = True, - nitrification_inhibitor_used = True, - fraction_of_annual_crop_burnt = 1.337, - herbicide_use = 1.337, - glyphosate_other_herbicide_use = 1.337, - electricity_allocation = 1.337, - limestone = 1.337, - limestone_fraction = 1.337, - diesel_use = 1.337, - petrol_use = 1.337, - lpg = 1.337, - refrigerants = [ - openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner.post_horticulture_request_crops_inner_refrigerants_inner( - refrigerant = 'HFC-23', - charge_size = 1.337, ) - ] - ) - else: - return PostHorticultureRequestCropsInner( - type = 'Pulses', - average_yield = 1.337, - area_sown = 1.337, - urea_application = 1.337, - non_urea_nitrogen = 1.337, - urea_ammonium_nitrate = 1.337, - phosphorus_application = 1.337, - potassium_application = 1.337, - sulfur_application = 1.337, - rainfall_above600 = True, - fraction_of_annual_crop_burnt = 1.337, - herbicide_use = 1.337, - glyphosate_other_herbicide_use = 1.337, - electricity_allocation = 1.337, - limestone = 1.337, - limestone_fraction = 1.337, - diesel_use = 1.337, - petrol_use = 1.337, - lpg = 1.337, - refrigerants = [ - openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner.post_horticulture_request_crops_inner_refrigerants_inner( - refrigerant = 'HFC-23', - charge_size = 1.337, ) - ], - ) - """ - - def testPostHorticultureRequestCropsInner(self): - """Test PostHorticultureRequestCropsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner_refrigerants_inner.py b/examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner_refrigerants_inner.py deleted file mode 100644 index 73c2d24e..00000000 --- a/examples/python-api-client/api-client/test/test_post_horticulture_request_crops_inner_refrigerants_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner import PostHorticultureRequestCropsInnerRefrigerantsInner - -class TestPostHorticultureRequestCropsInnerRefrigerantsInner(unittest.TestCase): - """PostHorticultureRequestCropsInnerRefrigerantsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostHorticultureRequestCropsInnerRefrigerantsInner: - """Test PostHorticultureRequestCropsInnerRefrigerantsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostHorticultureRequestCropsInnerRefrigerantsInner` - """ - model = PostHorticultureRequestCropsInnerRefrigerantsInner() - if include_optional: - return PostHorticultureRequestCropsInnerRefrigerantsInner( - refrigerant = 'HFC-23', - charge_size = 1.337 - ) - else: - return PostHorticultureRequestCropsInnerRefrigerantsInner( - refrigerant = 'HFC-23', - charge_size = 1.337, - ) - """ - - def testPostHorticultureRequestCropsInnerRefrigerantsInner(self): - """Test PostHorticultureRequestCropsInnerRefrigerantsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork200_response.py b/examples/python-api-client/api-client/test/test_post_pork200_response.py deleted file mode 100644 index 3d4c0600..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork200_response.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork200_response import PostPork200Response - -class TestPostPork200Response(unittest.TestCase): - """PostPork200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPork200Response: - """Test PostPork200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPork200Response` - """ - model = PostPork200Response() - if include_optional: - return PostPork200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ] - ) - else: - return PostPork200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - ) - """ - - def testPostPork200Response(self): - """Test PostPork200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_pork200_response_intensities.py deleted file mode 100644 index 741436cc..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork200_response_intensities.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork200_response_intensities import PostPork200ResponseIntensities - -class TestPostPork200ResponseIntensities(unittest.TestCase): - """PostPork200ResponseIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPork200ResponseIntensities: - """Test PostPork200ResponseIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPork200ResponseIntensities` - """ - model = PostPork200ResponseIntensities() - if include_optional: - return PostPork200ResponseIntensities( - pork_meat_including_sequestration = 1.337, - pork_meat_excluding_sequestration = 1.337, - liveweight_produced_kg = 1.337 - ) - else: - return PostPork200ResponseIntensities( - pork_meat_including_sequestration = 1.337, - pork_meat_excluding_sequestration = 1.337, - liveweight_produced_kg = 1.337, - ) - """ - - def testPostPork200ResponseIntensities(self): - """Test PostPork200ResponseIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_pork200_response_intermediate_inner.py deleted file mode 100644 index 9b433afd..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork200_response_intermediate_inner.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork200_response_intermediate_inner import PostPork200ResponseIntermediateInner - -class TestPostPork200ResponseIntermediateInner(unittest.TestCase): - """PostPork200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPork200ResponseIntermediateInner: - """Test PostPork200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPork200ResponseIntermediateInner` - """ - model = PostPork200ResponseIntermediateInner() - if include_optional: - return PostPork200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - net = { - 'key' : null - }, - intensities = { - 'key' : null - } - ) - else: - return PostPork200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - ) - """ - - def testPostPork200ResponseIntermediateInner(self): - """Test PostPork200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork200_response_net.py b/examples/python-api-client/api-client/test/test_post_pork200_response_net.py deleted file mode 100644 index 7a5158fa..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork200_response_net.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork200_response_net import PostPork200ResponseNet - -class TestPostPork200ResponseNet(unittest.TestCase): - """PostPork200ResponseNet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPork200ResponseNet: - """Test PostPork200ResponseNet - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPork200ResponseNet` - """ - model = PostPork200ResponseNet() - if include_optional: - return PostPork200ResponseNet( - total = 1.337 - ) - else: - return PostPork200ResponseNet( - total = 1.337, - ) - """ - - def testPostPork200ResponseNet(self): - """Test PostPork200ResponseNet""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_pork200_response_scope1.py deleted file mode 100644 index ce9c783f..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork200_response_scope1.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork200_response_scope1 import PostPork200ResponseScope1 - -class TestPostPork200ResponseScope1(unittest.TestCase): - """PostPork200ResponseScope1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPork200ResponseScope1: - """Test PostPork200ResponseScope1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPork200ResponseScope1` - """ - model = PostPork200ResponseScope1() - if include_optional: - return PostPork200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - urea_co2 = 1.337, - lime_co2 = 1.337, - fertiliser_n2_o = 1.337, - enteric_ch4 = 1.337, - manure_management_ch4 = 1.337, - manure_management_direct_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - atmospheric_deposition_indirect_n2_o = 1.337, - leaching_and_runoff_soil_n2_o = 1.337, - leaching_and_runoff_mmsn2_o = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337 - ) - else: - return PostPork200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - urea_co2 = 1.337, - lime_co2 = 1.337, - fertiliser_n2_o = 1.337, - enteric_ch4 = 1.337, - manure_management_ch4 = 1.337, - manure_management_direct_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - atmospheric_deposition_indirect_n2_o = 1.337, - leaching_and_runoff_soil_n2_o = 1.337, - leaching_and_runoff_mmsn2_o = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337, - ) - """ - - def testPostPork200ResponseScope1(self): - """Test PostPork200ResponseScope1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_pork200_response_scope3.py deleted file mode 100644 index cd06ebda..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork200_response_scope3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork200_response_scope3 import PostPork200ResponseScope3 - -class TestPostPork200ResponseScope3(unittest.TestCase): - """PostPork200ResponseScope3 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPork200ResponseScope3: - """Test PostPork200ResponseScope3 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPork200ResponseScope3` - """ - model = PostPork200ResponseScope3() - if include_optional: - return PostPork200ResponseScope3( - fertiliser = 1.337, - purchased_feed = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - lime = 1.337, - purchased_livestock = 1.337, - bedding = 1.337, - total = 1.337 - ) - else: - return PostPork200ResponseScope3( - fertiliser = 1.337, - purchased_feed = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - lime = 1.337, - purchased_livestock = 1.337, - bedding = 1.337, - total = 1.337, - ) - """ - - def testPostPork200ResponseScope3(self): - """Test PostPork200ResponseScope3""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request.py b/examples/python-api-client/api-client/test/test_post_pork_request.py deleted file mode 100644 index bdcf49dc..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request import PostPorkRequest - -class TestPostPorkRequest(unittest.TestCase): - """PostPorkRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequest: - """Test PostPorkRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequest` - """ - model = PostPorkRequest() - if include_optional: - return PostPorkRequest( - state = 'nsw', - north_of_tropic_of_capricorn = True, - rainfall_above600 = True, - pork = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostPorkRequest( - state = 'nsw', - north_of_tropic_of_capricorn = True, - rainfall_above600 = True, - pork = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostPorkRequest(self): - """Test PostPorkRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner.py deleted file mode 100644 index 6ce737df..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request_pork_inner import PostPorkRequestPorkInner - -class TestPostPorkRequestPorkInner(unittest.TestCase): - """PostPorkRequestPorkInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequestPorkInner: - """Test PostPorkRequestPorkInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequestPorkInner` - """ - model = PostPorkRequestPorkInner() - if include_optional: - return PostPorkRequestPorkInner( - id = '', - classes = { - 'key' : null - }, - limestone = 1.337, - limestone_fraction = 1.337, - fertiliser = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - bedding_hay_barley_straw = 1.337, - feed_products = [ - { - 'key' : null - } - ] - ) - else: - return PostPorkRequestPorkInner( - classes = { - 'key' : null - }, - limestone = 1.337, - limestone_fraction = 1.337, - fertiliser = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - bedding_hay_barley_straw = 1.337, - feed_products = [ - { - 'key' : null - } - ], - ) - """ - - def testPostPorkRequestPorkInner(self): - """Test PostPorkRequestPorkInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes.py deleted file mode 100644 index 09cfca99..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request_pork_inner_classes import PostPorkRequestPorkInnerClasses - -class TestPostPorkRequestPorkInnerClasses(unittest.TestCase): - """PostPorkRequestPorkInnerClasses unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClasses: - """Test PostPorkRequestPorkInnerClasses - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequestPorkInnerClasses` - """ - model = PostPorkRequestPorkInnerClasses() - if include_optional: - return PostPorkRequestPorkInnerClasses( - sows = { - 'key' : null - }, - boars = { - 'key' : null - }, - gilts = { - 'key' : null - }, - suckers = { - 'key' : null - }, - weaners = { - 'key' : null - }, - growers = { - 'key' : null - }, - slaughter_pigs = { - 'key' : null - } - ) - else: - return PostPorkRequestPorkInnerClasses( - ) - """ - - def testPostPorkRequestPorkInnerClasses(self): - """Test PostPorkRequestPorkInnerClasses""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_boars.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_boars.py deleted file mode 100644 index ac8f5a7e..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_boars.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request_pork_inner_classes_boars import PostPorkRequestPorkInnerClassesBoars - -class TestPostPorkRequestPorkInnerClassesBoars(unittest.TestCase): - """PostPorkRequestPorkInnerClassesBoars unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesBoars: - """Test PostPorkRequestPorkInnerClassesBoars - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesBoars` - """ - model = PostPorkRequestPorkInnerClassesBoars() - if include_optional: - return PostPorkRequestPorkInnerClassesBoars( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ], - manure = { - 'key' : null - } - ) - else: - return PostPorkRequestPorkInnerClassesBoars( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - manure = { - 'key' : null - }, - ) - """ - - def testPostPorkRequestPorkInnerClassesBoars(self): - """Test PostPorkRequestPorkInnerClassesBoars""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_gilts.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_gilts.py deleted file mode 100644 index 87fb7459..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_gilts.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request_pork_inner_classes_gilts import PostPorkRequestPorkInnerClassesGilts - -class TestPostPorkRequestPorkInnerClassesGilts(unittest.TestCase): - """PostPorkRequestPorkInnerClassesGilts unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesGilts: - """Test PostPorkRequestPorkInnerClassesGilts - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesGilts` - """ - model = PostPorkRequestPorkInnerClassesGilts() - if include_optional: - return PostPorkRequestPorkInnerClassesGilts( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ], - manure = { - 'key' : null - } - ) - else: - return PostPorkRequestPorkInnerClassesGilts( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - manure = { - 'key' : null - }, - ) - """ - - def testPostPorkRequestPorkInnerClassesGilts(self): - """Test PostPorkRequestPorkInnerClassesGilts""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_growers.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_growers.py deleted file mode 100644 index a8d80ef1..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_growers.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request_pork_inner_classes_growers import PostPorkRequestPorkInnerClassesGrowers - -class TestPostPorkRequestPorkInnerClassesGrowers(unittest.TestCase): - """PostPorkRequestPorkInnerClassesGrowers unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesGrowers: - """Test PostPorkRequestPorkInnerClassesGrowers - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesGrowers` - """ - model = PostPorkRequestPorkInnerClassesGrowers() - if include_optional: - return PostPorkRequestPorkInnerClassesGrowers( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ], - manure = { - 'key' : null - } - ) - else: - return PostPorkRequestPorkInnerClassesGrowers( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - manure = { - 'key' : null - }, - ) - """ - - def testPostPorkRequestPorkInnerClassesGrowers(self): - """Test PostPorkRequestPorkInnerClassesGrowers""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_slaughter_pigs.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_slaughter_pigs.py deleted file mode 100644 index 74810895..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_slaughter_pigs.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request_pork_inner_classes_slaughter_pigs import PostPorkRequestPorkInnerClassesSlaughterPigs - -class TestPostPorkRequestPorkInnerClassesSlaughterPigs(unittest.TestCase): - """PostPorkRequestPorkInnerClassesSlaughterPigs unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesSlaughterPigs: - """Test PostPorkRequestPorkInnerClassesSlaughterPigs - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesSlaughterPigs` - """ - model = PostPorkRequestPorkInnerClassesSlaughterPigs() - if include_optional: - return PostPorkRequestPorkInnerClassesSlaughterPigs( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ], - manure = { - 'key' : null - } - ) - else: - return PostPorkRequestPorkInnerClassesSlaughterPigs( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - manure = { - 'key' : null - }, - ) - """ - - def testPostPorkRequestPorkInnerClassesSlaughterPigs(self): - """Test PostPorkRequestPorkInnerClassesSlaughterPigs""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows.py deleted file mode 100644 index 31d09401..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request_pork_inner_classes_sows import PostPorkRequestPorkInnerClassesSows - -class TestPostPorkRequestPorkInnerClassesSows(unittest.TestCase): - """PostPorkRequestPorkInnerClassesSows unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesSows: - """Test PostPorkRequestPorkInnerClassesSows - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesSows` - """ - model = PostPorkRequestPorkInnerClassesSows() - if include_optional: - return PostPorkRequestPorkInnerClassesSows( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ], - manure = { - 'key' : null - } - ) - else: - return PostPorkRequestPorkInnerClassesSows( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - manure = { - 'key' : null - }, - ) - """ - - def testPostPorkRequestPorkInnerClassesSows(self): - """Test PostPorkRequestPorkInnerClassesSows""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure.py deleted file mode 100644 index 6a6f5f6c..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure import PostPorkRequestPorkInnerClassesSowsManure - -class TestPostPorkRequestPorkInnerClassesSowsManure(unittest.TestCase): - """PostPorkRequestPorkInnerClassesSowsManure unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesSowsManure: - """Test PostPorkRequestPorkInnerClassesSowsManure - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesSowsManure` - """ - model = PostPorkRequestPorkInnerClassesSowsManure() - if include_optional: - return PostPorkRequestPorkInnerClassesSowsManure( - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - autumn = { - 'key' : null - }, - winter = { - 'key' : null - } - ) - else: - return PostPorkRequestPorkInnerClassesSowsManure( - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - ) - """ - - def testPostPorkRequestPorkInnerClassesSowsManure(self): - """Test PostPorkRequestPorkInnerClassesSowsManure""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure_spring.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure_spring.py deleted file mode 100644 index 326fe898..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_sows_manure_spring.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request_pork_inner_classes_sows_manure_spring import PostPorkRequestPorkInnerClassesSowsManureSpring - -class TestPostPorkRequestPorkInnerClassesSowsManureSpring(unittest.TestCase): - """PostPorkRequestPorkInnerClassesSowsManureSpring unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesSowsManureSpring: - """Test PostPorkRequestPorkInnerClassesSowsManureSpring - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesSowsManureSpring` - """ - model = PostPorkRequestPorkInnerClassesSowsManureSpring() - if include_optional: - return PostPorkRequestPorkInnerClassesSowsManureSpring( - outdoor_systems = 1.337, - covered_anaerobic_pond = 1.337, - uncovered_anaerobic_pond = 1.337, - deep_litter = 1.337, - undefined_system = 1.337 - ) - else: - return PostPorkRequestPorkInnerClassesSowsManureSpring( - ) - """ - - def testPostPorkRequestPorkInnerClassesSowsManureSpring(self): - """Test PostPorkRequestPorkInnerClassesSowsManureSpring""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_suckers.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_suckers.py deleted file mode 100644 index 92ebd389..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_suckers.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request_pork_inner_classes_suckers import PostPorkRequestPorkInnerClassesSuckers - -class TestPostPorkRequestPorkInnerClassesSuckers(unittest.TestCase): - """PostPorkRequestPorkInnerClassesSuckers unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesSuckers: - """Test PostPorkRequestPorkInnerClassesSuckers - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesSuckers` - """ - model = PostPorkRequestPorkInnerClassesSuckers() - if include_optional: - return PostPorkRequestPorkInnerClassesSuckers( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ], - manure = { - 'key' : null - } - ) - else: - return PostPorkRequestPorkInnerClassesSuckers( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - manure = { - 'key' : null - }, - ) - """ - - def testPostPorkRequestPorkInnerClassesSuckers(self): - """Test PostPorkRequestPorkInnerClassesSuckers""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_weaners.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_weaners.py deleted file mode 100644 index 5ff71cec..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_classes_weaners.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request_pork_inner_classes_weaners import PostPorkRequestPorkInnerClassesWeaners - -class TestPostPorkRequestPorkInnerClassesWeaners(unittest.TestCase): - """PostPorkRequestPorkInnerClassesWeaners unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequestPorkInnerClassesWeaners: - """Test PostPorkRequestPorkInnerClassesWeaners - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequestPorkInnerClassesWeaners` - """ - model = PostPorkRequestPorkInnerClassesWeaners() - if include_optional: - return PostPorkRequestPorkInnerClassesWeaners( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ], - manure = { - 'key' : null - } - ) - else: - return PostPorkRequestPorkInnerClassesWeaners( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - manure = { - 'key' : null - }, - ) - """ - - def testPostPorkRequestPorkInnerClassesWeaners(self): - """Test PostPorkRequestPorkInnerClassesWeaners""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner.py deleted file mode 100644 index 7bb98062..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request_pork_inner_feed_products_inner import PostPorkRequestPorkInnerFeedProductsInner - -class TestPostPorkRequestPorkInnerFeedProductsInner(unittest.TestCase): - """PostPorkRequestPorkInnerFeedProductsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequestPorkInnerFeedProductsInner: - """Test PostPorkRequestPorkInnerFeedProductsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequestPorkInnerFeedProductsInner` - """ - model = PostPorkRequestPorkInnerFeedProductsInner() - if include_optional: - return PostPorkRequestPorkInnerFeedProductsInner( - feed_purchased = 1.337, - additional_ingredients = 0, - emissions_intensity = 1.337, - ingredients = { - 'key' : null - } - ) - else: - return PostPorkRequestPorkInnerFeedProductsInner( - feed_purchased = 1.337, - additional_ingredients = 0, - emissions_intensity = 1.337, - ingredients = { - 'key' : null - }, - ) - """ - - def testPostPorkRequestPorkInnerFeedProductsInner(self): - """Test PostPorkRequestPorkInnerFeedProductsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner_ingredients.py b/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner_ingredients.py deleted file mode 100644 index 0cd01412..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request_pork_inner_feed_products_inner_ingredients.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request_pork_inner_feed_products_inner_ingredients import PostPorkRequestPorkInnerFeedProductsInnerIngredients - -class TestPostPorkRequestPorkInnerFeedProductsInnerIngredients(unittest.TestCase): - """PostPorkRequestPorkInnerFeedProductsInnerIngredients unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequestPorkInnerFeedProductsInnerIngredients: - """Test PostPorkRequestPorkInnerFeedProductsInnerIngredients - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequestPorkInnerFeedProductsInnerIngredients` - """ - model = PostPorkRequestPorkInnerFeedProductsInnerIngredients() - if include_optional: - return PostPorkRequestPorkInnerFeedProductsInnerIngredients( - wheat = 0, - barley = 0, - whey_powder = 0, - canola_meal = 0, - soybean_meal = 0, - meat_meal = 0, - blood_meal = 0, - fishmeal = 0, - tallow = 0, - wheat_bran = 0, - beet_pulp = 0, - mill_mix = 0 - ) - else: - return PostPorkRequestPorkInnerFeedProductsInnerIngredients( - ) - """ - - def testPostPorkRequestPorkInnerFeedProductsInnerIngredients(self): - """Test PostPorkRequestPorkInnerFeedProductsInnerIngredients""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_pork_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_pork_request_vegetation_inner.py deleted file mode 100644 index 9aa5d358..00000000 --- a/examples/python-api-client/api-client/test/test_post_pork_request_vegetation_inner.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_pork_request_vegetation_inner import PostPorkRequestVegetationInner - -class TestPostPorkRequestVegetationInner(unittest.TestCase): - """PostPorkRequestVegetationInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPorkRequestVegetationInner: - """Test PostPorkRequestVegetationInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPorkRequestVegetationInner` - """ - model = PostPorkRequestVegetationInner() - if include_optional: - return PostPorkRequestVegetationInner( - vegetation = { - 'key' : null - }, - allocated_proportion = [ - 1.337 - ] - ) - else: - return PostPorkRequestVegetationInner( - vegetation = { - 'key' : null - }, - allocated_proportion = [ - 1.337 - ], - ) - """ - - def testPostPorkRequestVegetationInner(self): - """Test PostPorkRequestVegetationInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response.py b/examples/python-api-client/api-client/test/test_post_poultry200_response.py deleted file mode 100644 index b0c38981..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry200_response.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry200_response import PostPoultry200Response - -class TestPostPoultry200Response(unittest.TestCase): - """PostPoultry200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultry200Response: - """Test PostPoultry200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultry200Response` - """ - model = PostPoultry200Response() - if include_optional: - return PostPoultry200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate_broilers = [ - { - 'key' : null - } - ], - intermediate_layers = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = { - 'key' : null - } - ) - else: - return PostPoultry200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate_broilers = [ - { - 'key' : null - } - ], - intermediate_layers = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - ) - """ - - def testPostPoultry200Response(self): - """Test PostPoultry200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_intensities.py deleted file mode 100644 index ec882d2c..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry200_response_intensities.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry200_response_intensities import PostPoultry200ResponseIntensities - -class TestPostPoultry200ResponseIntensities(unittest.TestCase): - """PostPoultry200ResponseIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultry200ResponseIntensities: - """Test PostPoultry200ResponseIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultry200ResponseIntensities` - """ - model = PostPoultry200ResponseIntensities() - if include_optional: - return PostPoultry200ResponseIntensities( - poultry_meat_including_sequestration = 1.337, - poultry_meat_excluding_sequestration = 1.337, - poultry_eggs_including_sequestration = 1.337, - poultry_eggs_excluding_sequestration = 1.337, - meat_produced_kg = 1.337, - eggs_produced_kg = 1.337 - ) - else: - return PostPoultry200ResponseIntensities( - poultry_meat_including_sequestration = 1.337, - poultry_meat_excluding_sequestration = 1.337, - poultry_eggs_including_sequestration = 1.337, - poultry_eggs_excluding_sequestration = 1.337, - meat_produced_kg = 1.337, - eggs_produced_kg = 1.337, - ) - """ - - def testPostPoultry200ResponseIntensities(self): - """Test PostPoultry200ResponseIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner.py deleted file mode 100644 index 5ea8c76d..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry200_response_intermediate_broilers_inner import PostPoultry200ResponseIntermediateBroilersInner - -class TestPostPoultry200ResponseIntermediateBroilersInner(unittest.TestCase): - """PostPoultry200ResponseIntermediateBroilersInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultry200ResponseIntermediateBroilersInner: - """Test PostPoultry200ResponseIntermediateBroilersInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultry200ResponseIntermediateBroilersInner` - """ - model = PostPoultry200ResponseIntermediateBroilersInner() - if include_optional: - return PostPoultry200ResponseIntermediateBroilersInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intensities = { - 'key' : null - }, - net = { - 'key' : null - } - ) - else: - return PostPoultry200ResponseIntermediateBroilersInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - ) - """ - - def testPostPoultry200ResponseIntermediateBroilersInner(self): - """Test PostPoultry200ResponseIntermediateBroilersInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner_intensities.py deleted file mode 100644 index 622211ff..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_broilers_inner_intensities.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry200_response_intermediate_broilers_inner_intensities import PostPoultry200ResponseIntermediateBroilersInnerIntensities - -class TestPostPoultry200ResponseIntermediateBroilersInnerIntensities(unittest.TestCase): - """PostPoultry200ResponseIntermediateBroilersInnerIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultry200ResponseIntermediateBroilersInnerIntensities: - """Test PostPoultry200ResponseIntermediateBroilersInnerIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultry200ResponseIntermediateBroilersInnerIntensities` - """ - model = PostPoultry200ResponseIntermediateBroilersInnerIntensities() - if include_optional: - return PostPoultry200ResponseIntermediateBroilersInnerIntensities( - poultry_meat_including_sequestration = 1.337, - poultry_meat_excluding_sequestration = 1.337, - meat_produced_kg = 1.337 - ) - else: - return PostPoultry200ResponseIntermediateBroilersInnerIntensities( - poultry_meat_including_sequestration = 1.337, - poultry_meat_excluding_sequestration = 1.337, - meat_produced_kg = 1.337, - ) - """ - - def testPostPoultry200ResponseIntermediateBroilersInnerIntensities(self): - """Test PostPoultry200ResponseIntermediateBroilersInnerIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner.py deleted file mode 100644 index 946bb8eb..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry200_response_intermediate_layers_inner import PostPoultry200ResponseIntermediateLayersInner - -class TestPostPoultry200ResponseIntermediateLayersInner(unittest.TestCase): - """PostPoultry200ResponseIntermediateLayersInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultry200ResponseIntermediateLayersInner: - """Test PostPoultry200ResponseIntermediateLayersInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultry200ResponseIntermediateLayersInner` - """ - model = PostPoultry200ResponseIntermediateLayersInner() - if include_optional: - return PostPoultry200ResponseIntermediateLayersInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intensities = { - 'key' : null - }, - net = { - 'key' : null - } - ) - else: - return PostPoultry200ResponseIntermediateLayersInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - ) - """ - - def testPostPoultry200ResponseIntermediateLayersInner(self): - """Test PostPoultry200ResponseIntermediateLayersInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner_intensities.py deleted file mode 100644 index afc1e883..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry200_response_intermediate_layers_inner_intensities.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry200_response_intermediate_layers_inner_intensities import PostPoultry200ResponseIntermediateLayersInnerIntensities - -class TestPostPoultry200ResponseIntermediateLayersInnerIntensities(unittest.TestCase): - """PostPoultry200ResponseIntermediateLayersInnerIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultry200ResponseIntermediateLayersInnerIntensities: - """Test PostPoultry200ResponseIntermediateLayersInnerIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultry200ResponseIntermediateLayersInnerIntensities` - """ - model = PostPoultry200ResponseIntermediateLayersInnerIntensities() - if include_optional: - return PostPoultry200ResponseIntermediateLayersInnerIntensities( - poultry_eggs_including_sequestration = 1.337, - poultry_eggs_excluding_sequestration = 1.337, - eggs_produced_kg = 1.337 - ) - else: - return PostPoultry200ResponseIntermediateLayersInnerIntensities( - poultry_eggs_including_sequestration = 1.337, - poultry_eggs_excluding_sequestration = 1.337, - eggs_produced_kg = 1.337, - ) - """ - - def testPostPoultry200ResponseIntermediateLayersInnerIntensities(self): - """Test PostPoultry200ResponseIntermediateLayersInnerIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_net.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_net.py deleted file mode 100644 index e6caa6d3..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry200_response_net.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry200_response_net import PostPoultry200ResponseNet - -class TestPostPoultry200ResponseNet(unittest.TestCase): - """PostPoultry200ResponseNet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultry200ResponseNet: - """Test PostPoultry200ResponseNet - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultry200ResponseNet` - """ - model = PostPoultry200ResponseNet() - if include_optional: - return PostPoultry200ResponseNet( - total = 1.337, - broilers = 1.337, - layers = 1.337 - ) - else: - return PostPoultry200ResponseNet( - total = 1.337, - broilers = 1.337, - layers = 1.337, - ) - """ - - def testPostPoultry200ResponseNet(self): - """Test PostPoultry200ResponseNet""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_scope1.py deleted file mode 100644 index 58aa188a..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry200_response_scope1.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry200_response_scope1 import PostPoultry200ResponseScope1 - -class TestPostPoultry200ResponseScope1(unittest.TestCase): - """PostPoultry200ResponseScope1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultry200ResponseScope1: - """Test PostPoultry200ResponseScope1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultry200ResponseScope1` - """ - model = PostPoultry200ResponseScope1() - if include_optional: - return PostPoultry200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - manure_management_ch4 = 1.337, - manure_management_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337 - ) - else: - return PostPoultry200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - manure_management_ch4 = 1.337, - manure_management_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337, - ) - """ - - def testPostPoultry200ResponseScope1(self): - """Test PostPoultry200ResponseScope1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_poultry200_response_scope3.py deleted file mode 100644 index f5018958..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry200_response_scope3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry200_response_scope3 import PostPoultry200ResponseScope3 - -class TestPostPoultry200ResponseScope3(unittest.TestCase): - """PostPoultry200ResponseScope3 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultry200ResponseScope3: - """Test PostPoultry200ResponseScope3 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultry200ResponseScope3` - """ - model = PostPoultry200ResponseScope3() - if include_optional: - return PostPoultry200ResponseScope3( - purchased_feed = 1.337, - purchased_hay = 1.337, - purchased_livestock = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - total = 1.337 - ) - else: - return PostPoultry200ResponseScope3( - purchased_feed = 1.337, - purchased_hay = 1.337, - purchased_livestock = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - total = 1.337, - ) - """ - - def testPostPoultry200ResponseScope3(self): - """Test PostPoultry200ResponseScope3""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request.py b/examples/python-api-client/api-client/test/test_post_poultry_request.py deleted file mode 100644 index 1b1b25dc..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request import PostPoultryRequest - -class TestPostPoultryRequest(unittest.TestCase): - """PostPoultryRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequest: - """Test PostPoultryRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequest` - """ - model = PostPoultryRequest() - if include_optional: - return PostPoultryRequest( - state = 'nsw', - north_of_tropic_of_capricorn = True, - rainfall_above600 = True, - broilers = [ - { - 'key' : null - } - ], - layers = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostPoultryRequest( - state = 'nsw', - north_of_tropic_of_capricorn = True, - rainfall_above600 = True, - broilers = [ - { - 'key' : null - } - ], - layers = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostPoultryRequest(self): - """Test PostPoultryRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner.py deleted file mode 100644 index abcf0c41..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_broilers_inner import PostPoultryRequestBroilersInner - -class TestPostPoultryRequestBroilersInner(unittest.TestCase): - """PostPoultryRequestBroilersInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestBroilersInner: - """Test PostPoultryRequestBroilersInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestBroilersInner` - """ - model = PostPoultryRequestBroilersInner() - if include_optional: - return PostPoultryRequestBroilersInner( - id = '', - groups = [ - { - 'key' : null - } - ], - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - hay = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - manure_waste_allocation = 1.337, - waste_handled_drylot_or_storage = 1.337, - litter_recycled = 1.337, - litter_recycle_frequency = 1.337, - purchased_free_range = 1.337, - meat_chicken_growers_purchases = { - 'key' : null - }, - meat_chicken_layers_purchases = { - 'key' : null - }, - meat_other_purchases = { - 'key' : null - }, - sales = [ - { - 'key' : null - } - ] - ) - else: - return PostPoultryRequestBroilersInner( - groups = [ - { - 'key' : null - } - ], - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - hay = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - manure_waste_allocation = 1.337, - waste_handled_drylot_or_storage = 1.337, - litter_recycled = 1.337, - litter_recycle_frequency = 1.337, - purchased_free_range = 1.337, - meat_chicken_growers_purchases = { - 'key' : null - }, - meat_chicken_layers_purchases = { - 'key' : null - }, - meat_other_purchases = { - 'key' : null - }, - sales = [ - { - 'key' : null - } - ], - ) - """ - - def testPostPoultryRequestBroilersInner(self): - """Test PostPoultryRequestBroilersInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner.py deleted file mode 100644 index e6009ef4..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_broilers_inner_groups_inner import PostPoultryRequestBroilersInnerGroupsInner - -class TestPostPoultryRequestBroilersInnerGroupsInner(unittest.TestCase): - """PostPoultryRequestBroilersInnerGroupsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerGroupsInner: - """Test PostPoultryRequestBroilersInnerGroupsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestBroilersInnerGroupsInner` - """ - model = PostPoultryRequestBroilersInnerGroupsInner() - if include_optional: - return PostPoultryRequestBroilersInnerGroupsInner( - meat_chicken_growers = { - 'key' : null - }, - meat_chicken_layers = { - 'key' : null - }, - meat_other = { - 'key' : null - }, - feed = [ - { - 'key' : null - } - ], - custom_feed_purchased = 1.337, - custom_feed_emission_intensity = 1.337 - ) - else: - return PostPoultryRequestBroilersInnerGroupsInner( - meat_chicken_growers = { - 'key' : null - }, - meat_chicken_layers = { - 'key' : null - }, - meat_other = { - 'key' : null - }, - feed = [ - { - 'key' : null - } - ], - custom_feed_purchased = 1.337, - custom_feed_emission_intensity = 1.337, - ) - """ - - def testPostPoultryRequestBroilersInnerGroupsInner(self): - """Test PostPoultryRequestBroilersInnerGroupsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner.py deleted file mode 100644 index 39560083..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner import PostPoultryRequestBroilersInnerGroupsInnerFeedInner - -class TestPostPoultryRequestBroilersInnerGroupsInnerFeedInner(unittest.TestCase): - """PostPoultryRequestBroilersInnerGroupsInnerFeedInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerGroupsInnerFeedInner: - """Test PostPoultryRequestBroilersInnerGroupsInnerFeedInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestBroilersInnerGroupsInnerFeedInner` - """ - model = PostPoultryRequestBroilersInnerGroupsInnerFeedInner() - if include_optional: - return PostPoultryRequestBroilersInnerGroupsInnerFeedInner( - ingredients = { - 'key' : null - }, - feed_purchased = 1.337, - additional_ingredient = 1.337, - emission_intensity = 1.337 - ) - else: - return PostPoultryRequestBroilersInnerGroupsInnerFeedInner( - ingredients = { - 'key' : null - }, - feed_purchased = 1.337, - additional_ingredient = 1.337, - emission_intensity = 1.337, - ) - """ - - def testPostPoultryRequestBroilersInnerGroupsInnerFeedInner(self): - """Test PostPoultryRequestBroilersInnerGroupsInnerFeedInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py deleted file mode 100644 index 49b923c0..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_feed_inner_ingredients import PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients - -class TestPostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients(unittest.TestCase): - """PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients: - """Test PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients` - """ - model = PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients() - if include_optional: - return PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients( - wheat = 1.337, - barley = 1.337, - sorghum = 1.337, - soybean = 1.337, - millrun = 1.337 - ) - else: - return PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients( - ) - """ - - def testPostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients(self): - """Test PostPoultryRequestBroilersInnerGroupsInnerFeedInnerIngredients""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py deleted file mode 100644 index ec8f8fd8..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_broilers_inner_groups_inner_meat_chicken_growers import PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers - -class TestPostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers(unittest.TestCase): - """PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers: - """Test PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers` - """ - model = PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers() - if include_optional: - return PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers( - birds = 1.337, - average_stay_length50 = 1.337, - liveweight50 = 1.337, - average_stay_length100 = 1.337, - liveweight100 = 1.337, - dry_matter_intake = 1.337, - dry_matter_digestibility = 1.337, - crude_protein = 1.337, - manure_ash = 1.337, - nitrogen_retention_rate = 1.337 - ) - else: - return PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers( - birds = 1.337, - average_stay_length50 = 1.337, - liveweight50 = 1.337, - average_stay_length100 = 1.337, - liveweight100 = 1.337, - ) - """ - - def testPostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers(self): - """Test PostPoultryRequestBroilersInnerGroupsInnerMeatChickenGrowers""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py deleted file mode 100644 index b4df0e84..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_growers_purchases.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_growers_purchases import PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases - -class TestPostPoultryRequestBroilersInnerMeatChickenGrowersPurchases(unittest.TestCase): - """PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases: - """Test PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases` - """ - model = PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases() - if include_optional: - return PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases( - head = 1.337, - purchase_weight = 1.337 - ) - else: - return PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases( - head = 1.337, - purchase_weight = 1.337, - ) - """ - - def testPostPoultryRequestBroilersInnerMeatChickenGrowersPurchases(self): - """Test PostPoultryRequestBroilersInnerMeatChickenGrowersPurchases""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py deleted file mode 100644 index 7e9f0221..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_chicken_layers_purchases.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_broilers_inner_meat_chicken_layers_purchases import PostPoultryRequestBroilersInnerMeatChickenLayersPurchases - -class TestPostPoultryRequestBroilersInnerMeatChickenLayersPurchases(unittest.TestCase): - """PostPoultryRequestBroilersInnerMeatChickenLayersPurchases unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerMeatChickenLayersPurchases: - """Test PostPoultryRequestBroilersInnerMeatChickenLayersPurchases - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestBroilersInnerMeatChickenLayersPurchases` - """ - model = PostPoultryRequestBroilersInnerMeatChickenLayersPurchases() - if include_optional: - return PostPoultryRequestBroilersInnerMeatChickenLayersPurchases( - head = 1.337, - purchase_weight = 1.337 - ) - else: - return PostPoultryRequestBroilersInnerMeatChickenLayersPurchases( - head = 1.337, - purchase_weight = 1.337, - ) - """ - - def testPostPoultryRequestBroilersInnerMeatChickenLayersPurchases(self): - """Test PostPoultryRequestBroilersInnerMeatChickenLayersPurchases""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_other_purchases.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_other_purchases.py deleted file mode 100644 index c2b72e50..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_meat_other_purchases.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_broilers_inner_meat_other_purchases import PostPoultryRequestBroilersInnerMeatOtherPurchases - -class TestPostPoultryRequestBroilersInnerMeatOtherPurchases(unittest.TestCase): - """PostPoultryRequestBroilersInnerMeatOtherPurchases unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerMeatOtherPurchases: - """Test PostPoultryRequestBroilersInnerMeatOtherPurchases - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestBroilersInnerMeatOtherPurchases` - """ - model = PostPoultryRequestBroilersInnerMeatOtherPurchases() - if include_optional: - return PostPoultryRequestBroilersInnerMeatOtherPurchases( - head = 1.337, - purchase_weight = 1.337 - ) - else: - return PostPoultryRequestBroilersInnerMeatOtherPurchases( - head = 1.337, - purchase_weight = 1.337, - ) - """ - - def testPostPoultryRequestBroilersInnerMeatOtherPurchases(self): - """Test PostPoultryRequestBroilersInnerMeatOtherPurchases""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_sales_inner.py b/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_sales_inner.py deleted file mode 100644 index 08976099..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_broilers_inner_sales_inner.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_broilers_inner_sales_inner import PostPoultryRequestBroilersInnerSalesInner - -class TestPostPoultryRequestBroilersInnerSalesInner(unittest.TestCase): - """PostPoultryRequestBroilersInnerSalesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestBroilersInnerSalesInner: - """Test PostPoultryRequestBroilersInnerSalesInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestBroilersInnerSalesInner` - """ - model = PostPoultryRequestBroilersInnerSalesInner() - if include_optional: - return PostPoultryRequestBroilersInnerSalesInner( - meat_chicken_growers_sales = { - 'key' : null - }, - meat_chicken_layers = { - 'key' : null - }, - meat_other = { - 'key' : null - } - ) - else: - return PostPoultryRequestBroilersInnerSalesInner( - meat_chicken_growers_sales = { - 'key' : null - }, - meat_chicken_layers = { - 'key' : null - }, - meat_other = { - 'key' : null - }, - ) - """ - - def testPostPoultryRequestBroilersInnerSalesInner(self): - """Test PostPoultryRequestBroilersInnerSalesInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner.py b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner.py deleted file mode 100644 index c69577d9..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_layers_inner import PostPoultryRequestLayersInner - -class TestPostPoultryRequestLayersInner(unittest.TestCase): - """PostPoultryRequestLayersInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestLayersInner: - """Test PostPoultryRequestLayersInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestLayersInner` - """ - model = PostPoultryRequestLayersInner() - if include_optional: - return PostPoultryRequestLayersInner( - id = '', - layers = { - 'key' : null - }, - meat_chicken_layers = { - 'key' : null - }, - feed = [ - { - 'key' : null - } - ], - purchased_free_range = 1.337, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - hay = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - manure_waste_allocation = 1.337, - waste_handled_drylot_or_storage = 1.337, - litter_recycled = 1.337, - litter_recycle_frequency = 1.337, - meat_chicken_layers_purchases = { - 'key' : null - }, - layers_purchases = { - 'key' : null - }, - custom_feed_purchased = 1.337, - custom_feed_emission_intensity = 1.337, - meat_chicken_layers_egg_sale = { - 'key' : null - }, - layers_egg_sale = { - 'key' : null - } - ) - else: - return PostPoultryRequestLayersInner( - layers = { - 'key' : null - }, - meat_chicken_layers = { - 'key' : null - }, - feed = [ - { - 'key' : null - } - ], - purchased_free_range = 1.337, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - hay = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - manure_waste_allocation = 1.337, - waste_handled_drylot_or_storage = 1.337, - litter_recycled = 1.337, - litter_recycle_frequency = 1.337, - meat_chicken_layers_purchases = { - 'key' : null - }, - layers_purchases = { - 'key' : null - }, - custom_feed_purchased = 1.337, - custom_feed_emission_intensity = 1.337, - meat_chicken_layers_egg_sale = { - 'key' : null - }, - layers_egg_sale = { - 'key' : null - }, - ) - """ - - def testPostPoultryRequestLayersInner(self): - """Test PostPoultryRequestLayersInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers.py b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers.py deleted file mode 100644 index 6f5bc4fe..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_layers_inner_layers import PostPoultryRequestLayersInnerLayers - -class TestPostPoultryRequestLayersInnerLayers(unittest.TestCase): - """PostPoultryRequestLayersInnerLayers unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestLayersInnerLayers: - """Test PostPoultryRequestLayersInnerLayers - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestLayersInnerLayers` - """ - model = PostPoultryRequestLayersInnerLayers() - if include_optional: - return PostPoultryRequestLayersInnerLayers( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337 - ) - else: - return PostPoultryRequestLayersInnerLayers( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - ) - """ - - def testPostPoultryRequestLayersInnerLayers(self): - """Test PostPoultryRequestLayersInnerLayers""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_egg_sale.py b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_egg_sale.py deleted file mode 100644 index a195d572..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_egg_sale.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_layers_inner_layers_egg_sale import PostPoultryRequestLayersInnerLayersEggSale - -class TestPostPoultryRequestLayersInnerLayersEggSale(unittest.TestCase): - """PostPoultryRequestLayersInnerLayersEggSale unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestLayersInnerLayersEggSale: - """Test PostPoultryRequestLayersInnerLayersEggSale - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestLayersInnerLayersEggSale` - """ - model = PostPoultryRequestLayersInnerLayersEggSale() - if include_optional: - return PostPoultryRequestLayersInnerLayersEggSale( - eggs_produced = 1.337, - average_weight = 1.337 - ) - else: - return PostPoultryRequestLayersInnerLayersEggSale( - eggs_produced = 1.337, - average_weight = 1.337, - ) - """ - - def testPostPoultryRequestLayersInnerLayersEggSale(self): - """Test PostPoultryRequestLayersInnerLayersEggSale""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_purchases.py b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_purchases.py deleted file mode 100644 index 77379408..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_layers_purchases.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_layers_inner_layers_purchases import PostPoultryRequestLayersInnerLayersPurchases - -class TestPostPoultryRequestLayersInnerLayersPurchases(unittest.TestCase): - """PostPoultryRequestLayersInnerLayersPurchases unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestLayersInnerLayersPurchases: - """Test PostPoultryRequestLayersInnerLayersPurchases - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestLayersInnerLayersPurchases` - """ - model = PostPoultryRequestLayersInnerLayersPurchases() - if include_optional: - return PostPoultryRequestLayersInnerLayersPurchases( - head = 1.337, - purchase_weight = 1.337 - ) - else: - return PostPoultryRequestLayersInnerLayersPurchases( - head = 1.337, - purchase_weight = 1.337, - ) - """ - - def testPostPoultryRequestLayersInnerLayersPurchases(self): - """Test PostPoultryRequestLayersInnerLayersPurchases""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers.py b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers.py deleted file mode 100644 index 2ff5d48a..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_layers_inner_meat_chicken_layers import PostPoultryRequestLayersInnerMeatChickenLayers - -class TestPostPoultryRequestLayersInnerMeatChickenLayers(unittest.TestCase): - """PostPoultryRequestLayersInnerMeatChickenLayers unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestLayersInnerMeatChickenLayers: - """Test PostPoultryRequestLayersInnerMeatChickenLayers - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestLayersInnerMeatChickenLayers` - """ - model = PostPoultryRequestLayersInnerMeatChickenLayers() - if include_optional: - return PostPoultryRequestLayersInnerMeatChickenLayers( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337 - ) - else: - return PostPoultryRequestLayersInnerMeatChickenLayers( - autumn = 1.337, - winter = 1.337, - spring = 1.337, - summer = 1.337, - ) - """ - - def testPostPoultryRequestLayersInnerMeatChickenLayers(self): - """Test PostPoultryRequestLayersInnerMeatChickenLayers""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py b/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py deleted file mode 100644 index 1c372630..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_layers_inner_meat_chicken_layers_egg_sale.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_layers_inner_meat_chicken_layers_egg_sale import PostPoultryRequestLayersInnerMeatChickenLayersEggSale - -class TestPostPoultryRequestLayersInnerMeatChickenLayersEggSale(unittest.TestCase): - """PostPoultryRequestLayersInnerMeatChickenLayersEggSale unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestLayersInnerMeatChickenLayersEggSale: - """Test PostPoultryRequestLayersInnerMeatChickenLayersEggSale - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestLayersInnerMeatChickenLayersEggSale` - """ - model = PostPoultryRequestLayersInnerMeatChickenLayersEggSale() - if include_optional: - return PostPoultryRequestLayersInnerMeatChickenLayersEggSale( - eggs_produced = 1.337, - average_weight = 1.337 - ) - else: - return PostPoultryRequestLayersInnerMeatChickenLayersEggSale( - eggs_produced = 1.337, - average_weight = 1.337, - ) - """ - - def testPostPoultryRequestLayersInnerMeatChickenLayersEggSale(self): - """Test PostPoultryRequestLayersInnerMeatChickenLayersEggSale""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_poultry_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_poultry_request_vegetation_inner.py deleted file mode 100644 index 6530a8d1..00000000 --- a/examples/python-api-client/api-client/test/test_post_poultry_request_vegetation_inner.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_poultry_request_vegetation_inner import PostPoultryRequestVegetationInner - -class TestPostPoultryRequestVegetationInner(unittest.TestCase): - """PostPoultryRequestVegetationInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostPoultryRequestVegetationInner: - """Test PostPoultryRequestVegetationInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostPoultryRequestVegetationInner` - """ - model = PostPoultryRequestVegetationInner() - if include_optional: - return PostPoultryRequestVegetationInner( - vegetation = { - 'key' : null - }, - broilers_proportion = [ - 1.337 - ], - layers_proportion = [ - 1.337 - ] - ) - else: - return PostPoultryRequestVegetationInner( - vegetation = { - 'key' : null - }, - broilers_proportion = [ - 1.337 - ], - layers_proportion = [ - 1.337 - ], - ) - """ - - def testPostPoultryRequestVegetationInner(self): - """Test PostPoultryRequestVegetationInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing200_response.py b/examples/python-api-client/api-client/test/test_post_processing200_response.py deleted file mode 100644 index 8b81b6b7..00000000 --- a/examples/python-api-client/api-client/test/test_post_processing200_response.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_processing200_response import PostProcessing200Response - -class TestPostProcessing200Response(unittest.TestCase): - """PostProcessing200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostProcessing200Response: - """Test PostProcessing200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostProcessing200Response` - """ - model = PostProcessing200Response() - if include_optional: - return PostProcessing200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - purchased_offsets = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = [ - { - 'key' : null - } - ], - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ] - ) - else: - return PostProcessing200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - purchased_offsets = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = [ - { - 'key' : null - } - ], - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - ) - """ - - def testPostProcessing200Response(self): - """Test PostProcessing200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing200_response_intensities_inner.py b/examples/python-api-client/api-client/test/test_post_processing200_response_intensities_inner.py deleted file mode 100644 index 240f4cdc..00000000 --- a/examples/python-api-client/api-client/test/test_post_processing200_response_intensities_inner.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_processing200_response_intensities_inner import PostProcessing200ResponseIntensitiesInner - -class TestPostProcessing200ResponseIntensitiesInner(unittest.TestCase): - """PostProcessing200ResponseIntensitiesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostProcessing200ResponseIntensitiesInner: - """Test PostProcessing200ResponseIntensitiesInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostProcessing200ResponseIntensitiesInner` - """ - model = PostProcessing200ResponseIntensitiesInner() - if include_optional: - return PostProcessing200ResponseIntensitiesInner( - units_produced = 1.337, - unit_of_product = 'litre', - processing_excluding_carbon_offsets = 1.337, - processing_including_carbon_offsets = 1.337 - ) - else: - return PostProcessing200ResponseIntensitiesInner( - units_produced = 1.337, - unit_of_product = 'litre', - processing_excluding_carbon_offsets = 1.337, - processing_including_carbon_offsets = 1.337, - ) - """ - - def testPostProcessing200ResponseIntensitiesInner(self): - """Test PostProcessing200ResponseIntensitiesInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_processing200_response_intermediate_inner.py deleted file mode 100644 index 78a09351..00000000 --- a/examples/python-api-client/api-client/test/test_post_processing200_response_intermediate_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_processing200_response_intermediate_inner import PostProcessing200ResponseIntermediateInner - -class TestPostProcessing200ResponseIntermediateInner(unittest.TestCase): - """PostProcessing200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostProcessing200ResponseIntermediateInner: - """Test PostProcessing200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostProcessing200ResponseIntermediateInner` - """ - model = PostProcessing200ResponseIntermediateInner() - if include_optional: - return PostProcessing200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intensities = { - 'key' : null - }, - net = { - 'key' : null - } - ) - else: - return PostProcessing200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - ) - """ - - def testPostProcessing200ResponseIntermediateInner(self): - """Test PostProcessing200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing200_response_net.py b/examples/python-api-client/api-client/test/test_post_processing200_response_net.py deleted file mode 100644 index 1548d9ff..00000000 --- a/examples/python-api-client/api-client/test/test_post_processing200_response_net.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_processing200_response_net import PostProcessing200ResponseNet - -class TestPostProcessing200ResponseNet(unittest.TestCase): - """PostProcessing200ResponseNet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostProcessing200ResponseNet: - """Test PostProcessing200ResponseNet - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostProcessing200ResponseNet` - """ - model = PostProcessing200ResponseNet() - if include_optional: - return PostProcessing200ResponseNet( - total = 1.337 - ) - else: - return PostProcessing200ResponseNet( - total = 1.337, - ) - """ - - def testPostProcessing200ResponseNet(self): - """Test PostProcessing200ResponseNet""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_processing200_response_scope1.py deleted file mode 100644 index 4aa407df..00000000 --- a/examples/python-api-client/api-client/test/test_post_processing200_response_scope1.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_processing200_response_scope1 import PostProcessing200ResponseScope1 - -class TestPostProcessing200ResponseScope1(unittest.TestCase): - """PostProcessing200ResponseScope1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostProcessing200ResponseScope1: - """Test PostProcessing200ResponseScope1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostProcessing200ResponseScope1` - """ - model = PostProcessing200ResponseScope1() - if include_optional: - return PostProcessing200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - hfcs_refrigerant_leakage = 1.337, - purchased_co2 = 1.337, - wastewater_co2 = 1.337, - composted_solid_waste_co2 = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total_hfcs = 1.337, - total = 1.337 - ) - else: - return PostProcessing200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - hfcs_refrigerant_leakage = 1.337, - purchased_co2 = 1.337, - wastewater_co2 = 1.337, - composted_solid_waste_co2 = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total_hfcs = 1.337, - total = 1.337, - ) - """ - - def testPostProcessing200ResponseScope1(self): - """Test PostProcessing200ResponseScope1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_processing200_response_scope3.py deleted file mode 100644 index 2d35bddc..00000000 --- a/examples/python-api-client/api-client/test/test_post_processing200_response_scope3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_processing200_response_scope3 import PostProcessing200ResponseScope3 - -class TestPostProcessing200ResponseScope3(unittest.TestCase): - """PostProcessing200ResponseScope3 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostProcessing200ResponseScope3: - """Test PostProcessing200ResponseScope3 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostProcessing200ResponseScope3` - """ - model = PostProcessing200ResponseScope3() - if include_optional: - return PostProcessing200ResponseScope3( - electricity = 1.337, - fuel = 1.337, - solid_waste_sent_offsite = 1.337, - total = 1.337 - ) - else: - return PostProcessing200ResponseScope3( - electricity = 1.337, - fuel = 1.337, - solid_waste_sent_offsite = 1.337, - total = 1.337, - ) - """ - - def testPostProcessing200ResponseScope3(self): - """Test PostProcessing200ResponseScope3""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing_request.py b/examples/python-api-client/api-client/test/test_post_processing_request.py deleted file mode 100644 index 929f1a23..00000000 --- a/examples/python-api-client/api-client/test/test_post_processing_request.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_processing_request import PostProcessingRequest - -class TestPostProcessingRequest(unittest.TestCase): - """PostProcessingRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostProcessingRequest: - """Test PostProcessingRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostProcessingRequest` - """ - model = PostProcessingRequest() - if include_optional: - return PostProcessingRequest( - state = 'nsw', - products = [ - { - 'key' : null - } - ] - ) - else: - return PostProcessingRequest( - state = 'nsw', - products = [ - { - 'key' : null - } - ], - ) - """ - - def testPostProcessingRequest(self): - """Test PostProcessingRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing_request_products_inner.py b/examples/python-api-client/api-client/test/test_post_processing_request_products_inner.py deleted file mode 100644 index c3fe2e1a..00000000 --- a/examples/python-api-client/api-client/test/test_post_processing_request_products_inner.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_processing_request_products_inner import PostProcessingRequestProductsInner - -class TestPostProcessingRequestProductsInner(unittest.TestCase): - """PostProcessingRequestProductsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostProcessingRequestProductsInner: - """Test PostProcessingRequestProductsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostProcessingRequestProductsInner` - """ - model = PostProcessingRequestProductsInner() - if include_optional: - return PostProcessingRequestProductsInner( - id = '', - product = { - 'key' : null - }, - electricity_renewable = 0, - electricity_use = 1.337, - electricity_source = 'State Grid', - fuel = { - 'key' : null - }, - refrigerants = [ - openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner.post_horticulture_request_crops_inner_refrigerants_inner( - refrigerant = 'HFC-23', - charge_size = 1.337, ) - ], - fluid_waste = [ - { - 'key' : null - } - ], - solid_waste = { - 'key' : null - }, - purchased_co2 = 1.337, - carbon_offsets = 1.337 - ) - else: - return PostProcessingRequestProductsInner( - product = { - 'key' : null - }, - electricity_renewable = 0, - electricity_use = 1.337, - electricity_source = 'State Grid', - fuel = { - 'key' : null - }, - refrigerants = [ - openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner.post_horticulture_request_crops_inner_refrigerants_inner( - refrigerant = 'HFC-23', - charge_size = 1.337, ) - ], - fluid_waste = [ - { - 'key' : null - } - ], - solid_waste = { - 'key' : null - }, - purchased_co2 = 1.337, - ) - """ - - def testPostProcessingRequestProductsInner(self): - """Test PostProcessingRequestProductsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_processing_request_products_inner_product.py b/examples/python-api-client/api-client/test/test_post_processing_request_products_inner_product.py deleted file mode 100644 index fbcbf54d..00000000 --- a/examples/python-api-client/api-client/test/test_post_processing_request_products_inner_product.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_processing_request_products_inner_product import PostProcessingRequestProductsInnerProduct - -class TestPostProcessingRequestProductsInnerProduct(unittest.TestCase): - """PostProcessingRequestProductsInnerProduct unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostProcessingRequestProductsInnerProduct: - """Test PostProcessingRequestProductsInnerProduct - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostProcessingRequestProductsInnerProduct` - """ - model = PostProcessingRequestProductsInnerProduct() - if include_optional: - return PostProcessingRequestProductsInnerProduct( - unit = 'litre', - amount_made_per_year = 1.337 - ) - else: - return PostProcessingRequestProductsInnerProduct( - unit = 'litre', - amount_made_per_year = 1.337, - ) - """ - - def testPostProcessingRequestProductsInnerProduct(self): - """Test PostProcessingRequestProductsInnerProduct""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_rice200_response.py b/examples/python-api-client/api-client/test/test_post_rice200_response.py deleted file mode 100644 index 6d140d2d..00000000 --- a/examples/python-api-client/api-client/test/test_post_rice200_response.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_rice200_response import PostRice200Response - -class TestPostRice200Response(unittest.TestCase): - """PostRice200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostRice200Response: - """Test PostRice200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostRice200Response` - """ - model = PostRice200Response() - if include_optional: - return PostRice200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = { - 'key' : null - } - ) - else: - return PostRice200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - ) - """ - - def testPostRice200Response(self): - """Test PostRice200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_rice200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_rice200_response_intensities.py deleted file mode 100644 index 67fb71c7..00000000 --- a/examples/python-api-client/api-client/test/test_post_rice200_response_intensities.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_rice200_response_intensities import PostRice200ResponseIntensities - -class TestPostRice200ResponseIntensities(unittest.TestCase): - """PostRice200ResponseIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostRice200ResponseIntensities: - """Test PostRice200ResponseIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostRice200ResponseIntensities` - """ - model = PostRice200ResponseIntensities() - if include_optional: - return PostRice200ResponseIntensities( - rice_produced_tonnes = 1.337, - rice_excluding_sequestration = 1.337, - rice_including_sequestration = 1.337, - intensity = 1.337 - ) - else: - return PostRice200ResponseIntensities( - rice_produced_tonnes = 1.337, - rice_excluding_sequestration = 1.337, - rice_including_sequestration = 1.337, - intensity = 1.337, - ) - """ - - def testPostRice200ResponseIntensities(self): - """Test PostRice200ResponseIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner.py deleted file mode 100644 index b9ae225a..00000000 --- a/examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_rice200_response_intermediate_inner import PostRice200ResponseIntermediateInner - -class TestPostRice200ResponseIntermediateInner(unittest.TestCase): - """PostRice200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostRice200ResponseIntermediateInner: - """Test PostRice200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostRice200ResponseIntermediateInner` - """ - model = PostRice200ResponseIntermediateInner() - if include_optional: - return PostRice200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - intensities = { - 'key' : null - }, - net = { - 'key' : null - } - ) - else: - return PostRice200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - ) - """ - - def testPostRice200ResponseIntermediateInner(self): - """Test PostRice200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner_intensities.py deleted file mode 100644 index 9850bcf0..00000000 --- a/examples/python-api-client/api-client/test/test_post_rice200_response_intermediate_inner_intensities.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_rice200_response_intermediate_inner_intensities import PostRice200ResponseIntermediateInnerIntensities - -class TestPostRice200ResponseIntermediateInnerIntensities(unittest.TestCase): - """PostRice200ResponseIntermediateInnerIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostRice200ResponseIntermediateInnerIntensities: - """Test PostRice200ResponseIntermediateInnerIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostRice200ResponseIntermediateInnerIntensities` - """ - model = PostRice200ResponseIntermediateInnerIntensities() - if include_optional: - return PostRice200ResponseIntermediateInnerIntensities( - rice_produced_tonnes = 1.337, - rice_excluding_sequestration = 1.337, - rice_including_sequestration = 1.337, - intensity = 1.337 - ) - else: - return PostRice200ResponseIntermediateInnerIntensities( - rice_produced_tonnes = 1.337, - rice_excluding_sequestration = 1.337, - rice_including_sequestration = 1.337, - intensity = 1.337, - ) - """ - - def testPostRice200ResponseIntermediateInnerIntensities(self): - """Test PostRice200ResponseIntermediateInnerIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_rice200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_rice200_response_scope1.py deleted file mode 100644 index 445222e8..00000000 --- a/examples/python-api-client/api-client/test/test_post_rice200_response_scope1.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_rice200_response_scope1 import PostRice200ResponseScope1 - -class TestPostRice200ResponseScope1(unittest.TestCase): - """PostRice200ResponseScope1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostRice200ResponseScope1: - """Test PostRice200ResponseScope1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostRice200ResponseScope1` - """ - model = PostRice200ResponseScope1() - if include_optional: - return PostRice200ResponseScope1( - fuel_co2 = 1.337, - lime_co2 = 1.337, - urea_co2 = 1.337, - field_burning_ch4 = 1.337, - rice_cultivation_ch4 = 1.337, - fuel_ch4 = 1.337, - fertiliser_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - field_burning_n2_o = 1.337, - crop_residue_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - fuel_n2_o = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337 - ) - else: - return PostRice200ResponseScope1( - fuel_co2 = 1.337, - lime_co2 = 1.337, - urea_co2 = 1.337, - field_burning_ch4 = 1.337, - rice_cultivation_ch4 = 1.337, - fuel_ch4 = 1.337, - fertiliser_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - field_burning_n2_o = 1.337, - crop_residue_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - fuel_n2_o = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337, - ) - """ - - def testPostRice200ResponseScope1(self): - """Test PostRice200ResponseScope1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_rice_request.py b/examples/python-api-client/api-client/test/test_post_rice_request.py deleted file mode 100644 index 3316dd91..00000000 --- a/examples/python-api-client/api-client/test/test_post_rice_request.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_rice_request import PostRiceRequest - -class TestPostRiceRequest(unittest.TestCase): - """PostRiceRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostRiceRequest: - """Test PostRiceRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostRiceRequest` - """ - model = PostRiceRequest() - if include_optional: - return PostRiceRequest( - state = 'nsw', - crops = [ - { - 'key' : null - } - ], - electricity_renewable = 0, - electricity_use = 1.337, - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostRiceRequest( - state = 'nsw', - crops = [ - { - 'key' : null - } - ], - electricity_renewable = 0, - electricity_use = 1.337, - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostRiceRequest(self): - """Test PostRiceRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_rice_request_crops_inner.py b/examples/python-api-client/api-client/test/test_post_rice_request_crops_inner.py deleted file mode 100644 index b9a667a0..00000000 --- a/examples/python-api-client/api-client/test/test_post_rice_request_crops_inner.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_rice_request_crops_inner import PostRiceRequestCropsInner - -class TestPostRiceRequestCropsInner(unittest.TestCase): - """PostRiceRequestCropsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostRiceRequestCropsInner: - """Test PostRiceRequestCropsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostRiceRequestCropsInner` - """ - model = PostRiceRequestCropsInner() - if include_optional: - return PostRiceRequestCropsInner( - id = '', - state = 'nsw', - average_rice_yield = 1.337, - area_sown = 1.337, - growing_season_days = 1.337, - water_regime_type = 'Upland', - water_regime_sub_type = 'Continuously flooded', - rice_preseason_flooding_period = 'Non flooded pre-season < 180 days', - urea_application = 1.337, - non_urea_nitrogen = 1.337, - urea_ammonium_nitrate = 1.337, - phosphorus_application = 1.337, - potassium_application = 1.337, - sulfur_application = 1.337, - fraction_of_annual_crop_burnt = 0, - herbicide_use = 1.337, - glyphosate_other_herbicide_use = 1.337, - electricity_allocation = 0, - limestone = 1.337, - limestone_fraction = 1.337, - diesel_use = 1.337, - petrol_use = 1.337, - lpg = 1.337 - ) - else: - return PostRiceRequestCropsInner( - state = 'nsw', - average_rice_yield = 1.337, - area_sown = 1.337, - growing_season_days = 1.337, - water_regime_type = 'Upland', - water_regime_sub_type = 'Continuously flooded', - rice_preseason_flooding_period = 'Non flooded pre-season < 180 days', - urea_application = 1.337, - non_urea_nitrogen = 1.337, - urea_ammonium_nitrate = 1.337, - phosphorus_application = 1.337, - potassium_application = 1.337, - sulfur_application = 1.337, - fraction_of_annual_crop_burnt = 0, - herbicide_use = 1.337, - glyphosate_other_herbicide_use = 1.337, - electricity_allocation = 0, - limestone = 1.337, - limestone_fraction = 1.337, - diesel_use = 1.337, - petrol_use = 1.337, - lpg = 1.337, - ) - """ - - def testPostRiceRequestCropsInner(self): - """Test PostRiceRequestCropsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep200_response.py b/examples/python-api-client/api-client/test/test_post_sheep200_response.py deleted file mode 100644 index 299d9b97..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheep200_response.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheep200_response import PostSheep200Response - -class TestPostSheep200Response(unittest.TestCase): - """PostSheep200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheep200Response: - """Test PostSheep200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheep200Response` - """ - model = PostSheep200Response() - if include_optional: - return PostSheep200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = { - 'key' : null - } - ) - else: - return PostSheep200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - ) - """ - - def testPostSheep200Response(self): - """Test PostSheep200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner.py deleted file mode 100644 index 1f9cc6b3..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheep200_response_intermediate_inner import PostSheep200ResponseIntermediateInner - -class TestPostSheep200ResponseIntermediateInner(unittest.TestCase): - """PostSheep200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheep200ResponseIntermediateInner: - """Test PostSheep200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheep200ResponseIntermediateInner` - """ - model = PostSheep200ResponseIntermediateInner() - if include_optional: - return PostSheep200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - intensities = { - 'key' : null - }, - net = { - 'key' : null - } - ) - else: - return PostSheep200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - ) - """ - - def testPostSheep200ResponseIntermediateInner(self): - """Test PostSheep200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner_intensities.py deleted file mode 100644 index c091979d..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheep200_response_intermediate_inner_intensities.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheep200_response_intermediate_inner_intensities import PostSheep200ResponseIntermediateInnerIntensities - -class TestPostSheep200ResponseIntermediateInnerIntensities(unittest.TestCase): - """PostSheep200ResponseIntermediateInnerIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheep200ResponseIntermediateInnerIntensities: - """Test PostSheep200ResponseIntermediateInnerIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheep200ResponseIntermediateInnerIntensities` - """ - model = PostSheep200ResponseIntermediateInnerIntensities() - if include_optional: - return PostSheep200ResponseIntermediateInnerIntensities( - wool_produced_kg = 1.337, - sheep_meat_produced_kg = 1.337, - wool_including_sequestration = 1.337, - wool_excluding_sequestration = 1.337, - sheep_meat_breeding_including_sequestration = 1.337, - sheep_meat_breeding_excluding_sequestration = 1.337 - ) - else: - return PostSheep200ResponseIntermediateInnerIntensities( - wool_produced_kg = 1.337, - sheep_meat_produced_kg = 1.337, - wool_including_sequestration = 1.337, - wool_excluding_sequestration = 1.337, - sheep_meat_breeding_including_sequestration = 1.337, - sheep_meat_breeding_excluding_sequestration = 1.337, - ) - """ - - def testPostSheep200ResponseIntermediateInnerIntensities(self): - """Test PostSheep200ResponseIntermediateInnerIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep200_response_net.py b/examples/python-api-client/api-client/test/test_post_sheep200_response_net.py deleted file mode 100644 index 84546de3..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheep200_response_net.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheep200_response_net import PostSheep200ResponseNet - -class TestPostSheep200ResponseNet(unittest.TestCase): - """PostSheep200ResponseNet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheep200ResponseNet: - """Test PostSheep200ResponseNet - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheep200ResponseNet` - """ - model = PostSheep200ResponseNet() - if include_optional: - return PostSheep200ResponseNet( - total = 1.337, - sheep = 1.337 - ) - else: - return PostSheep200ResponseNet( - total = 1.337, - sheep = 1.337, - ) - """ - - def testPostSheep200ResponseNet(self): - """Test PostSheep200ResponseNet""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request.py b/examples/python-api-client/api-client/test/test_post_sheep_request.py deleted file mode 100644 index 5ad1cfe6..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheep_request.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheep_request import PostSheepRequest - -class TestPostSheepRequest(unittest.TestCase): - """PostSheepRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepRequest: - """Test PostSheepRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepRequest` - """ - model = PostSheepRequest() - if include_optional: - return PostSheepRequest( - state = 'nsw', - north_of_tropic_of_capricorn = True, - rainfall_above600 = True, - sheep = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostSheepRequest( - state = 'nsw', - north_of_tropic_of_capricorn = True, - rainfall_above600 = True, - sheep = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostSheepRequest(self): - """Test PostSheepRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner.py deleted file mode 100644 index 570c4f7c..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheep_request_sheep_inner import PostSheepRequestSheepInner - -class TestPostSheepRequestSheepInner(unittest.TestCase): - """PostSheepRequestSheepInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepRequestSheepInner: - """Test PostSheepRequestSheepInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepRequestSheepInner` - """ - model = PostSheepRequestSheepInner() - if include_optional: - return PostSheepRequestSheepInner( - id = '', - classes = { - 'key' : null - }, - limestone = 1.337, - limestone_fraction = 1.337, - fertiliser = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - mineral_supplementation = { - 'key' : null - }, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - grain_feed = 1.337, - hay_feed = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - merino_percent = 1.337, - ewes_lambing = { - 'key' : null - }, - seasonal_lambing = { - 'key' : null - } - ) - else: - return PostSheepRequestSheepInner( - classes = { - 'key' : null - }, - limestone = 1.337, - limestone_fraction = 1.337, - fertiliser = { - 'key' : null - }, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - mineral_supplementation = { - 'key' : null - }, - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - grain_feed = 1.337, - hay_feed = 1.337, - herbicide = 1.337, - herbicide_other = 1.337, - merino_percent = 1.337, - ewes_lambing = { - 'key' : null - }, - seasonal_lambing = { - 'key' : null - }, - ) - """ - - def testPostSheepRequestSheepInner(self): - """Test PostSheepRequestSheepInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes.py deleted file mode 100644 index edc74267..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheep_request_sheep_inner_classes import PostSheepRequestSheepInnerClasses - -class TestPostSheepRequestSheepInnerClasses(unittest.TestCase): - """PostSheepRequestSheepInnerClasses unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepRequestSheepInnerClasses: - """Test PostSheepRequestSheepInnerClasses - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepRequestSheepInnerClasses` - """ - model = PostSheepRequestSheepInnerClasses() - if include_optional: - return PostSheepRequestSheepInnerClasses( - rams = { - 'key' : null - }, - trade_rams = { - 'key' : null - }, - wethers = { - 'key' : null - }, - trade_wethers = { - 'key' : null - }, - maiden_breeding_ewes = { - 'key' : null - }, - trade_maiden_breeding_ewes = { - 'key' : null - }, - breeding_ewes = { - 'key' : null - }, - trade_breeding_ewes = { - 'key' : null - }, - other_ewes = { - 'key' : null - }, - trade_other_ewes = { - 'key' : null - }, - ewe_lambs = { - 'key' : null - }, - trade_ewe_lambs = { - 'key' : null - }, - wether_lambs = { - 'key' : null - }, - trade_wether_lambs = { - 'key' : null - }, - trade_ewes = { - 'key' : null - }, - trade_lambs_and_hoggets = { - 'key' : null - } - ) - else: - return PostSheepRequestSheepInnerClasses( - breeding_ewes = { - 'key' : null - }, - ewe_lambs = { - 'key' : null - }, - wether_lambs = { - 'key' : null - }, - ) - """ - - def testPostSheepRequestSheepInnerClasses(self): - """Test PostSheepRequestSheepInnerClasses""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams.py deleted file mode 100644 index 0fd9f9cb..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheep_request_sheep_inner_classes_rams import PostSheepRequestSheepInnerClassesRams - -class TestPostSheepRequestSheepInnerClassesRams(unittest.TestCase): - """PostSheepRequestSheepInnerClassesRams unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepRequestSheepInnerClassesRams: - """Test PostSheepRequestSheepInnerClassesRams - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepRequestSheepInnerClassesRams` - """ - model = PostSheepRequestSheepInnerClassesRams() - if include_optional: - return PostSheepRequestSheepInnerClassesRams( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostSheepRequestSheepInnerClassesRams( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostSheepRequestSheepInnerClassesRams(self): - """Test PostSheepRequestSheepInnerClassesRams""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams_autumn.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams_autumn.py deleted file mode 100644 index 58353d1e..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_rams_autumn.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheep_request_sheep_inner_classes_rams_autumn import PostSheepRequestSheepInnerClassesRamsAutumn - -class TestPostSheepRequestSheepInnerClassesRamsAutumn(unittest.TestCase): - """PostSheepRequestSheepInnerClassesRamsAutumn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepRequestSheepInnerClassesRamsAutumn: - """Test PostSheepRequestSheepInnerClassesRamsAutumn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepRequestSheepInnerClassesRamsAutumn` - """ - model = PostSheepRequestSheepInnerClassesRamsAutumn() - if include_optional: - return PostSheepRequestSheepInnerClassesRamsAutumn( - head = 1.337, - liveweight = 1.337, - liveweight_gain = 1.337, - crude_protein = 1.337, - dry_matter_digestibility = 1.337, - feed_availability = 1.337 - ) - else: - return PostSheepRequestSheepInnerClassesRamsAutumn( - head = 1.337, - liveweight = 1.337, - liveweight_gain = 1.337, - ) - """ - - def testPostSheepRequestSheepInnerClassesRamsAutumn(self): - """Test PostSheepRequestSheepInnerClassesRamsAutumn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_ewes.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_ewes.py deleted file mode 100644 index 1e8c22e8..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_ewes.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheep_request_sheep_inner_classes_trade_ewes import PostSheepRequestSheepInnerClassesTradeEwes - -class TestPostSheepRequestSheepInnerClassesTradeEwes(unittest.TestCase): - """PostSheepRequestSheepInnerClassesTradeEwes unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepRequestSheepInnerClassesTradeEwes: - """Test PostSheepRequestSheepInnerClassesTradeEwes - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepRequestSheepInnerClassesTradeEwes` - """ - model = PostSheepRequestSheepInnerClassesTradeEwes() - if include_optional: - return PostSheepRequestSheepInnerClassesTradeEwes( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostSheepRequestSheepInnerClassesTradeEwes( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostSheepRequestSheepInnerClassesTradeEwes(self): - """Test PostSheepRequestSheepInnerClassesTradeEwes""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py deleted file mode 100644 index 3b21592a..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheep_request_sheep_inner_classes_trade_lambs_and_hoggets import PostSheepRequestSheepInnerClassesTradeLambsAndHoggets - -class TestPostSheepRequestSheepInnerClassesTradeLambsAndHoggets(unittest.TestCase): - """PostSheepRequestSheepInnerClassesTradeLambsAndHoggets unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepRequestSheepInnerClassesTradeLambsAndHoggets: - """Test PostSheepRequestSheepInnerClassesTradeLambsAndHoggets - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepRequestSheepInnerClassesTradeLambsAndHoggets` - """ - model = PostSheepRequestSheepInnerClassesTradeLambsAndHoggets() - if include_optional: - return PostSheepRequestSheepInnerClassesTradeLambsAndHoggets( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - head_purchased = 1.337, - purchased_weight = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - purchases = [ - { - 'key' : null - } - ] - ) - else: - return PostSheepRequestSheepInnerClassesTradeLambsAndHoggets( - autumn = { - 'key' : null - }, - winter = { - 'key' : null - }, - spring = { - 'key' : null - }, - summer = { - 'key' : null - }, - head_shorn = 1.337, - wool_shorn = 1.337, - clean_wool_yield = 1.337, - head_sold = 1.337, - sale_weight = 1.337, - ) - """ - - def testPostSheepRequestSheepInnerClassesTradeLambsAndHoggets(self): - """Test PostSheepRequestSheepInnerClassesTradeLambsAndHoggets""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_ewes_lambing.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_ewes_lambing.py deleted file mode 100644 index 8bbf0d18..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_ewes_lambing.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheep_request_sheep_inner_ewes_lambing import PostSheepRequestSheepInnerEwesLambing - -class TestPostSheepRequestSheepInnerEwesLambing(unittest.TestCase): - """PostSheepRequestSheepInnerEwesLambing unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepRequestSheepInnerEwesLambing: - """Test PostSheepRequestSheepInnerEwesLambing - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepRequestSheepInnerEwesLambing` - """ - model = PostSheepRequestSheepInnerEwesLambing() - if include_optional: - return PostSheepRequestSheepInnerEwesLambing( - autumn = 0, - winter = 0, - spring = 0, - summer = 0 - ) - else: - return PostSheepRequestSheepInnerEwesLambing( - autumn = 0, - winter = 0, - spring = 0, - summer = 0, - ) - """ - - def testPostSheepRequestSheepInnerEwesLambing(self): - """Test PostSheepRequestSheepInnerEwesLambing""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_seasonal_lambing.py b/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_seasonal_lambing.py deleted file mode 100644 index a6c163ed..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheep_request_sheep_inner_seasonal_lambing.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheep_request_sheep_inner_seasonal_lambing import PostSheepRequestSheepInnerSeasonalLambing - -class TestPostSheepRequestSheepInnerSeasonalLambing(unittest.TestCase): - """PostSheepRequestSheepInnerSeasonalLambing unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepRequestSheepInnerSeasonalLambing: - """Test PostSheepRequestSheepInnerSeasonalLambing - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepRequestSheepInnerSeasonalLambing` - """ - model = PostSheepRequestSheepInnerSeasonalLambing() - if include_optional: - return PostSheepRequestSheepInnerSeasonalLambing( - autumn = 0, - winter = 0, - spring = 0, - summer = 0 - ) - else: - return PostSheepRequestSheepInnerSeasonalLambing( - autumn = 0, - winter = 0, - spring = 0, - summer = 0, - ) - """ - - def testPostSheepRequestSheepInnerSeasonalLambing(self): - """Test PostSheepRequestSheepInnerSeasonalLambing""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheep_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_sheep_request_vegetation_inner.py deleted file mode 100644 index 1cd26e14..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheep_request_vegetation_inner.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheep_request_vegetation_inner import PostSheepRequestVegetationInner - -class TestPostSheepRequestVegetationInner(unittest.TestCase): - """PostSheepRequestVegetationInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepRequestVegetationInner: - """Test PostSheepRequestVegetationInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepRequestVegetationInner` - """ - model = PostSheepRequestVegetationInner() - if include_optional: - return PostSheepRequestVegetationInner( - vegetation = { - 'key' : null - }, - sheep_proportion = [ - 1.337 - ] - ) - else: - return PostSheepRequestVegetationInner( - vegetation = { - 'key' : null - }, - sheep_proportion = [ - 1.337 - ], - ) - """ - - def testPostSheepRequestVegetationInner(self): - """Test PostSheepRequestVegetationInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response.py b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response.py deleted file mode 100644 index 3551a07d..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheepbeef200_response import PostSheepbeef200Response - -class TestPostSheepbeef200Response(unittest.TestCase): - """PostSheepbeef200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepbeef200Response: - """Test PostSheepbeef200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepbeef200Response` - """ - model = PostSheepbeef200Response() - if include_optional: - return PostSheepbeef200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = { - 'key' : null - }, - intermediate_beef = [ - { - 'key' : null - } - ], - intermediate_sheep = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = { - 'key' : null - } - ) - else: - return PostSheepbeef200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = { - 'key' : null - }, - intermediate_beef = [ - { - 'key' : null - } - ], - intermediate_sheep = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - ) - """ - - def testPostSheepbeef200Response(self): - """Test PostSheepbeef200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intensities.py deleted file mode 100644 index 78fe192e..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intensities.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheepbeef200_response_intensities import PostSheepbeef200ResponseIntensities - -class TestPostSheepbeef200ResponseIntensities(unittest.TestCase): - """PostSheepbeef200ResponseIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepbeef200ResponseIntensities: - """Test PostSheepbeef200ResponseIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepbeef200ResponseIntensities` - """ - model = PostSheepbeef200ResponseIntensities() - if include_optional: - return PostSheepbeef200ResponseIntensities( - beef_including_sequestration = 1.337, - beef_excluding_sequestration = 1.337, - liveweight_beef_produced_kg = 1.337, - wool_including_sequestration = 1.337, - wool_excluding_sequestration = 1.337, - sheep_meat_breeding_including_sequestration = 1.337, - sheep_meat_breeding_excluding_sequestration = 1.337, - wool_produced_kg = 1.337, - sheep_meat_produced_kg = 1.337 - ) - else: - return PostSheepbeef200ResponseIntensities( - beef_including_sequestration = 1.337, - beef_excluding_sequestration = 1.337, - liveweight_beef_produced_kg = 1.337, - wool_including_sequestration = 1.337, - wool_excluding_sequestration = 1.337, - sheep_meat_breeding_including_sequestration = 1.337, - sheep_meat_breeding_excluding_sequestration = 1.337, - wool_produced_kg = 1.337, - sheep_meat_produced_kg = 1.337, - ) - """ - - def testPostSheepbeef200ResponseIntensities(self): - """Test PostSheepbeef200ResponseIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate.py b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate.py deleted file mode 100644 index 9339ad89..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheepbeef200_response_intermediate import PostSheepbeef200ResponseIntermediate - -class TestPostSheepbeef200ResponseIntermediate(unittest.TestCase): - """PostSheepbeef200ResponseIntermediate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepbeef200ResponseIntermediate: - """Test PostSheepbeef200ResponseIntermediate - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepbeef200ResponseIntermediate` - """ - model = PostSheepbeef200ResponseIntermediate() - if include_optional: - return PostSheepbeef200ResponseIntermediate( - beef = { - 'key' : null - }, - sheep = { - 'key' : null - } - ) - else: - return PostSheepbeef200ResponseIntermediate( - beef = { - 'key' : null - }, - sheep = { - 'key' : null - }, - ) - """ - - def testPostSheepbeef200ResponseIntermediate(self): - """Test PostSheepbeef200ResponseIntermediate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_beef.py b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_beef.py deleted file mode 100644 index 01c57f34..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_beef.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheepbeef200_response_intermediate_beef import PostSheepbeef200ResponseIntermediateBeef - -class TestPostSheepbeef200ResponseIntermediateBeef(unittest.TestCase): - """PostSheepbeef200ResponseIntermediateBeef unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepbeef200ResponseIntermediateBeef: - """Test PostSheepbeef200ResponseIntermediateBeef - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepbeef200ResponseIntermediateBeef` - """ - model = PostSheepbeef200ResponseIntermediateBeef() - if include_optional: - return PostSheepbeef200ResponseIntermediateBeef( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - net = { - 'key' : null - }, - intensities = { - 'key' : null - } - ) - else: - return PostSheepbeef200ResponseIntermediateBeef( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - ) - """ - - def testPostSheepbeef200ResponseIntermediateBeef(self): - """Test PostSheepbeef200ResponseIntermediateBeef""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_sheep.py b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_sheep.py deleted file mode 100644 index 4796f532..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_intermediate_sheep.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheepbeef200_response_intermediate_sheep import PostSheepbeef200ResponseIntermediateSheep - -class TestPostSheepbeef200ResponseIntermediateSheep(unittest.TestCase): - """PostSheepbeef200ResponseIntermediateSheep unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepbeef200ResponseIntermediateSheep: - """Test PostSheepbeef200ResponseIntermediateSheep - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepbeef200ResponseIntermediateSheep` - """ - model = PostSheepbeef200ResponseIntermediateSheep() - if include_optional: - return PostSheepbeef200ResponseIntermediateSheep( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - net = { - 'key' : null - }, - intensities = { - 'key' : null - } - ) - else: - return PostSheepbeef200ResponseIntermediateSheep( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - ) - """ - - def testPostSheepbeef200ResponseIntermediateSheep(self): - """Test PostSheepbeef200ResponseIntermediateSheep""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_net.py b/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_net.py deleted file mode 100644 index 3e6fcf84..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheepbeef200_response_net.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheepbeef200_response_net import PostSheepbeef200ResponseNet - -class TestPostSheepbeef200ResponseNet(unittest.TestCase): - """PostSheepbeef200ResponseNet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepbeef200ResponseNet: - """Test PostSheepbeef200ResponseNet - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepbeef200ResponseNet` - """ - model = PostSheepbeef200ResponseNet() - if include_optional: - return PostSheepbeef200ResponseNet( - total = 1.337, - beef = 1.337, - sheep = 1.337 - ) - else: - return PostSheepbeef200ResponseNet( - total = 1.337, - beef = 1.337, - sheep = 1.337, - ) - """ - - def testPostSheepbeef200ResponseNet(self): - """Test PostSheepbeef200ResponseNet""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef_request.py b/examples/python-api-client/api-client/test/test_post_sheepbeef_request.py deleted file mode 100644 index a303b836..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheepbeef_request.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheepbeef_request import PostSheepbeefRequest - -class TestPostSheepbeefRequest(unittest.TestCase): - """PostSheepbeefRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepbeefRequest: - """Test PostSheepbeefRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepbeefRequest` - """ - model = PostSheepbeefRequest() - if include_optional: - return PostSheepbeefRequest( - state = 'nsw', - north_of_tropic_of_capricorn = True, - rainfall_above600 = True, - beef = [ - { - 'key' : null - } - ], - sheep = [ - { - 'key' : null - } - ], - burning = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostSheepbeefRequest( - state = 'nsw', - north_of_tropic_of_capricorn = True, - rainfall_above600 = True, - beef = [ - { - 'key' : null - } - ], - sheep = [ - { - 'key' : null - } - ], - burning = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostSheepbeefRequest(self): - """Test PostSheepbeefRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sheepbeef_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_sheepbeef_request_vegetation_inner.py deleted file mode 100644 index 1f833ef5..00000000 --- a/examples/python-api-client/api-client/test/test_post_sheepbeef_request_vegetation_inner.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sheepbeef_request_vegetation_inner import PostSheepbeefRequestVegetationInner - -class TestPostSheepbeefRequestVegetationInner(unittest.TestCase): - """PostSheepbeefRequestVegetationInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSheepbeefRequestVegetationInner: - """Test PostSheepbeefRequestVegetationInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSheepbeefRequestVegetationInner` - """ - model = PostSheepbeefRequestVegetationInner() - if include_optional: - return PostSheepbeefRequestVegetationInner( - vegetation = { - 'key' : null - }, - beef_proportion = [ - 1.337 - ], - sheep_proportion = [ - 1.337 - ] - ) - else: - return PostSheepbeefRequestVegetationInner( - vegetation = { - 'key' : null - }, - beef_proportion = [ - 1.337 - ], - sheep_proportion = [ - 1.337 - ], - ) - """ - - def testPostSheepbeefRequestVegetationInner(self): - """Test PostSheepbeefRequestVegetationInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sugar200_response.py b/examples/python-api-client/api-client/test/test_post_sugar200_response.py deleted file mode 100644 index 9761ee1d..00000000 --- a/examples/python-api-client/api-client/test/test_post_sugar200_response.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sugar200_response import PostSugar200Response - -class TestPostSugar200Response(unittest.TestCase): - """PostSugar200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSugar200Response: - """Test PostSugar200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSugar200Response` - """ - model = PostSugar200Response() - if include_optional: - return PostSugar200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = [ - { - 'key' : null - } - ] - ) - else: - return PostSugar200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = [ - { - 'key' : null - } - ], - ) - """ - - def testPostSugar200Response(self): - """Test PostSugar200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner.py deleted file mode 100644 index 759c4311..00000000 --- a/examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sugar200_response_intermediate_inner import PostSugar200ResponseIntermediateInner - -class TestPostSugar200ResponseIntermediateInner(unittest.TestCase): - """PostSugar200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSugar200ResponseIntermediateInner: - """Test PostSugar200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSugar200ResponseIntermediateInner` - """ - model = PostSugar200ResponseIntermediateInner() - if include_optional: - return PostSugar200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - intensities = { - 'key' : null - }, - net = { - 'key' : null - } - ) - else: - return PostSugar200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - ) - """ - - def testPostSugar200ResponseIntermediateInner(self): - """Test PostSugar200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner_intensities.py deleted file mode 100644 index 74ba7a36..00000000 --- a/examples/python-api-client/api-client/test/test_post_sugar200_response_intermediate_inner_intensities.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sugar200_response_intermediate_inner_intensities import PostSugar200ResponseIntermediateInnerIntensities - -class TestPostSugar200ResponseIntermediateInnerIntensities(unittest.TestCase): - """PostSugar200ResponseIntermediateInnerIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSugar200ResponseIntermediateInnerIntensities: - """Test PostSugar200ResponseIntermediateInnerIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSugar200ResponseIntermediateInnerIntensities` - """ - model = PostSugar200ResponseIntermediateInnerIntensities() - if include_optional: - return PostSugar200ResponseIntermediateInnerIntensities( - sugar_excluding_sequestration = 1.337, - sugar_including_sequestration = 1.337, - sugar_produced_kg = 1.337 - ) - else: - return PostSugar200ResponseIntermediateInnerIntensities( - sugar_excluding_sequestration = 1.337, - sugar_including_sequestration = 1.337, - sugar_produced_kg = 1.337, - ) - """ - - def testPostSugar200ResponseIntermediateInnerIntensities(self): - """Test PostSugar200ResponseIntermediateInnerIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sugar_request.py b/examples/python-api-client/api-client/test/test_post_sugar_request.py deleted file mode 100644 index fbf5aeb3..00000000 --- a/examples/python-api-client/api-client/test/test_post_sugar_request.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sugar_request import PostSugarRequest - -class TestPostSugarRequest(unittest.TestCase): - """PostSugarRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSugarRequest: - """Test PostSugarRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSugarRequest` - """ - model = PostSugarRequest() - if include_optional: - return PostSugarRequest( - state = 'nsw', - crops = [ - { - 'key' : null - } - ], - electricity_renewable = 0, - electricity_use = 1.337, - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostSugarRequest( - state = 'nsw', - crops = [ - { - 'key' : null - } - ], - electricity_renewable = 0, - electricity_use = 1.337, - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostSugarRequest(self): - """Test PostSugarRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_sugar_request_crops_inner.py b/examples/python-api-client/api-client/test/test_post_sugar_request_crops_inner.py deleted file mode 100644 index e47335a7..00000000 --- a/examples/python-api-client/api-client/test/test_post_sugar_request_crops_inner.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_sugar_request_crops_inner import PostSugarRequestCropsInner - -class TestPostSugarRequestCropsInner(unittest.TestCase): - """PostSugarRequestCropsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostSugarRequestCropsInner: - """Test PostSugarRequestCropsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostSugarRequestCropsInner` - """ - model = PostSugarRequestCropsInner() - if include_optional: - return PostSugarRequestCropsInner( - id = '', - state = 'nsw', - production_system = 'Non-irrigated crop', - average_cane_yield = 1.337, - percent_milled_cane_yield = 1.337, - area_sown = 1.337, - non_urea_nitrogen = 1.337, - urea_application = 1.337, - urea_ammonium_nitrate = 1.337, - phosphorus_application = 1.337, - potassium_application = 1.337, - sulfur_application = 1.337, - rainfall_above600 = True, - fraction_of_annual_crop_burnt = 1.337, - herbicide_use = 1.337, - glyphosate_other_herbicide_use = 1.337, - electricity_allocation = 1.337, - limestone = 1.337, - limestone_fraction = 1.337, - diesel_use = 1.337, - petrol_use = 1.337, - lpg = 1.337 - ) - else: - return PostSugarRequestCropsInner( - state = 'nsw', - production_system = 'Non-irrigated crop', - average_cane_yield = 1.337, - area_sown = 1.337, - non_urea_nitrogen = 1.337, - urea_application = 1.337, - urea_ammonium_nitrate = 1.337, - phosphorus_application = 1.337, - potassium_application = 1.337, - sulfur_application = 1.337, - rainfall_above600 = True, - fraction_of_annual_crop_burnt = 1.337, - herbicide_use = 1.337, - glyphosate_other_herbicide_use = 1.337, - electricity_allocation = 1.337, - limestone = 1.337, - limestone_fraction = 1.337, - diesel_use = 1.337, - petrol_use = 1.337, - lpg = 1.337, - ) - """ - - def testPostSugarRequestCropsInner(self): - """Test PostSugarRequestCropsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard200_response.py b/examples/python-api-client/api-client/test/test_post_vineyard200_response.py deleted file mode 100644 index 6e3cb02e..00000000 --- a/examples/python-api-client/api-client/test/test_post_vineyard200_response.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_vineyard200_response import PostVineyard200Response - -class TestPostVineyard200Response(unittest.TestCase): - """PostVineyard200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostVineyard200Response: - """Test PostVineyard200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostVineyard200Response` - """ - model = PostVineyard200Response() - if include_optional: - return PostVineyard200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = [ - { - 'key' : null - } - ] - ) - else: - return PostVineyard200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = [ - { - 'key' : null - } - ], - ) - """ - - def testPostVineyard200Response(self): - """Test PostVineyard200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner.py deleted file mode 100644 index 1519eb31..00000000 --- a/examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_vineyard200_response_intermediate_inner import PostVineyard200ResponseIntermediateInner - -class TestPostVineyard200ResponseIntermediateInner(unittest.TestCase): - """PostVineyard200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostVineyard200ResponseIntermediateInner: - """Test PostVineyard200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostVineyard200ResponseIntermediateInner` - """ - model = PostVineyard200ResponseIntermediateInner() - if include_optional: - return PostVineyard200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - intensities = { - 'key' : null - }, - net = { - 'key' : null - } - ) - else: - return PostVineyard200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - carbon_sequestration = 1.337, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - ) - """ - - def testPostVineyard200ResponseIntermediateInner(self): - """Test PostVineyard200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner_intensities.py deleted file mode 100644 index b112a053..00000000 --- a/examples/python-api-client/api-client/test/test_post_vineyard200_response_intermediate_inner_intensities.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_vineyard200_response_intermediate_inner_intensities import PostVineyard200ResponseIntermediateInnerIntensities - -class TestPostVineyard200ResponseIntermediateInnerIntensities(unittest.TestCase): - """PostVineyard200ResponseIntermediateInnerIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostVineyard200ResponseIntermediateInnerIntensities: - """Test PostVineyard200ResponseIntermediateInnerIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostVineyard200ResponseIntermediateInnerIntensities` - """ - model = PostVineyard200ResponseIntermediateInnerIntensities() - if include_optional: - return PostVineyard200ResponseIntermediateInnerIntensities( - vineyards_excluding_sequestration = 1.337, - vineyards_including_sequestration = 1.337, - crop_produced_kg = 1.337 - ) - else: - return PostVineyard200ResponseIntermediateInnerIntensities( - vineyards_excluding_sequestration = 1.337, - vineyards_including_sequestration = 1.337, - crop_produced_kg = 1.337, - ) - """ - - def testPostVineyard200ResponseIntermediateInnerIntensities(self): - """Test PostVineyard200ResponseIntermediateInnerIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard200_response_net.py b/examples/python-api-client/api-client/test/test_post_vineyard200_response_net.py deleted file mode 100644 index 7a6a1a34..00000000 --- a/examples/python-api-client/api-client/test/test_post_vineyard200_response_net.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_vineyard200_response_net import PostVineyard200ResponseNet - -class TestPostVineyard200ResponseNet(unittest.TestCase): - """PostVineyard200ResponseNet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostVineyard200ResponseNet: - """Test PostVineyard200ResponseNet - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostVineyard200ResponseNet` - """ - model = PostVineyard200ResponseNet() - if include_optional: - return PostVineyard200ResponseNet( - total = 1.337, - vineyards = [ - 1.337 - ] - ) - else: - return PostVineyard200ResponseNet( - total = 1.337, - vineyards = [ - 1.337 - ], - ) - """ - - def testPostVineyard200ResponseNet(self): - """Test PostVineyard200ResponseNet""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_vineyard200_response_scope1.py deleted file mode 100644 index b291fbb9..00000000 --- a/examples/python-api-client/api-client/test/test_post_vineyard200_response_scope1.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_vineyard200_response_scope1 import PostVineyard200ResponseScope1 - -class TestPostVineyard200ResponseScope1(unittest.TestCase): - """PostVineyard200ResponseScope1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostVineyard200ResponseScope1: - """Test PostVineyard200ResponseScope1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostVineyard200ResponseScope1` - """ - model = PostVineyard200ResponseScope1() - if include_optional: - return PostVineyard200ResponseScope1( - fuel_co2 = 1.337, - lime_co2 = 1.337, - urea_co2 = 1.337, - waste_water_co2 = 1.337, - composted_solid_waste_co2 = 1.337, - fuel_ch4 = 1.337, - fertiliser_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - crop_residue_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - fuel_n2_o = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337 - ) - else: - return PostVineyard200ResponseScope1( - fuel_co2 = 1.337, - lime_co2 = 1.337, - urea_co2 = 1.337, - waste_water_co2 = 1.337, - composted_solid_waste_co2 = 1.337, - fuel_ch4 = 1.337, - fertiliser_n2_o = 1.337, - atmospheric_deposition_n2_o = 1.337, - crop_residue_n2_o = 1.337, - leaching_and_runoff_n2_o = 1.337, - fuel_n2_o = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total = 1.337, - ) - """ - - def testPostVineyard200ResponseScope1(self): - """Test PostVineyard200ResponseScope1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_vineyard200_response_scope3.py deleted file mode 100644 index 6c9699f5..00000000 --- a/examples/python-api-client/api-client/test/test_post_vineyard200_response_scope3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_vineyard200_response_scope3 import PostVineyard200ResponseScope3 - -class TestPostVineyard200ResponseScope3(unittest.TestCase): - """PostVineyard200ResponseScope3 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostVineyard200ResponseScope3: - """Test PostVineyard200ResponseScope3 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostVineyard200ResponseScope3` - """ - model = PostVineyard200ResponseScope3() - if include_optional: - return PostVineyard200ResponseScope3( - fertiliser = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - lime = 1.337, - commercial_flights = 1.337, - inbound_freight = 1.337, - solid_waste_sent_offsite = 1.337, - outbound_freight = 1.337, - total = 1.337 - ) - else: - return PostVineyard200ResponseScope3( - fertiliser = 1.337, - herbicide = 1.337, - electricity = 1.337, - fuel = 1.337, - lime = 1.337, - commercial_flights = 1.337, - inbound_freight = 1.337, - solid_waste_sent_offsite = 1.337, - outbound_freight = 1.337, - total = 1.337, - ) - """ - - def testPostVineyard200ResponseScope3(self): - """Test PostVineyard200ResponseScope3""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard_request.py b/examples/python-api-client/api-client/test/test_post_vineyard_request.py deleted file mode 100644 index 35a59bc3..00000000 --- a/examples/python-api-client/api-client/test/test_post_vineyard_request.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_vineyard_request import PostVineyardRequest - -class TestPostVineyardRequest(unittest.TestCase): - """PostVineyardRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostVineyardRequest: - """Test PostVineyardRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostVineyardRequest` - """ - model = PostVineyardRequest() - if include_optional: - return PostVineyardRequest( - vineyards = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ] - ) - else: - return PostVineyardRequest( - vineyards = [ - { - 'key' : null - } - ], - vegetation = [ - { - 'key' : null - } - ], - ) - """ - - def testPostVineyardRequest(self): - """Test PostVineyardRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard_request_vegetation_inner.py b/examples/python-api-client/api-client/test/test_post_vineyard_request_vegetation_inner.py deleted file mode 100644 index 2766f4a7..00000000 --- a/examples/python-api-client/api-client/test/test_post_vineyard_request_vegetation_inner.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_vineyard_request_vegetation_inner import PostVineyardRequestVegetationInner - -class TestPostVineyardRequestVegetationInner(unittest.TestCase): - """PostVineyardRequestVegetationInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostVineyardRequestVegetationInner: - """Test PostVineyardRequestVegetationInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostVineyardRequestVegetationInner` - """ - model = PostVineyardRequestVegetationInner() - if include_optional: - return PostVineyardRequestVegetationInner( - vegetation = { - 'key' : null - }, - allocation_to_vineyards = [ - 1.337 - ] - ) - else: - return PostVineyardRequestVegetationInner( - vegetation = { - 'key' : null - }, - allocation_to_vineyards = [ - 1.337 - ], - ) - """ - - def testPostVineyardRequestVegetationInner(self): - """Test PostVineyardRequestVegetationInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_vineyard_request_vineyards_inner.py b/examples/python-api-client/api-client/test/test_post_vineyard_request_vineyards_inner.py deleted file mode 100644 index 399cc533..00000000 --- a/examples/python-api-client/api-client/test/test_post_vineyard_request_vineyards_inner.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_vineyard_request_vineyards_inner import PostVineyardRequestVineyardsInner - -class TestPostVineyardRequestVineyardsInner(unittest.TestCase): - """PostVineyardRequestVineyardsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostVineyardRequestVineyardsInner: - """Test PostVineyardRequestVineyardsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostVineyardRequestVineyardsInner` - """ - model = PostVineyardRequestVineyardsInner() - if include_optional: - return PostVineyardRequestVineyardsInner( - id = '', - state = 'nsw', - rainfall_above600 = True, - irrigated = True, - area_planted = 1.337, - average_yield = 1.337, - non_urea_nitrogen = 1.337, - phosphorus_application = 1.337, - potassium_application = 1.337, - sulfur_application = 1.337, - urea_application = 1.337, - urea_ammonium_nitrate = 1.337, - limestone = 1.337, - limestone_fraction = 1.337, - herbicide_use = 1.337, - glyphosate_other_herbicide_use = 1.337, - electricity_renewable = 0, - electricity_use = 1.337, - electricity_source = 'State Grid', - fuel = { - 'key' : null - }, - fluid_waste = [ - { - 'key' : null - } - ], - solid_waste = { - 'key' : null - }, - inbound_freight = [ - { - 'key' : null - } - ], - outbound_freight = [ - { - 'key' : null - } - ], - total_commercial_flights_km = 1.337 - ) - else: - return PostVineyardRequestVineyardsInner( - state = 'nsw', - rainfall_above600 = True, - irrigated = True, - area_planted = 1.337, - average_yield = 1.337, - non_urea_nitrogen = 1.337, - phosphorus_application = 1.337, - potassium_application = 1.337, - sulfur_application = 1.337, - urea_application = 1.337, - urea_ammonium_nitrate = 1.337, - limestone = 1.337, - limestone_fraction = 1.337, - herbicide_use = 1.337, - glyphosate_other_herbicide_use = 1.337, - electricity_renewable = 0, - electricity_use = 1.337, - electricity_source = 'State Grid', - fuel = { - 'key' : null - }, - fluid_waste = [ - { - 'key' : null - } - ], - solid_waste = { - 'key' : null - }, - inbound_freight = [ - { - 'key' : null - } - ], - outbound_freight = [ - { - 'key' : null - } - ], - total_commercial_flights_km = 1.337, - ) - """ - - def testPostVineyardRequestVineyardsInner(self): - """Test PostVineyardRequestVineyardsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response.py b/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response.py deleted file mode 100644 index 704a589a..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildcatchfishery200_response import PostWildcatchfishery200Response - -class TestPostWildcatchfishery200Response(unittest.TestCase): - """PostWildcatchfishery200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildcatchfishery200Response: - """Test PostWildcatchfishery200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildcatchfishery200Response` - """ - model = PostWildcatchfishery200Response() - if include_optional: - return PostWildcatchfishery200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - purchased_offsets = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ] - ) - else: - return PostWildcatchfishery200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - purchased_offsets = { - 'key' : null - }, - net = { - 'key' : null - }, - intensities = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - ) - """ - - def testPostWildcatchfishery200Response(self): - """Test PostWildcatchfishery200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intensities.py b/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intensities.py deleted file mode 100644 index 11471467..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intensities.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildcatchfishery200_response_intensities import PostWildcatchfishery200ResponseIntensities - -class TestPostWildcatchfishery200ResponseIntensities(unittest.TestCase): - """PostWildcatchfishery200ResponseIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildcatchfishery200ResponseIntensities: - """Test PostWildcatchfishery200ResponseIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildcatchfishery200ResponseIntensities` - """ - model = PostWildcatchfishery200ResponseIntensities() - if include_optional: - return PostWildcatchfishery200ResponseIntensities( - total_harvest_weight_kg = 1.337, - wild_catch_fishery_excluding_carbon_offsets = 1.337, - wild_catch_fishery_including_carbon_offsets = 1.337 - ) - else: - return PostWildcatchfishery200ResponseIntensities( - total_harvest_weight_kg = 1.337, - wild_catch_fishery_excluding_carbon_offsets = 1.337, - wild_catch_fishery_including_carbon_offsets = 1.337, - ) - """ - - def testPostWildcatchfishery200ResponseIntensities(self): - """Test PostWildcatchfishery200ResponseIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intermediate_inner.py deleted file mode 100644 index ccd2dcc5..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_intermediate_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildcatchfishery200_response_intermediate_inner import PostWildcatchfishery200ResponseIntermediateInner - -class TestPostWildcatchfishery200ResponseIntermediateInner(unittest.TestCase): - """PostWildcatchfishery200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildcatchfishery200ResponseIntermediateInner: - """Test PostWildcatchfishery200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildcatchfishery200ResponseIntermediateInner` - """ - model = PostWildcatchfishery200ResponseIntermediateInner() - if include_optional: - return PostWildcatchfishery200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - } - ) - else: - return PostWildcatchfishery200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - carbon_sequestration = { - 'key' : null - }, - ) - """ - - def testPostWildcatchfishery200ResponseIntermediateInner(self): - """Test PostWildcatchfishery200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_scope1.py deleted file mode 100644 index caf466ee..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildcatchfishery200_response_scope1.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildcatchfishery200_response_scope1 import PostWildcatchfishery200ResponseScope1 - -class TestPostWildcatchfishery200ResponseScope1(unittest.TestCase): - """PostWildcatchfishery200ResponseScope1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildcatchfishery200ResponseScope1: - """Test PostWildcatchfishery200ResponseScope1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildcatchfishery200ResponseScope1` - """ - model = PostWildcatchfishery200ResponseScope1() - if include_optional: - return PostWildcatchfishery200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - waste_water_co2 = 1.337, - composted_solid_waste_co2 = 1.337, - hfcs_refrigerant_leakage = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total_hfcs = 1.337, - total = 1.337 - ) - else: - return PostWildcatchfishery200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - waste_water_co2 = 1.337, - composted_solid_waste_co2 = 1.337, - hfcs_refrigerant_leakage = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total_hfcs = 1.337, - total = 1.337, - ) - """ - - def testPostWildcatchfishery200ResponseScope1(self): - """Test PostWildcatchfishery200ResponseScope1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request.py b/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request.py deleted file mode 100644 index 7f296876..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildcatchfishery_request import PostWildcatchfisheryRequest - -class TestPostWildcatchfisheryRequest(unittest.TestCase): - """PostWildcatchfisheryRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildcatchfisheryRequest: - """Test PostWildcatchfisheryRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildcatchfisheryRequest` - """ - model = PostWildcatchfisheryRequest() - if include_optional: - return PostWildcatchfisheryRequest( - enterprises = [ - { - 'key' : null - } - ] - ) - else: - return PostWildcatchfisheryRequest( - enterprises = [ - { - 'key' : null - } - ], - ) - """ - - def testPostWildcatchfisheryRequest(self): - """Test PostWildcatchfisheryRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner.py b/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner.py deleted file mode 100644 index d32aad60..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildcatchfishery_request_enterprises_inner import PostWildcatchfisheryRequestEnterprisesInner - -class TestPostWildcatchfisheryRequestEnterprisesInner(unittest.TestCase): - """PostWildcatchfisheryRequestEnterprisesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildcatchfisheryRequestEnterprisesInner: - """Test PostWildcatchfisheryRequestEnterprisesInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildcatchfisheryRequestEnterprisesInner` - """ - model = PostWildcatchfisheryRequestEnterprisesInner() - if include_optional: - return PostWildcatchfisheryRequestEnterprisesInner( - id = '', - state = 'nsw', - production_system = 'Abalone', - total_harvest_kg = 1.337, - refrigerants = [ - openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner.post_horticulture_request_crops_inner_refrigerants_inner( - refrigerant = 'HFC-23', - charge_size = 1.337, ) - ], - bait = [ - { - 'key' : null - } - ], - custom_bait = [ - { - 'key' : null - } - ], - inbound_freight = [ - { - 'key' : null - } - ], - outbound_freight = [ - { - 'key' : null - } - ], - total_commercial_flights_km = 1.337, - electricity_renewable = 0, - electricity_use = 1.337, - electricity_source = 'State Grid', - fuel = { - 'key' : null - }, - fluid_waste = [ - { - 'key' : null - } - ], - solid_waste = { - 'key' : null - }, - carbon_offsets = 1.337 - ) - else: - return PostWildcatchfisheryRequestEnterprisesInner( - state = 'nsw', - production_system = 'Abalone', - total_harvest_kg = 1.337, - refrigerants = [ - openapi_client.models.post_horticulture_request_crops_inner_refrigerants_inner.post_horticulture_request_crops_inner_refrigerants_inner( - refrigerant = 'HFC-23', - charge_size = 1.337, ) - ], - bait = [ - { - 'key' : null - } - ], - custom_bait = [ - { - 'key' : null - } - ], - inbound_freight = [ - { - 'key' : null - } - ], - outbound_freight = [ - { - 'key' : null - } - ], - total_commercial_flights_km = 1.337, - electricity_renewable = 0, - electricity_use = 1.337, - electricity_source = 'State Grid', - fuel = { - 'key' : null - }, - fluid_waste = [ - { - 'key' : null - } - ], - solid_waste = { - 'key' : null - }, - ) - """ - - def testPostWildcatchfisheryRequestEnterprisesInner(self): - """Test PostWildcatchfisheryRequestEnterprisesInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner_bait_inner.py b/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner_bait_inner.py deleted file mode 100644 index 4ac835fc..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildcatchfishery_request_enterprises_inner_bait_inner.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildcatchfishery_request_enterprises_inner_bait_inner import PostWildcatchfisheryRequestEnterprisesInnerBaitInner - -class TestPostWildcatchfisheryRequestEnterprisesInnerBaitInner(unittest.TestCase): - """PostWildcatchfisheryRequestEnterprisesInnerBaitInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildcatchfisheryRequestEnterprisesInnerBaitInner: - """Test PostWildcatchfisheryRequestEnterprisesInnerBaitInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildcatchfisheryRequestEnterprisesInnerBaitInner` - """ - model = PostWildcatchfisheryRequestEnterprisesInnerBaitInner() - if include_optional: - return PostWildcatchfisheryRequestEnterprisesInnerBaitInner( - type = 'Fish Frames', - purchased_tonnes = 1.337, - additional_ingredients = 0, - emissions_intensity = 1.337 - ) - else: - return PostWildcatchfisheryRequestEnterprisesInnerBaitInner( - type = 'Fish Frames', - purchased_tonnes = 1.337, - additional_ingredients = 0, - emissions_intensity = 1.337, - ) - """ - - def testPostWildcatchfisheryRequestEnterprisesInnerBaitInner(self): - """Test PostWildcatchfisheryRequestEnterprisesInnerBaitInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response.py deleted file mode 100644 index 23a43d33..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildseafisheries200_response import PostWildseafisheries200Response - -class TestPostWildseafisheries200Response(unittest.TestCase): - """PostWildseafisheries200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildseafisheries200Response: - """Test PostWildseafisheries200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildseafisheries200Response` - """ - model = PostWildseafisheries200Response() - if include_optional: - return PostWildseafisheries200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - purchased_offsets = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = [ - { - 'key' : null - } - ] - ) - else: - return PostWildseafisheries200Response( - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - purchased_offsets = { - 'key' : null - }, - intermediate = [ - { - 'key' : null - } - ], - net = { - 'key' : null - }, - intensities = [ - { - 'key' : null - } - ], - ) - """ - - def testPostWildseafisheries200Response(self): - """Test PostWildseafisheries200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner.py deleted file mode 100644 index 99653bbc..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildseafisheries200_response_intermediate_inner import PostWildseafisheries200ResponseIntermediateInner - -class TestPostWildseafisheries200ResponseIntermediateInner(unittest.TestCase): - """PostWildseafisheries200ResponseIntermediateInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildseafisheries200ResponseIntermediateInner: - """Test PostWildseafisheries200ResponseIntermediateInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildseafisheries200ResponseIntermediateInner` - """ - model = PostWildseafisheries200ResponseIntermediateInner() - if include_optional: - return PostWildseafisheries200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - purchased_offsets = { - 'key' : null - }, - carbon_sequestration = 1.337, - intensities = { - 'key' : null - }, - net = { - 'key' : null - } - ) - else: - return PostWildseafisheries200ResponseIntermediateInner( - id = '', - scope1 = { - 'key' : null - }, - scope2 = { - 'key' : null - }, - scope3 = { - 'key' : null - }, - purchased_offsets = { - 'key' : null - }, - carbon_sequestration = 1.337, - intensities = { - 'key' : null - }, - net = { - 'key' : null - }, - ) - """ - - def testPostWildseafisheries200ResponseIntermediateInner(self): - """Test PostWildseafisheries200ResponseIntermediateInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner_intensities.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner_intensities.py deleted file mode 100644 index c0e3d807..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_intermediate_inner_intensities.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildseafisheries200_response_intermediate_inner_intensities import PostWildseafisheries200ResponseIntermediateInnerIntensities - -class TestPostWildseafisheries200ResponseIntermediateInnerIntensities(unittest.TestCase): - """PostWildseafisheries200ResponseIntermediateInnerIntensities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildseafisheries200ResponseIntermediateInnerIntensities: - """Test PostWildseafisheries200ResponseIntermediateInnerIntensities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildseafisheries200ResponseIntermediateInnerIntensities` - """ - model = PostWildseafisheries200ResponseIntermediateInnerIntensities() - if include_optional: - return PostWildseafisheries200ResponseIntermediateInnerIntensities( - intensity_excluding_carbon_offset = 1.337, - intensity_including_carbon_offset = 1.337, - total_harvest_weight_tonnes = 1.337 - ) - else: - return PostWildseafisheries200ResponseIntermediateInnerIntensities( - intensity_excluding_carbon_offset = 1.337, - intensity_including_carbon_offset = 1.337, - total_harvest_weight_tonnes = 1.337, - ) - """ - - def testPostWildseafisheries200ResponseIntermediateInnerIntensities(self): - """Test PostWildseafisheries200ResponseIntermediateInnerIntensities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope1.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope1.py deleted file mode 100644 index 60e97208..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope1.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildseafisheries200_response_scope1 import PostWildseafisheries200ResponseScope1 - -class TestPostWildseafisheries200ResponseScope1(unittest.TestCase): - """PostWildseafisheries200ResponseScope1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildseafisheries200ResponseScope1: - """Test PostWildseafisheries200ResponseScope1 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildseafisheries200ResponseScope1` - """ - model = PostWildseafisheries200ResponseScope1() - if include_optional: - return PostWildseafisheries200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - hfcs_refrigerant_leakage = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total_hfcs = 1.337, - total = 1.337 - ) - else: - return PostWildseafisheries200ResponseScope1( - fuel_co2 = 1.337, - fuel_ch4 = 1.337, - fuel_n2_o = 1.337, - hfcs_refrigerant_leakage = 1.337, - total_co2 = 1.337, - total_ch4 = 1.337, - total_n2_o = 1.337, - total_hfcs = 1.337, - total = 1.337, - ) - """ - - def testPostWildseafisheries200ResponseScope1(self): - """Test PostWildseafisheries200ResponseScope1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope3.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope3.py deleted file mode 100644 index ac32474b..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildseafisheries200_response_scope3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildseafisheries200_response_scope3 import PostWildseafisheries200ResponseScope3 - -class TestPostWildseafisheries200ResponseScope3(unittest.TestCase): - """PostWildseafisheries200ResponseScope3 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildseafisheries200ResponseScope3: - """Test PostWildseafisheries200ResponseScope3 - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildseafisheries200ResponseScope3` - """ - model = PostWildseafisheries200ResponseScope3() - if include_optional: - return PostWildseafisheries200ResponseScope3( - electricity = 1.337, - fuel = 1.337, - bait = 1.337, - total = 1.337 - ) - else: - return PostWildseafisheries200ResponseScope3( - electricity = 1.337, - fuel = 1.337, - bait = 1.337, - total = 1.337, - ) - """ - - def testPostWildseafisheries200ResponseScope3(self): - """Test PostWildseafisheries200ResponseScope3""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request.py deleted file mode 100644 index 514fdf63..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildseafisheries_request import PostWildseafisheriesRequest - -class TestPostWildseafisheriesRequest(unittest.TestCase): - """PostWildseafisheriesRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildseafisheriesRequest: - """Test PostWildseafisheriesRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildseafisheriesRequest` - """ - model = PostWildseafisheriesRequest() - if include_optional: - return PostWildseafisheriesRequest( - enterprises = [ - { - 'key' : null - } - ] - ) - else: - return PostWildseafisheriesRequest( - enterprises = [ - { - 'key' : null - } - ], - ) - """ - - def testPostWildseafisheriesRequest(self): - """Test PostWildseafisheriesRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner.py deleted file mode 100644 index 593a32d2..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildseafisheries_request_enterprises_inner import PostWildseafisheriesRequestEnterprisesInner - -class TestPostWildseafisheriesRequestEnterprisesInner(unittest.TestCase): - """PostWildseafisheriesRequestEnterprisesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildseafisheriesRequestEnterprisesInner: - """Test PostWildseafisheriesRequestEnterprisesInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildseafisheriesRequestEnterprisesInner` - """ - model = PostWildseafisheriesRequestEnterprisesInner() - if include_optional: - return PostWildseafisheriesRequestEnterprisesInner( - id = '', - state = 'nsw', - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - total_whole_weight_caught = 1.337, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - refrigerants = [ - { - 'key' : null - } - ], - transports = [ - { - 'key' : null - } - ], - flights = [ - { - 'key' : null - } - ], - bait = [ - { - 'key' : null - } - ], - custombait = [ - { - 'key' : null - } - ], - carbon_offset = 1.337 - ) - else: - return PostWildseafisheriesRequestEnterprisesInner( - state = 'nsw', - electricity_source = 'State Grid', - electricity_renewable = 0, - electricity_use = 1.337, - total_whole_weight_caught = 1.337, - diesel = 1.337, - petrol = 1.337, - lpg = 1.337, - refrigerants = [ - { - 'key' : null - } - ], - transports = [ - { - 'key' : null - } - ], - flights = [ - { - 'key' : null - } - ], - bait = [ - { - 'key' : null - } - ], - custombait = [ - { - 'key' : null - } - ], - carbon_offset = 1.337, - ) - """ - - def testPostWildseafisheriesRequestEnterprisesInner(self): - """Test PostWildseafisheriesRequestEnterprisesInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_bait_inner.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_bait_inner.py deleted file mode 100644 index d7764a48..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_bait_inner.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildseafisheries_request_enterprises_inner_bait_inner import PostWildseafisheriesRequestEnterprisesInnerBaitInner - -class TestPostWildseafisheriesRequestEnterprisesInnerBaitInner(unittest.TestCase): - """PostWildseafisheriesRequestEnterprisesInnerBaitInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildseafisheriesRequestEnterprisesInnerBaitInner: - """Test PostWildseafisheriesRequestEnterprisesInnerBaitInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildseafisheriesRequestEnterprisesInnerBaitInner` - """ - model = PostWildseafisheriesRequestEnterprisesInnerBaitInner() - if include_optional: - return PostWildseafisheriesRequestEnterprisesInnerBaitInner( - type = 'Fish Frames', - purchased = 1.337, - additional_ingredient = 0, - emissions_intensity = 1.337 - ) - else: - return PostWildseafisheriesRequestEnterprisesInnerBaitInner( - type = 'Fish Frames', - purchased = 1.337, - additional_ingredient = 0, - emissions_intensity = 1.337, - ) - """ - - def testPostWildseafisheriesRequestEnterprisesInnerBaitInner(self): - """Test PostWildseafisheriesRequestEnterprisesInnerBaitInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_custombait_inner.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_custombait_inner.py deleted file mode 100644 index 0054eca5..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_custombait_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildseafisheries_request_enterprises_inner_custombait_inner import PostWildseafisheriesRequestEnterprisesInnerCustombaitInner - -class TestPostWildseafisheriesRequestEnterprisesInnerCustombaitInner(unittest.TestCase): - """PostWildseafisheriesRequestEnterprisesInnerCustombaitInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildseafisheriesRequestEnterprisesInnerCustombaitInner: - """Test PostWildseafisheriesRequestEnterprisesInnerCustombaitInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildseafisheriesRequestEnterprisesInnerCustombaitInner` - """ - model = PostWildseafisheriesRequestEnterprisesInnerCustombaitInner() - if include_optional: - return PostWildseafisheriesRequestEnterprisesInnerCustombaitInner( - purchased = 1.337, - emissions_intensity = 1.337 - ) - else: - return PostWildseafisheriesRequestEnterprisesInnerCustombaitInner( - purchased = 1.337, - emissions_intensity = 1.337, - ) - """ - - def testPostWildseafisheriesRequestEnterprisesInnerCustombaitInner(self): - """Test PostWildseafisheriesRequestEnterprisesInnerCustombaitInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_flights_inner.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_flights_inner.py deleted file mode 100644 index 054dd804..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_flights_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildseafisheries_request_enterprises_inner_flights_inner import PostWildseafisheriesRequestEnterprisesInnerFlightsInner - -class TestPostWildseafisheriesRequestEnterprisesInnerFlightsInner(unittest.TestCase): - """PostWildseafisheriesRequestEnterprisesInnerFlightsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildseafisheriesRequestEnterprisesInnerFlightsInner: - """Test PostWildseafisheriesRequestEnterprisesInnerFlightsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildseafisheriesRequestEnterprisesInnerFlightsInner` - """ - model = PostWildseafisheriesRequestEnterprisesInnerFlightsInner() - if include_optional: - return PostWildseafisheriesRequestEnterprisesInnerFlightsInner( - commercial_flight_passengers = 1.337, - total_flight_distance = 1.337 - ) - else: - return PostWildseafisheriesRequestEnterprisesInnerFlightsInner( - commercial_flight_passengers = 1.337, - total_flight_distance = 1.337, - ) - """ - - def testPostWildseafisheriesRequestEnterprisesInnerFlightsInner(self): - """Test PostWildseafisheriesRequestEnterprisesInnerFlightsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py deleted file mode 100644 index f9137b1c..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_refrigerants_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildseafisheries_request_enterprises_inner_refrigerants_inner import PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner - -class TestPostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner(unittest.TestCase): - """PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner: - """Test PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner` - """ - model = PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner() - if include_optional: - return PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner( - refrigerant = 'HFC-23', - annual_recharge = 1.337 - ) - else: - return PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner( - refrigerant = 'HFC-23', - annual_recharge = 1.337, - ) - """ - - def testPostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner(self): - """Test PostWildseafisheriesRequestEnterprisesInnerRefrigerantsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_transports_inner.py b/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_transports_inner.py deleted file mode 100644 index b69b92a5..00000000 --- a/examples/python-api-client/api-client/test/test_post_wildseafisheries_request_enterprises_inner_transports_inner.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AIA Calculator API - - Emissions Calculators for various farming activities - - The version of the OpenAPI document: 3.0.0 - Contact: contact@aginnovationaustralia.com.au - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.post_wildseafisheries_request_enterprises_inner_transports_inner import PostWildseafisheriesRequestEnterprisesInnerTransportsInner - -class TestPostWildseafisheriesRequestEnterprisesInnerTransportsInner(unittest.TestCase): - """PostWildseafisheriesRequestEnterprisesInnerTransportsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostWildseafisheriesRequestEnterprisesInnerTransportsInner: - """Test PostWildseafisheriesRequestEnterprisesInnerTransportsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostWildseafisheriesRequestEnterprisesInnerTransportsInner` - """ - model = PostWildseafisheriesRequestEnterprisesInnerTransportsInner() - if include_optional: - return PostWildseafisheriesRequestEnterprisesInnerTransportsInner( - type = 'None', - fuel = 'Gasoline', - distance = 1.337 - ) - else: - return PostWildseafisheriesRequestEnterprisesInnerTransportsInner( - type = 'None', - fuel = 'Gasoline', - distance = 1.337, - ) - """ - - def testPostWildseafisheriesRequestEnterprisesInnerTransportsInner(self): - """Test PostWildseafisheriesRequestEnterprisesInnerTransportsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/examples/python-api-client/generate.sh b/examples/python-api-client/generate.sh index ff49abeb..693e696c 100755 --- a/examples/python-api-client/generate.sh +++ b/examples/python-api-client/generate.sh @@ -2,13 +2,14 @@ set -e API_CLIENT_DIR=api-client API_VERSION=3.0.0 -# rm -rf $API_CLIENT_DIR +rm -rf $API_CLIENT_DIR -# npm -g install @openapitools/openapi-generator-cli -# openapi-generator-cli generate \ -# -i https://d2awla29kxgk7i.cloudfront.net/api/$API_VERSION/openapi.json \ -# -g python \ -# -o $API_CLIENT_DIR +npm -g install @openapitools/openapi-generator-cli +openapi-generator-cli generate \ + -i https://d2awla29kxgk7i.cloudfront.net/api/$API_VERSION/openapi.json \ + -g python \ + -o $API_CLIENT_DIR \ + --global-property apiTests=false,apiDocs=false,modelTests=false,modelDocs=false cp resources/* $API_CLIENT_DIR/ From 04f4de24447042ba5b06dfd91724a0df682109ec Mon Sep 17 00:00:00 2001 From: Eddie Sholl Date: Mon, 27 Oct 2025 14:39:51 +1100 Subject: [PATCH 8/8] Updating generation commands in readme files --- examples/php-api-client/README.md | 3 ++- examples/python-api-client/README.md | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/examples/php-api-client/README.md b/examples/php-api-client/README.md index f11311e9..b89ee1a7 100644 --- a/examples/php-api-client/README.md +++ b/examples/php-api-client/README.md @@ -25,7 +25,8 @@ npm -g install @openapitools/openapi-generator-cli openapi-generator-cli generate \ -i https://d2awla29kxgk7i.cloudfront.net/api/$API_VERSION/openapi.json \ -g php \ - -o $API_CLIENT_DIR + -o $API_CLIENT_DIR \ + --global-property apiTests=false,apiDocs=false,modelTests=false,modelDocs=false ``` For now, the PHP generator does not support all the configuration needed for an mTLS connection out of the box. Several fixes have been applied to the generated code in the `api-client` folder to let this work end to end. Once this [PR](https://github.com/OpenAPITools/openapi-generator/pull/22229) has been merged and released, it will be possible to make requests via mTLS without any code changes to the generated PHP client code needed. diff --git a/examples/python-api-client/README.md b/examples/python-api-client/README.md index f11311e9..a2531a2b 100644 --- a/examples/python-api-client/README.md +++ b/examples/python-api-client/README.md @@ -1,20 +1,20 @@ -# Example PHP API client for the AIA Carbon Calculators API +# Example Python API client for the AIA Carbon Calculators API -This example shows how to call the REST API available at https://emissionscalculator-mtls.production.aiaapi.com/calculator/3.0.0 using a simple PHP script. +This example shows how to call the REST API available at https://emissionscalculator-mtls.production.aiaapi.com/calculator/3.0.0 using a simple Python script. ## Running the example -You can execute a simple request to the `beef` endpoint using the example provided. You just need to update the calls `$config->setCertFile` and `$config->setKeyFile` in [example.php](./api-client/example.php) so they point to your client certificate and key files. This allows the client to authenticate with the endpoint via mTLS. Once that has been done you just need to run: +You can execute a simple request to the `beef` endpoint using the example provided. You just need to update the parameters `cert_file="cert.pem"` and `key_file="key.pem"` in [test_pai.py](./api-client/test_api.py) so they point to your client certificate and key files. This allows the client to authenticate with the endpoint via mTLS. Once that has been done you just need to run: ``` cd api-client -composer install -php example.php +setup_local.sh +run_test.sh ``` ## Code generation -The PHP API client has been generated using the [openapi-generator-cli](https://www.npmjs.com/package/@openapitools/openapi-generator-cli) tool. The generation can be reproduced with a script like: +The Python API client has been generated using the [openapi-generator-cli](https://www.npmjs.com/package/@openapitools/openapi-generator-cli) tool. The generation can be reproduced with a script like: ``` API_CLIENT_DIR=api-client @@ -24,8 +24,9 @@ rm -rf $API_CLIENT_DIR npm -g install @openapitools/openapi-generator-cli openapi-generator-cli generate \ -i https://d2awla29kxgk7i.cloudfront.net/api/$API_VERSION/openapi.json \ - -g php \ - -o $API_CLIENT_DIR + -g python \ + -o $API_CLIENT_DIR \ + --global-property apiTests=false,apiDocs=false,modelTests=false,modelDocs=false ``` -For now, the PHP generator does not support all the configuration needed for an mTLS connection out of the box. Several fixes have been applied to the generated code in the `api-client` folder to let this work end to end. Once this [PR](https://github.com/OpenAPITools/openapi-generator/pull/22229) has been merged and released, it will be possible to make requests via mTLS without any code changes to the generated PHP client code needed. +For now, the Python generator does not support all the configuration needed for an mTLS connection out of the box. Several fixes have been applied to the generated code in the `api-client` folder to let this work end to end. Once this [PR](https://github.com/OpenAPITools/openapi-generator/pull/22229) has been merged and released, it will be possible to make requests via mTLS without any code changes to the generated PHP client code needed.